How sunbird-all/all-learner-ai-services works
Project type and purpose
• This is a full-stack backend service built on NestJS (a Node.js/TypeScript framework) that exposes RESTful endpoints for managing “scores” and related data.
• It orchestrates data flows between API clients and three data stores (MongoDB, MySQL, Redis) and includes authentication, configuration, and caching layers.
File structure
• Top-level artifacts:
• Dockerfile & docker-compose.yml (defines containers for the app, MongoDB, MySQL, Redis)
• nest-cli.json, tsconfig.json/build (build configuration)
• .github/workflows/* (CI/CD pipelines)
• src/ modules:
• app.module.ts, app.controller.ts/service.ts (entry point & heartbeat)
• auth/ (AuthGuard, AuthModule for JWT/OAuth)
• config/ (environment-specific DB configs for MongoDB & MySQL)
• mongodb/ (cache service, language config, DTOs, Mongoose schemas, controllers/services for scores & logs)
• mysql/ (TypeORM Entities, DTOs, controllers/services for scores)
• redis/ (RedisModule for cache)
• test/ (unit & e2e tests)
README for insights
• Standard NestJS starter README: confirms use of NestJS CLI, modules, and standard commands.
Detail
• Sequence of a typical request (annotate steps 1–5).