SOMA docs
Surfaces

Web app

Routes, API endpoints, and the dive-stack.

https://soma-ai.cc — Next.js 15 App Router deployed on Vercel.

Authenticated pages

RouteKindWhat
/appstaticDashboard home / redirect
/app/chatstaticStreaming agent chat, useChat + Vercel AI SDK
/app/capturestaticQuick-add entity (form → memory_capture)
/app/entitiesdynamicPaginated list with filters + search
/app/entities/[id]dynamicDetail view + dive-stack panels (backlinks, edges, related)
/app/inboxstaticRecently-ingested sources awaiting action
/app/timelinestaticChronological events + facts, Schedule-X views
/app/projectsdynamicKanban over type=project entities
/app/graphstaticD3 force-directed neighborhood viz
/app/settings/integrationsdynamicGoogle / Slack OAuth + Gmail label subs
/app/settings/healthstaticApple Health XML import form

API routes

RouteRuntimePurpose
POST /api/chatnodejs, force-dynamicAgent stream. 20 req/min/user. 20s stream-start timeout.
GET,POST,PUT /api/inngestnodejs, maxDuration=300Inngest Cloud workflow handler
POST /api/telegram/webhooknodejs, maxDuration=60grammY webhook, HMAC-guarded
POST /api/webhooks/gmailnodejsGoogle Pub/Sub push notification
POST /api/health/importnodejsApple Health upload → fires health.import event
GET /api/entities/[id]nodejsFetch one
POST /api/entities/[id]/archivenodejsSoft-delete
GET /api/events, /api/graph, /api/searchnodejsRead paths
GET /connect/google/{start,callback,disconnect}nodejsGmail + Calendar OAuth
GET /connect/slack/{start,callback}nodejsSlack OAuth
GET /auth/callback / POST /auth/sign-outnodejsSupabase Auth

The dive-stack

The signature interaction. Horizontal stack of panels à la Finder column view. Clicking a backlink, a @mention, or a related entity pushes a new panel on the right. Closing pops it.

Lives under apps/web/src/components/dive/. State is a Zustand store (dive-store.ts). Panel animation is a translateX spring driven by motion/react.

See the Claude skill soma-dive-stack for full implementation guidance.

State management

  • Server state — TanStack Query v5 (@soma/api-client). Queries are keyed by entity id + surface.
  • UI state — Zustand stores. Each domain gets its own store (dive-store, command-palette-store, etc.).
  • URL statenuqs for filter params (type, search, sort).

No global Redux. No Context providers for domain state.

Tailwind + shadcn

Tailwind v4 + @soma/ui (shadcn primitives wrapped with SOMA design tokens). All colors, sizes, spacing come from CSS custom properties defined in packages/ui/src/tokens/*.css. Never hard-code — see soma-design-system skill.