# jcv2021/finance-app architecture

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

- Interactive diagram: https://gitdiagram.com/jcv2021/finance-app
- Repository: https://github.com/jcv2021/finance-app

## Overview

This is a scaffold for a local-first personal finance application. The clearest implemented user-facing domain behavior is a set of standalone financial calculations: account, available-money, financial, period, and daily balances, plus transfer construction. The API currently only logs a startup message, and the web app has no source files in the tree. No calls or wiring between these pieces are shown, so the graph keeps them separate; the database migration is also unsampled.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API runtime"]
  node_server["API server<br/>[server.ts]"]
end

subgraph group_finance["Financial core"]
  node_account_balance["Account balance"]
  node_available_money["Available money"]
  node_financial_balance["Financial balance"]
  node_period_balance["Period balance"]
  node_daily_balance["Daily balance"]
  node_transfer["Transfer creation<br/>[createTransfer.ts]"]
end

click node_server "https://github.com/jcv2021/finance-app/blob/main/apps/api/src/server.ts"
click node_account_balance "https://github.com/jcv2021/finance-app/blob/main/packages/financial-core/src/calculations/calculateAccountBalance.ts"
click node_available_money "https://github.com/jcv2021/finance-app/blob/main/packages/financial-core/src/calculations/calculateAvailableMoney.ts"
click node_financial_balance "https://github.com/jcv2021/finance-app/blob/main/packages/financial-core/src/calculations/calculateFinancialBalance.ts"
click node_period_balance "https://github.com/jcv2021/finance-app/blob/main/packages/financial-core/src/calculations/calculatePeriodBalance.ts"
click node_daily_balance "https://github.com/jcv2021/finance-app/blob/main/packages/financial-core/src/calculations/calculateDailyBalance.ts"
click node_transfer "https://github.com/jcv2021/finance-app/blob/main/packages/financial-core/src/calculations/createTransfer.ts"

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_server toneBlue
class node_account_balance,node_available_money,node_financial_balance,node_period_balance,node_daily_balance,node_transfer toneAmber
```

## Components

### API runtime

- [API server](https://github.com/jcv2021/finance-app/blob/main/apps/api/src/server.ts): `apps/api/src/server.ts`

### Financial core

- [Account balance](https://github.com/jcv2021/finance-app/blob/main/packages/financial-core/src/calculations/calculateAccountBalance.ts): `packages/financial-core/src/calculations/calculateAccountBalance.ts`
- [Available money](https://github.com/jcv2021/finance-app/blob/main/packages/financial-core/src/calculations/calculateAvailableMoney.ts): `packages/financial-core/src/calculations/calculateAvailableMoney.ts`
- [Financial balance](https://github.com/jcv2021/finance-app/blob/main/packages/financial-core/src/calculations/calculateFinancialBalance.ts): `packages/financial-core/src/calculations/calculateFinancialBalance.ts`
- [Period balance](https://github.com/jcv2021/finance-app/blob/main/packages/financial-core/src/calculations/calculatePeriodBalance.ts): `packages/financial-core/src/calculations/calculatePeriodBalance.ts`
- [Daily balance](https://github.com/jcv2021/finance-app/blob/main/packages/financial-core/src/calculations/calculateDailyBalance.ts): `packages/financial-core/src/calculations/calculateDailyBalance.ts`
- [Transfer creation](https://github.com/jcv2021/finance-app/blob/main/packages/financial-core/src/calculations/createTransfer.ts): `packages/financial-core/src/calculations/createTransfer.ts`
