Apps
Per-service specs. Each service is owned, deployable, and tested independently. The platform is a small constellation of services that share a database (core-api is the only writer) and a queue (BullMQ on Redis).
Services
- api-gateway — single HTTP entry point. Tenant resolution, auth, routing. No business logic.
- core-api — main business logic. Modular monolith on Fastify + Prisma. Owns the schema.
- tenant-web — Next.js frontend. Student portal and admin dashboard, role-aware.
- ai-worker — Python worker for AI jobs. Consumes from the
ai-jobsqueue, writes results back. - notification-service — queue consumer. Email, in-app, outbound webhooks.
Conventions
Every service ships with: a /health endpoint (or queue heartbeat), structured JSON logs with tenant_id + request_id, and a Dockerfile. Services that talk to the DB go through core-api — only core-api holds Prisma.