# techtee19/banking-microservice architecture

> Architecture diagram of the GitHub repository techtee19/banking-microservice, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/techtee19/banking-microservice
- Repository: https://github.com/techtee19/banking-microservice

## Overview

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: [`api-gateway/src/routes/index.js`](https://github.com/techtee19/banking-microservice/blob/main/api-gateway/src/routes/index.js) (Gateway routing), [`payment-service/src/controllers/payment.controller.js`](https://github.com/techtee19/banking-microservice/blob/main/payment-service/src/controllers/payment.controller.js) (Payment processing), [`notification-service/src/controllers/notification.controller.js`](https://github.com/techtee19/banking-microservice/blob/main/notification-service/src/controllers/notification.controller.js) (Notification delivery), [`transaction-service/src/controllers/transaction.controller.js`](https://github.com/techtee19/banking-microservice/blob/main/transaction-service/src/controllers/transaction.controller.js) (Transaction workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_edge["API access"]
  node_gateway["API gateway<br/>[app.js]"]
  node_gateway_routes["Gateway routing<br/>[index.js]"]
end

subgraph group_identity["Identity and customers"]
  node_auth["Authentication<br/>[auth.controller.js]"]
  node_users[("Users and tokens<br/>[user.model.js]")]
  node_customers["Customer profiles"]
  node_customer_store[("Customer records<br/>[customer.model.js]")]
end

subgraph group_money["Money movement"]
  node_accounts["Account operations"]
  node_account_store[("Account records<br/>[account.model.js]")]
  node_transactions["Transaction workflow"]
  node_transaction_store[("Transaction records")]
  node_payments["Payment processing"]
  node_payment_store[("Payment records<br/>[payment.model.js]")]
  node_payment_gateway["Payment provider"]
end

subgraph group_risknotify["Risk and messaging"]
  node_fraud["Fraud evaluation"]
  node_fraud_rules["Fraud rules<br/>[fraudRules.js]"]
  node_fraud_store[("Fraud records<br/>[fraudLog.model.js]")]
  node_notifications["Notification delivery"]
  node_notification_store[("Notification records")]
  node_email_templates["Email templates<br/>[email.templates.js]"]
  node_email_provider["Email provider<br/>[email.provider.js]"]
end

subgraph group_registry["Service registry"]
  node_registry_api["Registry API"]
  node_registry_store[("Registry store<br/>[registry.store.js]")]
end

node_client(("Banking client"))

node_client -->|"sends requests"| node_gateway
node_gateway -->|"mounts routes"| node_gateway_routes
node_gateway_routes -.->|"routes requests"| node_auth
node_gateway_routes -.->|"routes requests"| node_customers
node_gateway_routes -.->|"routes requests"| node_accounts
node_gateway_routes -.->|"routes requests"| node_transactions
node_gateway_routes -.->|"routes requests"| node_payments
node_gateway_routes -.->|"routes requests"| node_fraud
node_gateway_routes -.->|"routes requests"| node_notifications
node_auth -->|"reads and writes"| node_users
node_customers -->|"reads and writes"| node_customer_store
node_accounts -->|"reads and writes"| node_account_store
node_transactions -->|"reads and writes"| node_transaction_store
node_transactions -->|"checks fraud"| node_fraud
node_transactions -.->|"requests account operations"| node_accounts
node_transactions -->|"sends notification"| node_notifications
node_payments -->|"reads and writes"| node_payment_store
node_payments -->|"checks fraud"| node_fraud
node_payments -.->|"requests account operations"| node_accounts
node_payments -->|"processes payment"| node_payment_gateway
node_payments -->|"sends notification"| node_notifications
node_fraud -->|"evaluates transaction"| node_fraud_rules
node_fraud -->|"writes checks"| node_fraud_store
node_notifications -->|"reads and writes"| node_notification_store
node_notifications -->|"gets template"| node_email_templates
node_notifications -->|"sends email"| node_email_provider
node_registry_api -->|"reads and writes"| node_registry_store

click node_gateway "https://github.com/techtee19/banking-microservice/blob/main/api-gateway/src/app.js"
click node_gateway_routes "https://github.com/techtee19/banking-microservice/blob/main/api-gateway/src/routes/index.js"
click node_auth "https://github.com/techtee19/banking-microservice/blob/main/auth-service/src/controllers/auth.controller.js"
click node_users "https://github.com/techtee19/banking-microservice/blob/main/auth-service/src/models/user.model.js"
click node_customers "https://github.com/techtee19/banking-microservice/blob/main/customer-service/src/controllers/customer.controller.js"
click node_customer_store "https://github.com/techtee19/banking-microservice/blob/main/customer-service/src/models/customer.model.js"
click node_accounts "https://github.com/techtee19/banking-microservice/blob/main/account-service/src/controllers/account.controller.js"
click node_account_store "https://github.com/techtee19/banking-microservice/blob/main/account-service/src/models/account.model.js"
click node_transactions "https://github.com/techtee19/banking-microservice/blob/main/transaction-service/src/controllers/transaction.controller.js"
click node_transaction_store "https://github.com/techtee19/banking-microservice/blob/main/transaction-service/src/models/transaction.model.js"
click node_payments "https://github.com/techtee19/banking-microservice/blob/main/payment-service/src/controllers/payment.controller.js"
click node_payment_store "https://github.com/techtee19/banking-microservice/blob/main/payment-service/src/models/payment.model.js"
click node_payment_gateway "https://github.com/techtee19/banking-microservice/blob/main/payment-service/src/providers/paymentGateway.provider.js"
click node_fraud "https://github.com/techtee19/banking-microservice/blob/main/fraud-service/src/controllers/fraud.controller.js"
click node_fraud_rules "https://github.com/techtee19/banking-microservice/blob/main/fraud-service/src/rules/fraudRules.js"
click node_fraud_store "https://github.com/techtee19/banking-microservice/blob/main/fraud-service/src/models/fraudLog.model.js"
click node_notifications "https://github.com/techtee19/banking-microservice/blob/main/notification-service/src/controllers/notification.controller.js"
click node_notification_store "https://github.com/techtee19/banking-microservice/blob/main/notification-service/src/models/notification.model.js"
click node_email_templates "https://github.com/techtee19/banking-microservice/blob/main/notification-service/src/templates/email.templates.js"
click node_email_provider "https://github.com/techtee19/banking-microservice/blob/main/notification-service/src/providers/email.provider.js"
click node_registry_api "https://github.com/techtee19/banking-microservice/blob/main/registry-service/src/controllers/registry.controller.js"
click node_registry_store "https://github.com/techtee19/banking-microservice/blob/main/registry-service/src/store/registry.store.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_gateway,node_gateway_routes,node_client toneBlue
class node_auth,node_users,node_customers,node_customer_store toneAmber
class node_accounts,node_account_store,node_transactions,node_transaction_store,node_payments,node_payment_store,node_payment_gateway toneMint
class node_fraud,node_fraud_rules,node_fraud_store,node_notifications,node_notification_store,node_email_templates,node_email_provider toneRose
class node_registry_api,node_registry_store toneIndigo
```

## Components

### API access

- [API gateway](https://github.com/techtee19/banking-microservice/blob/main/api-gateway/src/app.js): `api-gateway/src/app.js`
- [Gateway routing](https://github.com/techtee19/banking-microservice/blob/main/api-gateway/src/routes/index.js): `api-gateway/src/routes/index.js`

### Identity and customers

- [Authentication](https://github.com/techtee19/banking-microservice/blob/main/auth-service/src/controllers/auth.controller.js): `auth-service/src/controllers/auth.controller.js`
- [Users and tokens](https://github.com/techtee19/banking-microservice/blob/main/auth-service/src/models/user.model.js): `auth-service/src/models/user.model.js`
- [Customer profiles](https://github.com/techtee19/banking-microservice/blob/main/customer-service/src/controllers/customer.controller.js): `customer-service/src/controllers/customer.controller.js`
- [Customer records](https://github.com/techtee19/banking-microservice/blob/main/customer-service/src/models/customer.model.js): `customer-service/src/models/customer.model.js`

### Money movement

- [Account operations](https://github.com/techtee19/banking-microservice/blob/main/account-service/src/controllers/account.controller.js): `account-service/src/controllers/account.controller.js`
- [Account records](https://github.com/techtee19/banking-microservice/blob/main/account-service/src/models/account.model.js): `account-service/src/models/account.model.js`
- [Transaction workflow](https://github.com/techtee19/banking-microservice/blob/main/transaction-service/src/controllers/transaction.controller.js): `transaction-service/src/controllers/transaction.controller.js`
- [Transaction records](https://github.com/techtee19/banking-microservice/blob/main/transaction-service/src/models/transaction.model.js): `transaction-service/src/models/transaction.model.js`
- [Payment processing](https://github.com/techtee19/banking-microservice/blob/main/payment-service/src/controllers/payment.controller.js): `payment-service/src/controllers/payment.controller.js`
- [Payment records](https://github.com/techtee19/banking-microservice/blob/main/payment-service/src/models/payment.model.js): `payment-service/src/models/payment.model.js`
- [Payment provider](https://github.com/techtee19/banking-microservice/blob/main/payment-service/src/providers/paymentGateway.provider.js): `payment-service/src/providers/paymentGateway.provider.js`

### Risk and messaging

- [Fraud evaluation](https://github.com/techtee19/banking-microservice/blob/main/fraud-service/src/controllers/fraud.controller.js): `fraud-service/src/controllers/fraud.controller.js`
- [Fraud rules](https://github.com/techtee19/banking-microservice/blob/main/fraud-service/src/rules/fraudRules.js): `fraud-service/src/rules/fraudRules.js`
- [Fraud records](https://github.com/techtee19/banking-microservice/blob/main/fraud-service/src/models/fraudLog.model.js): `fraud-service/src/models/fraudLog.model.js`
- [Notification delivery](https://github.com/techtee19/banking-microservice/blob/main/notification-service/src/controllers/notification.controller.js): `notification-service/src/controllers/notification.controller.js`
- [Notification records](https://github.com/techtee19/banking-microservice/blob/main/notification-service/src/models/notification.model.js): `notification-service/src/models/notification.model.js`
- [Email templates](https://github.com/techtee19/banking-microservice/blob/main/notification-service/src/templates/email.templates.js): `notification-service/src/templates/email.templates.js`
- [Email provider](https://github.com/techtee19/banking-microservice/blob/main/notification-service/src/providers/email.provider.js): `notification-service/src/providers/email.provider.js`

### Service registry

- [Registry API](https://github.com/techtee19/banking-microservice/blob/main/registry-service/src/controllers/registry.controller.js): `registry-service/src/controllers/registry.controller.js`
- [Registry store](https://github.com/techtee19/banking-microservice/blob/main/registry-service/src/store/registry.store.js): `registry-service/src/store/registry.store.js`

### Other components

- **Banking client**

## Connections

- Banking client → API gateway: sends requests
- API gateway → Gateway routing: mounts routes (evidence: `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 (evidence: `auth-service/src/controllers/auth.controller.js`)
- Customer profiles → Customer records: reads and writes (evidence: `customer-service/src/controllers/customer.controller.js`)
- Account operations → Account records: reads and writes (evidence: `account-service/src/controllers/account.controller.js`)
- Transaction workflow → Transaction records: reads and writes (evidence: `transaction-service/src/controllers/transaction.controller.js`)
- Transaction workflow → Fraud evaluation: checks fraud (evidence: `transaction-service/src/controllers/transaction.controller.js`)
- Transaction workflow → Account operations: requests account operations
- Transaction workflow → Notification delivery: sends notification (evidence: `transaction-service/src/controllers/transaction.controller.js`)
- Payment processing → Payment records: reads and writes (evidence: `payment-service/src/controllers/payment.controller.js`)
- Payment processing → Fraud evaluation: checks fraud (evidence: `payment-service/src/controllers/payment.controller.js`)
- Payment processing → Account operations: requests account operations
- Payment processing → Payment provider: processes payment (evidence: `payment-service/src/controllers/payment.controller.js`)
- Payment processing → Notification delivery: sends notification (evidence: `payment-service/src/controllers/payment.controller.js`)
- Fraud evaluation → Fraud rules: evaluates transaction (evidence: `fraud-service/src/controllers/fraud.controller.js`)
- Fraud evaluation → Fraud records: writes checks (evidence: `fraud-service/src/controllers/fraud.controller.js`)
- Notification delivery → Notification records: reads and writes (evidence: `notification-service/src/controllers/notification.controller.js`)
- Notification delivery → Email templates: gets template (evidence: `notification-service/src/controllers/notification.controller.js`)
- Notification delivery → Email provider: sends email (evidence: `notification-service/src/controllers/notification.controller.js`)
- Registry API → Registry store: reads and writes (evidence: `registry-service/src/controllers/registry.controller.js`)
