Root Layout
Apps
apps/web-app/
The main Next.js 14 web application.
| Directory | Purpose |
|---|---|
app/ | App Router pages and API routes |
components/ | React components |
hooks/ | Custom React hooks |
lib/ | Utilities, database clients, AI services |
Services
| Service | Purpose |
|---|---|
services/event-intake/ | Slack event ingestion Lambda |
services/job-worker/ | Background job processor Lambda |
services/user-resolver/ | User context resolution Lambda |
Packages
| Package | Purpose |
|---|---|
packages/shared/ | Shared utilities and types |
packages/communication-slack/ | Slack API client |
packages/mcp-clients/ | MCP adapter implementations |
packages/tenant-store/ | Workspace data access layer |
packages/job-store/ | Job queue management |
packages/knowledge-pipeline/ | Thread analysis and auto-doc generation |
Key Entry Points
| File | Purpose |
|---|---|
apps/web-app/app/layout.tsx | Web app root layout |
apps/web-app/app/[slug]/page.tsx | Workspace home page |
services/job-worker/src/handler.ts | Lambda job handler |
services/event-intake/src/handler.ts | Slack event handler |
Configuration Files
| File | Purpose |
|---|---|
.env.example | Environment variable template |
pnpm-workspace.yaml | Workspace package definitions |
tsconfig.base.json | Shared TypeScript config |
eslint.config.mjs | ESLint configuration |
vercel.json | Vercel deployment config |

