How leacarp/rappi-tp works
Project type and purpose
• This is an Nx‐managed monorepo containing:
• A NestJS backend application (apps/rappi-backend-m2)
• An end-to-end test suite for that backend (apps/rappi-backend-m2-e2e)
• Purpose: to serve as a modular, testable backend API built with NestJS and orchestrated via Nx.
File structure
• Top level: standard Nx workspace files (nx.json, tsconfig.base.json, CI workflow, package.json)
• apps/
• rappi-backend-m2/ – the NestJS application
– src/main.ts: entry point, bootstraps Nest application
– src/app/app.module.ts: root module, imports submodules, declares controllers & providers
– src/app/app.controller.ts & app.service.ts: sample controller/service pair
– webpack.config.js: custom build config
• rappi-backend-m2-e2e/ – Jest-based e2e tests
– src/support/ for setup/teardown scripts
– rappi-backend-m2.spec.ts: example end-to-end test against the running backend
• Config files: per-project project.json, ESLint, tsconfig, Jest configs
README for additional insights
• Confirms Nx + NestJS stack
• Shows how to serve, build, and test via npx nx commands
• Mentions the ability to generate new apps/libs using Nx plugins
a. Main components
– Nx Workspace (container for all projects and shared code)
– rappi-backend-m2 (NestJS HTTP API server)
– rappi-backend-m2-e2e (test runner invoking HTTP calls)
– External dependencies (e.g., Database, Cache, Third‐party APIs – if/when added)
– CI Pipeline (GitHub Actions workflow)
b. Relationships and interactions
– CI → Nx Workspace: triggers build/test tasks
– Nx Workspace → rappi-backend-m2: runs serve and build
– rappi-backend-m2-e2e → rappi-backend-m2: HTTP requests to exposed endpoints
c. Architectural patterns and design principles
– NestJS modular structure (AppModule imports, controllers/providers)
– MVC: Controllers handle routes → Services contain business logic
– Nx project graph: independent tasks and dependency orchestration
– e2e testing layer separated from production code
d. Key technologies/frameworks
– Node.js + TypeScript
– NestJS (Modules, Controllers, Services)
– Nx (monorepo tooling, generators, task runner)
– Jest (unit & e2e testing)
– Webpack (custom build pipeline)
Elements
• Workspace → API (build/serve)
• API → Database (read/write)
• e2e → API (HTTP requests)
• CI → Workspace (triggers tasks)
• Runtime components (API, Database) in another
• Test harness in a third