diff --git a/app/(chat)/page.tsx b/app/(chat)/chat/page.tsx
similarity index 97%
rename from app/(chat)/page.tsx
rename to app/(chat)/chat/page.tsx
index 85d31a0..1744349 100644
--- a/app/(chat)/page.tsx
+++ b/app/(chat)/chat/page.tsx
@@ -4,7 +4,7 @@ import { Chat } from '@/components/chat';
import { DEFAULT_CHAT_MODEL } from '@/lib/ai/models';
import { generateUUID } from '@/lib/utils';
import { DataStreamHandler } from '@/components/data-stream-handler';
-import { auth } from '../(auth)/auth';
+import { auth } from '../../(auth)/auth';
import { redirect } from 'next/navigation';
export default async function Page() {
diff --git a/app/page.tsx b/app/page.tsx
new file mode 100644
index 0000000..63a8fb6
--- /dev/null
+++ b/app/page.tsx
@@ -0,0 +1,94 @@
+import Link from 'next/link';
+import { motion } from 'framer-motion';
+import { Button } from '@/components/ui/button';
+import {
+ Card,
+ CardHeader,
+ CardTitle,
+ CardDescription,
+} from '@/components/ui/card';
+import { Briefcase, FileSearch, Users, Database } from 'lucide-react';
+
+const features = [
+ {
+ icon: FileSearch,
+ title: 'Instant Answers',
+ description:
+ 'Ask questions across documents, sheets, and wikis and get answers in seconds.',
+ },
+ {
+ icon: Users,
+ title: 'Team Knowledge',
+ description:
+ 'Share conversations and insights so everyone stays on the same page.',
+ },
+ {
+ icon: Briefcase,
+ title: 'Customer Support',
+ description:
+ 'Resolve customer issues quickly with access to internal guides and history.',
+ },
+ {
+ icon: Database,
+ title: 'Company Data',
+ description:
+ 'Connect your structured data sources to chat with your numbers naturally.',
+ },
+];
+
+export default function LandingPage() {
+ return (
+
+
+
+ Cerch AI
+
+
+ AI that understands your people and company data so you can work
+ smarter.
+
+
+
+
+
+
+
+
+ {features.map((feature, idx) => (
+
+
+
+
+ {feature.title}
+ {feature.description}
+
+
+
+ ))}
+
+
+
+ );
+}
diff --git a/components/app-sidebar.tsx b/components/app-sidebar.tsx
index 5ff972b..ff71267 100644
--- a/components/app-sidebar.tsx
+++ b/components/app-sidebar.tsx
@@ -46,7 +46,7 @@ export function AppSidebar({ user }: { user: User | undefined }) {
className="p-2 h-fit"
onClick={() => {
setOpenMobile(false);
- router.push('/');
+ router.push('/chat');
router.refresh();
}}
>
diff --git a/components/chat-header.tsx b/components/chat-header.tsx
index 14ebe14..51009e0 100644
--- a/components/chat-header.tsx
+++ b/components/chat-header.tsx
@@ -36,7 +36,7 @@ function PureChatHeader({
variant="outline"
className="order-2 md:order-1 md:px-2 px-2 md:h-fit ml-auto md:ml-0"
onClick={() => {
- router.push('/');
+ router.push('/chat');
router.refresh();
}}
>
diff --git a/components/sidebar-history.tsx b/components/sidebar-history.tsx
index 04b441f..ff95254 100644
--- a/components/sidebar-history.tsx
+++ b/components/sidebar-history.tsx
@@ -144,7 +144,7 @@ export function SidebarHistory({ user }: { user: User | undefined }) {
setShowDeleteDialog(false);
if (deleteId === id) {
- router.push('/');
+ router.push('/chat');
}
};
diff --git a/middleware.ts b/middleware.ts
index 200f802..16a4ad7 100644
--- a/middleware.ts
+++ b/middleware.ts
@@ -17,6 +17,10 @@ export async function middleware(request: NextRequest) {
return NextResponse.next();
}
+ if (pathname === '/') {
+ return NextResponse.next();
+ }
+
const token = await getToken({
req: request,
secret: process.env.AUTH_SECRET,
@@ -42,7 +46,7 @@ export async function middleware(request: NextRequest) {
export const config = {
matcher: [
- '/',
+ '/chat',
'/chat/:id',
'/api/:path*',
'/login',