Skip to content

armgit / alook

Public Imported from GitHub
0

Multi-Agent Collaboration for Team and Friends

feat(web): root and app layouts

Generb49a297479a4
diff --git a/src/web/src/app/(app)/layout.tsx b/src/web/src/app/(app)/layout.tsx
new file mode 100644
index 000000000..c216c3740
--- /dev/null
+++ b/src/web/src/app/(app)/layout.tsx
@@ -0,0 +1,32 @@
+import { redirect } from "next/navigation";
+import { getSession } from "@/lib/session";
+import { AgentProvider } from "@/contexts/agent-context";
+import { AppSidebar } from "@/components/app-sidebar";
+import { GradientBackground } from "@/components/gradient-background";
+
+export default async function AppLayout({
+ children,
+}: {
+ children: React.ReactNode;
+}) {
+ const session = await getSession();
+ if (!session) redirect("/sign-in");
+
+ return (
+ <AgentProvider>
+ <div className="flex h-screen overflow-hidden relative">
+ <GradientBackground />
+
+ {/* Sidebar rail — stable across route changes */}
+ <AppSidebar />
+
+ {/* Floating content panel */}
+ <div className="flex-1 min-w-0 p-2 pl-0">
+ <main className="h-full rounded-xl bg-card/80 backdrop-blur-xl shadow-lg ring-1 ring-border/40 overflow-hidden flex flex-col">
+ {children}
+ </main>
+ </div>
+ </div>
+ </AgentProvider>
+ );
+}
diff --git a/src/web/src/app/layout.tsx b/src/web/src/app/layout.tsx
new file mode 100644
index 000000000..03de78574
--- /dev/null
+++ b/src/web/src/app/layout.tsx
@@ -0,0 +1,50 @@
+import type { Metadata } from "next";
+import { DM_Sans, DM_Mono, Caveat } from "next/font/google";
+import { ThemeProvider } from "@/components/theme-provider";
+import { ToasterProvider } from "@/components/toaster-provider";
+import "./globals.css";
+
+const dmSans = DM_Sans({
+ variable: "--font-dm-sans",
+ subsets: ["latin"],
+ weight: ["400", "500", "600"],
+});
+
+const dmMono = DM_Mono({
+ variable: "--font-dm-mono",
+ subsets: ["latin"],
+ weight: ["400", "500"],
+});
+
+const caveat = Caveat({
+ variable: "--font-caveat",
+ subsets: ["latin"],
+ weight: ["400", "500", "600", "700"],
+});
+
+
+export const metadata: Metadata = {
+ title: "Alook",
+ description: "Chat with AI agents",
+};
+
+export default function RootLayout({
+ children,
+}: Readonly<{
+ children: React.ReactNode;
+}>) {
+ return (
+ <html
+ lang="en"
+ className={`${dmSans.variable} ${dmMono.variable} ${caveat.variable} h-full antialiased`}
+ suppressHydrationWarning
+ >
+ <body className="min-h-full flex flex-col">
+ <ThemeProvider attribute="class" defaultTheme="system" enableSystem>
+ {children}
+ <ToasterProvider />
+ </ThemeProvider>
+ </body>
+ </html>
+ );
+}