# seajay100/eve-expense-and-budget-tracker architecture

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

- Interactive diagram: https://gitdiagram.com/seajay100/eve-expense-and-budget-tracker
- Repository: https://github.com/seajay100/eve-expense-and-budget-tracker

## Overview

Eve is a personal expense and budget tracker. A user registers or logs in, then manages accounts, categories, and income, expense, transfer, and recurring transactions; the app also supports budget and monthly-summary views. The Express server serves the frontend and mounts API routes, which enforce user ownership and use MongoDB-backed models. The README documents filtering, balance changes, and summaries, but frontend implementation details were not sampled, so client-to-API call edges are omitted rather than inferred.

Main entry points: [`backend/server.js`](https://github.com/seajay100/eve-expense-and-budget-tracker/blob/master/backend/server.js) (HTTP server), [`backend/routes/transaction.js`](https://github.com/seajay100/eve-expense-and-budget-tracker/blob/master/backend/routes/transaction.js) (Transaction routes), [`backend/routes/account.js`](https://github.com/seajay100/eve-expense-and-budget-tracker/blob/master/backend/routes/account.js) (Account routes), [`backend/middleware/auth.js`](https://github.com/seajay100/eve-expense-and-budget-tracker/blob/master/backend/middleware/auth.js) (JWT protection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Frontend experience"]
  node_web["Web interface"]
  node_authui["Login and session<br/>[login.html]"]
  node_transactionui["Transaction views"]
  node_accountui["Account flows"]
  node_categoryui["Category views"]
  node_summaries["Monthly summaries"]
end

subgraph group_api["API and identity"]
  node_server["HTTP server<br/>[server.js]"]
  node_authroutes["Registration and login<br/>[auth.js]"]
  node_protection["JWT protection<br/>[auth.js]"]
end

subgraph group_domain["Finance operations"]
  node_transactionroutes["Transaction routes<br/>[transaction.js]"]
  node_accountroutes["Account routes<br/>[account.js]"]
  node_categoryroutes["Category routes<br/>[categories.js]"]
  node_validation["Amount validation<br/>[validation.js]"]
end

subgraph group_storage["Persistence"]
  node_users[("User records<br/>[User.js]")]
  node_accounts[("Account records<br/>[Accounts.js]")]
  node_categories[("Category records<br/>[Categories.js]")]
  node_transactions[("Transaction records<br/>[Transaction.js]")]
end

node_person(("User"))
node_mongo[("MongoDB")]

node_person -->|"uses"| node_web
node_server -->|"serves"| node_web
node_server -->|"mounts"| node_authroutes
node_server -->|"mounts"| node_transactionroutes
node_server -->|"mounts"| node_accountroutes
node_server -->|"mounts"| node_categoryroutes
node_server -->|"connects"| node_mongo
node_authroutes -->|"reads and writes"| node_users
node_authroutes -->|"protects profile"| node_protection
node_protection -->|"loads user"| node_users
node_transactionroutes -->|"guards routes"| node_protection
node_accountroutes -->|"guards routes"| node_protection
node_categoryroutes -->|"guards routes"| node_protection
node_transactionroutes -->|"reads and writes"| node_transactions
node_transactionroutes -->|"checks accounts"| node_accounts
node_transactionroutes -->|"checks categories"| node_categories
node_transactionroutes -->|"validates amounts"| node_validation
node_accountroutes -->|"reads and writes"| node_accounts
node_accountroutes -->|"reads and creates"| node_transactions
node_accountroutes -->|"validates amounts"| node_validation
node_categoryroutes -->|"reads and writes"| node_categories
node_categoryroutes -->|"checks usage"| node_transactions

click node_web "https://github.com/seajay100/eve-expense-and-budget-tracker/tree/master/frontend/public"
click node_authui "https://github.com/seajay100/eve-expense-and-budget-tracker/blob/master/frontend/public/pages/login.html"
click node_server "https://github.com/seajay100/eve-expense-and-budget-tracker/blob/master/backend/server.js"
click node_authroutes "https://github.com/seajay100/eve-expense-and-budget-tracker/blob/master/backend/routes/auth.js"
click node_protection "https://github.com/seajay100/eve-expense-and-budget-tracker/blob/master/backend/middleware/auth.js"
click node_transactionroutes "https://github.com/seajay100/eve-expense-and-budget-tracker/blob/master/backend/routes/transaction.js"
click node_accountroutes "https://github.com/seajay100/eve-expense-and-budget-tracker/blob/master/backend/routes/account.js"
click node_categoryroutes "https://github.com/seajay100/eve-expense-and-budget-tracker/blob/master/backend/routes/categories.js"
click node_validation "https://github.com/seajay100/eve-expense-and-budget-tracker/blob/master/backend/utils/validation.js"
click node_users "https://github.com/seajay100/eve-expense-and-budget-tracker/blob/master/backend/models/User.js"
click node_accounts "https://github.com/seajay100/eve-expense-and-budget-tracker/blob/master/backend/models/Accounts.js"
click node_categories "https://github.com/seajay100/eve-expense-and-budget-tracker/blob/master/backend/models/Categories.js"
click node_transactions "https://github.com/seajay100/eve-expense-and-budget-tracker/blob/master/backend/models/Transaction.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_web,node_authui,node_transactionui,node_accountui,node_categoryui,node_summaries,node_person toneBlue
class node_server,node_authroutes,node_protection,node_mongo toneAmber
class node_transactionroutes,node_accountroutes,node_categoryroutes,node_validation toneMint
class node_users,node_accounts,node_categories,node_transactions toneRose
```

## Components

### Frontend experience

- [Web interface](https://github.com/seajay100/eve-expense-and-budget-tracker/tree/master/frontend/public): `frontend/public`
- [Login and session](https://github.com/seajay100/eve-expense-and-budget-tracker/blob/master/frontend/public/pages/login.html): `frontend/public/pages/login.html`
- **Transaction views**
- **Account flows**
- **Category views**
- **Monthly summaries**

### API and identity

- [HTTP server](https://github.com/seajay100/eve-expense-and-budget-tracker/blob/master/backend/server.js): `backend/server.js`
- [Registration and login](https://github.com/seajay100/eve-expense-and-budget-tracker/blob/master/backend/routes/auth.js): `backend/routes/auth.js`
- [JWT protection](https://github.com/seajay100/eve-expense-and-budget-tracker/blob/master/backend/middleware/auth.js): `backend/middleware/auth.js`

### Finance operations

- [Transaction routes](https://github.com/seajay100/eve-expense-and-budget-tracker/blob/master/backend/routes/transaction.js): `backend/routes/transaction.js`
- [Account routes](https://github.com/seajay100/eve-expense-and-budget-tracker/blob/master/backend/routes/account.js): `backend/routes/account.js`
- [Category routes](https://github.com/seajay100/eve-expense-and-budget-tracker/blob/master/backend/routes/categories.js): `backend/routes/categories.js`
- [Amount validation](https://github.com/seajay100/eve-expense-and-budget-tracker/blob/master/backend/utils/validation.js): `backend/utils/validation.js`

### Persistence

- [User records](https://github.com/seajay100/eve-expense-and-budget-tracker/blob/master/backend/models/User.js): `backend/models/User.js`
- [Account records](https://github.com/seajay100/eve-expense-and-budget-tracker/blob/master/backend/models/Accounts.js): `backend/models/Accounts.js`
- [Category records](https://github.com/seajay100/eve-expense-and-budget-tracker/blob/master/backend/models/Categories.js): `backend/models/Categories.js`
- [Transaction records](https://github.com/seajay100/eve-expense-and-budget-tracker/blob/master/backend/models/Transaction.js): `backend/models/Transaction.js`

### Other components

- **User**
- **MongoDB**

## Connections

- User → Web interface: uses (evidence: `README.md`)
- HTTP server → Web interface: serves (evidence: `backend/server.js`)
- HTTP server → Registration and login: mounts (evidence: `backend/server.js`)
- HTTP server → Transaction routes: mounts (evidence: `backend/server.js`)
- HTTP server → Account routes: mounts (evidence: `backend/server.js`)
- HTTP server → Category routes: mounts (evidence: `backend/server.js`)
- HTTP server → MongoDB: connects (evidence: `backend/server.js`)
- Registration and login → User records: reads and writes (evidence: `backend/routes/auth.js`)
- Registration and login → JWT protection: protects profile (evidence: `backend/routes/auth.js`)
- JWT protection → User records: loads user (evidence: `backend/middleware/auth.js`)
- Transaction routes → JWT protection: guards routes (evidence: `backend/routes/transaction.js`)
- Account routes → JWT protection: guards routes (evidence: `backend/routes/account.js`)
- Category routes → JWT protection: guards routes (evidence: `backend/routes/categories.js`)
- Transaction routes → Transaction records: reads and writes (evidence: `backend/routes/transaction.js`)
- Transaction routes → Account records: checks accounts (evidence: `backend/routes/transaction.js`)
- Transaction routes → Category records: checks categories (evidence: `backend/routes/transaction.js`)
- Transaction routes → Amount validation: validates amounts (evidence: `backend/routes/transaction.js`)
- Account routes → Account records: reads and writes (evidence: `backend/routes/account.js`)
- Account routes → Transaction records: reads and creates (evidence: `backend/routes/account.js`)
- Account routes → Amount validation: validates amounts (evidence: `backend/routes/account.js`)
- Category routes → Category records: reads and writes (evidence: `backend/routes/categories.js`)
- Category routes → Transaction records: checks usage (evidence: `backend/routes/categories.js`)
