The backend is a NestJS monorepo with two apps and shared libraries.

backend/
  apps/
    api/
      src/
    ingestion-worker/
      src/
  libs/
    config/
    contracts/
    db/
    observability/
  prisma/
mkdocs/

Apps

  • backend/apps/api: REST API service
  • backend/apps/ingestion-worker: MQTT ingestion worker and health endpoint

Shared libraries

  • backend/libs/config: environment validation and config loaders
  • backend/libs/db: Prisma client and database access
  • backend/libs/observability: health checks and logging
  • backend/libs/contracts: shared DTOs and schemas