# ax-47/akhsakov_finance architecture

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

- Interactive diagram: https://gitdiagram.com/ax-47/akhsakov_finance
- Repository: https://github.com/ax-47/akhsakov_finance

## Overview

Akhsakov Finance is a personal investment-tracking application with web, desktop, and mobile clients, a shared Rust UI, and an API backed by server-local SQLite. The main workflow is viewing and managing portfolios, enriched by market prices and analysis; the README also documents research, planning, alerts, reports, data import/export, offline use, and Claude/MCP access. The graph uses documented capabilities and sampled entry-point/API calls; several feature-module connections are left broad because their implementation was not sampled.

Main entry points: [`packages/ui/src/app.rs`](https://github.com/ax-47/akhsakov_finance/blob/main/packages/ui/src/app.rs) (Shared UI), [`packages/api/src/database/mod.rs`](https://github.com/ax-47/akhsakov_finance/blob/main/packages/api/src/database/mod.rs) (SQLite database), [`packages/api/src/quote`](https://github.com/ax-47/akhsakov_finance/tree/main/packages/api/src/quote) (Quotes and cache), [`packages/api/src/mcp`](https://github.com/ax-47/akhsakov_finance/tree/main/packages/api/src/mcp) (MCP connector)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["App clients"]
  node_web["Web app<br/>[main.rs]"]
  node_desktop["Desktop app<br/>[main.rs]"]
  node_mobile["Mobile app<br/>[main.rs]"]
  node_ui["Shared UI<br/>[app.rs]"]
end

subgraph group_portfolio["Portfolio workflow"]
  node_portfolio_features["Portfolio and tax"]
  node_transactions["Transactions and assets"]
  node_planning["Plans and risk"]
  node_thesis["Portfolio thesis"]
end

subgraph group_markets["Market and research"]
  node_quotes["Quotes and cache"]
  node_market_tools["Market tools"]
  node_research["Stock research"]
end

subgraph group_operations["Account and operations"]
  node_watchlist["Watchlists and alerts"]
  node_notifications["Notifications"]
  node_reports["Reports and backup"]
  node_backup["Backup and restore"]
  node_mcp["MCP connector"]
  node_auth["Authentication"]
  node_settings["Settings"]
end

subgraph group_storage["Shared data"]
  node_sqlite[("SQLite database<br/>[mod.rs]")]
end

node_investor(("Investor"))
node_yahoo["Yahoo Finance"]
node_delivery["ntfy / Telegram / webhook"]
node_claude(("Claude"))

node_investor -->|"uses"| node_web
node_investor -->|"uses"| node_desktop
node_investor -->|"uses"| node_mobile
node_web -->|"renders"| node_ui
node_desktop -->|"renders"| node_ui
node_mobile -->|"renders"| node_ui
node_ui -->|"requests data"| node_portfolio_features
node_ui -->|"requests data"| node_transactions
node_ui -->|"requests data"| node_planning
node_ui -->|"requests data"| node_thesis
node_ui -->|"requests quotes"| node_quotes
node_ui -->|"requests data"| node_market_tools
node_ui -->|"requests data"| node_research
node_ui -->|"requests data"| node_watchlist
node_ui -->|"requests data"| node_reports
node_ui -->|"requests data"| node_backup
node_ui -->|"requests data"| node_settings
node_ui -->|"requests data"| node_auth
node_portfolio_features -->|"reads / writes"| node_sqlite
node_transactions -->|"reads / writes"| node_sqlite
node_planning -->|"reads / writes"| node_sqlite
node_thesis -->|"reads / writes"| node_sqlite
node_quotes -->|"cache access"| node_sqlite
node_quotes -->|"fetches prices"| node_yahoo
node_market_tools -->|"fetches market data"| node_yahoo
node_research -->|"fetches research"| node_yahoo
node_watchlist -.->|"triggers alerts"| node_notifications
node_notifications -.->|"sends notifications"| node_delivery
node_reports -->|"reads data"| node_sqlite
node_backup -->|"exports / restores"| node_sqlite
node_auth -->|"reads / writes"| node_sqlite
node_settings -->|"reads / writes"| node_sqlite
node_claude -.->|"connects"| node_mcp
node_mcp -.->|"reads portfolio"| node_portfolio_features
node_mcp -.->|"records thesis"| node_thesis

click node_web "https://github.com/ax-47/akhsakov_finance/blob/main/packages/web/src/main.rs"
click node_desktop "https://github.com/ax-47/akhsakov_finance/blob/main/packages/desktop/src/main.rs"
click node_mobile "https://github.com/ax-47/akhsakov_finance/blob/main/packages/mobile/src/main.rs"
click node_ui "https://github.com/ax-47/akhsakov_finance/blob/main/packages/ui/src/app.rs"
click node_portfolio_features "https://github.com/ax-47/akhsakov_finance/tree/main/packages/api/src/portfolio"
click node_transactions "https://github.com/ax-47/akhsakov_finance/tree/main/packages/api/src/economy"
click node_planning "https://github.com/ax-47/akhsakov_finance/tree/main/packages/api/src/planning"
click node_thesis "https://github.com/ax-47/akhsakov_finance/tree/main/packages/api/src/thesis"
click node_quotes "https://github.com/ax-47/akhsakov_finance/tree/main/packages/api/src/quote"
click node_market_tools "https://github.com/ax-47/akhsakov_finance/tree/main/packages/api/src/market"
click node_research "https://github.com/ax-47/akhsakov_finance/tree/main/packages/api/src/research"
click node_watchlist "https://github.com/ax-47/akhsakov_finance/tree/main/packages/api/src/watchlist"
click node_notifications "https://github.com/ax-47/akhsakov_finance/tree/main/packages/api/src/notifications"
click node_reports "https://github.com/ax-47/akhsakov_finance/tree/main/packages/api/src/reports"
click node_backup "https://github.com/ax-47/akhsakov_finance/tree/main/packages/api/src/backup"
click node_mcp "https://github.com/ax-47/akhsakov_finance/tree/main/packages/api/src/mcp"
click node_auth "https://github.com/ax-47/akhsakov_finance/tree/main/packages/api/src/auth"
click node_settings "https://github.com/ax-47/akhsakov_finance/tree/main/packages/api/src/settings"
click node_sqlite "https://github.com/ax-47/akhsakov_finance/blob/main/packages/api/src/database/mod.rs"

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_desktop,node_mobile,node_ui toneBlue
class node_portfolio_features,node_transactions,node_planning,node_thesis toneAmber
class node_quotes,node_market_tools,node_research,node_delivery toneMint
class node_watchlist,node_notifications,node_reports,node_backup,node_mcp,node_auth,node_settings toneRose
class node_sqlite,node_investor,node_yahoo,node_claude toneIndigo
```

## Components

### App clients

- [Web app](https://github.com/ax-47/akhsakov_finance/blob/main/packages/web/src/main.rs): `packages/web/src/main.rs`
- [Desktop app](https://github.com/ax-47/akhsakov_finance/blob/main/packages/desktop/src/main.rs): `packages/desktop/src/main.rs`
- [Mobile app](https://github.com/ax-47/akhsakov_finance/blob/main/packages/mobile/src/main.rs): `packages/mobile/src/main.rs`
- [Shared UI](https://github.com/ax-47/akhsakov_finance/blob/main/packages/ui/src/app.rs): `packages/ui/src/app.rs`

### Portfolio workflow

- [Portfolio and tax](https://github.com/ax-47/akhsakov_finance/tree/main/packages/api/src/portfolio): `packages/api/src/portfolio`
- [Transactions and assets](https://github.com/ax-47/akhsakov_finance/tree/main/packages/api/src/economy): `packages/api/src/economy`
- [Plans and risk](https://github.com/ax-47/akhsakov_finance/tree/main/packages/api/src/planning): `packages/api/src/planning`
- [Portfolio thesis](https://github.com/ax-47/akhsakov_finance/tree/main/packages/api/src/thesis): `packages/api/src/thesis`

### Market and research

- [Quotes and cache](https://github.com/ax-47/akhsakov_finance/tree/main/packages/api/src/quote): `packages/api/src/quote`
- [Market tools](https://github.com/ax-47/akhsakov_finance/tree/main/packages/api/src/market): `packages/api/src/market`
- [Stock research](https://github.com/ax-47/akhsakov_finance/tree/main/packages/api/src/research): `packages/api/src/research`

### Account and operations

- [Watchlists and alerts](https://github.com/ax-47/akhsakov_finance/tree/main/packages/api/src/watchlist): `packages/api/src/watchlist`
- [Notifications](https://github.com/ax-47/akhsakov_finance/tree/main/packages/api/src/notifications): `packages/api/src/notifications`
- [Reports and backup](https://github.com/ax-47/akhsakov_finance/tree/main/packages/api/src/reports): `packages/api/src/reports`
- [Backup and restore](https://github.com/ax-47/akhsakov_finance/tree/main/packages/api/src/backup): `packages/api/src/backup`
- [MCP connector](https://github.com/ax-47/akhsakov_finance/tree/main/packages/api/src/mcp): `packages/api/src/mcp`
- [Authentication](https://github.com/ax-47/akhsakov_finance/tree/main/packages/api/src/auth): `packages/api/src/auth`
- [Settings](https://github.com/ax-47/akhsakov_finance/tree/main/packages/api/src/settings): `packages/api/src/settings`

### Shared data

- [SQLite database](https://github.com/ax-47/akhsakov_finance/blob/main/packages/api/src/database/mod.rs): `packages/api/src/database/mod.rs`

### Other components

- **Investor**
- **Yahoo Finance**
- **ntfy / Telegram / webhook**
- **Claude**

## Connections

- Investor → Web app: uses
- Investor → Desktop app: uses
- Investor → Mobile app: uses
- Web app → Shared UI: renders
- Desktop app → Shared UI: renders
- Mobile app → Shared UI: renders
- Shared UI → Portfolio and tax: requests data
- Shared UI → Transactions and assets: requests data
- Shared UI → Plans and risk: requests data
- Shared UI → Portfolio thesis: requests data
- Shared UI → Quotes and cache: requests quotes
- Shared UI → Market tools: requests data
- Shared UI → Stock research: requests data
- Shared UI → Watchlists and alerts: requests data
- Shared UI → Reports and backup: requests data
- Shared UI → Backup and restore: requests data
- Shared UI → Settings: requests data
- Shared UI → Authentication: requests data
- Portfolio and tax → SQLite database: reads / writes
- Transactions and assets → SQLite database: reads / writes
- Plans and risk → SQLite database: reads / writes
- Portfolio thesis → SQLite database: reads / writes
- Quotes and cache → SQLite database: cache access
- Quotes and cache → Yahoo Finance: fetches prices
- Market tools → Yahoo Finance: fetches market data
- Stock research → Yahoo Finance: fetches research
- Watchlists and alerts → Notifications: triggers alerts
- Notifications → ntfy / Telegram / webhook: sends notifications
- Reports and backup → SQLite database: reads data
- Backup and restore → SQLite database: exports / restores
- Authentication → SQLite database: reads / writes
- Settings → SQLite database: reads / writes
- Claude → MCP connector: connects
- MCP connector → Portfolio and tax: reads portfolio
- MCP connector → Portfolio thesis: records thesis
