# ayobamiseun/fullstack-fintech-wallet architecture

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

- Interactive diagram: https://gitdiagram.com/ayobamiseun/fullstack-fintech-wallet
- Repository: https://github.com/ayobamiseun/fullstack-fintech-wallet

## Overview

Cash Transactions App is a React wallet client backed by an Express API, with Sequelize/PostgreSQL persistence. The main user workflow is login or registration, then viewing an account and initiating a transfer; the backend routes requests through controllers and services to account, transaction, and user models. The README also describes broader wallet, compliance, security, admin, and integration capabilities that are not represented in the supplied tree, so those branches are shown as documented but implementation details are unverified. Edges use excerpts or README statements as evidence.

Main entry points: [`backend/src/app.ts`](https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/backend/src/app.ts) (Express application), [`backend/src/services`](https://github.com/ayobamiseun/fullstack-fintech-wallet/tree/main/backend/src/services) (User and wallet services), [`frontend-serve/src/App.tsx`](https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/frontend-serve/src/App.tsx) (React app routes), [`frontend-serve/src/Pages/Login.tsx`](https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/frontend-serve/src/Pages/Login.tsx) (Login and registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Wallet client"]
  node_app["React app routes<br/>[App.tsx]"]
  node_login["Login and registration<br/>[Login.tsx]"]
  node_accountui["Account and transfers UI<br/>[Account.tsx]"]
  node_header["Balance and transfer header<br/>[Header.tsx]"]
  node_clientapi["API request client<br/>[apiRequests.ts]"]
  node_local["Session storage<br/>[localStorage.ts]"]
  node_fetch["HTTP fetch wrapper<br/>[fetchWrapper.ts]"]
end

subgraph group_api["API and security"]
  node_server["Express application<br/>[app.ts]"]
  node_routes["API routes"]
  node_controllers["Request controllers"]
  node_jwt["JWT service<br/>[jwtService.ts]"]
  node_auth["Authentication middleware<br/>[authMiddleware.ts]"]
  node_errors["Error handling<br/>[errorHandler.ts]"]
end

subgraph group_domain["Wallet domain"]
  node_services["User and wallet services"]
  node_contracts["Domain interfaces"]
  node_walletfeatures["Wallet extensions"]
  node_identityfeatures["KYC and account security"]
  node_adminfeatures["Admin and audit tools"]
end

subgraph group_data["Persistence and integrations"]
  node_accountmodel["Account model<br/>[Account.ts]"]
  node_usermodel["User model<br/>[User.ts]"]
  node_transactionmodel["Transaction model<br/>[Transaction.ts]"]
  node_database[("PostgreSQL database")]
  node_integrations["Email and webhooks"]
end

node_user(("Wallet user"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_accountui
node_login -->|"requests login"| node_clientapi
node_login -->|"saves session"| node_local
node_accountui -->|"renders"| node_header
node_header -->|"reads session"| node_local
node_header -->|"requests balance and transfer"| node_clientapi
node_clientapi -->|"delegates requests"| node_fetch
node_fetch -->|"sends HTTP"| node_server
node_server -->|"mounts"| node_routes
node_routes -->|"dispatches"| node_controllers
node_controllers -->|"calls"| node_services
node_services -->|"reads and writes"| node_accountmodel
node_services -->|"uses transactions"| node_transactionmodel
node_services -->|"uses users"| node_usermodel
node_usermodel -->|"references account"| node_accountmodel
node_accountmodel -.->|"persists"| node_database
node_transactionmodel -.->|"persists"| node_database
node_services -->|"creates and validates tokens"| node_jwt
node_auth -->|"validates tokens"| node_jwt
node_server -->|"handles errors"| node_errors
node_server -.->|"offers documented endpoints"| node_walletfeatures
node_server -.->|"offers documented flows"| node_identityfeatures
node_server -.->|"offers documented endpoints"| node_adminfeatures
node_services -->|"sends reset email"| node_integrations
node_server -.->|"supports documented webhooks"| node_integrations
node_contracts -.->|"types domain data"| node_services

click node_app "https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/frontend-serve/src/App.tsx"
click node_login "https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/frontend-serve/src/Pages/Login.tsx"
click node_accountui "https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/frontend-serve/src/Pages/Account.tsx"
click node_header "https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/frontend-serve/src/components/Header.tsx"
click node_clientapi "https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/frontend-serve/src/services/apiRequests.ts"
click node_local "https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/frontend-serve/src/services/localStorage.ts"
click node_fetch "https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/frontend-serve/src/utils/fetchWrapper.ts"
click node_server "https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/backend/src/app.ts"
click node_routes "https://github.com/ayobamiseun/fullstack-fintech-wallet/tree/main/backend/src/routes"
click node_controllers "https://github.com/ayobamiseun/fullstack-fintech-wallet/tree/main/backend/src/controllers"
click node_services "https://github.com/ayobamiseun/fullstack-fintech-wallet/tree/main/backend/src/services"
click node_jwt "https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/backend/src/services/jwtService.ts"
click node_auth "https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/backend/src/middlewares/authMiddleware.ts"
click node_errors "https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/backend/src/middlewares/errorHandler.ts"
click node_contracts "https://github.com/ayobamiseun/fullstack-fintech-wallet/tree/main/backend/src/interfaces"
click node_accountmodel "https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/backend/src/database/models/Account.ts"
click node_usermodel "https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/backend/src/database/models/User.ts"
click node_transactionmodel "https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/backend/src/database/models/Transaction.ts"
click node_walletfeatures "https://github.com/ayobamiseun/fullstack-fintech-wallet/tree/main/backend/src"
click node_identityfeatures "https://github.com/ayobamiseun/fullstack-fintech-wallet/tree/main/backend/src"
click node_adminfeatures "https://github.com/ayobamiseun/fullstack-fintech-wallet/tree/main/backend/src"
click node_integrations "https://github.com/ayobamiseun/fullstack-fintech-wallet/tree/main/backend/src/services"

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_login,node_accountui,node_header,node_clientapi,node_local,node_fetch,node_user toneBlue
class node_server,node_routes,node_controllers,node_jwt,node_auth,node_errors toneAmber
class node_services,node_contracts,node_walletfeatures,node_identityfeatures,node_adminfeatures toneMint
class node_accountmodel,node_usermodel,node_transactionmodel,node_database,node_integrations toneRose
```

## Components

### Wallet client

- [React app routes](https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/frontend-serve/src/App.tsx): `frontend-serve/src/App.tsx`
- [Login and registration](https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/frontend-serve/src/Pages/Login.tsx): `frontend-serve/src/Pages/Login.tsx`
- [Account and transfers UI](https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/frontend-serve/src/Pages/Account.tsx): `frontend-serve/src/Pages/Account.tsx`
- [Balance and transfer header](https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/frontend-serve/src/components/Header.tsx): `frontend-serve/src/components/Header.tsx`
- [API request client](https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/frontend-serve/src/services/apiRequests.ts): `frontend-serve/src/services/apiRequests.ts`
- [Session storage](https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/frontend-serve/src/services/localStorage.ts): `frontend-serve/src/services/localStorage.ts`
- [HTTP fetch wrapper](https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/frontend-serve/src/utils/fetchWrapper.ts): `frontend-serve/src/utils/fetchWrapper.ts`

### API and security

- [Express application](https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/backend/src/app.ts): `backend/src/app.ts`
- [API routes](https://github.com/ayobamiseun/fullstack-fintech-wallet/tree/main/backend/src/routes): `backend/src/routes`
- [Request controllers](https://github.com/ayobamiseun/fullstack-fintech-wallet/tree/main/backend/src/controllers): `backend/src/controllers`
- [JWT service](https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/backend/src/services/jwtService.ts): `backend/src/services/jwtService.ts`
- [Authentication middleware](https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/backend/src/middlewares/authMiddleware.ts): `backend/src/middlewares/authMiddleware.ts`
- [Error handling](https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/backend/src/middlewares/errorHandler.ts): `backend/src/middlewares/errorHandler.ts`

### Wallet domain

- [User and wallet services](https://github.com/ayobamiseun/fullstack-fintech-wallet/tree/main/backend/src/services): `backend/src/services`
- [Domain interfaces](https://github.com/ayobamiseun/fullstack-fintech-wallet/tree/main/backend/src/interfaces): `backend/src/interfaces`
- [Wallet extensions](https://github.com/ayobamiseun/fullstack-fintech-wallet/tree/main/backend/src): `backend/src`
- [KYC and account security](https://github.com/ayobamiseun/fullstack-fintech-wallet/tree/main/backend/src): `backend/src`
- [Admin and audit tools](https://github.com/ayobamiseun/fullstack-fintech-wallet/tree/main/backend/src): `backend/src`

### Persistence and integrations

- [Account model](https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/backend/src/database/models/Account.ts): `backend/src/database/models/Account.ts`
- [User model](https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/backend/src/database/models/User.ts): `backend/src/database/models/User.ts`
- [Transaction model](https://github.com/ayobamiseun/fullstack-fintech-wallet/blob/main/backend/src/database/models/Transaction.ts): `backend/src/database/models/Transaction.ts`
- **PostgreSQL database**
- [Email and webhooks](https://github.com/ayobamiseun/fullstack-fintech-wallet/tree/main/backend/src/services): `backend/src/services`

### Other components

- **Wallet user**

## Connections

- Wallet user → React app routes: uses (evidence: `frontend-serve/src/App.tsx`)
- React app routes → Login and registration: routes to (evidence: `frontend-serve/src/App.tsx`)
- React app routes → Account and transfers UI: routes to (evidence: `frontend-serve/src/App.tsx`)
- Login and registration → API request client: requests login (evidence: `frontend-serve/src/Pages/Login.tsx`)
- Login and registration → Session storage: saves session (evidence: `frontend-serve/src/Pages/Login.tsx`)
- Account and transfers UI → Balance and transfer header: renders (evidence: `frontend-serve/src/Pages/Account.tsx`)
- Balance and transfer header → Session storage: reads session (evidence: `frontend-serve/src/components/Header.tsx`)
- Balance and transfer header → API request client: requests balance and transfer (evidence: `frontend-serve/src/components/Header.tsx`)
- API request client → HTTP fetch wrapper: delegates requests (evidence: `frontend-serve/src/services/apiRequests.ts`)
- HTTP fetch wrapper → Express application: sends HTTP
- Express application → API routes: mounts (evidence: `backend/src/app.ts`)
- API routes → Request controllers: dispatches (evidence: `backend/src/routes/main.ts`)
- Request controllers → User and wallet services: calls (evidence: `backend/src/controllers/Account.ts`)
- User and wallet services → Account model: reads and writes (evidence: `backend/src/services/Account.ts`)
- User and wallet services → Transaction model: uses transactions (evidence: `backend/src/services/Transactions.ts`)
- User and wallet services → User model: uses users (evidence: `backend/src/services/User.ts`)
- User model → Account model: references account (evidence: `backend/src/database/models/User.ts`)
- Account model → PostgreSQL database: persists (evidence: `backend/src/database/models/Account.ts`)
- Transaction model → PostgreSQL database: persists (evidence: `backend/src/database/models/Transaction.ts`)
- User and wallet services → JWT service: creates and validates tokens (evidence: `backend/src/services/User.ts`)
- Authentication middleware → JWT service: validates tokens (evidence: `backend/src/middlewares/authMiddleware.ts`)
- Express application → Error handling: handles errors (evidence: `backend/src/app.ts`)
- Express application → Wallet extensions: offers documented endpoints (evidence: `README.md`)
- Express application → KYC and account security: offers documented flows (evidence: `README.md`)
- Express application → Admin and audit tools: offers documented endpoints (evidence: `README.md`)
- User and wallet services → Email and webhooks: sends reset email (evidence: `backend/src/controllers/User.ts`)
- Express application → Email and webhooks: supports documented webhooks (evidence: `README.md`)
- Domain interfaces → User and wallet services: types domain data (evidence: `backend/src/services/jwtService.ts`)
