How techtee19/banking-microservice works
This is a banking microservices backend: clients enter through an API gateway, while separate services manage identity, customer profiles, accounts, payments, transfers, fraud checks, notifications, and service registration. The clearest end-to-end workflow in the excerpts is a transaction request: its service persists a pending transaction, invokes fraud screening, and coordinates account operations and notification; failures can enter reconciliation. The gateway’s downstream routing and several service-to-service HTTP implementations were not sampled, so those links are omitted or marked unverified.
Main entry points: index.js Gateway routing · payment.controller.js Payment processing · notification.controller.js Notification delivery · transaction.controller.js Transaction workflow
Components 23
API access
- API gateway
api-gateway/src/app.js - Gateway routing
api-gateway/src/routes/index.js
Identity and customers
- Authentication
auth-service/src/controllers/auth.controller.js - Users and tokens
auth-service/src/models/user.model.js - Customer profiles
customer-service/src/controllers/customer.controller.js - Customer records
customer-service/src/models/customer.model.js
Money movement
- Account operations
account-service/src/controllers/account.controller.js - Account records
account-service/src/models/account.model.js - Transaction workflow
transaction-service/src/controllers/transaction.controller.js - Transaction records
transaction-service/src/models/transaction.model.js - Payment processing
payment-service/src/controllers/payment.controller.js - Payment records
payment-service/src/models/payment.model.js - Payment provider
payment-service/src/providers/paymentGateway.provider.js
Risk and messaging
- Fraud evaluation
fraud-service/src/controllers/fraud.controller.js - Fraud rules
fraud-service/src/rules/fraudRules.js - Fraud records
fraud-service/src/models/fraudLog.model.js - Notification delivery
notification-service/src/controllers/notification.controller.js - Notification records
notification-service/src/models/notification.model.js - Email templates
notification-service/src/templates/email.templates.js - Email provider
notification-service/src/providers/email.provider.js
Service registry
- Registry API
registry-service/src/controllers/registry.controller.js - Registry store
registry-service/src/store/registry.store.js
Other components
- Banking client
Connections 27
- Banking client → API gateway: sends requests
- API gateway → Gateway routing: mounts routes
api-gateway/src/app.js - Gateway routing → Authentication: routes requests
- Gateway routing → Customer profiles: routes requests
- Gateway routing → Account operations: routes requests
- Gateway routing → Transaction workflow: routes requests
- Gateway routing → Payment processing: routes requests
- Gateway routing → Fraud evaluation: routes requests
- Gateway routing → Notification delivery: routes requests
- Authentication → Users and tokens: reads and writes
auth-service/src/controllers/auth.controller.js - Customer profiles → Customer records: reads and writes
customer-service/src/controllers/customer.controller.js - Account operations → Account records: reads and writes
account-service/src/controllers/account.controller.js - Transaction workflow → Transaction records: reads and writes
transaction-service/src/controllers/transaction.controller.js - Transaction workflow → Fraud evaluation: checks fraud
transaction-service/src/controllers/transaction.controller.js - Transaction workflow → Account operations: requests account operations
- Transaction workflow → Notification delivery: sends notification
transaction-service/src/controllers/transaction.controller.js - Payment processing → Payment records: reads and writes
payment-service/src/controllers/payment.controller.js - Payment processing → Fraud evaluation: checks fraud
payment-service/src/controllers/payment.controller.js - Payment processing → Account operations: requests account operations
- Payment processing → Payment provider: processes payment
payment-service/src/controllers/payment.controller.js - Payment processing → Notification delivery: sends notification
payment-service/src/controllers/payment.controller.js - Fraud evaluation → Fraud rules: evaluates transaction
fraud-service/src/controllers/fraud.controller.js - Fraud evaluation → Fraud records: writes checks
fraud-service/src/controllers/fraud.controller.js - Notification delivery → Notification records: reads and writes
notification-service/src/controllers/notification.controller.js - Notification delivery → Email templates: gets template
notification-service/src/controllers/notification.controller.js - Notification delivery → Email provider: sends email
notification-service/src/controllers/notification.controller.js - Registry API → Registry store: reads and writes
registry-service/src/controllers/registry.controller.js