Skip to content

Architecture Map

Budgeti backend follows a layered architecture where each layer has clear ownership:

  • Product context: Budgeti is a mobile-first finance app with AI-assisted capture.
  • Documentation scope here: backend implementation map for the currently ready component.
  • Presentation: Express routes, controllers, and HTTP middlewares.
  • Application: use-case orchestration and service ports.
  • Domain: entities, invariants, and repository interfaces.
  • Infrastructure: Prisma repositories, external service adapters, logging.
  • Shared: cross-cutting errors, schemas, types, and utilities.

POST /api/v1/wallet flows through these files:

  1. backend/src/Presentation/Routes/WalletRoutes.ts
  2. backend/src/Presentation/Controllers/WalletController.ts
  3. backend/src/Application/UseCases/Wallet/CreateWalletImpl.ts
  4. backend/src/Infrastructure/Repositories/Prisma/WalletRepositoryImpl.ts
  • All bindings live in backend/src/Containers/inversify.config.ts.
  • Symbol registry is declared in backend/src/Containers/Types.ts.
  • Canonical error definition and status map: backend/src/Shared/Errors.ts.
  • Error serialization middleware: backend/src/Presentation/Middlewares/errorsMiddleware.ts.
  • Lightweight liveness endpoint: GET /health in backend/src/app.ts.