Route Map
Complete inventory of all routes, API endpoints, and content paths in the Trovella web application.
Every route in apps/web/src/app/ organized by category. Dynamic segments use Next.js [param] notation; catch-all segments use [[...slug]].
Dashboard Pages
Authenticated pages wrapped in DashboardPage (server) and DashboardShell (client). All require a session -- unauthenticated users are redirected to /auth/sign-in?callbackUrl=....
| Route | File | Status | Description |
|---|---|---|---|
/ | page.tsx | Active | Home -- renders DashboardContent for authenticated users, LandingPage for visitors |
/discover | discover/page.tsx | Stub | Browse curated AI skills (coming soon) |
/create | create/page.tsx | Stub | Generate content with AI (coming soon) |
/chat | chat/page.tsx | Stub | AI conversation interface (coming soon) |
/memory | memory/page.tsx | Stub | Cross-platform AI memory management (coming soon) |
/settings | settings/page.tsx | Active | Account settings and integration management |
Admin Pages
Admin pages are also dashboard pages (same DashboardPage wrapper). Currently accessible to all authenticated users -- admin-only CASL enforcement is planned.
| Route | File | Description |
|---|---|---|
/admin/ai-logs | admin/ai-logs/page.tsx | AI completion logs and usage monitoring |
/admin/research-plans | admin/research-plans/page.tsx | List of all research plans |
/admin/research-plans/[planId] | admin/research-plans/[planId]/page.tsx | Detail view of a single research plan and its steps |
/admin/search | admin/search/page.tsx | Hybrid search testing interface |
/admin/skill-executions | admin/skill-executions/page.tsx | List of all skill execution runs |
/admin/skill-executions/[executionId] | admin/skill-executions/[executionId]/page.tsx | Detail view of a single skill execution |
Auth Pages
Public pages with a centered card layout (auth/layout.tsx). No DashboardPage wrapper, no sidebar.
| Route | File | Type | Description |
|---|---|---|---|
/auth/sign-in | auth/sign-in/page.tsx | Page | Google OAuth sign-in; redirects to / if already authenticated |
/auth/sign-out | auth/sign-out/route.ts | Route Handler (POST) | Signs out via Better Auth, redirects to / |
For the complete sign-in flow (OAuth redirect, callback handling, session creation), see Authentication -- Sign-In Flow.
Content Pages
Public documentation and internal wiki, both powered by Fumadocs with separate source directories and layouts.
| Route | Source Directory | Layout | Description |
|---|---|---|---|
/docs/[[...slug]] | content/docs/ | DocsLayout with sidebar + search | User-facing public documentation |
/wiki/[[...slug]] | content/internal/ | DocsLayout with sidebar + search | Internal team wiki (this site) |
Both use generateStaticParams() for static generation and generateMetadata() for per-page SEO.
API Routes
JSON API endpoints under /api/. The middleware skips CSP for these routes (they return JSON, not HTML).
| Route | File | Methods | Auth | Description |
|---|---|---|---|---|
/api/trpc/[trpc] | api/trpc/[trpc]/route.ts | GET, POST | Via tRPC context | tRPC fetch adapter -- all typed procedures |
/api/auth/[...all] | api/auth/[...all]/route.ts | GET, POST | Better Auth internal | Better Auth catch-all handler (OAuth callbacks, session management) |
/api/health | api/health/route.ts | GET | None | Health check -- database, Redis, Typesense status |
/api/inngest | api/inngest/route.ts | GET, POST, PUT | Signing key | Inngest serve handler for background job dispatch |
/api/mcp | api/mcp/route.ts | GET, POST, DELETE | PAT (MCP-internal) | MCP Streamable HTTP transport for research tools |
/api/search | api/search/route.ts | GET | None | Fumadocs search index for /docs pages |
/api/admin/ai-playground | api/admin/ai-playground/route.ts | POST | Session (cookie) | SSE streaming endpoint for the AI playground |
Special Files
| File | Purpose |
|---|---|
layout.tsx | Root layout -- fonts (DM Sans, DM Serif Display, JetBrains Mono), theme provider, toaster, nonce passthrough |
globals.css | Global styles and Tailwind base |
global-error.tsx | Top-level error boundary -- reports to Sentry, renders a "try again" button |
sitemap.ts | Dynamic sitemap.xml generated from Fumadocs sources (docs + wiki pages) |
Sidebar Navigation
The AppSidebar component defines the sidebar links that users see. It has two sections:
Primary navigation: Dashboard (/), Discover, Create, Chat, Memory
Admin section: AI Logs, Research Plans, Hybrid Search, Skill Executions, Wiki
Active states are determined by exact match (primary nav) or startsWith (admin items).