# satyatejachukka/wealth_sync architecture

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

- Interactive diagram: https://gitdiagram.com/satyatejachukka/wealth_sync
- Repository: https://github.com/satyatejachukka/wealth_sync

## Overview

WealthSync is a personal-finance ledger and planning application. A user signs in, records income or expenses and manages recurring commitments; the React dashboard calls the FastAPI JSON API, which handles finance data and calculations against a PostgreSQL-compatible store. The product also covers budgets, goals, loans, lending, electricity bills, calendar events, notifications, and internally tracked Autopilot orders. The README documents the overall frontend/API/backend arrangement; some feature implementations are unsampled, so those branches are shown at directory level without speculative call edges.

Main entry points: [`backend/app/models`](https://github.com/satyatejachukka/wealth_sync/tree/main/backend/app/models) (Finance records), [`backend/app/api/v1`](https://github.com/satyatejachukka/wealth_sync/tree/main/backend/app/api/v1) (Finance API routes), [`backend/app/main.py`](https://github.com/satyatejachukka/wealth_sync/blob/main/backend/app/main.py) (FastAPI entrypoint), [`frontend/src/App.jsx`](https://github.com/satyatejachukka/wealth_sync/blob/main/frontend/src/App.jsx) (React routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["React routes<br/>[App.jsx]"]
  node_auth_ui["Client authentication<br/>[auth.jsx]"]
  node_api_client["HTTP API client<br/>[api.js]"]
  node_dashboard["Finance dashboard"]
  node_feature_pages["Finance pages"]
  node_feature_services["API feature clients"]
end

subgraph group_api["API and identity"]
  node_server["FastAPI entrypoint<br/>[main.py]"]
  node_auth_routes["Authentication routes<br/>[auth.py]"]
  node_auth_deps["Token verification<br/>[deps.py]"]
end

subgraph group_finance["Finance workflows"]
  node_finance_routes["Finance API routes"]
  node_budget_engine["Budget calculations<br/>[budget_engine.py]"]
  node_autopilot["Autopilot orders<br/>[autopilot.py]"]
  node_electricity["Electricity workflow"]
  node_planning["Planning and triage"]
  node_bill_tasks["Scheduled bill automation"]
  node_notifications["Notifications<br/>[notifications.py]"]
  node_calendar["Financial calendar<br/>[calendar.py]"]
end

subgraph group_data["Persistence"]
  node_models["Finance records"]
  node_database[("SQL database<br/>[database.py]")]
end

node_user(("Finance user"))
node_firebase(("Firebase Auth"))
node_redis_celery["Redis and Celery"]

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_feature_pages
node_user -->|"signs in"| node_auth_ui
node_auth_ui -->|"calls"| node_api_client
node_auth_ui -.->|"authenticates with"| node_firebase
node_feature_pages -->|"uses"| node_feature_services
node_feature_services -->|"sends API requests"| node_server
node_api_client -->|"sends API requests"| node_server
node_server -->|"registers"| node_auth_routes
node_server -->|"registers"| node_finance_routes
node_auth_routes -->|"requires identity"| node_auth_deps
node_auth_deps -->|"looks up user"| node_models
node_finance_routes -->|"uses calculations"| node_budget_engine
node_finance_routes -->|"dispatches orders"| node_autopilot
node_finance_routes -.->|"uses workflow"| node_electricity
node_finance_routes -->|"reads and writes"| node_models
node_budget_engine -->|"calculates from"| node_models
node_autopilot -->|"tracks orders"| node_models
node_electricity -->|"updates bills"| node_models
node_calendar -->|"reads commitments"| node_models
node_notifications -.->|"manages notifications"| node_models
node_models -->|"persists records"| node_database
node_bill_tasks -.->|"scheduled by"| node_redis_celery
node_planning -.->|"supports planning views"| node_finance_routes

click node_app "https://github.com/satyatejachukka/wealth_sync/blob/main/frontend/src/App.jsx"
click node_auth_ui "https://github.com/satyatejachukka/wealth_sync/blob/main/frontend/src/lib/auth.jsx"
click node_api_client "https://github.com/satyatejachukka/wealth_sync/blob/main/frontend/src/lib/api.js"
click node_dashboard "https://github.com/satyatejachukka/wealth_sync/tree/main/frontend/src/pages/dashboard"
click node_feature_pages "https://github.com/satyatejachukka/wealth_sync/tree/main/frontend/src/pages/dashboard"
click node_feature_services "https://github.com/satyatejachukka/wealth_sync/tree/main/frontend/src/services"
click node_server "https://github.com/satyatejachukka/wealth_sync/blob/main/backend/app/main.py"
click node_auth_routes "https://github.com/satyatejachukka/wealth_sync/blob/main/backend/app/api/v1/auth.py"
click node_auth_deps "https://github.com/satyatejachukka/wealth_sync/blob/main/backend/app/api/deps.py"
click node_finance_routes "https://github.com/satyatejachukka/wealth_sync/tree/main/backend/app/api/v1"
click node_budget_engine "https://github.com/satyatejachukka/wealth_sync/blob/main/backend/app/services/budget_engine.py"
click node_autopilot "https://github.com/satyatejachukka/wealth_sync/blob/main/backend/app/services/autopilot.py"
click node_electricity "https://github.com/satyatejachukka/wealth_sync/blob/main/backend/app/services/electricity_service.py"
click node_planning "https://github.com/satyatejachukka/wealth_sync/tree/main/backend/app/services"
click node_bill_tasks "https://github.com/satyatejachukka/wealth_sync/tree/main/backend/app/tasks"
click node_models "https://github.com/satyatejachukka/wealth_sync/tree/main/backend/app/models"
click node_database "https://github.com/satyatejachukka/wealth_sync/blob/main/backend/app/core/database.py"
click node_notifications "https://github.com/satyatejachukka/wealth_sync/blob/main/backend/app/api/v1/notifications.py"
click node_calendar "https://github.com/satyatejachukka/wealth_sync/blob/main/backend/app/api/v1/calendar.py"

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_auth_ui,node_api_client,node_dashboard,node_feature_pages,node_feature_services,node_user toneBlue
class node_server,node_auth_routes,node_auth_deps,node_redis_celery toneAmber
class node_finance_routes,node_budget_engine,node_autopilot,node_electricity,node_planning,node_bill_tasks,node_notifications,node_calendar toneMint
class node_models,node_database toneRose
class node_firebase toneIndigo
```

## Components

### Web client

- [React routes](https://github.com/satyatejachukka/wealth_sync/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Client authentication](https://github.com/satyatejachukka/wealth_sync/blob/main/frontend/src/lib/auth.jsx): `frontend/src/lib/auth.jsx`
- [HTTP API client](https://github.com/satyatejachukka/wealth_sync/blob/main/frontend/src/lib/api.js): `frontend/src/lib/api.js`
- [Finance dashboard](https://github.com/satyatejachukka/wealth_sync/tree/main/frontend/src/pages/dashboard): `frontend/src/pages/dashboard`
- [Finance pages](https://github.com/satyatejachukka/wealth_sync/tree/main/frontend/src/pages/dashboard): `frontend/src/pages/dashboard`
- [API feature clients](https://github.com/satyatejachukka/wealth_sync/tree/main/frontend/src/services): `frontend/src/services`

### API and identity

- [FastAPI entrypoint](https://github.com/satyatejachukka/wealth_sync/blob/main/backend/app/main.py): `backend/app/main.py`
- [Authentication routes](https://github.com/satyatejachukka/wealth_sync/blob/main/backend/app/api/v1/auth.py): `backend/app/api/v1/auth.py`
- [Token verification](https://github.com/satyatejachukka/wealth_sync/blob/main/backend/app/api/deps.py): `backend/app/api/deps.py`

### Finance workflows

- [Finance API routes](https://github.com/satyatejachukka/wealth_sync/tree/main/backend/app/api/v1): `backend/app/api/v1`
- [Budget calculations](https://github.com/satyatejachukka/wealth_sync/blob/main/backend/app/services/budget_engine.py): `backend/app/services/budget_engine.py`
- [Autopilot orders](https://github.com/satyatejachukka/wealth_sync/blob/main/backend/app/services/autopilot.py): `backend/app/services/autopilot.py`
- [Electricity workflow](https://github.com/satyatejachukka/wealth_sync/blob/main/backend/app/services/electricity_service.py): `backend/app/services/electricity_service.py`
- [Planning and triage](https://github.com/satyatejachukka/wealth_sync/tree/main/backend/app/services): `backend/app/services`
- [Scheduled bill automation](https://github.com/satyatejachukka/wealth_sync/tree/main/backend/app/tasks): `backend/app/tasks`
- [Notifications](https://github.com/satyatejachukka/wealth_sync/blob/main/backend/app/api/v1/notifications.py): `backend/app/api/v1/notifications.py`
- [Financial calendar](https://github.com/satyatejachukka/wealth_sync/blob/main/backend/app/api/v1/calendar.py): `backend/app/api/v1/calendar.py`

### Persistence

- [Finance records](https://github.com/satyatejachukka/wealth_sync/tree/main/backend/app/models): `backend/app/models`
- [SQL database](https://github.com/satyatejachukka/wealth_sync/blob/main/backend/app/core/database.py): `backend/app/core/database.py`

### Other components

- **Finance user**
- **Firebase Auth**
- **Redis and Celery**

## Connections

- Finance user → React routes: uses
- React routes → Finance dashboard: routes to (evidence: `frontend/src/App.jsx`)
- React routes → Finance pages: routes to (evidence: `frontend/src/App.jsx`)
- Finance user → Client authentication: signs in
- Client authentication → HTTP API client: calls (evidence: `frontend/src/lib/auth.jsx`)
- Client authentication → Firebase Auth: authenticates with (evidence: `frontend/src/lib/auth.jsx`)
- Finance pages → API feature clients: uses (evidence: `frontend/src/pages/dashboard/Loans.jsx`)
- API feature clients → FastAPI entrypoint: sends API requests
- HTTP API client → FastAPI entrypoint: sends API requests
- FastAPI entrypoint → Authentication routes: registers (evidence: `backend/app/main.py`)
- FastAPI entrypoint → Finance API routes: registers (evidence: `backend/app/main.py`)
- Authentication routes → Token verification: requires identity (evidence: `backend/app/api/v1/auth.py`)
- Token verification → Finance records: looks up user (evidence: `backend/app/api/deps.py`)
- Finance API routes → Budget calculations: uses calculations (evidence: `backend/app/api/v1/budgets.py`)
- Finance API routes → Autopilot orders: dispatches orders (evidence: `backend/app/api/v1/autopilot.py`)
- Finance API routes → Electricity workflow: uses workflow (evidence: `backend/app/services/electricity_service.py`)
- Finance API routes → Finance records: reads and writes (evidence: `backend/app/api/v1/transactions.py`)
- Budget calculations → Finance records: calculates from (evidence: `backend/app/services/budget_engine.py`)
- Autopilot orders → Finance records: tracks orders (evidence: `backend/app/api/v1/autopilot.py`)
- Electricity workflow → Finance records: updates bills (evidence: `backend/app/services/electricity_service.py`)
- Financial calendar → Finance records: reads commitments (evidence: `backend/app/api/v1/calendar.py`)
- Notifications → Finance records: manages notifications
- Finance records → SQL database: persists records (evidence: `backend/app/core/database.py`)
- Scheduled bill automation → Redis and Celery: scheduled by
- Planning and triage → Finance API routes: supports planning views (evidence: `backend/app/services/budget_engine.py`)
