AI Visibility — UI
All pages live under /ai-search in apps/dashboard/src/app/(dashboard)/ai-search/.
Pages
/ai-search — Main Dashboard
Files: page.tsx (server), AISearchOverviewClient.tsx (client)
The main overview. Data is fetched server-side via Prisma (not the API) and passed as props.
Sections:
- GEO Score card — overall mention rate averaged across all enabled platforms and prompts over 14 days. Shows a sparkline trend and a colour-coded badge (Low / Medium / High).
- Platform score cards (2×2 grid) — per-platform mention %. Shows “API key missing” in amber if
apiKeyPresentis false. - Competitor Gap — compares brand mention rate vs each tracked competitor. Links to
/ai-search/competitors. - Brand Narrative — teaser of the latest narrative with a History link.
- Recommended Actions — auto-generated list based on GEO score and gaps.
- Prompt Visibility table — one row per prompt, columns per platform, checkmark/cross per cell. Expandable rows show the raw excerpt when the brand was mentioned.
/ai-search/prompts — Manage Prompts
Create, edit, toggle, and delete monitored prompts. Each prompt has a type tag (local, category, brand, competitor).
/ai-search/settings — Platform Settings
File: settings/page.tsx, AISearchSettingsClient.tsx
Toggle each platform on/off for the tenant. Disabled if apiKeyPresent is false or globalEnabled is false (admin-controlled). Shows how many platforms are active.
/ai-search/competitors — Competitor Gap
File: competitors/page.tsx, CompetitorGapClient.tsx
Side-by-side matrix of brand vs competitor mention rates per platform per prompt. Highlights prompts where competitors appear but the brand does not.
/ai-search/history — Run History
File: history/page.tsx, HistoryClient.tsx
Bar chart of GEO score over time. Table grouped by run date showing mention counts per platform.
Topbar Actions (on main page)
| Button | Action |
|---|---|
| ? (help icon) | Links to /help/ai-search |
| Manage Prompts | Links to /ai-search/prompts |
| Platforms | Links to /ai-search/settings |
| Run Now | POST /tenant/v1/ai-visibility/run → enqueues BullMQ job → shows green toast “Visibility check queued — results will appear shortly.” |
GEO Score Colour Coding
| Range | Label | Colour |
|---|---|---|
| 0–33% | Low | Red |
| 34–66% | Medium | Amber |
| 67–100% | High | Green |
Sidebar Location
Under SEO group → AI Search (last item). Icon: ScanSearch (Lucide).