# jatinrwt01/bank_management_system architecture

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

- Interactive diagram: https://gitdiagram.com/jatinrwt01/bank_management_system
- Repository: https://github.com/jatinrwt01/bank_management_system

## Overview

This is an online banking system with customer, employee, and administrator portals. Users register or sign in, then use role-gated screens for account balances, deposits, withdrawals, transfers, and transaction history; staff can search customers and process desk transactions, while administrators manage customer status and review transactions. The frontend API client calls the backend, whose route handlers authorize requests and invoke controllers that access MySQL. Major screens and backend capabilities are represented, but unsampled controller and page internals are not inferred beyond indexed imports and documented routes.

Main entry points: [`frontend/src/App.jsx`](https://github.com/jatinrwt01/bank_management_system/blob/main/frontend/src/App.jsx) (Route application), [`frontend/src/services/api.js`](https://github.com/jatinrwt01/bank_management_system/blob/main/frontend/src/services/api.js) (HTTP API client), [`backend/server.js`](https://github.com/jatinrwt01/bank_management_system/blob/main/backend/server.js) (Express API server), [`backend/config/db.js`](https://github.com/jatinrwt01/bank_management_system/blob/main/backend/config/db.js) (MySQL pool)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["Route application<br/>[App.jsx]"]
  node_navbar["Navigation<br/>[Navbar.jsx]"]
  node_guard["Role route guard<br/>[ProtectedRoute.jsx]"]
  node_login["Login and registration<br/>[LoginPage.jsx]"]
  node_register["Registration screen<br/>[RegisterPage.jsx]"]
  node_dashboard["Customer dashboard<br/>[DashboardPage.jsx]"]
  node_transactions["Transaction history"]
  node_money["Deposit withdraw transfer<br/>[TransferPage.jsx]"]
  node_adminui["Admin portal"]
  node_employeeui["Employee portal"]
end

subgraph group_api["API and access control"]
  node_api_client["HTTP API client<br/>[api.js]"]
  node_server["Express API server<br/>[server.js]"]
  node_authroutes["Authentication routes<br/>[authRoutes.js]"]
  node_account_routes["Account routes<br/>[accountRoutes.js]"]
  node_transaction_routes["Transaction routes"]
  node_admin_routes["Admin routes<br/>[adminRoutes.js]"]
  node_employee_routes["Employee routes<br/>[employeeRoutes.js]"]
  node_auth_middleware["Token verification<br/>[authMiddleware.js]"]
  node_role_middleware["Role authorization<br/>[roleMiddleware.js]"]
end

subgraph group_banking["Banking operations"]
  node_auth_controller["Identity handling<br/>[authController.js]"]
  node_account_controller["Account queries"]
  node_transaction_controller["Customer transactions"]
end

subgraph group_operations["Staff and administration"]
  node_admin_controller["Customer administration<br/>[adminController.js]"]
  node_employee_controller["Staff customer desk"]
end

subgraph group_data["Configuration and storage"]
  node_db_config["MySQL pool<br/>[db.js]"]
  node_mysql[("MySQL database")]
end

node_user(("Bank user"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_navbar
node_app -->|"gates routes"| node_guard
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_register
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_transactions
node_app -->|"routes to"| node_money
node_app -->|"routes to"| node_adminui
node_app -->|"routes to"| node_employeeui
node_login -->|"calls"| node_api_client
node_register -->|"calls"| node_api_client
node_dashboard -->|"calls"| node_api_client
node_transactions -->|"calls"| node_api_client
node_money -->|"calls"| node_api_client
node_adminui -->|"calls"| node_api_client
node_employeeui -->|"calls"| node_api_client
node_api_client -->|"HTTP requests"| node_server
node_server -->|"mounts"| node_authroutes
node_server -->|"mounts"| node_account_routes
node_server -->|"mounts"| node_transaction_routes
node_server -->|"mounts"| node_admin_routes
node_server -->|"mounts"| node_employee_routes
node_authroutes -->|"dispatches"| node_auth_controller
node_account_routes -->|"dispatches"| node_account_controller
node_transaction_routes -->|"dispatches"| node_transaction_controller
node_admin_routes -->|"dispatches"| node_admin_controller
node_employee_routes -->|"dispatches"| node_employee_controller
node_transaction_routes -->|"checks token"| node_auth_middleware
node_admin_routes -->|"checks token"| node_auth_middleware
node_admin_routes -->|"checks role"| node_role_middleware
node_employee_routes -->|"checks token"| node_auth_middleware
node_employee_routes -->|"checks role"| node_role_middleware
node_auth_controller -->|"queries"| node_db_config
node_account_controller -->|"queries"| node_db_config
node_transaction_controller -->|"queries"| node_db_config
node_admin_controller -->|"queries"| node_db_config
node_employee_controller -->|"queries"| node_db_config
node_db_config -->|"connects"| node_mysql

click node_app "https://github.com/jatinrwt01/bank_management_system/blob/main/frontend/src/App.jsx"
click node_navbar "https://github.com/jatinrwt01/bank_management_system/blob/main/frontend/src/components/Navbar.jsx"
click node_guard "https://github.com/jatinrwt01/bank_management_system/blob/main/frontend/src/components/ProtectedRoute.jsx"
click node_login "https://github.com/jatinrwt01/bank_management_system/blob/main/frontend/src/pages/LoginPage.jsx"
click node_register "https://github.com/jatinrwt01/bank_management_system/blob/main/frontend/src/pages/RegisterPage.jsx"
click node_dashboard "https://github.com/jatinrwt01/bank_management_system/blob/main/frontend/src/pages/DashboardPage.jsx"
click node_transactions "https://github.com/jatinrwt01/bank_management_system/blob/main/frontend/src/pages/TransactionsPage.jsx"
click node_money "https://github.com/jatinrwt01/bank_management_system/blob/main/frontend/src/pages/TransferPage.jsx"
click node_adminui "https://github.com/jatinrwt01/bank_management_system/blob/main/frontend/src/pages/admin/AdminDashboardPage.jsx"
click node_employeeui "https://github.com/jatinrwt01/bank_management_system/blob/main/frontend/src/pages/employee/EmployeeDashboardPage.jsx"
click node_api_client "https://github.com/jatinrwt01/bank_management_system/blob/main/frontend/src/services/api.js"
click node_server "https://github.com/jatinrwt01/bank_management_system/blob/main/backend/server.js"
click node_authroutes "https://github.com/jatinrwt01/bank_management_system/blob/main/backend/routes/authRoutes.js"
click node_account_routes "https://github.com/jatinrwt01/bank_management_system/blob/main/backend/routes/accountRoutes.js"
click node_transaction_routes "https://github.com/jatinrwt01/bank_management_system/blob/main/backend/routes/transactionRoutes.js"
click node_admin_routes "https://github.com/jatinrwt01/bank_management_system/blob/main/backend/routes/adminRoutes.js"
click node_employee_routes "https://github.com/jatinrwt01/bank_management_system/blob/main/backend/routes/employeeRoutes.js"
click node_auth_middleware "https://github.com/jatinrwt01/bank_management_system/blob/main/backend/middleware/authMiddleware.js"
click node_role_middleware "https://github.com/jatinrwt01/bank_management_system/blob/main/backend/middleware/roleMiddleware.js"
click node_auth_controller "https://github.com/jatinrwt01/bank_management_system/blob/main/backend/controllers/authController.js"
click node_account_controller "https://github.com/jatinrwt01/bank_management_system/blob/main/backend/controllers/accountController.js"
click node_transaction_controller "https://github.com/jatinrwt01/bank_management_system/blob/main/backend/controllers/transactionController.js"
click node_admin_controller "https://github.com/jatinrwt01/bank_management_system/blob/main/backend/controllers/adminController.js"
click node_employee_controller "https://github.com/jatinrwt01/bank_management_system/blob/main/backend/controllers/employeeController.js"
click node_db_config "https://github.com/jatinrwt01/bank_management_system/blob/main/backend/config/db.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_app,node_navbar,node_guard,node_login,node_register,node_dashboard,node_transactions,node_money,node_adminui,node_employeeui,node_user toneBlue
class node_api_client,node_server,node_authroutes,node_account_routes,node_transaction_routes,node_admin_routes,node_employee_routes,node_auth_middleware,node_role_middleware toneAmber
class node_auth_controller,node_account_controller,node_transaction_controller toneMint
class node_admin_controller,node_employee_controller toneRose
class node_db_config,node_mysql toneIndigo
```

## Components

### Web client

- [Route application](https://github.com/jatinrwt01/bank_management_system/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Navigation](https://github.com/jatinrwt01/bank_management_system/blob/main/frontend/src/components/Navbar.jsx): `frontend/src/components/Navbar.jsx`
- [Role route guard](https://github.com/jatinrwt01/bank_management_system/blob/main/frontend/src/components/ProtectedRoute.jsx): `frontend/src/components/ProtectedRoute.jsx`
- [Login and registration](https://github.com/jatinrwt01/bank_management_system/blob/main/frontend/src/pages/LoginPage.jsx): `frontend/src/pages/LoginPage.jsx`
- [Registration screen](https://github.com/jatinrwt01/bank_management_system/blob/main/frontend/src/pages/RegisterPage.jsx): `frontend/src/pages/RegisterPage.jsx`
- [Customer dashboard](https://github.com/jatinrwt01/bank_management_system/blob/main/frontend/src/pages/DashboardPage.jsx): `frontend/src/pages/DashboardPage.jsx`
- [Transaction history](https://github.com/jatinrwt01/bank_management_system/blob/main/frontend/src/pages/TransactionsPage.jsx): `frontend/src/pages/TransactionsPage.jsx`
- [Deposit withdraw transfer](https://github.com/jatinrwt01/bank_management_system/blob/main/frontend/src/pages/TransferPage.jsx): `frontend/src/pages/TransferPage.jsx`
- [Admin portal](https://github.com/jatinrwt01/bank_management_system/blob/main/frontend/src/pages/admin/AdminDashboardPage.jsx): `frontend/src/pages/admin/AdminDashboardPage.jsx`
- [Employee portal](https://github.com/jatinrwt01/bank_management_system/blob/main/frontend/src/pages/employee/EmployeeDashboardPage.jsx): `frontend/src/pages/employee/EmployeeDashboardPage.jsx`

### API and access control

- [HTTP API client](https://github.com/jatinrwt01/bank_management_system/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`
- [Express API server](https://github.com/jatinrwt01/bank_management_system/blob/main/backend/server.js): `backend/server.js`
- [Authentication routes](https://github.com/jatinrwt01/bank_management_system/blob/main/backend/routes/authRoutes.js): `backend/routes/authRoutes.js`
- [Account routes](https://github.com/jatinrwt01/bank_management_system/blob/main/backend/routes/accountRoutes.js): `backend/routes/accountRoutes.js`
- [Transaction routes](https://github.com/jatinrwt01/bank_management_system/blob/main/backend/routes/transactionRoutes.js): `backend/routes/transactionRoutes.js`
- [Admin routes](https://github.com/jatinrwt01/bank_management_system/blob/main/backend/routes/adminRoutes.js): `backend/routes/adminRoutes.js`
- [Employee routes](https://github.com/jatinrwt01/bank_management_system/blob/main/backend/routes/employeeRoutes.js): `backend/routes/employeeRoutes.js`
- [Token verification](https://github.com/jatinrwt01/bank_management_system/blob/main/backend/middleware/authMiddleware.js): `backend/middleware/authMiddleware.js`
- [Role authorization](https://github.com/jatinrwt01/bank_management_system/blob/main/backend/middleware/roleMiddleware.js): `backend/middleware/roleMiddleware.js`

### Banking operations

- [Identity handling](https://github.com/jatinrwt01/bank_management_system/blob/main/backend/controllers/authController.js): `backend/controllers/authController.js`
- [Account queries](https://github.com/jatinrwt01/bank_management_system/blob/main/backend/controllers/accountController.js): `backend/controllers/accountController.js`
- [Customer transactions](https://github.com/jatinrwt01/bank_management_system/blob/main/backend/controllers/transactionController.js): `backend/controllers/transactionController.js`

### Staff and administration

- [Customer administration](https://github.com/jatinrwt01/bank_management_system/blob/main/backend/controllers/adminController.js): `backend/controllers/adminController.js`
- [Staff customer desk](https://github.com/jatinrwt01/bank_management_system/blob/main/backend/controllers/employeeController.js): `backend/controllers/employeeController.js`

### Configuration and storage

- [MySQL pool](https://github.com/jatinrwt01/bank_management_system/blob/main/backend/config/db.js): `backend/config/db.js`
- **MySQL database**

### Other components

- **Bank user**

## Connections

- Bank user → Route application: uses (evidence: `frontend/src/App.jsx`)
- Route application → Navigation: renders (evidence: `frontend/src/App.jsx`)
- Route application → Role route guard: gates routes (evidence: `frontend/src/App.jsx`)
- Route application → Login and registration: routes to (evidence: `frontend/src/App.jsx`)
- Route application → Registration screen: routes to (evidence: `frontend/src/App.jsx`)
- Route application → Customer dashboard: routes to (evidence: `frontend/src/App.jsx`)
- Route application → Transaction history: routes to (evidence: `frontend/src/App.jsx`)
- Route application → Deposit withdraw transfer: routes to (evidence: `frontend/src/App.jsx`)
- Route application → Admin portal: routes to (evidence: `frontend/src/App.jsx`)
- Route application → Employee portal: routes to (evidence: `frontend/src/App.jsx`)
- Login and registration → HTTP API client: calls (evidence: `frontend/src/pages/LoginPage.jsx`)
- Registration screen → HTTP API client: calls (evidence: `frontend/src/pages/RegisterPage.jsx`)
- Customer dashboard → HTTP API client: calls (evidence: `frontend/src/pages/DashboardPage.jsx`)
- Transaction history → HTTP API client: calls (evidence: `frontend/src/pages/TransactionsPage.jsx`)
- Deposit withdraw transfer → HTTP API client: calls (evidence: `frontend/src/pages/TransferPage.jsx`)
- Admin portal → HTTP API client: calls (evidence: `frontend/src/pages/admin/AdminDashboardPage.jsx`)
- Employee portal → HTTP API client: calls (evidence: `frontend/src/pages/employee/EmployeeDashboardPage.jsx`)
- HTTP API client → Express API server: HTTP requests (evidence: `frontend/src/services/api.js`)
- Express API server → Authentication routes: mounts (evidence: `backend/server.js`)
- Express API server → Account routes: mounts (evidence: `backend/server.js`)
- Express API server → Transaction routes: mounts (evidence: `backend/server.js`)
- Express API server → Admin routes: mounts (evidence: `backend/server.js`)
- Express API server → Employee routes: mounts (evidence: `backend/server.js`)
- Authentication routes → Identity handling: dispatches (evidence: `backend/routes/authRoutes.js`)
- Account routes → Account queries: dispatches (evidence: `backend/routes/accountRoutes.js`)
- Transaction routes → Customer transactions: dispatches (evidence: `backend/routes/transactionRoutes.js`)
- Admin routes → Customer administration: dispatches (evidence: `backend/routes/adminRoutes.js`)
- Employee routes → Staff customer desk: dispatches (evidence: `backend/routes/employeeRoutes.js`)
- Transaction routes → Token verification: checks token (evidence: `backend/routes/transactionRoutes.js`)
- Admin routes → Token verification: checks token (evidence: `backend/routes/adminRoutes.js`)
- Admin routes → Role authorization: checks role (evidence: `backend/routes/adminRoutes.js`)
- Employee routes → Token verification: checks token (evidence: `backend/routes/employeeRoutes.js`)
- Employee routes → Role authorization: checks role (evidence: `backend/routes/employeeRoutes.js`)
- Identity handling → MySQL pool: queries (evidence: `backend/controllers/authController.js`)
- Account queries → MySQL pool: queries (evidence: `backend/controllers/accountController.js`)
- Customer transactions → MySQL pool: queries (evidence: `backend/controllers/transactionController.js`)
- Customer administration → MySQL pool: queries (evidence: `backend/controllers/adminController.js`)
- Staff customer desk → MySQL pool: queries (evidence: `backend/controllers/employeeController.js`)
- MySQL pool → MySQL database: connects (evidence: `backend/config/db.js`)
