Skip to content

Webapp Architecture

The T3 commercial webapp is a Next.js 16 monorepo app with three processes.

Processes

ProcessEntryPort
apps/webNext.js 16 (React 19, Tailwind 4, TypeScript, NextAuth 5)3000
apps/workerBackground worker (inbox watcher, autopilot scheduler, run queue)
apps/wsWebSocket sidecar3002

Start all three with:

bash
pnpm dev

Route Structure

All authenticated workspace pages live under /w/[slug]/*. The old (legacy) route group was removed in PR #10.

Workspace Routes (/w/[slug]/)

RoutePage
/w/[slug]/Workspace home
/w/[slug]/agentsAgent runs
/w/[slug]/auditAudit log
/w/[slug]/autopilotAutopilot schedules
/w/[slug]/benchmarkBenchmarking
/w/[slug]/boardKanban board
/w/[slug]/copilotAI copilot chat
/w/[slug]/extractTerm extraction
/w/[slug]/fundsFund list
/w/[slug]/funds/[id]Fund detail
/w/[slug]/inboxDocument inbox
/w/[slug]/investorsInvestor list
/w/[slug]/investors/[id]Investor detail (minimal — schema carries name/type/classification only)
/w/[slug]/kycKYC tracker
/w/[slug]/navNAV reporting
/w/[slug]/operationsOperations dashboard
/w/[slug]/portfolioPortfolio view
/w/[slug]/reconcileReconciliation list
/w/[slug]/reconcile/[id]Reconciliation detail
/w/[slug]/reportingReporting
/w/[slug]/reviewsReview list
/w/[slug]/reviews/[reviewSlug]Review detail
/w/[slug]/runsRun history
/w/[slug]/runs/[id]Run detail
/w/[slug]/settings/workspaceWorkspace settings
/w/[slug]/skillsSkills browser
/w/[slug]/uploadDocument upload
/w/[slug]/upload/queueUpload queue
/w/[slug]/waterfallWaterfall calculator

Public Routes

RoutePage
/Landing page
/signinSign in
/signupSign up
/verifyMagic link verification
/pitchPitch page
/onboardingWorkspace + fund creation

Onboarding

Onboarding is wired with the createWorkspaceAndFund server action. It creates the workspace, the first fund, and redirects to /w/[slug]/.

Database

Postgres + Drizzle ORM. Key migrations:

  • 0003fund(workspace_id, name) UNIQUE constraint
  • 0004inbox_item.fund_id FK

Design

The webapp uses a Ledger-style layout (PR #10 redesign). All workspace pages use a persistent sidebar with a drawer on mobile. See DESIGN.md for the full design system specification.

Mobile breakpoints:

  • 375px: sidebar becomes a drawer, tables scroll horizontally, panels stack vertically

T1 (skills + CLI) and T2 (vault template) are MIT licensed.