How vidhuson/retail-banking-backend works
Retail Banking Backend is an Express/TypeScript API for the operations portal, covering authentication and the customer, account, transaction, employee, dashboard, notification, support, and statement domains. The request path begins at the server’s mounted routes, applies authentication, role checks and validation where configured, then reaches controllers and services. Sampled services use repositories and shared Prisma/database, audit, notification, and request-context facilities. The README documents the wider capability set; unsampled domain internals are represented by their exact service paths, with no inferred call edges.
Main entry points: auth.service.ts Authentication · account.service.ts Account management · transaction.service.ts Transactions · routes Domain routes
Components 22
API entry and access
- Express server
src/server.ts - Domain routes
src/routes - Access middleware
src/middleware
Identity and customers
- Authentication
src/services/auth.service.ts - User repository
src/repositories/user.repository.ts - Customer management
src/services/customer.service.ts - Customer repository
src/repositories/customer.repository.ts
Banking operations
- Account management
src/services/account.service.ts - Account repository
src/repositories/account.repository.ts - Transactions
src/services/transaction.service.ts - Transaction repository
src/repositories/transaction.repository.ts - Statements
src/services/statement.service.ts
Portal operations
- Employee management
src/services/employee.service.ts - Dashboard
src/services/dashboard.service.ts - Notifications
src/services/notification.service.ts - Support
src/services/support.service.ts - Audit logging
src/services/audit-log.service.ts - Customer profiles
src/services/profile.service.ts
Shared runtime
- Request and response utilities
src/context/request-context.ts - Prisma client
src/config/prisma.ts
Other components
- API clients
- PostgreSQL
Connections 22
- API clients → Express server: sends requests
README.md - Express server → Domain routes: mounts routes
src/server.ts - Domain routes → Access middleware: applies access checks
src/routes/customer.routes.ts - Domain routes → Customer management: dispatches customer calls
src/routes/customer.routes.ts - Domain routes → Account management: dispatches account calls
src/routes/account.routes.ts - Authentication → User repository: uses
src/services/auth.service.ts - Authentication → Customer repository: creates customer
src/services/auth.service.ts - Authentication → Notifications: creates notification
src/services/auth.service.ts - Authentication → Audit logging: logs events
src/services/auth.service.ts - Customer management → Customer repository: uses
src/services/customer.service.ts - Account management → Account repository: uses
src/services/account.service.ts - Account management → Customer repository: uses
src/services/account.service.ts - Account management → Audit logging: logs events
src/services/account.service.ts - Account management → Notifications: creates notifications
src/services/account.service.ts - Transactions → Account repository: uses
src/services/transaction.service.ts - Transactions → Transaction repository: uses
src/services/transaction.service.ts - Transactions → Audit logging: logs events
src/services/transaction.service.ts - Transactions → Notifications: creates notifications
src/services/transaction.service.ts - User repository → Prisma client: queries
src/repositories/user.repository.ts - Customer repository → Prisma client: queries
src/repositories/customer.repository.ts - Prisma client → PostgreSQL: accesses
src/config/prisma.ts - Authentication → Request and response utilities: uses request context