The whole dashboard installs with one shadcn command. It writes 27 files — routes, shell, data and components — and the source stays yours to edit.
Run this in a project that already uses shadcn/ui on React and Tailwind CSS v4.
npx shadcn@latest add https://prequelui.terravidhal.me/r/memories.json"use client";
import { useMemo, useState } from "react";
import { Users as UsersIcon, Search } from "lucide-react";
import {
CUSTOMERS,
type Customer,
type CustomerStatus,
} from "@/dashboards/memories/data";
import { PageHeader, RefreshButton } from "@/dashboards/memories/components/page-header";
import { CustomerDirectory } from "@/dashboards/memories/components/customer-directory";
import { CustomerHistory } from "@/dashboards/memories/components/customer-history";
import { EmptyState } from "@/dashboards/memories/components/empty-state";
import { CustomersSkeleton } from "@/dashboards/memories/components/skeletons";
import { useRefresh } from "@/dashboards/memories/use-refresh";
import { cn } from "@/lib/utils";
type SortKey = "mrr" | "csat" | "tickets" | "name";
const STATUS_FILTERS: Array<{ key: "all" | CustomerStatus; label: string }> = [
{ key: "all", label: "All" },
{ key: "active", label: "Active" },
{ key: "trial", label: "Trial" },
{ key: "churned", label: "Churned" },
{ key: "vip", label: "VIP" },
];
export default function CustomersPage() {
const { loading, refresh } = useRefresh();
const [query, setQuery] = useState("");
const [status, setStatus] = useState<"all" | CustomerStatus>("all");
const [sort, setSort] = useState<SortKey>("mrr");
const [selectedId, setSelectedId] = useState<string | null>(CUSTOMERS[0]?.id ?? null);
const filtered = useMemo(() => {
const q = query.trim().toLowerCase();
const list = CUSTOMERS.filter((c) => {
const matchQ =
!q ||
c.name.toLowerCase().includes(q) ||
c.email.toLowerCase().includes(q) ||
c.company.toLowerCase().includes(q);
const matchStatus = status === "all" || c.status === status;
return matchQ && matchStatus;
});
const sorted = [...list];
sorted.sort((a, b) => {
if (sort === "name") return a.name.localeCompare(b.name);
return b[sort] - a[sort];
});
return sorted;
}, [query, status, sort]);
const selected = CUSTOMERS.find((c) => c.id === selectedId) ?? null;
return (
<div className="space-y-6">
<PageHeader
title="Customers"
description={`${CUSTOMERS.length} customers · $${CUSTOMERS.reduce(
(sum, c) => sum + c.mrr,
0
).toLocaleString("en-US")} total MRR`}
>
<RefreshButton onClick={refresh} loading={loading} />
</PageHeader>
{loading ? (
<CustomersSkeleton />
) : (
<div className="grid grid-cols-1 items-start gap-4 lg:grid-cols-[minmax(0,1fr)_340px]">
{/* list column */}
<div className={cn(selectedId ? "hidden lg:block" : "block")}>
<div className="mb-3 space-y-3 rounded-xl border border-border bg-card p-3">
<div className="relative">
<Search className="pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" />
<input
value={query}
onChange={(e) => setQuery(e.target.value)}
placeholder="Search name, company or email…"
className="h-9 w-full rounded-lg border border-input bg-transparent pl-9 pr-3 text-sm outline-none placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring"
/>
</div>
<div className="flex flex-wrap items-center gap-1.5">
{STATUS_FILTERS.map((f) => {
const active = status === f.key;
return (
<button
key={f.key}
type="button"
onClick={() => setStatus(f.key)}
className={cn(
"rounded-full border px-2.5 py-1 text-[12px] font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
active
? "border-foreground/30 bg-muted text-foreground"
: "border-border text-muted-foreground hover:bg-muted hover:text-foreground"
)}
>
{f.label}
</button>
);
})}
<select
value={sort}
onChange={(e) => setSort(e.target.value as SortKey)}
aria-label="Sort customers"
className="ml-auto h-8 rounded-lg border border-input bg-transparent px-2 text-[12px] text-muted-foreground outline-none focus-visible:ring-2 focus-visible:ring-ring"
>
<option value="mrr">Highest MRR</option>
<option value="csat">Highest CSAT</option>
<option value="tickets">Most tickets</option>
<option value="name">Name A–Z</option>
</select>
</div>
</div>
{filtered.length === 0 ? (
<div className="rounded-xl border border-border bg-card">
<EmptyState
icon={UsersIcon}
title="No customers found"
description={`Nothing matches ${
query ? `“${query}”` : "these filters"
}. Try a different search.`}
action={
<button
type="button"
onClick={() => {
setQuery("");
setStatus("all");
}}
className="rounded-lg px-3 py-1.5 text-[13px] font-medium underline-offset-4 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
>
Clear filters
</button>
}
/>
</div>
) : (
<div className="pb-2 pr-0.5 lg:max-h-[calc(100dvh-15rem)] lg:overflow-y-auto">
<CustomerDirectory
customers={filtered}
selectedId={selectedId}
onSelect={setSelectedId}
/>
</div>
)}
</div>
{/* history column */}
<div className={cn(selectedId ? "block" : "hidden lg:block")}>
{selected ? (
<div className="min-h-[60dvh] lg:h-[calc(100dvh-15rem)] lg:min-h-0">
<CustomerHistory
customer={selected}
onBack={() => setSelectedId(null)}
/>
</div>
) : (
<div className="hidden min-h-[calc(100dvh-15rem)] items-center justify-center rounded-xl border border-dashed border-border lg:flex">
<EmptyState
title="Select a customer"
description="Pick a customer to see their plan, tickets and recent history."
/>
</div>
)}
</div>
</div>
)}
</div>
);
}
motion, lucide-react
npm install motion lucide-reactThese come from the free MIT registry and are installed with the dashboard.
The routes and the data are ordinary files in your app; change them like your own.
The dashboard mounts at /dashboards/memories. Every screen listed above is its own route under app/dashboards/memories.
The numbers, names and dates come from dashboards/memories/data.ts. Keep the exported shapes and every chart, table and filter keeps working.
Navigation, command search, notifications and the theme switch live in the shell. The switch reads PrequelUI's ThemeProvider, so wrap your root layout in it or point the switch at your own.
Free and MIT. Read the dashboard guide for project requirements and the manual install.