diff --git a/src/app/api/auth/[...all]/route.ts b/src/app/api/auth/[...all]/route.ts index b1d6891..81724a0 100644 --- a/src/app/api/auth/[...all]/route.ts +++ b/src/app/api/auth/[...all]/route.ts @@ -1,6 +1,4 @@ import { auth } from "@/lib/auth" import { toNextJsHandler } from "better-auth/next-js" -const handler = toNextJsHandler(auth) - -export { handler as GET, handler as POST } \ No newline at end of file +export const { GET, POST } = toNextJsHandler(auth) \ No newline at end of file diff --git a/src/app/api/chat/route.ts b/src/app/api/chat/route.ts index d8342d3..9e1c7c0 100644 --- a/src/app/api/chat/route.ts +++ b/src/app/api/chat/route.ts @@ -9,5 +9,5 @@ export async function POST(req: Request) { messages, }) - return result.toDataStreamResponse() + return result.toTextStreamResponse() } \ No newline at end of file diff --git a/src/app/chat/page.tsx b/src/app/chat/page.tsx index fbe504b..446cd24 100644 --- a/src/app/chat/page.tsx +++ b/src/app/chat/page.tsx @@ -1,6 +1,6 @@ "use client" -import { useChat } from "ai/react" +import { useChat } from "@ai-sdk/react" import { Button } from "@/components/ui/button" import { UserProfile } from "@/components/auth/user-profile" import { useSession } from "@/lib/auth-client" diff --git a/src/app/globals.css b/src/app/globals.css index dc98be7..e46472d 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -45,24 +45,25 @@ :root { --radius: 0.625rem; - --background: oklch(1 0 0); - --foreground: oklch(0.145 0 0); + /* light theme (unused by default since we force dark) */ + --background: oklch(0.99 0 0); + --foreground: oklch(0.14 0 0); --card: oklch(1 0 0); - --card-foreground: oklch(0.145 0 0); + --card-foreground: oklch(0.14 0 0); --popover: oklch(1 0 0); - --popover-foreground: oklch(0.145 0 0); - --primary: oklch(0.205 0 0); - --primary-foreground: oklch(0.985 0 0); + --popover-foreground: oklch(0.14 0 0); + --primary: oklch(0.55 0.16 150); /* emerald-ish */ + --primary-foreground: oklch(0.99 0 0); --secondary: oklch(0.97 0 0); - --secondary-foreground: oklch(0.205 0 0); - --muted: oklch(0.97 0 0); - --muted-foreground: oklch(0.556 0 0); - --accent: oklch(0.97 0 0); - --accent-foreground: oklch(0.205 0 0); + --secondary-foreground: oklch(0.2 0 0); + --muted: oklch(0.95 0 0); + --muted-foreground: oklch(0.56 0 0); + --accent: oklch(0.9 0.08 150); + --accent-foreground: oklch(0.2 0 0); --destructive: oklch(0.577 0.245 27.325); - --border: oklch(0.922 0 0); - --input: oklch(0.922 0 0); - --ring: oklch(0.708 0 0); + --border: oklch(0.9 0 0); + --input: oklch(0.9 0 0); + --ring: oklch(0.7 0 0); --chart-1: oklch(0.646 0.222 41.116); --chart-2: oklch(0.6 0.118 184.704); --chart-3: oklch(0.398 0.07 227.392); @@ -79,37 +80,37 @@ } .dark { - --background: oklch(0.145 0 0); - --foreground: oklch(0.985 0 0); - --card: oklch(0.205 0 0); - --card-foreground: oklch(0.985 0 0); - --popover: oklch(0.205 0 0); - --popover-foreground: oklch(0.985 0 0); - --primary: oklch(0.922 0 0); - --primary-foreground: oklch(0.205 0 0); - --secondary: oklch(0.269 0 0); - --secondary-foreground: oklch(0.985 0 0); - --muted: oklch(0.269 0 0); - --muted-foreground: oklch(0.708 0 0); - --accent: oklch(0.269 0 0); - --accent-foreground: oklch(0.985 0 0); + --background: oklch(0.16 0 0); + --foreground: oklch(0.97 0 0); + --card: oklch(0.2 0 0); + --card-foreground: oklch(0.98 0 0); + --popover: oklch(0.18 0 0); + --popover-foreground: oklch(0.98 0 0); + --primary: oklch(0.7 0.2 150); /* vibrant emerald */ + --primary-foreground: oklch(0.13 0 0); + --secondary: oklch(0.26 0 0); + --secondary-foreground: oklch(0.98 0 0); + --muted: oklch(0.26 0 0); + --muted-foreground: oklch(0.72 0 0); + --accent: oklch(0.32 0.03 150); + --accent-foreground: oklch(0.98 0 0); --destructive: oklch(0.704 0.191 22.216); - --border: oklch(1 0 0 / 10%); - --input: oklch(1 0 0 / 15%); - --ring: oklch(0.556 0 0); - --chart-1: oklch(0.488 0.243 264.376); - --chart-2: oklch(0.696 0.17 162.48); - --chart-3: oklch(0.769 0.188 70.08); - --chart-4: oklch(0.627 0.265 303.9); - --chart-5: oklch(0.645 0.246 16.439); - --sidebar: oklch(0.205 0 0); - --sidebar-foreground: oklch(0.985 0 0); - --sidebar-primary: oklch(0.488 0.243 264.376); - --sidebar-primary-foreground: oklch(0.985 0 0); - --sidebar-accent: oklch(0.269 0 0); - --sidebar-accent-foreground: oklch(0.985 0 0); - --sidebar-border: oklch(1 0 0 / 10%); - --sidebar-ring: oklch(0.556 0 0); + --border: color-mix(in oklab, white 12%, transparent); + --input: color-mix(in oklab, white 16%, transparent); + --ring: oklch(0.72 0.15 150); + --chart-1: oklch(0.7 0.2 150); + --chart-2: oklch(0.66 0.18 170); + --chart-3: oklch(0.62 0.14 190); + --chart-4: oklch(0.75 0.22 130); + --chart-5: oklch(0.68 0.2 110); + --sidebar: oklch(0.18 0 0); + --sidebar-foreground: oklch(0.98 0 0); + --sidebar-primary: oklch(0.7 0.2 150); + --sidebar-primary-foreground: oklch(0.12 0 0); + --sidebar-accent: oklch(0.24 0 0); + --sidebar-accent-foreground: oklch(0.98 0 0); + --sidebar-border: color-mix(in oklab, white 10%, transparent); + --sidebar-ring: oklch(0.72 0.15 150); } @layer base { @@ -118,5 +119,22 @@ } body { @apply bg-background text-foreground; + background-image: + radial-gradient(1200px 600px at 80% -20%, color-mix(in oklab, var(--primary) 10%, transparent) 0%, transparent 60%), + radial-gradient(800px 400px at -10% 20%, color-mix(in oklab, var(--primary) 8%, transparent) 0%, transparent 60%); + background-attachment: fixed; } } + +/* Subtle glow/bloom utilities for accent elements */ +@utility glow { + box-shadow: + 0 0 0.5rem color-mix(in oklab, var(--primary) 55%, transparent), + 0 0 1.25rem color-mix(in oklab, var(--primary) 35%, transparent), + inset 0 0 0.25rem color-mix(in oklab, var(--primary) 25%, transparent); +} + +@utility grain { + background-image: linear-gradient(transparent, transparent), + url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E"); +} diff --git a/src/app/layout.tsx b/src/app/layout.tsx index f7fa87e..0f2c6d3 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -23,7 +23,7 @@ export default function RootLayout({ children: React.ReactNode; }>) { return ( - +
diff --git a/src/app/page.tsx b/src/app/page.tsx index caf1e40..a52e634 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -4,10 +4,14 @@ import { UserProfile } from "@/components/auth/user-profile" export default function Home() { return ( -