Trovella Wiki

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=....

RouteFileStatusDescription
/page.tsxActiveHome -- renders DashboardContent for authenticated users, LandingPage for visitors
/discoverdiscover/page.tsxStubBrowse curated AI skills (coming soon)
/createcreate/page.tsxStubGenerate content with AI (coming soon)
/chatchat/page.tsxStubAI conversation interface (coming soon)
/memorymemory/page.tsxStubCross-platform AI memory management (coming soon)
/settingssettings/page.tsxActiveAccount 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.

RouteFileDescription
/admin/ai-logsadmin/ai-logs/page.tsxAI completion logs and usage monitoring
/admin/research-plansadmin/research-plans/page.tsxList of all research plans
/admin/research-plans/[planId]admin/research-plans/[planId]/page.tsxDetail view of a single research plan and its steps
/admin/searchadmin/search/page.tsxHybrid search testing interface
/admin/skill-executionsadmin/skill-executions/page.tsxList of all skill execution runs
/admin/skill-executions/[executionId]admin/skill-executions/[executionId]/page.tsxDetail view of a single skill execution

Auth Pages

Public pages with a centered card layout (auth/layout.tsx). No DashboardPage wrapper, no sidebar.

RouteFileTypeDescription
/auth/sign-inauth/sign-in/page.tsxPageGoogle OAuth sign-in; redirects to / if already authenticated
/auth/sign-outauth/sign-out/route.tsRoute 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.

RouteSource DirectoryLayoutDescription
/docs/[[...slug]]content/docs/DocsLayout with sidebar + searchUser-facing public documentation
/wiki/[[...slug]]content/internal/DocsLayout with sidebar + searchInternal 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).

RouteFileMethodsAuthDescription
/api/trpc/[trpc]api/trpc/[trpc]/route.tsGET, POSTVia tRPC contexttRPC fetch adapter -- all typed procedures
/api/auth/[...all]api/auth/[...all]/route.tsGET, POSTBetter Auth internalBetter Auth catch-all handler (OAuth callbacks, session management)
/api/healthapi/health/route.tsGETNoneHealth check -- database, Redis, Typesense status
/api/inngestapi/inngest/route.tsGET, POST, PUTSigning keyInngest serve handler for background job dispatch
/api/mcpapi/mcp/route.tsGET, POST, DELETEPAT (MCP-internal)MCP Streamable HTTP transport for research tools
/api/searchapi/search/route.tsGETNoneFumadocs search index for /docs pages
/api/admin/ai-playgroundapi/admin/ai-playground/route.tsPOSTSession (cookie)SSE streaming endpoint for the AI playground

Special Files

FilePurpose
layout.tsxRoot layout -- fonts (DM Sans, DM Serif Display, JetBrains Mono), theme provider, toaster, nonce passthrough
globals.cssGlobal styles and Tailwind base
global-error.tsxTop-level error boundary -- reports to Sentry, renders a "try again" button
sitemap.tsDynamic sitemap.xml generated from Fumadocs sources (docs + wiki pages)

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).

On this page