# ankushmahajan/react-netbanking-app architecture

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

- Interactive diagram: https://gitdiagram.com/ankushmahajan/react-netbanking-app
- Repository: https://github.com/ankushmahajan/react-netbanking-app

## Overview

This React net-banking app lets a customer log in, view accounts and transaction details, and transfer money. Routing and authentication gates select the screens; page components dispatch Redux actions, which call the stub backend and update client state. The README identifies react-training-lib as the backend dependency. Some page and reducer behavior is represented from the source index and README rather than inspected excerpts, so uncertain wiring is omitted.

Main entry points: [`src/routes.js`](https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/routes.js) (App routes), [`src/components/pages/Accounts.js`](https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/components/pages/Accounts.js) (Accounts), [`src/components/pages/Login.js`](https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/components/pages/Login.js) (Login), [`src/actions/user_actions.js`](https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/actions/user_actions.js) (User actions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["Navigation and access"]
  node_routes["App routes<br/>[routes.js]"]
  node_app_shell["App shell<br/>[AppContainer.js]"]
  node_auth_gate["Auth gate"]
end

subgraph group_customer["Customer workflows"]
  node_login["Login<br/>[Login.js]"]
  node_accounts["Accounts<br/>[Accounts.js]"]
  node_account_details["Account details<br/>[AccountDetails.js]"]
  node_transfers["Balance transfers"]
  node_form_fields["Form fields"]
end

subgraph group_state["Redux state"]
  node_action_types["Action types<br/>[types.js]"]
  node_root_reducer["Root reducer<br/>[index.js]"]
  node_auth_reducer["Authentication state"]
  node_accounts_reducer["Accounts state"]
end

subgraph group_services["Backend services"]
  node_user_actions["User actions<br/>[user_actions.js]"]
  node_account_actions["Account actions<br/>[account_actions.js]"]
  node_backend["Stub backend"]
end

node_customer_actor(("Customer"))

node_customer_actor -.->|"opens screens"| node_routes
node_routes -->|"renders shell"| node_app_shell
node_routes -->|"routes to"| node_login
node_routes -->|"protects routes"| node_auth_gate
node_routes -->|"routes to"| node_accounts
node_routes -->|"routes to"| node_transfers
node_auth_gate -.->|"renders when logged in"| node_accounts
node_auth_gate -->|"checks login state"| node_auth_reducer
node_login -->|"dispatches login"| node_user_actions
node_login -->|"renders fields"| node_form_fields
node_login -->|"redirects after login"| node_accounts
node_app_shell -->|"dispatches logout"| node_user_actions
node_accounts -->|"loads account data"| node_account_actions
node_accounts -->|"renders details"| node_account_details
node_transfers -->|"submits transfer"| node_account_actions
node_user_actions -->|"calls auth API"| node_backend
node_account_actions -->|"calls account API"| node_backend
node_user_actions -->|"uses action types"| node_action_types
node_account_actions -->|"uses action types"| node_action_types
node_root_reducer -->|"combines reducer"| node_auth_reducer
node_root_reducer -->|"combines reducer"| node_accounts_reducer
node_auth_reducer -->|"handles actions"| node_action_types
node_accounts_reducer -.->|"handles actions"| node_action_types

click node_routes "https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/routes.js"
click node_app_shell "https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/components/AppContainer.js"
click node_auth_gate "https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/components/higherordercomponents/requireauthentication.js"
click node_login "https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/components/pages/Login.js"
click node_accounts "https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/components/pages/Accounts.js"
click node_account_details "https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/components/pages/AccountDetails.js"
click node_transfers "https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/components/pages/BalanceTransfers.js"
click node_form_fields "https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/components/common/renderformfields.js"
click node_user_actions "https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/actions/user_actions.js"
click node_account_actions "https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/actions/account_actions.js"
click node_action_types "https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/actions/types.js"
click node_root_reducer "https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/reducers/index.js"
click node_auth_reducer "https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/reducers/authentication_reducer.js"
click node_accounts_reducer "https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/reducers/accounts_reducer.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_routes,node_app_shell,node_auth_gate toneBlue
class node_login,node_accounts,node_account_details,node_transfers,node_form_fields toneAmber
class node_action_types,node_root_reducer,node_auth_reducer,node_accounts_reducer toneMint
class node_user_actions,node_account_actions,node_backend toneRose
class node_customer_actor toneIndigo
```

## Components

### Navigation and access

- [App routes](https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/routes.js): `src/routes.js`
- [App shell](https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/components/AppContainer.js): `src/components/AppContainer.js`
- [Auth gate](https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/components/higherordercomponents/requireauthentication.js): `src/components/higherordercomponents/requireauthentication.js`

### Customer workflows

- [Login](https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/components/pages/Login.js): `src/components/pages/Login.js`
- [Accounts](https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/components/pages/Accounts.js): `src/components/pages/Accounts.js`
- [Account details](https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/components/pages/AccountDetails.js): `src/components/pages/AccountDetails.js`
- [Balance transfers](https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/components/pages/BalanceTransfers.js): `src/components/pages/BalanceTransfers.js`
- [Form fields](https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/components/common/renderformfields.js): `src/components/common/renderformfields.js`

### Redux state

- [Action types](https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/actions/types.js): `src/actions/types.js`
- [Root reducer](https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/reducers/index.js): `src/reducers/index.js`
- [Authentication state](https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/reducers/authentication_reducer.js): `src/reducers/authentication_reducer.js`
- [Accounts state](https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/reducers/accounts_reducer.js): `src/reducers/accounts_reducer.js`

### Backend services

- [User actions](https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/actions/user_actions.js): `src/actions/user_actions.js`
- [Account actions](https://github.com/ankushmahajan/react-netbanking-app/blob/master/src/actions/account_actions.js): `src/actions/account_actions.js`
- **Stub backend**

### Other components

- **Customer**

## Connections

- Customer → App routes: opens screens
- App routes → App shell: renders shell (evidence: `src/routes.js`)
- App routes → Login: routes to (evidence: `src/routes.js`)
- App routes → Auth gate: protects routes (evidence: `src/routes.js`)
- App routes → Accounts: routes to (evidence: `src/routes.js`)
- App routes → Balance transfers: routes to (evidence: `src/routes.js`)
- Auth gate → Accounts: renders when logged in
- Auth gate → Authentication state: checks login state (evidence: `src/components/higherordercomponents/requireauthentication.js`)
- Login → User actions: dispatches login (evidence: `src/components/pages/Login.js`)
- Login → Form fields: renders fields (evidence: `src/components/pages/Login.js`)
- Login → Accounts: redirects after login (evidence: `src/components/pages/Login.js`)
- App shell → User actions: dispatches logout (evidence: `src/components/AppContainer.js`)
- Accounts → Account actions: loads account data (evidence: `src/components/pages/Accounts.js`)
- Accounts → Account details: renders details (evidence: `src/components/pages/Accounts.js`)
- Balance transfers → Account actions: submits transfer (evidence: `src/components/pages/BalanceTransfers.js`)
- User actions → Stub backend: calls auth API (evidence: `src/actions/user_actions.js`)
- Account actions → Stub backend: calls account API (evidence: `src/actions/account_actions.js`)
- User actions → Action types: uses action types (evidence: `src/actions/user_actions.js`)
- Account actions → Action types: uses action types (evidence: `src/actions/account_actions.js`)
- Root reducer → Authentication state: combines reducer (evidence: `src/reducers/index.js`)
- Root reducer → Accounts state: combines reducer (evidence: `src/reducers/index.js`)
- Authentication state → Action types: handles actions (evidence: `src/reducers/authentication_reducer.js`)
- Accounts state → Action types: handles actions (evidence: `src/reducers/accounts_reducer.js`)
