Command Inbox
Overview

Stack

Technologies, libraries, and version choices

Application layer

TechnologyRole
Next.js 15App Router, RSC, API route handlers
React 19UI components
TypeScriptEnd-to-end type safety
Tailwind CSS 4Styling
shadcn/ui + RadixAccessible primitives (dialogs, tooltips, command palette)
Framer MotionPanel transitions and micro-interactions
TipTapRich-text email composer
react-hotkeys-hookKeyboard shortcut bindings

Data layer

TechnologyRole
Neon PostgresPrimary database (serverless, pooled connections)
pgvectorVector similarity search for semantic inbox search
Drizzle ORMSchema, migrations, typed queries
Corsair cache tablesGmail/Calendar data synced by Corsair SDK

Integrations

TechnologyRole
Corsair SDKGmail + GCal plugins, webhooks, tenant isolation
@corsair-dev/gmailGmail read/write, watch, threads.list
@corsair-dev/googlecalendarEvents, free/busy, Meet links
@corsair-dev/mcpMCP tool definitions for agent
Better AuthGoogle OAuth sign-in, session management
Pusher ChannelsRealtime inbox updates (optional; polling fallback)

AI layer

TechnologyRole
Vercel AI SDK (ai package)streamText, tool calling, UI message streams
@ai-sdk/openaiGPT-5 Nano chat + text-embedding-3-small
@ai-sdk/googleGemini 2.5 Flash chat + text-embedding-004
@ai-sdk/reactClient-side chat hooks for agent panel

Default models are defined in src/lib/ai/providers.ts:

ProviderChat modelEmbedding modelDimensions
OpenAI (default)gpt-5-nanotext-embedding-3-small768
Gemini (fallback)gemini-2.5-flashtext-embedding-004768

Runtime and tooling

ToolRole
BunPackage manager and script runner
VercelProduction hosting
ESLintLinting (eslint-config-next)
Drizzle KitMigration authoring (drizzle-kit studio)

Documentation site

TechnologyRole
FumadocsMDX docs framework (apps/docs)
Separate Vercel projectdocs.command-inbox.sayantanbal.in

Phase-gated capabilities

Features unlock as environment variables are configured:

PhaseRequirementsUnlocks
0DATABASE_URL, CORSAIR_KEK, Google OAuthDB, Corsair setup, smoke tests
1BETTER_AUTH_SECRETSign-in, sessions
2AI key + optional Pub/Sub + PusherClassification, embeddings, webhooks, semantic search
3+CRON_SECRET + external cronSend-later dispatch, snooze expiry

See Environment variables for the full list.