import { useState } from "react"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Avatar, AvatarFallback } from "@/components/ui/avatar"; import { Plus, ThumbsUp, GripVertical, MoreHorizontal, Sparkles } from "lucide-react"; import { toast } from "sonner"; import Sidebar from "@/components/Sidebar"; import Header from "@/components/Header"; interface Feature { id: number; title: string; description: string; priority: string; priorityColor: string; votes: number; status: string; statusColor: string; assignee: string; assigneeColor: string; } interface RoadmapColumn { id: string; title: string; color: string; dotColor: string; features: Feature[]; } const initialColumns: RoadmapColumn[] = [ { id: "now", title: "Now", color: "bg-blue-50 border-blue-200", dotColor: "bg-blue-600", features: [ { id: 1, title: "Visual Roadmap Board", description: "Drag-and-drop interface for managing product priorities and timelines", priority: "P0", priorityColor: "bg-red-100 text-red-700", votes: 48, status: "In Progress", statusColor: "bg-blue-100 text-blue-700", assignee: "SK", assigneeColor: "bg-blue-500" }, { id: 2, title: "Slack Integration", description: "Integrate with Slack, Jira, and Linear for seamless workflow", priority: "P0", priorityColor: "bg-red-100 text-red-700", votes: 36, status: "In Review", statusColor: "bg-amber-100 text-amber-700", assignee: "AL", assigneeColor: "bg-sky-500" }, { id: 3, title: "Priority Scoring", description: "Customizable scoring model with weighted criteria", priority: "P1", priorityColor: "bg-orange-100 text-orange-700", votes: 29, status: "In Progress", statusColor: "bg-blue-100 text-blue-700", assignee: "RJ", assigneeColor: "bg-indigo-500" }, ], }, { id: "next", title: "Next", color: "bg-sky-50 border-sky-200", dotColor: "bg-sky-500", features: [ { id: 4, title: "Feedback Analytics", description: "AI-powered analysis of user feedback with sentiment detection", priority: "P1", priorityColor: "bg-orange-100 text-orange-700", votes: 52, status: "Planned", statusColor: "bg-slate-100 text-slate-700", assignee: "NK", assigneeColor: "bg-emerald-500" }, { id: 5, title: "Public Changelog", description: "Public-facing changelog with email subscription support", priority: "P1", priorityColor: "bg-orange-100 text-orange-700", votes: 31, status: "Planned", statusColor: "bg-slate-100 text-slate-700", assignee: "SK", assigneeColor: "bg-blue-500" }, { id: 6, title: "API Access", description: "REST and GraphQL APIs for programmatic access to product data", priority: "P2", priorityColor: "bg-slate-100 text-slate-600", votes: 22, status: "Planned", statusColor: "bg-slate-100 text-slate-700", assignee: "AL", assigneeColor: "bg-sky-500" }, { id: 7, title: "Custom Dashboards", description: "Build personalized views with drag-and-drop widgets", priority: "P2", priorityColor: "bg-slate-100 text-slate-600", votes: 18, status: "Planned", statusColor: "bg-slate-100 text-slate-700", assignee: "RJ", assigneeColor: "bg-indigo-500" }, ], }, { id: "later", title: "Later", color: "bg-slate-50 border-slate-200", dotColor: "bg-slate-400", features: [ { id: 8, title: "Mobile App", description: "Native iOS and Android apps for on-the-go product management", priority: "P2", priorityColor: "bg-slate-100 text-slate-600", votes: 41, status: "Exploring", statusColor: "bg-purple-100 text-purple-700", assignee: "NK", assigneeColor: "bg-emerald-500" }, { id: 9, title: "AI Roadmap Generator", description: "Auto-generate roadmaps from feedback patterns and market data", priority: "P2", priorityColor: "bg-slate-100 text-slate-600", votes: 33, status: "Exploring", statusColor: "bg-purple-100 text-purple-700", assignee: "SK", assigneeColor: "bg-blue-500" }, { id: 10, title: "White-label Portal", description: "Customer-facing portal with custom branding and domain", priority: "P2", priorityColor: "bg-slate-100 text-slate-600", votes: 19, status: "Exploring", statusColor: "bg-purple-100 text-purple-700", assignee: "AL", assigneeColor: "bg-sky-500" }, ], }, ]; export default function IndexPage() { const [columns, setColumns] = useState(initialColumns); const handleVote = (columnId: string, featureId: number) => { setColumns(prev => prev.map(col => col.id === columnId ? { ...col, features: col.features.map(f => f.id === featureId ? { ...f, votes: f.votes + 1 } : f) } : col )); toast("Vote recorded!"); }; const handleAddFeature = (columnId: string) => { toast("Add feature dialog would open here"); }; return (
{/* ── Page Header ── */}

Roadmap

Plan and communicate your product strategy

{/* ── Roadmap Columns ── */}
{columns.map((column) => (
{/* Column Header */}

{column.title}

{column.features.length}
{/* Feature Cards */}
{column.features.map((feature) => (

{feature.title}

{feature.description}

{feature.priority} {feature.status}
{feature.assignee}
))}
{/* Add Feature Button */}
))}
); }