# rekcah97/financo architecture

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

- Interactive diagram: https://gitdiagram.com/rekcah97/financo
- Repository: https://github.com/rekcah97/financo

## Overview

Financo is a personal-finance application with a React interface and an Express/Prisma API. Users can sign in and manage categories, transactions, saving goals and allocations, and view summaries. The sampled interface currently supplies mock category and transaction state; the excerpts do not show it calling the API, so that connection is left unverified. Backend route/controller and persistence links follow the source index and sampled imports; several feature implementations were not excerpted.

Main entry points: [`backend/Routes/index.js`](https://github.com/rekcah97/financo/blob/main/backend/Routes/index.js) (API route registry), [`frontend/src/App.jsx`](https://github.com/rekcah97/financo/blob/main/frontend/src/App.jsx) (App routing), [`backend/config/db.config.js`](https://github.com/rekcah97/financo/blob/main/backend/config/db.config.js) (Prisma database), [`backend/Routes/auth.Routes.js`](https://github.com/rekcah97/financo/blob/main/backend/Routes/auth.Routes.js) (Authentication routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_appui["App routing<br/>[App.jsx]"]
  node_authui["Auth pages"]
  node_categoryui["Category management"]
  node_goalui["Goal management"]
  node_transactionui["Transaction views"]
  node_categoryctx["Category state"]
  node_goalctx["Goal state<br/>[GoalsContext.jsx]"]
  node_transactionctx["Transaction state"]
end

subgraph group_api["API and access"]
  node_apiapp["Express application<br/>[app.js]"]
  node_routes["API route registry<br/>[index.js]"]
  node_authroutes["Authentication routes<br/>[auth.Routes.js]"]
  node_jwt["JWT verification"]
  node_authctrl["Account and verification<br/>[auth.Controller.js]"]
end

subgraph group_finance["Finance features"]
  node_categoryctrl["Category operations"]
  node_transactionctrl["Transaction operations"]
  node_goalctrl["Saving goals"]
  node_allocationctrl["Saving allocations"]
  node_summaryctrl["Financial summary"]
  node_savingservice["Saving calculations<br/>[saving.Services.js]"]
end

subgraph group_data["Persistence and services"]
  node_db[("Prisma database<br/>[db.config.js]")]
end

node_user(("User"))

node_user -->|"uses"| node_appui
node_appui -->|"routes to"| node_authui
node_appui -->|"routes to"| node_categoryui
node_appui -->|"routes to"| node_goalui
node_appui -->|"routes to"| node_transactionui
node_categoryui -->|"uses"| node_categoryctx
node_goalui -->|"uses"| node_goalctx
node_transactionui -->|"uses"| node_transactionctx
node_transactionctx -->|"reads"| node_categoryctx
node_appui -.->|"API calls unverified"| node_apiapp
node_apiapp -->|"mounts"| node_routes
node_routes -->|"registers"| node_authroutes
node_routes -->|"routes to"| node_categoryctrl
node_routes -->|"routes to"| node_transactionctrl
node_routes -->|"routes to"| node_goalctrl
node_routes -->|"routes to"| node_allocationctrl
node_routes -->|"routes to"| node_summaryctrl
node_authroutes -->|"dispatches"| node_authctrl
node_authroutes -->|"verifies protected requests"| node_jwt
node_categoryctrl -->|"queries"| node_db
node_transactionctrl -->|"queries"| node_db
node_goalctrl -->|"queries"| node_db
node_allocationctrl -->|"queries"| node_db
node_summaryctrl -->|"queries"| node_db
node_authctrl -->|"queries"| node_db
node_allocationctrl -->|"calculates savings"| node_savingservice
node_summaryctrl -->|"calculates savings"| node_savingservice
node_savingservice -->|"aggregates"| node_db

click node_appui "https://github.com/rekcah97/financo/blob/main/frontend/src/App.jsx"
click node_authui "https://github.com/rekcah97/financo/tree/main/frontend/src/pages/auth"
click node_categoryui "https://github.com/rekcah97/financo/tree/main/frontend/src/pages/Categories"
click node_goalui "https://github.com/rekcah97/financo/tree/main/frontend/src/pages/Goals"
click node_transactionui "https://github.com/rekcah97/financo/tree/main/frontend/src/pages/Transactions"
click node_categoryctx "https://github.com/rekcah97/financo/blob/main/frontend/src/context/CategoryContext.jsx"
click node_goalctx "https://github.com/rekcah97/financo/blob/main/frontend/src/context/GoalsContext.jsx"
click node_transactionctx "https://github.com/rekcah97/financo/blob/main/frontend/src/context/TransactionContext.jsx"
click node_apiapp "https://github.com/rekcah97/financo/blob/main/backend/app.js"
click node_routes "https://github.com/rekcah97/financo/blob/main/backend/Routes/index.js"
click node_authroutes "https://github.com/rekcah97/financo/blob/main/backend/Routes/auth.Routes.js"
click node_jwt "https://github.com/rekcah97/financo/blob/main/backend/middleware/verifyJWT.middleware.js"
click node_authctrl "https://github.com/rekcah97/financo/blob/main/backend/controllers/auth.Controller.js"
click node_categoryctrl "https://github.com/rekcah97/financo/blob/main/backend/controllers/category.Controller.js"
click node_transactionctrl "https://github.com/rekcah97/financo/blob/main/backend/controllers/transaction.Controller.js"
click node_goalctrl "https://github.com/rekcah97/financo/blob/main/backend/controllers/savingGoals.Controller.js"
click node_allocationctrl "https://github.com/rekcah97/financo/blob/main/backend/controllers/savingAllocation.Controller.js"
click node_summaryctrl "https://github.com/rekcah97/financo/blob/main/backend/controllers/summary.Controller.js"
click node_savingservice "https://github.com/rekcah97/financo/blob/main/backend/services/saving.Services.js"
click node_db "https://github.com/rekcah97/financo/blob/main/backend/config/db.config.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_appui,node_authui,node_categoryui,node_goalui,node_transactionui,node_categoryctx,node_goalctx,node_transactionctx,node_user toneBlue
class node_apiapp,node_routes,node_authroutes,node_jwt,node_authctrl toneAmber
class node_categoryctrl,node_transactionctrl,node_goalctrl,node_allocationctrl,node_summaryctrl,node_savingservice toneMint
class node_db toneRose
```

## Components

### Web interface

- [App routing](https://github.com/rekcah97/financo/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Auth pages](https://github.com/rekcah97/financo/tree/main/frontend/src/pages/auth): `frontend/src/pages/auth`
- [Category management](https://github.com/rekcah97/financo/tree/main/frontend/src/pages/Categories): `frontend/src/pages/Categories`
- [Goal management](https://github.com/rekcah97/financo/tree/main/frontend/src/pages/Goals): `frontend/src/pages/Goals`
- [Transaction views](https://github.com/rekcah97/financo/tree/main/frontend/src/pages/Transactions): `frontend/src/pages/Transactions`
- [Category state](https://github.com/rekcah97/financo/blob/main/frontend/src/context/CategoryContext.jsx): `frontend/src/context/CategoryContext.jsx`
- [Goal state](https://github.com/rekcah97/financo/blob/main/frontend/src/context/GoalsContext.jsx): `frontend/src/context/GoalsContext.jsx`
- [Transaction state](https://github.com/rekcah97/financo/blob/main/frontend/src/context/TransactionContext.jsx): `frontend/src/context/TransactionContext.jsx`

### API and access

- [Express application](https://github.com/rekcah97/financo/blob/main/backend/app.js): `backend/app.js`
- [API route registry](https://github.com/rekcah97/financo/blob/main/backend/Routes/index.js): `backend/Routes/index.js`
- [Authentication routes](https://github.com/rekcah97/financo/blob/main/backend/Routes/auth.Routes.js): `backend/Routes/auth.Routes.js`
- [JWT verification](https://github.com/rekcah97/financo/blob/main/backend/middleware/verifyJWT.middleware.js): `backend/middleware/verifyJWT.middleware.js`
- [Account and verification](https://github.com/rekcah97/financo/blob/main/backend/controllers/auth.Controller.js): `backend/controllers/auth.Controller.js`

### Finance features

- [Category operations](https://github.com/rekcah97/financo/blob/main/backend/controllers/category.Controller.js): `backend/controllers/category.Controller.js`
- [Transaction operations](https://github.com/rekcah97/financo/blob/main/backend/controllers/transaction.Controller.js): `backend/controllers/transaction.Controller.js`
- [Saving goals](https://github.com/rekcah97/financo/blob/main/backend/controllers/savingGoals.Controller.js): `backend/controllers/savingGoals.Controller.js`
- [Saving allocations](https://github.com/rekcah97/financo/blob/main/backend/controllers/savingAllocation.Controller.js): `backend/controllers/savingAllocation.Controller.js`
- [Financial summary](https://github.com/rekcah97/financo/blob/main/backend/controllers/summary.Controller.js): `backend/controllers/summary.Controller.js`
- [Saving calculations](https://github.com/rekcah97/financo/blob/main/backend/services/saving.Services.js): `backend/services/saving.Services.js`

### Persistence and services

- [Prisma database](https://github.com/rekcah97/financo/blob/main/backend/config/db.config.js): `backend/config/db.config.js`

### Other components

- **User**

## Connections

- User → App routing: uses (evidence: `frontend/src/App.jsx`)
- App routing → Auth pages: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Category management: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Goal management: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Transaction views: routes to (evidence: `frontend/src/App.jsx`)
- Category management → Category state: uses (evidence: `frontend/src/pages/Categories/Categories.jsx`)
- Goal management → Goal state: uses (evidence: `frontend/src/pages/Goals/Goals.jsx`)
- Transaction views → Transaction state: uses (evidence: `frontend/src/pages/Transactions/Transactions.jsx`)
- Transaction state → Category state: reads (evidence: `frontend/src/context/TransactionContext.jsx`)
- App routing → Express application: API calls unverified
- Express application → API route registry: mounts (evidence: `backend/app.js`)
- API route registry → Authentication routes: registers (evidence: `backend/Routes/index.js`)
- API route registry → Category operations: routes to (evidence: `backend/Routes/index.js`)
- API route registry → Transaction operations: routes to (evidence: `backend/Routes/index.js`)
- API route registry → Saving goals: routes to (evidence: `backend/Routes/index.js`)
- API route registry → Saving allocations: routes to (evidence: `backend/Routes/index.js`)
- API route registry → Financial summary: routes to (evidence: `backend/Routes/index.js`)
- Authentication routes → Account and verification: dispatches (evidence: `backend/Routes/auth.Routes.js`)
- Authentication routes → JWT verification: verifies protected requests (evidence: `backend/Routes/auth.Routes.js`)
- Category operations → Prisma database: queries (evidence: `backend/controllers/category.Controller.js`)
- Transaction operations → Prisma database: queries (evidence: `backend/controllers/transaction.Controller.js`)
- Saving goals → Prisma database: queries (evidence: `backend/controllers/savingGoals.Controller.js`)
- Saving allocations → Prisma database: queries (evidence: `backend/controllers/savingAllocation.Controller.js`)
- Financial summary → Prisma database: queries (evidence: `backend/controllers/summary.Controller.js`)
- Account and verification → Prisma database: queries (evidence: `backend/controllers/auth.Controller.js`)
- Saving allocations → Saving calculations: calculates savings (evidence: `backend/controllers/savingAllocation.Controller.js`)
- Financial summary → Saving calculations: calculates savings (evidence: `backend/controllers/summary.Controller.js`)
- Saving calculations → Prisma database: aggregates (evidence: `backend/services/saving.Services.js`)
