Multitenant B2B SaaS for campus recruitment. Think Superset, built for Indian universities.
How to use this spec
Each file is self-contained and written to be fed directly to an AI coding agent. Start with the architecture overview, then pick the service you're building.
Files
Architecture & overview
File
What it covers
README.md
This file — index and orientation
architecture.md
System design, multitenancy pattern, all services, data flow
Per-service specs (feed these to agents)
File
Service
apps/api-gateway.md
TypeScript — entry point, tenant resolution, JWT, routing
apps/core-api.md
TypeScript — main business logic monolith
apps/tenant-web.md
TypeScript / Next.js — student + admin frontend
apps/notification-service.md
TypeScript — email/push/webhook worker
apps/ai-worker.md
Python — LLM tasks, resume AI
Infrastructure
File
What it covers
infra/overview.md
All running processes, ports, docker-compose, k8s layout
infra/database.md
Full Postgres schema, all tables, indexes, RLS
infra/auth.md
OAuth, OTP, JWT, refresh token, revocation
infra/queue.md
BullMQ setup, job types, retry strategy
Product
File
What it covers
product/user-stories.md
All roles, all stories, acceptance criteria
product/views-ui.md
Every screen, what data it shows, interactions
product/rbac.md
Roles, permissions matrix, API key scopes
product/segmentation.md
Query builder spec, all operators, usage across product
product/resume.md
Resume JSON schema, verification flow, AI variants
Stack decisions (locked)
All services: TypeScript (Node 20, Fastify)
AI worker only: Python 3.11 (FastAPI + Celery)
Frontend: Next.js 14 (App Router, TypeScript)
ORM: Prisma (core-api), raw SQL for read-heavy queries
Database: Postgres 16 (shared schema multitenant)
Cache / sessions: Redis 7
Queue: BullMQ (backed by Redis, no separate broker)
Object storage: S3-compatible (AWS S3 or Cloudflare R2)
Search: Postgres full-text + pg_trgm (no Meilisearch until needed)