# aditi-rajoriya/fintrack-pro architecture

> Architecture diagram of the GitHub repository aditi-rajoriya/fintrack-pro, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aditi-rajoriya/fintrack-pro
- Repository: https://github.com/aditi-rajoriya/fintrack-pro

## Overview

FinTrack Pro is a personal-finance tracker. Users sign in, record and categorize income or expenses, then review budgets, goals, and analytics; profile settings and notifications support that workflow. The React app calls an Express API whose domain controllers manage MongoDB-backed records. The README also documents scheduled email reports and theme adaptation. Source excerpts are partial, so some client-to-service and route-to-controller links reflect the repository’s module structure and documented capabilities rather than inspected call sites.

Main entry points: [`server/routes/index.js`](https://github.com/aditi-rajoriya/fintrack-pro/blob/main/server/routes/index.js) (API routes), [`server/models`](https://github.com/aditi-rajoriya/fintrack-pro/tree/main/server/models) (Domain models), [`client/src/App.js`](https://github.com/aditi-rajoriya/fintrack-pro/blob/main/client/src/App.js) (React app), [`server/controllers/transaction.controller.js`](https://github.com/aditi-rajoriya/fintrack-pro/blob/main/server/controllers/transaction.controller.js) (Transactions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Finance interface"]
  node_app["React app<br/>[App.js]"]
  node_authctx["Authentication state<br/>[AuthContext.js]"]
  node_pages["Finance pages"]
  node_theme["Theme state<br/>[ThemeContext.js]"]
  node_clientservices["API services"]
  node_apiclient["HTTP client<br/>[apiClient.js]"]
end

subgraph group_api["API and domain"]
  node_server["Express API<br/>[server.js]"]
  node_routes["API routes<br/>[index.js]"]
  node_authctrl["Authentication<br/>[auth.controller.js]"]
  node_userctrl["Profile settings<br/>[user.controller.js]"]
  node_txctrl["Transactions"]
  node_catctrl["Categories"]
  node_budgetctrl["Budgets"]
  node_goalctrl["Savings goals<br/>[goal.controller.js]"]
  node_analyticsctrl["Analytics"]
end

subgraph group_data["Persistence"]
  node_models["Domain models"]
  node_mongodb[("MongoDB")]
end

subgraph group_integrations["Notifications and scheduling"]
  node_scheduler["Report scheduler"]
  node_email["Email delivery<br/>[email.service.js]"]
  node_mailer["Email provider"]
end

node_user(("Finance user"))

node_user -->|"uses"| node_app
node_app -->|"checks session"| node_authctx
node_app -->|"renders routes"| node_pages
node_app -->|"applies theme"| node_theme
node_pages -->|"requests data"| node_clientservices
node_authctx -->|"checks identity"| node_clientservices
node_clientservices -->|"sends requests"| node_apiclient
node_apiclient -->|"calls API"| node_server
node_server -->|"mounts routes"| node_routes
node_routes -->|"dispatches auth"| node_authctrl
node_routes -->|"dispatches profile"| node_userctrl
node_routes -->|"dispatches transactions"| node_txctrl
node_routes -->|"dispatches categories"| node_catctrl
node_routes -->|"dispatches budgets"| node_budgetctrl
node_routes -->|"dispatches goals"| node_goalctrl
node_routes -->|"dispatches analytics"| node_analyticsctrl
node_authctrl -->|"reads and writes"| node_models
node_userctrl -->|"reads and writes"| node_models
node_txctrl -->|"reads and writes"| node_models
node_catctrl -->|"reads and writes"| node_models
node_budgetctrl -->|"reads and writes"| node_models
node_goalctrl -->|"reads and writes"| node_models
node_analyticsctrl -->|"queries records"| node_models
node_models -->|"persists records"| node_mongodb
node_txctrl -->|"checks budgets"| node_budgetctrl
node_txctrl -->|"sends breach alerts"| node_email
node_server -->|"starts scheduled reports"| node_scheduler
node_scheduler -->|"requests reports"| node_email
node_email -.->|"delivers messages"| node_mailer

click node_app "https://github.com/aditi-rajoriya/fintrack-pro/blob/main/client/src/App.js"
click node_authctx "https://github.com/aditi-rajoriya/fintrack-pro/blob/main/client/src/contexts/AuthContext.js"
click node_pages "https://github.com/aditi-rajoriya/fintrack-pro/tree/main/client/src/pages"
click node_theme "https://github.com/aditi-rajoriya/fintrack-pro/blob/main/client/src/contexts/ThemeContext.js"
click node_clientservices "https://github.com/aditi-rajoriya/fintrack-pro/tree/main/client/src/services"
click node_apiclient "https://github.com/aditi-rajoriya/fintrack-pro/blob/main/client/src/services/apiClient.js"
click node_server "https://github.com/aditi-rajoriya/fintrack-pro/blob/main/server/server.js"
click node_routes "https://github.com/aditi-rajoriya/fintrack-pro/blob/main/server/routes/index.js"
click node_authctrl "https://github.com/aditi-rajoriya/fintrack-pro/blob/main/server/controllers/auth.controller.js"
click node_userctrl "https://github.com/aditi-rajoriya/fintrack-pro/blob/main/server/controllers/user.controller.js"
click node_txctrl "https://github.com/aditi-rajoriya/fintrack-pro/blob/main/server/controllers/transaction.controller.js"
click node_catctrl "https://github.com/aditi-rajoriya/fintrack-pro/blob/main/server/controllers/category.controller.js"
click node_budgetctrl "https://github.com/aditi-rajoriya/fintrack-pro/blob/main/server/controllers/budget.controller.js"
click node_goalctrl "https://github.com/aditi-rajoriya/fintrack-pro/blob/main/server/controllers/goal.controller.js"
click node_analyticsctrl "https://github.com/aditi-rajoriya/fintrack-pro/blob/main/server/controllers/analytics.controller.js"
click node_models "https://github.com/aditi-rajoriya/fintrack-pro/tree/main/server/models"
click node_scheduler "https://github.com/aditi-rajoriya/fintrack-pro/blob/main/server/services/scheduler.service.js"
click node_email "https://github.com/aditi-rajoriya/fintrack-pro/blob/main/server/services/email.service.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_app,node_authctx,node_pages,node_theme,node_clientservices,node_apiclient,node_user toneBlue
class node_server,node_routes,node_authctrl,node_userctrl,node_txctrl,node_catctrl,node_budgetctrl,node_goalctrl,node_analyticsctrl toneAmber
class node_models,node_mongodb toneMint
class node_scheduler,node_email,node_mailer toneRose
```

## Components

### Finance interface

- [React app](https://github.com/aditi-rajoriya/fintrack-pro/blob/main/client/src/App.js): `client/src/App.js`
- [Authentication state](https://github.com/aditi-rajoriya/fintrack-pro/blob/main/client/src/contexts/AuthContext.js): `client/src/contexts/AuthContext.js`
- [Finance pages](https://github.com/aditi-rajoriya/fintrack-pro/tree/main/client/src/pages): `client/src/pages`
- [Theme state](https://github.com/aditi-rajoriya/fintrack-pro/blob/main/client/src/contexts/ThemeContext.js): `client/src/contexts/ThemeContext.js`
- [API services](https://github.com/aditi-rajoriya/fintrack-pro/tree/main/client/src/services): `client/src/services`
- [HTTP client](https://github.com/aditi-rajoriya/fintrack-pro/blob/main/client/src/services/apiClient.js): `client/src/services/apiClient.js`

### API and domain

- [Express API](https://github.com/aditi-rajoriya/fintrack-pro/blob/main/server/server.js): `server/server.js`
- [API routes](https://github.com/aditi-rajoriya/fintrack-pro/blob/main/server/routes/index.js): `server/routes/index.js`
- [Authentication](https://github.com/aditi-rajoriya/fintrack-pro/blob/main/server/controllers/auth.controller.js): `server/controllers/auth.controller.js`
- [Profile settings](https://github.com/aditi-rajoriya/fintrack-pro/blob/main/server/controllers/user.controller.js): `server/controllers/user.controller.js`
- [Transactions](https://github.com/aditi-rajoriya/fintrack-pro/blob/main/server/controllers/transaction.controller.js): `server/controllers/transaction.controller.js`
- [Categories](https://github.com/aditi-rajoriya/fintrack-pro/blob/main/server/controllers/category.controller.js): `server/controllers/category.controller.js`
- [Budgets](https://github.com/aditi-rajoriya/fintrack-pro/blob/main/server/controllers/budget.controller.js): `server/controllers/budget.controller.js`
- [Savings goals](https://github.com/aditi-rajoriya/fintrack-pro/blob/main/server/controllers/goal.controller.js): `server/controllers/goal.controller.js`
- [Analytics](https://github.com/aditi-rajoriya/fintrack-pro/blob/main/server/controllers/analytics.controller.js): `server/controllers/analytics.controller.js`

### Persistence

- [Domain models](https://github.com/aditi-rajoriya/fintrack-pro/tree/main/server/models): `server/models`
- **MongoDB**

### Notifications and scheduling

- [Report scheduler](https://github.com/aditi-rajoriya/fintrack-pro/blob/main/server/services/scheduler.service.js): `server/services/scheduler.service.js`
- [Email delivery](https://github.com/aditi-rajoriya/fintrack-pro/blob/main/server/services/email.service.js): `server/services/email.service.js`
- **Email provider**

### Other components

- **Finance user**

## Connections

- Finance user → React app: uses
- React app → Authentication state: checks session
- React app → Finance pages: renders routes
- React app → Theme state: applies theme
- Finance pages → API services: requests data
- Authentication state → API services: checks identity
- API services → HTTP client: sends requests
- HTTP client → Express API: calls API
- Express API → API routes: mounts routes
- API routes → Authentication: dispatches auth
- API routes → Profile settings: dispatches profile
- API routes → Transactions: dispatches transactions
- API routes → Categories: dispatches categories
- API routes → Budgets: dispatches budgets
- API routes → Savings goals: dispatches goals
- API routes → Analytics: dispatches analytics
- Authentication → Domain models: reads and writes
- Profile settings → Domain models: reads and writes
- Transactions → Domain models: reads and writes
- Categories → Domain models: reads and writes
- Budgets → Domain models: reads and writes
- Savings goals → Domain models: reads and writes
- Analytics → Domain models: queries records
- Domain models → MongoDB: persists records
- Transactions → Budgets: checks budgets
- Transactions → Email delivery: sends breach alerts
- Express API → Report scheduler: starts scheduled reports
- Report scheduler → Email delivery: requests reports
- Email delivery → Email provider: delivers messages
