"use client"; import { useParams, usePathname } from "next/navigation"; import { ClipboardList, CheckCircle2, Circle, Clock, Target, ListTodo, Calendar, Plus, Sparkles, } from "lucide-react"; import { PageTemplate, PageSection, PageCard, PageGrid, } from "@/components/layout/page-template"; import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; const BUILD_PLAN_NAV_ITEMS = [ { title: "MVP Scope", icon: Target, href: "/build-plan" }, { title: "Backlog", icon: ListTodo, href: "/build-plan#backlog" }, { title: "Milestones", icon: Calendar, href: "/build-plan#milestones" }, { title: "Progress", icon: Clock, href: "/build-plan#progress" }, ]; const SAMPLE_MVP_FEATURES = [ { id: 1, title: "User Authentication", status: "completed", priority: "high" }, { id: 2, title: "Dashboard UI", status: "in_progress", priority: "high" }, { id: 3, title: "Core Feature Flow", status: "in_progress", priority: "high" }, { id: 4, title: "Payment Integration", status: "todo", priority: "medium" }, { id: 5, title: "Email Notifications", status: "todo", priority: "low" }, ]; const SAMPLE_BACKLOG = [ { id: 1, title: "Advanced Analytics", priority: "medium" }, { id: 2, title: "Team Collaboration", priority: "high" }, { id: 3, title: "API Access", priority: "low" }, { id: 4, title: "Mobile App", priority: "medium" }, ]; export default function BuildPlanPage() { const params = useParams(); const pathname = usePathname(); const workspace = params.workspace as string; const projectId = params.projectId as string; const sidebarItems = BUILD_PLAN_NAV_ITEMS.map((item) => { const fullHref = `/${workspace}/project/${projectId}${item.href}`; return { ...item, href: fullHref, isActive: pathname === fullHref || pathname.startsWith(fullHref), }; }); const completedCount = SAMPLE_MVP_FEATURES.filter((f) => f.status === "completed").length; const totalCount = SAMPLE_MVP_FEATURES.length; const progressPercent = Math.round((completedCount / totalCount) * 100); return (

{completedCount} of {totalCount} MVP features done

), }} hero={{ icon: ClipboardList, title: "Build Plan", description: "Manage your MVP scope and track progress", actions: [ { label: "Generate Tasks", onClick: () => console.log("Generate tasks with AI"), icon: Sparkles, }, ], }} > {/* Progress Overview */}

{completedCount}

Completed

{SAMPLE_MVP_FEATURES.filter((f) => f.status === "in_progress").length}

In Progress

{SAMPLE_MVP_FEATURES.filter((f) => f.status === "todo").length}

To Do

{progressPercent}%

Progress

{/* MVP Scope */} Add Feature } >
{SAMPLE_MVP_FEATURES.map((feature) => (
{feature.status === "completed" && ( )} {feature.status === "in_progress" && ( )} {feature.status === "todo" && ( )}

{feature.title}

{feature.priority}
{feature.status === "in_progress" ? "in progress" : feature.status}
))}
{/* Backlog */} Add to Backlog } >
{SAMPLE_BACKLOG.map((item) => (

{item.title}

{item.priority}
))}
{/* Milestones */}

Alpha Release

Completed

Jan 15, 2025

Beta Launch

In Progress

Feb 1, 2025

Public Launch

Planned

Mar 1, 2025

); }