ubiquitous-invention/apps/web/components/panels/panel-header.tsx
Randall Stillwell a508ece6e7 feat: Full project management application scaffold
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
2026-03-26 22:39:16 -05:00

48 lines
1 KiB
TypeScript

"use client";
import { X } from "lucide-react";
import { Button } from "@/components/ui/button";
import { cn } from "@/lib/utils";
interface PanelHeaderProps {
title: string;
description?: string;
onClose: () => void;
className?: string;
}
export function PanelHeader({
title,
description,
onClose,
className,
}: PanelHeaderProps) {
return (
<div
className={cn(
"flex shrink-0 items-start justify-between gap-3 border-b border-border px-4 py-3",
className,
)}
>
<div className="min-w-0 flex-1">
<h2 className="truncate text-sm font-semibold leading-tight text-foreground">
{title}
</h2>
{description ? (
<p className="mt-0.5 text-xs text-muted-foreground">{description}</p>
) : null}
</div>
<Button
type="button"
variant="ghost"
size="icon"
className="size-8 shrink-0"
onClick={onClose}
aria-label="Close panel"
>
<X className="size-4" />
</Button>
</div>
);
}