mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
01f5dbd1ee
Northstar AI CRM — a full-featured agentic sales CRM for an enterprise hardware seller, built with CopilotKit, the AG-UI protocol, and a TypeScript Strands agent (@strands-agents/sdk + @ag-ui/aws-strands). The first TypeScript Strands example under examples/. Highlights: - Agentic canvas: tool calls render on the workspace — quote approval opens a quote page; analyze_team and generate_weekly_report open dedicated report pages; frontend tools navigate the workspace. - Generative UI cards, human-in-the-loop follow-up approval, and a live STATE_SNAPSHOT that syncs a SQLite CRM store with the board, dashboard, and report pages. - Dashboard, pipeline (Kanban), products, team, and reports surfaces. Self-contained under examples/showcases/strands-crm with an agent/ + frontend/ split and a concurrently dev script; listed in examples/README.md.
49 lines
1.5 KiB
TypeScript
49 lines
1.5 KiB
TypeScript
"use client";
|
||
import { useCrmContext } from "@/components/crm-context";
|
||
import {
|
||
KpiRow,
|
||
SalesOverTimeCard,
|
||
RevenueByCategoryCard,
|
||
TopReps,
|
||
UpcomingCloses,
|
||
LatestOrders,
|
||
DashboardSkeleton,
|
||
} from "@/components/dashboard";
|
||
|
||
export default function DashboardPage() {
|
||
const { crm, loading, setSelectedDealId } = useCrmContext();
|
||
|
||
return (
|
||
<div className="h-full overflow-auto p-6">
|
||
{loading ? (
|
||
<DashboardSkeleton />
|
||
) : crm.deals.length === 0 ? (
|
||
<div className="rounded-xl border border-dashed border-border p-10 text-center text-sm text-muted-foreground">
|
||
No data yet. Ask the assistant to research an account or build a quote
|
||
to get started.
|
||
</div>
|
||
) : (
|
||
<div className="space-y-4">
|
||
{/* 1 — KPI row */}
|
||
<KpiRow crm={crm} />
|
||
|
||
{/* 2–5 — responsive analytics grid (collapses to one column ≤1024px) */}
|
||
<div className="grid grid-cols-1 gap-4 lg:grid-cols-3">
|
||
<div className="lg:col-span-2">
|
||
<SalesOverTimeCard crm={crm} />
|
||
</div>
|
||
<RevenueByCategoryCard crm={crm} />
|
||
<TopReps crm={crm} />
|
||
<div className="lg:col-span-2">
|
||
<UpcomingCloses crm={crm} onSelect={setSelectedDealId} />
|
||
</div>
|
||
</div>
|
||
|
||
{/* 6 — latest orders, full width */}
|
||
<LatestOrders crm={crm} onSelect={setSelectedDealId} />
|
||
</div>
|
||
)}
|
||
</div>
|
||
);
|
||
}
|