# santhoshjk159/nexus-bms architecture

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

- Interactive diagram: https://gitdiagram.com/santhoshjk159/nexus-bms
- Repository: https://github.com/santhoshjk159/nexus-bms

## Overview

This is a banking-portal demo, despite the README’s generic screenshot-replica description. Its main workflow is role-based sign-in into customer, employee, or admin workspaces, where users review accounts and perform banking or operational tasks backed by a local mock banking store. The graph preserves the major customer, staff, and administration areas visible in the route tree, plus banking rules and shared UI/data layers. Some route implementations were not sampled, so their internal links are omitted rather than inferred.

Main entry points: [`src/services/store.ts`](https://github.com/santhoshjk159/nexus-bms/blob/main/src/services/store.ts) (Banking state), [`src/routes/customer.tsx`](https://github.com/santhoshjk159/nexus-bms/blob/main/src/routes/customer.tsx) (Customer portal), [`src/routeTree.gen.ts`](https://github.com/santhoshjk159/nexus-bms/blob/main/src/routeTree.gen.ts) (Role routes), [`src/routes/customer.loans.tsx`](https://github.com/santhoshjk159/nexus-bms/blob/main/src/routes/customer.loans.tsx) (Loans)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App Entry"]
  node_router["Router<br/>[router.tsx]"]
  node_routes["Role routes<br/>[routeTree.gen.ts]"]
  node_login["Sign in<br/>[login.tsx]"]
  node_shell["App shell<br/>[AppShell.tsx]"]
end

subgraph group_customer["Customer Banking"]
  node_customer_area["Customer portal<br/>[customer.tsx]"]
  node_accounts["Accounts and profile"]
  node_transfers["Transfers and payees"]
  node_loans["Loans<br/>[customer.loans.tsx]"]
  node_cards["Cards<br/>[customer.cards.tsx]"]
  node_customer_views["Customer activity"]
end

subgraph group_operations["Staff Operations"]
  node_employee_area["Employee portal<br/>[employee.tsx]"]
  node_employee_work["Employee services"]
  node_support["Customer support"]
end

subgraph group_admin["Administration"]
  node_admin_area["Admin portal<br/>[admin.tsx]"]
  node_admin_work["Admin controls<br/>[admin.ledger.tsx]"]
end

subgraph group_core["Banking Core"]
  node_auth["Session and access<br/>[auth.ts]"]
  node_store[("Banking state<br/>[store.ts]")]
  node_rules["Banking rules<br/>[banking.ts]"]
  node_customer_hook["Customer selector<br/>[use-customer.ts]"]
  node_finance_ui["Finance components<br/>[ui.tsx]"]
  node_data_table["Data table<br/>[DataTable.tsx]"]
  node_txn_drawer["Transaction drawer<br/>[TxnDrawer.tsx]"]
  node_charts["Finance charts<br/>[charts.tsx]"]
  node_types["Banking domain types<br/>[index.ts]"]
  node_format["Formatting utilities<br/>[format.ts]"]
end

node_user(("Portal user"))

node_router -->|"loads route tree"| node_routes
node_user -.->|"signs in"| node_login
node_login -.->|"authenticates"| node_auth
node_routes -->|"routes to"| node_customer_area
node_routes -->|"routes to"| node_employee_area
node_routes -->|"routes to"| node_admin_area
node_shell -->|"reads session"| node_auth
node_shell -->|"reads state"| node_store
node_customer_area -.->|"contains dashboard"| node_customer_views
node_customer_area -.->|"routes to"| node_accounts
node_customer_area -.->|"routes to"| node_transfers
node_customer_area -.->|"routes to"| node_loans
node_customer_area -.->|"routes to"| node_cards
node_employee_area -.->|"routes to"| node_employee_work
node_employee_area -.->|"routes to"| node_support
node_admin_area -.->|"routes to"| node_admin_work
node_customer_hook -->|"gets session"| node_auth
node_customer_hook -->|"selects records"| node_store
node_transfers -->|"reads and updates"| node_store
node_loans -->|"reads and updates"| node_store
node_cards -->|"reads and updates"| node_store
node_employee_work -->|"reads and updates"| node_store
node_support -->|"reads and updates"| node_store
node_admin_work -->|"reads and updates"| node_store
node_store -->|"screens transfers"| node_rules
node_admin_work -->|"uses ledger rules"| node_rules
node_customer_views -->|"selects customer data"| node_customer_hook
node_customer_views -->|"renders drawer"| node_txn_drawer
node_customer_views -->|"renders charts"| node_charts
node_loans -->|"renders panels"| node_finance_ui
node_loans -->|"renders schedule"| node_data_table
node_admin_work -->|"renders ledger rows"| node_data_table
node_store -->|"reads session"| node_auth
node_store -->|"uses domain types"| node_types
node_rules -->|"uses domain types"| node_types
node_finance_ui -->|"formats amounts"| node_format
node_data_table -->|"renders empty state"| node_finance_ui
node_charts -->|"formats values"| node_format

click node_router "https://github.com/santhoshjk159/nexus-bms/blob/main/src/router.tsx"
click node_routes "https://github.com/santhoshjk159/nexus-bms/blob/main/src/routeTree.gen.ts"
click node_login "https://github.com/santhoshjk159/nexus-bms/blob/main/src/routes/login.tsx"
click node_shell "https://github.com/santhoshjk159/nexus-bms/blob/main/src/components/layout/AppShell.tsx"
click node_customer_area "https://github.com/santhoshjk159/nexus-bms/blob/main/src/routes/customer.tsx"
click node_accounts "https://github.com/santhoshjk159/nexus-bms/blob/main/src/routes/customer.accounts.tsx"
click node_transfers "https://github.com/santhoshjk159/nexus-bms/blob/main/src/routes/customer.transfers.tsx"
click node_loans "https://github.com/santhoshjk159/nexus-bms/blob/main/src/routes/customer.loans.tsx"
click node_cards "https://github.com/santhoshjk159/nexus-bms/blob/main/src/routes/customer.cards.tsx"
click node_customer_views "https://github.com/santhoshjk159/nexus-bms/blob/main/src/routes/customer.dashboard.tsx"
click node_employee_area "https://github.com/santhoshjk159/nexus-bms/blob/main/src/routes/employee.tsx"
click node_employee_work "https://github.com/santhoshjk159/nexus-bms/blob/main/src/routes/employee.accounts.tsx"
click node_support "https://github.com/santhoshjk159/nexus-bms/blob/main/src/routes/employee.support.tsx"
click node_admin_area "https://github.com/santhoshjk159/nexus-bms/blob/main/src/routes/admin.tsx"
click node_admin_work "https://github.com/santhoshjk159/nexus-bms/blob/main/src/routes/admin.ledger.tsx"
click node_auth "https://github.com/santhoshjk159/nexus-bms/blob/main/src/lib/auth.ts"
click node_store "https://github.com/santhoshjk159/nexus-bms/blob/main/src/services/store.ts"
click node_rules "https://github.com/santhoshjk159/nexus-bms/blob/main/src/lib/banking.ts"
click node_customer_hook "https://github.com/santhoshjk159/nexus-bms/blob/main/src/hooks/use-customer.ts"
click node_finance_ui "https://github.com/santhoshjk159/nexus-bms/blob/main/src/components/finance/ui.tsx"
click node_data_table "https://github.com/santhoshjk159/nexus-bms/blob/main/src/components/data/DataTable.tsx"
click node_txn_drawer "https://github.com/santhoshjk159/nexus-bms/blob/main/src/components/finance/TxnDrawer.tsx"
click node_charts "https://github.com/santhoshjk159/nexus-bms/blob/main/src/components/finance/charts.tsx"
click node_types "https://github.com/santhoshjk159/nexus-bms/blob/main/src/types/index.ts"
click node_format "https://github.com/santhoshjk159/nexus-bms/blob/main/src/lib/format.ts"

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_router,node_routes,node_login,node_shell,node_user toneBlue
class node_customer_area,node_accounts,node_transfers,node_loans,node_cards,node_customer_views toneAmber
class node_employee_area,node_employee_work,node_support toneMint
class node_admin_area,node_admin_work toneRose
class node_auth,node_store,node_rules,node_customer_hook,node_finance_ui,node_data_table,node_txn_drawer,node_charts,node_types,node_format toneIndigo
```

## Components

### App Entry

- [Router](https://github.com/santhoshjk159/nexus-bms/blob/main/src/router.tsx): `src/router.tsx`
- [Role routes](https://github.com/santhoshjk159/nexus-bms/blob/main/src/routeTree.gen.ts): `src/routeTree.gen.ts`
- [Sign in](https://github.com/santhoshjk159/nexus-bms/blob/main/src/routes/login.tsx): `src/routes/login.tsx`
- [App shell](https://github.com/santhoshjk159/nexus-bms/blob/main/src/components/layout/AppShell.tsx): `src/components/layout/AppShell.tsx`

### Customer Banking

- [Customer portal](https://github.com/santhoshjk159/nexus-bms/blob/main/src/routes/customer.tsx): `src/routes/customer.tsx`
- [Accounts and profile](https://github.com/santhoshjk159/nexus-bms/blob/main/src/routes/customer.accounts.tsx): `src/routes/customer.accounts.tsx`
- [Transfers and payees](https://github.com/santhoshjk159/nexus-bms/blob/main/src/routes/customer.transfers.tsx): `src/routes/customer.transfers.tsx`
- [Loans](https://github.com/santhoshjk159/nexus-bms/blob/main/src/routes/customer.loans.tsx): `src/routes/customer.loans.tsx`
- [Cards](https://github.com/santhoshjk159/nexus-bms/blob/main/src/routes/customer.cards.tsx): `src/routes/customer.cards.tsx`
- [Customer activity](https://github.com/santhoshjk159/nexus-bms/blob/main/src/routes/customer.dashboard.tsx): `src/routes/customer.dashboard.tsx`

### Staff Operations

- [Employee portal](https://github.com/santhoshjk159/nexus-bms/blob/main/src/routes/employee.tsx): `src/routes/employee.tsx`
- [Employee services](https://github.com/santhoshjk159/nexus-bms/blob/main/src/routes/employee.accounts.tsx): `src/routes/employee.accounts.tsx`
- [Customer support](https://github.com/santhoshjk159/nexus-bms/blob/main/src/routes/employee.support.tsx): `src/routes/employee.support.tsx`

### Administration

- [Admin portal](https://github.com/santhoshjk159/nexus-bms/blob/main/src/routes/admin.tsx): `src/routes/admin.tsx`
- [Admin controls](https://github.com/santhoshjk159/nexus-bms/blob/main/src/routes/admin.ledger.tsx): `src/routes/admin.ledger.tsx`

### Banking Core

- [Session and access](https://github.com/santhoshjk159/nexus-bms/blob/main/src/lib/auth.ts): `src/lib/auth.ts`
- [Banking state](https://github.com/santhoshjk159/nexus-bms/blob/main/src/services/store.ts): `src/services/store.ts`
- [Banking rules](https://github.com/santhoshjk159/nexus-bms/blob/main/src/lib/banking.ts): `src/lib/banking.ts`
- [Customer selector](https://github.com/santhoshjk159/nexus-bms/blob/main/src/hooks/use-customer.ts): `src/hooks/use-customer.ts`
- [Finance components](https://github.com/santhoshjk159/nexus-bms/blob/main/src/components/finance/ui.tsx): `src/components/finance/ui.tsx`
- [Data table](https://github.com/santhoshjk159/nexus-bms/blob/main/src/components/data/DataTable.tsx): `src/components/data/DataTable.tsx`
- [Transaction drawer](https://github.com/santhoshjk159/nexus-bms/blob/main/src/components/finance/TxnDrawer.tsx): `src/components/finance/TxnDrawer.tsx`
- [Finance charts](https://github.com/santhoshjk159/nexus-bms/blob/main/src/components/finance/charts.tsx): `src/components/finance/charts.tsx`
- [Banking domain types](https://github.com/santhoshjk159/nexus-bms/blob/main/src/types/index.ts): `src/types/index.ts`
- [Formatting utilities](https://github.com/santhoshjk159/nexus-bms/blob/main/src/lib/format.ts): `src/lib/format.ts`

### Other components

- **Portal user**

## Connections

- Router → Role routes: loads route tree (evidence: `src/router.tsx`)
- Portal user → Sign in: signs in
- Sign in → Session and access: authenticates
- Role routes → Customer portal: routes to (evidence: `src/routeTree.gen.ts`)
- Role routes → Employee portal: routes to (evidence: `src/routeTree.gen.ts`)
- Role routes → Admin portal: routes to (evidence: `src/routeTree.gen.ts`)
- App shell → Session and access: reads session (evidence: `src/components/layout/AppShell.tsx`)
- App shell → Banking state: reads state (evidence: `src/components/layout/AppShell.tsx`)
- Customer portal → Customer activity: contains dashboard
- Customer portal → Accounts and profile: routes to
- Customer portal → Transfers and payees: routes to
- Customer portal → Loans: routes to
- Customer portal → Cards: routes to
- Employee portal → Employee services: routes to
- Employee portal → Customer support: routes to
- Admin portal → Admin controls: routes to
- Customer selector → Session and access: gets session (evidence: `src/hooks/use-customer.ts`)
- Customer selector → Banking state: selects records (evidence: `src/hooks/use-customer.ts`)
- Transfers and payees → Banking state: reads and updates (evidence: `src/routes/customer.transfers.tsx`)
- Loans → Banking state: reads and updates (evidence: `src/routes/customer.loans.tsx`)
- Cards → Banking state: reads and updates (evidence: `src/routes/customer.cards.tsx`)
- Employee services → Banking state: reads and updates (evidence: `src/routes/employee.accounts.tsx`)
- Customer support → Banking state: reads and updates (evidence: `src/routes/employee.support.tsx`)
- Admin controls → Banking state: reads and updates (evidence: `src/routes/admin.ledger.tsx`)
- Banking state → Banking rules: screens transfers (evidence: `src/services/store.ts`)
- Admin controls → Banking rules: uses ledger rules (evidence: `src/routes/admin.ledger.tsx`)
- Customer activity → Customer selector: selects customer data (evidence: `src/routes/customer.dashboard.tsx`)
- Customer activity → Transaction drawer: renders drawer (evidence: `src/routes/customer.dashboard.tsx`)
- Customer activity → Finance charts: renders charts (evidence: `src/routes/customer.dashboard.tsx`)
- Loans → Finance components: renders panels (evidence: `src/routes/customer.loans.tsx`)
- Loans → Data table: renders schedule (evidence: `src/routes/customer.loans.tsx`)
- Admin controls → Data table: renders ledger rows (evidence: `src/routes/admin.ledger.tsx`)
- Banking state → Session and access: reads session (evidence: `src/services/store.ts`)
- Banking state → Banking domain types: uses domain types (evidence: `src/services/store.ts`)
- Banking rules → Banking domain types: uses domain types (evidence: `src/lib/banking.ts`)
- Finance components → Formatting utilities: formats amounts (evidence: `src/components/finance/ui.tsx`)
- Data table → Finance components: renders empty state (evidence: `src/components/data/DataTable.tsx`)
- Finance charts → Formatting utilities: formats values (evidence: `src/components/finance/charts.tsx`)
