"use client"; import React from "react"; import { useQuery } from "@tanstack/react-query"; import { ClipboardList, FolderKanban, TestTube2, Rocket, GitCommit, AlertTriangle, Bot, ShieldAlert, RefreshCw, PlayCircle, } from "lucide-react"; import { Card, CardBody, CardHeader, CardTitle, CardFooter } from "@/components/ui/Card"; import { MetricCard } from "@/components/ui/MetricCard"; import { ProgressRing } from "@/components/ui/ProgressRing"; import { Button } from "@/components/ui/Button"; import { Badge } from "@/components/ui/Badge"; import { EmptyState } from "@/components/ui/EmptyState"; import { overview, health } from "@/lib/api"; import type { OverviewMetrics } from "@/lib/types"; const DEMO_METRICS: OverviewMetrics = { tenant_id: "demo-tenant", total_projects: 6, total_requirements: 142, total_tasks: 318, total_tests: 512, total_deployments: 27, total_commits: 1204, jobs_running: 3, jobs_queued: 8, jobs_failed_24h: 2, implementation_coverage_pct: 74.3, test_coverage_pct: 68.9, traceability_score_pct: 81.5, project_health_pct: 77.2, security_findings: 14, failed_builds: 3, active_ai_jobs: 5, featured_projects: [ { key: "ASF", name: "Azurian Software Factory" }, { key: "NOVA", name: "Nova Customer Portal" }, { key: "ORB", name: "Orbital Billing" }, ], mock_fields: ["*"], }; export default function OverviewPage() { const metricsQ = useQuery({ queryKey: ["overview"], queryFn: () => overview.get(), retry: false, refetchOnWindowFocus: false, }); const healthQ = useQuery({ queryKey: ["health"], queryFn: () => health(), retry: false, refetchOnWindowFocus: false, }); const m: OverviewMetrics = metricsQ.data ?? DEMO_METRICS; const isMock = !metricsQ.data; return (
From Requirement to Production — everything contextualized, traceable and AI-accessible.