Complete architecture for a ClickUp/Notion/Miro-class project management app: - Turborepo monorepo with Next.js 15, TypeScript, PostgreSQL (Drizzle ORM) - Object-centered database schema (everything is an Object: tasks, projects, docs, whiteboards) - NextAuth v5 authentication with credentials + OAuth providers - tRPC v11 API layer with full CRUD for objects, properties, relations, templates, search - Three-panel UI: collapsible sidebar, center content area, push-in right panel - Purple/teal theme with light/dark mode via Shadcn/ui + Tailwind CSS - Multiple views: List, Kanban board (dnd-kit), Table (spreadsheet), Embedded iframe - TipTap rich text editor with slash commands, custom blocks (callout, toggle, mention, embed, divider), AI block - Real-time collaboration via Yjs + Hocuspocus with presence/cursors - tldraw whiteboard with custom shape cards (task, document, project) - MCP server exposing all app data/tools for AI agents - AI chat panel, editor AI slash commands, Cmd+K command palette - Template system with built-in templates (Bug Report, Meeting Notes, Sprint) - Full-text search with result highlighting - Docker Compose for full-stack deployment (web + collab + postgres + redis) Made-with: Cursor
41 lines
1.5 KiB
TypeScript
41 lines
1.5 KiB
TypeScript
"use client";
|
|
|
|
import type { ReactNode } from "react";
|
|
import { useEffect, useState } from "react";
|
|
|
|
import { TooltipProvider } from "@/components/ui/tooltip";
|
|
import { RightPanel } from "@/components/panels/right-panel";
|
|
import { Sidebar } from "@/components/sidebar/sidebar";
|
|
import { CommandPalette } from "@/components/ai/command-palette";
|
|
import { SearchDialog } from "@/components/search";
|
|
|
|
export function AppShell({ children }: { children: ReactNode }) {
|
|
const [searchOpen, setSearchOpen] = useState(false);
|
|
|
|
useEffect(() => {
|
|
const onKey = (e: KeyboardEvent) => {
|
|
const isSlash = e.key === "/" || e.code === "Slash";
|
|
if (!isSlash || !(e.metaKey || e.ctrlKey)) return;
|
|
const t = e.target as HTMLElement | null;
|
|
if (t?.closest?.("[data-search-dialog-ignore-shortcut]")) return;
|
|
e.preventDefault();
|
|
setSearchOpen(true);
|
|
};
|
|
document.addEventListener("keydown", onKey, true);
|
|
return () => document.removeEventListener("keydown", onKey, true);
|
|
}, []);
|
|
|
|
return (
|
|
<TooltipProvider delayDuration={300}>
|
|
<div className="flex h-[100dvh] w-full overflow-hidden bg-background">
|
|
<Sidebar onOpenSearch={() => setSearchOpen(true)} />
|
|
<div className="flex min-w-0 flex-1 flex-col overflow-hidden">
|
|
<main className="flex-1 overflow-auto">{children}</main>
|
|
</div>
|
|
<RightPanel />
|
|
</div>
|
|
<CommandPalette />
|
|
<SearchDialog open={searchOpen} onOpenChange={setSearchOpen} />
|
|
</TooltipProvider>
|
|
);
|
|
}
|