How lindsey5/expense-tracker-backend works
This NestJS backend exposes an expense-tracking API: users can register, verify email, and log in, then manage wallets, budgets, and transactions and request transaction summaries. Controllers dispatch requests to domain services; the sampled authentication service persists user state through Prisma and sends verification mail through the email service. The tree also contains user lookup and a worker subsystem, but their implementation and wiring were not sampled, so their behavior and connections are left unspecified.
Main entry points: transaction.controller.ts Transaction API · JwtAuthGuard.ts JWT guard · auth.service.ts Authentication · wallet.controller.ts Wallet API
Components 18
API and identity
- Auth endpoints
src/auth/auth.controller.ts - Authentication
src/auth/auth.service.ts - JWT guard
src/auth/guards/JwtAuthGuard.ts - User lookup API
src/user/user.controller.ts - User operations
src/user/user.service.ts
Financial domains
- Wallet API
src/wallet/wallet.controller.ts - Wallet operations
src/wallet/wallet.service.ts - Budget API
src/budget/budget.controller.ts - Budget operations
src/budget/budget.service.ts - Transaction API
src/transaction/transaction.controller.ts - Transaction operations
src/transaction/transaction.service.ts - Transaction summaries
src/transaction/transaction-summary.service.ts
Persistence and email
- Prisma database access
src/prisma/prisma.service.ts - PostgreSQL
- Verification email
src/email/email.service.ts - Brevo email service
Background processing
- Worker subsystem
src/worker/worker.ts
Other components
- API client
Connections 18
- API client → Auth endpoints: submits auth
- API client → User lookup API: looks up user
- API client → Wallet API: manages wallets
- API client → Budget API: manages budgets
- API client → Transaction API: manages transactions
- Auth endpoints → Authentication: dispatches auth
- User lookup API → User operations: dispatches lookup
- Wallet API → Wallet operations: dispatches wallet
- Budget API → Budget operations: dispatches budget
- Transaction API → Transaction operations: dispatches transactions
- Transaction API → Transaction summaries: requests summaries
- JWT guard → Wallet API: guards routes
- JWT guard → Budget API: guards routes
- JWT guard → Transaction API: guards routes
- Authentication → Prisma database access: reads and writes
- Authentication → Verification email: sends codes
- Verification email → Brevo email service: sends email
- Prisma database access → PostgreSQL: accesses database