# edmilsongc/walletflow architecture

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

- Interactive diagram: https://gitdiagram.com/edmilsongc/walletflow
- Repository: https://github.com/edmilsongc/walletflow

## Overview

WalletFlow is a personal-finance web app. Users can register or log in, then access a session-checked finance workspace with dashboard, payables, receivables, investment plans, statements, transactions, support, and settings. The sampled payable and receivable screens submit records and request summaries; their API routes query PostgreSQL through a shared connection helper. Several listed screens have no sampled implementation details, so their presence is represented without inferred runtime links.

Main entry points: [`backend/src/main.py`](https://github.com/edmilsongc/walletflow/blob/main/backend/src/main.py) (API app), [`backend/src/routes/dataUser.py`](https://github.com/edmilsongc/walletflow/blob/main/backend/src/routes/dataUser.py) (User dashboard data), [`backend/src/routes/accountsPayable.py`](https://github.com/edmilsongc/walletflow/blob/main/backend/src/routes/accountsPayable.py) (Payables API), [`backend/src/routes/accountsReceivable.py`](https://github.com/edmilsongc/walletflow/blob/main/backend/src/routes/accountsReceivable.py) (Receivables API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_frontend["Page routing<br/>[main.py]"]
  node_templates["Finance pages"]
  node_ui["Shared UI<br/>[app.js]"]
  node_dashboard["Dashboard<br/>[dashboard.js]"]
  node_payable_ui["Payables UI"]
  node_receivable_ui["Receivables UI"]
  node_investment_ui["Investment plans"]
  node_statements_ui["Statements<br/>[statements.js]"]
  node_transactions_ui["Transactions<br/>[transactions.js]"]
  node_support_ui["Support<br/>[support.js]"]
  node_settings_ui["Settings<br/>[settings.js]"]
  node_login_ui["Login screen<br/>[login.js]"]
  node_register_ui["Registration screen<br/>[register.js]"]
  node_landing_ui["Landing page<br/>[index.js]"]
end

subgraph group_api["Backend API"]
  node_backend["API app<br/>[main.py]"]
  node_auth["Authentication<br/>[auth.py]"]
  node_user_data["User dashboard data<br/>[dataUser.py]"]
  node_payable_api["Payables API<br/>[accountsPayable.py]"]
  node_receivable_api["Receivables API"]
end

subgraph group_data["Persistence"]
  node_connection["DB connection<br/>[connection.py]"]
  node_postgres[("PostgreSQL")]
end

node_visitor(("Visitor"))

node_visitor -->|"requests pages"| node_frontend
node_frontend -->|"renders pages"| node_templates
node_frontend -->|"checks session"| node_backend
node_ui -->|"fetches dashboard"| node_user_data
node_payable_ui -->|"submits and fetches"| node_payable_api
node_receivable_ui -->|"submits and fetches"| node_receivable_api
node_backend -->|"registers blueprint"| node_auth
node_backend -->|"registers blueprint"| node_user_data
node_backend -->|"registers blueprint"| node_payable_api
node_backend -->|"registers blueprint"| node_receivable_api
node_auth -->|"opens connection"| node_connection
node_user_data -->|"opens connection"| node_connection
node_payable_api -->|"opens connection"| node_connection
node_receivable_api -->|"opens connection"| node_connection
node_auth -->|"queries users"| node_postgres
node_user_data -->|"queries user"| node_postgres
node_payable_api -->|"reads and writes"| node_postgres
node_receivable_api -->|"reads and writes"| node_postgres

click node_frontend "https://github.com/edmilsongc/walletflow/blob/main/frontend/src/main.py"
click node_templates "https://github.com/edmilsongc/walletflow/tree/main/frontend/src/templates"
click node_ui "https://github.com/edmilsongc/walletflow/blob/main/frontend/src/static/js/app.js"
click node_dashboard "https://github.com/edmilsongc/walletflow/blob/main/frontend/src/static/js/dashboard.js"
click node_payable_ui "https://github.com/edmilsongc/walletflow/blob/main/frontend/src/static/js/accounts-payable.js"
click node_receivable_ui "https://github.com/edmilsongc/walletflow/blob/main/frontend/src/static/js/accounts-receivable.js"
click node_investment_ui "https://github.com/edmilsongc/walletflow/blob/main/frontend/src/static/js/investment-plans.js"
click node_statements_ui "https://github.com/edmilsongc/walletflow/blob/main/frontend/src/static/js/statements.js"
click node_transactions_ui "https://github.com/edmilsongc/walletflow/blob/main/frontend/src/static/js/transactions.js"
click node_support_ui "https://github.com/edmilsongc/walletflow/blob/main/frontend/src/static/js/support.js"
click node_settings_ui "https://github.com/edmilsongc/walletflow/blob/main/frontend/src/static/js/settings.js"
click node_login_ui "https://github.com/edmilsongc/walletflow/blob/main/frontend/src/static/js/login.js"
click node_register_ui "https://github.com/edmilsongc/walletflow/blob/main/frontend/src/static/js/register.js"
click node_landing_ui "https://github.com/edmilsongc/walletflow/blob/main/frontend/src/static/js/index.js"
click node_backend "https://github.com/edmilsongc/walletflow/blob/main/backend/src/main.py"
click node_auth "https://github.com/edmilsongc/walletflow/blob/main/backend/src/routes/auth.py"
click node_user_data "https://github.com/edmilsongc/walletflow/blob/main/backend/src/routes/dataUser.py"
click node_payable_api "https://github.com/edmilsongc/walletflow/blob/main/backend/src/routes/accountsPayable.py"
click node_receivable_api "https://github.com/edmilsongc/walletflow/blob/main/backend/src/routes/accountsReceivable.py"
click node_connection "https://github.com/edmilsongc/walletflow/blob/main/backend/src/database/connection.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_frontend,node_templates,node_ui,node_dashboard,node_payable_ui,node_receivable_ui,node_investment_ui,node_statements_ui,node_transactions_ui,node_support_ui,node_settings_ui,node_login_ui,node_register_ui,node_landing_ui toneBlue
class node_backend,node_auth,node_user_data,node_payable_api,node_receivable_api toneAmber
class node_connection,node_postgres toneMint
class node_visitor toneIndigo
```

## Components

### Web experience

- [Page routing](https://github.com/edmilsongc/walletflow/blob/main/frontend/src/main.py): `frontend/src/main.py`
- [Finance pages](https://github.com/edmilsongc/walletflow/tree/main/frontend/src/templates): `frontend/src/templates`
- [Shared UI](https://github.com/edmilsongc/walletflow/blob/main/frontend/src/static/js/app.js): `frontend/src/static/js/app.js`
- [Dashboard](https://github.com/edmilsongc/walletflow/blob/main/frontend/src/static/js/dashboard.js): `frontend/src/static/js/dashboard.js`
- [Payables UI](https://github.com/edmilsongc/walletflow/blob/main/frontend/src/static/js/accounts-payable.js): `frontend/src/static/js/accounts-payable.js`
- [Receivables UI](https://github.com/edmilsongc/walletflow/blob/main/frontend/src/static/js/accounts-receivable.js): `frontend/src/static/js/accounts-receivable.js`
- [Investment plans](https://github.com/edmilsongc/walletflow/blob/main/frontend/src/static/js/investment-plans.js): `frontend/src/static/js/investment-plans.js`
- [Statements](https://github.com/edmilsongc/walletflow/blob/main/frontend/src/static/js/statements.js): `frontend/src/static/js/statements.js`
- [Transactions](https://github.com/edmilsongc/walletflow/blob/main/frontend/src/static/js/transactions.js): `frontend/src/static/js/transactions.js`
- [Support](https://github.com/edmilsongc/walletflow/blob/main/frontend/src/static/js/support.js): `frontend/src/static/js/support.js`
- [Settings](https://github.com/edmilsongc/walletflow/blob/main/frontend/src/static/js/settings.js): `frontend/src/static/js/settings.js`
- [Login screen](https://github.com/edmilsongc/walletflow/blob/main/frontend/src/static/js/login.js): `frontend/src/static/js/login.js`
- [Registration screen](https://github.com/edmilsongc/walletflow/blob/main/frontend/src/static/js/register.js): `frontend/src/static/js/register.js`
- [Landing page](https://github.com/edmilsongc/walletflow/blob/main/frontend/src/static/js/index.js): `frontend/src/static/js/index.js`

### Backend API

- [API app](https://github.com/edmilsongc/walletflow/blob/main/backend/src/main.py): `backend/src/main.py`
- [Authentication](https://github.com/edmilsongc/walletflow/blob/main/backend/src/routes/auth.py): `backend/src/routes/auth.py`
- [User dashboard data](https://github.com/edmilsongc/walletflow/blob/main/backend/src/routes/dataUser.py): `backend/src/routes/dataUser.py`
- [Payables API](https://github.com/edmilsongc/walletflow/blob/main/backend/src/routes/accountsPayable.py): `backend/src/routes/accountsPayable.py`
- [Receivables API](https://github.com/edmilsongc/walletflow/blob/main/backend/src/routes/accountsReceivable.py): `backend/src/routes/accountsReceivable.py`

### Persistence

- [DB connection](https://github.com/edmilsongc/walletflow/blob/main/backend/src/database/connection.py): `backend/src/database/connection.py`
- **PostgreSQL**

### Other components

- **Visitor**

## Connections

- Visitor → Page routing: requests pages (evidence: `frontend/src/main.py`)
- Page routing → Finance pages: renders pages (evidence: `frontend/src/main.py`)
- Page routing → API app: checks session (evidence: `frontend/src/main.py`)
- Shared UI → User dashboard data: fetches dashboard (evidence: `frontend/src/static/js/app.js`)
- Payables UI → Payables API: submits and fetches (evidence: `frontend/src/static/js/accounts-payable.js`)
- Receivables UI → Receivables API: submits and fetches (evidence: `frontend/src/static/js/accounts-receivable.js`)
- API app → Authentication: registers blueprint (evidence: `backend/src/main.py`)
- API app → User dashboard data: registers blueprint (evidence: `backend/src/main.py`)
- API app → Payables API: registers blueprint (evidence: `backend/src/main.py`)
- API app → Receivables API: registers blueprint (evidence: `backend/src/main.py`)
- Authentication → DB connection: opens connection (evidence: `backend/src/routes/auth.py`)
- User dashboard data → DB connection: opens connection (evidence: `backend/src/routes/dataUser.py`)
- Payables API → DB connection: opens connection (evidence: `backend/src/routes/accountsPayable.py`)
- Receivables API → DB connection: opens connection (evidence: `backend/src/routes/accountsReceivable.py`)
- Authentication → PostgreSQL: queries users (evidence: `backend/src/routes/auth.py`)
- User dashboard data → PostgreSQL: queries user (evidence: `backend/src/routes/dataUser.py`)
- Payables API → PostgreSQL: reads and writes (evidence: `backend/src/routes/accountsPayable.py`)
- Receivables API → PostgreSQL: reads and writes (evidence: `backend/src/routes/accountsReceivable.py`)
