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
28 lines
846 B
TypeScript
28 lines
846 B
TypeScript
"use client";
|
|
|
|
import { cn } from "@/lib/utils";
|
|
import { usePanelStore } from "@/lib/stores/panel-store";
|
|
import { ObjectDetail } from "./object-detail";
|
|
import { AIChatPanel } from "@/components/ai";
|
|
|
|
export function RightPanel() {
|
|
const isOpen = usePanelStore((s) => s.isOpen);
|
|
const content = usePanelStore((s) => s.content);
|
|
|
|
return (
|
|
<div
|
|
className={cn(
|
|
"flex h-full shrink-0 overflow-hidden transition-[width] duration-200 ease-out",
|
|
isOpen ? "w-[360px]" : "w-0",
|
|
)}
|
|
aria-hidden={!isOpen}
|
|
>
|
|
{isOpen && content ? (
|
|
<div className="flex h-full w-[360px] flex-col border-l border-border bg-card text-card-foreground">
|
|
{content === "object-detail" && <ObjectDetail />}
|
|
{content === "ai-chat" && <AIChatPanel />}
|
|
</div>
|
|
) : null}
|
|
</div>
|
|
);
|
|
}
|