# sito8943/sito-wallet architecture

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

- Interactive diagram: https://gitdiagram.com/sito8943/sito-wallet
- Repository: https://github.com/sito8943/sito-wallet

## Overview

Sito Wallet is a personal-finance web app. Users authenticate, enter a routed finance workspace, and manage accounts, transactions, currencies, debts, subscriptions, and dashboards; query hooks retrieve data through a centralized API manager. The README documents these major capabilities, while the route source confirms feature-gated pages and admin-only users. The graph emphasizes those stages and session/cache support. Several domain views and API clients are represented from the tree and README rather than inspected excerpts, so their internal call links are omitted.

Main entry points: [`src/Routes.tsx`](https://github.com/sito8943/sito-wallet/blob/main/src/Routes.tsx) (Route dispatch), [`src/App.tsx`](https://github.com/sito8943/sito-wallet/blob/main/src/App.tsx) (App bootstrap), [`src/hooks/useAppSession.tsx`](https://github.com/sito8943/sito-wallet/blob/main/src/hooks/useAppSession.tsx) (Session bootstrap), [`src/lib/api/Manager.ts`](https://github.com/sito8943/sito-wallet/blob/main/src/lib/api/Manager.ts) (API manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_app["App bootstrap<br/>[App.tsx]"]
  node_routes["Route dispatch<br/>[Routes.tsx]"]
end

subgraph group_finance["Finance workspace"]
  node_auth["Authentication"]
  node_dashboard["Dashboard"]
  node_accounts["Accounts"]
  node_transactions["Transactions"]
  node_categories["Categories"]
  node_currencies["Currencies"]
  node_debts["Debts"]
  node_subscriptions["Subscriptions"]
  node_providers["Subscription providers"]
  node_notifications["Notifications"]
  node_profile["Profile"]
  node_users["User administration"]
end

subgraph group_data["Data access"]
  node_queries["Query hooks"]
  node_manager["API manager<br/>[Manager.ts]"]
  node_api["Finance API clients"]
end

subgraph group_runtime["Session runtime"]
  node_session["Session bootstrap<br/>[useAppSession.tsx]"]
  node_featureflags["Feature flags"]
  node_cache[("Persisted query cache")]
end

node_user(("User"))
node_backend{{"Finance API"}}

node_user -->|"opens"| node_app
node_app -->|"bootstraps"| node_session
node_app -->|"renders"| node_routes
node_routes -->|"routes auth"| node_auth
node_routes -->|"routes home"| node_dashboard
node_routes -->|"routes accounts"| node_accounts
node_routes -->|"routes transactions"| node_transactions
node_routes -->|"routes categories"| node_categories
node_routes -->|"routes currencies"| node_currencies
node_routes -->|"routes debts"| node_debts
node_routes -->|"routes subscriptions"| node_subscriptions
node_routes -->|"routes providers"| node_providers
node_routes -->|"routes notifications"| node_notifications
node_routes -->|"routes profile"| node_profile
node_routes -->|"guards admin"| node_users
node_session -->|"loads session"| node_manager
node_session -->|"clears flags"| node_featureflags
node_routes -->|"checks access"| node_featureflags
node_queries -->|"requests data"| node_manager
node_manager -->|"provides clients"| node_api
node_api -.->|"calls API"| node_backend
node_cache -->|"scopes cache"| node_user

click node_app "https://github.com/sito8943/sito-wallet/blob/main/src/App.tsx"
click node_routes "https://github.com/sito8943/sito-wallet/blob/main/src/Routes.tsx"
click node_auth "https://github.com/sito8943/sito-wallet/tree/main/src/views/Auth"
click node_dashboard "https://github.com/sito8943/sito-wallet/tree/main/src/views/Home"
click node_accounts "https://github.com/sito8943/sito-wallet/tree/main/src/views/Accounts"
click node_transactions "https://github.com/sito8943/sito-wallet/tree/main/src/views/Transactions"
click node_categories "https://github.com/sito8943/sito-wallet/tree/main/src/views/TransactionCategories"
click node_currencies "https://github.com/sito8943/sito-wallet/tree/main/src/views/Currencies"
click node_debts "https://github.com/sito8943/sito-wallet/tree/main/src/views/Debts"
click node_subscriptions "https://github.com/sito8943/sito-wallet/tree/main/src/views/Subscriptions"
click node_providers "https://github.com/sito8943/sito-wallet/tree/main/src/views/SubscriptionProviders"
click node_notifications "https://github.com/sito8943/sito-wallet/blob/main/src/providers/Notifications/NotificationsProvider.tsx"
click node_profile "https://github.com/sito8943/sito-wallet/tree/main/src/views/Profile"
click node_users "https://github.com/sito8943/sito-wallet/tree/main/src/views/Users"
click node_session "https://github.com/sito8943/sito-wallet/blob/main/src/hooks/useAppSession.tsx"
click node_featureflags "https://github.com/sito8943/sito-wallet/blob/main/src/providers/FeatureFlags/FeatureFlagsProvider.tsx"
click node_queries "https://github.com/sito8943/sito-wallet/tree/main/src/hooks/queries"
click node_manager "https://github.com/sito8943/sito-wallet/blob/main/src/lib/api/Manager.ts"
click node_api "https://github.com/sito8943/sito-wallet/tree/main/src/lib/api"
click node_cache "https://github.com/sito8943/sito-wallet/blob/main/src/providers/QueryPersistence/QueryPersistenceProvider.tsx"

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_routes,node_user toneBlue
class node_auth,node_dashboard,node_accounts,node_transactions,node_categories,node_currencies,node_debts,node_subscriptions,node_providers,node_notifications,node_profile,node_users toneAmber
class node_queries,node_manager,node_api,node_backend toneMint
class node_session,node_featureflags,node_cache toneRose
```

## Components

### App entry

- [App bootstrap](https://github.com/sito8943/sito-wallet/blob/main/src/App.tsx): `src/App.tsx`
- [Route dispatch](https://github.com/sito8943/sito-wallet/blob/main/src/Routes.tsx): `src/Routes.tsx`

### Finance workspace

- [Authentication](https://github.com/sito8943/sito-wallet/tree/main/src/views/Auth): `src/views/Auth`
- [Dashboard](https://github.com/sito8943/sito-wallet/tree/main/src/views/Home): `src/views/Home`
- [Accounts](https://github.com/sito8943/sito-wallet/tree/main/src/views/Accounts): `src/views/Accounts`
- [Transactions](https://github.com/sito8943/sito-wallet/tree/main/src/views/Transactions): `src/views/Transactions`
- [Categories](https://github.com/sito8943/sito-wallet/tree/main/src/views/TransactionCategories): `src/views/TransactionCategories`
- [Currencies](https://github.com/sito8943/sito-wallet/tree/main/src/views/Currencies): `src/views/Currencies`
- [Debts](https://github.com/sito8943/sito-wallet/tree/main/src/views/Debts): `src/views/Debts`
- [Subscriptions](https://github.com/sito8943/sito-wallet/tree/main/src/views/Subscriptions): `src/views/Subscriptions`
- [Subscription providers](https://github.com/sito8943/sito-wallet/tree/main/src/views/SubscriptionProviders): `src/views/SubscriptionProviders`
- [Notifications](https://github.com/sito8943/sito-wallet/blob/main/src/providers/Notifications/NotificationsProvider.tsx): `src/providers/Notifications/NotificationsProvider.tsx`
- [Profile](https://github.com/sito8943/sito-wallet/tree/main/src/views/Profile): `src/views/Profile`
- [User administration](https://github.com/sito8943/sito-wallet/tree/main/src/views/Users): `src/views/Users`

### Data access

- [Query hooks](https://github.com/sito8943/sito-wallet/tree/main/src/hooks/queries): `src/hooks/queries`
- [API manager](https://github.com/sito8943/sito-wallet/blob/main/src/lib/api/Manager.ts): `src/lib/api/Manager.ts`
- [Finance API clients](https://github.com/sito8943/sito-wallet/tree/main/src/lib/api): `src/lib/api`

### Session runtime

- [Session bootstrap](https://github.com/sito8943/sito-wallet/blob/main/src/hooks/useAppSession.tsx): `src/hooks/useAppSession.tsx`
- [Feature flags](https://github.com/sito8943/sito-wallet/blob/main/src/providers/FeatureFlags/FeatureFlagsProvider.tsx): `src/providers/FeatureFlags/FeatureFlagsProvider.tsx`
- [Persisted query cache](https://github.com/sito8943/sito-wallet/blob/main/src/providers/QueryPersistence/QueryPersistenceProvider.tsx): `src/providers/QueryPersistence/QueryPersistenceProvider.tsx`

### Other components

- **User**
- **Finance API**

## Connections

- User → App bootstrap: opens
- App bootstrap → Session bootstrap: bootstraps (evidence: `src/App.tsx`)
- App bootstrap → Route dispatch: renders (evidence: `src/App.tsx`)
- Route dispatch → Authentication: routes auth (evidence: `src/Routes.tsx`)
- Route dispatch → Dashboard: routes home (evidence: `src/Routes.tsx`)
- Route dispatch → Accounts: routes accounts (evidence: `src/Routes.tsx`)
- Route dispatch → Transactions: routes transactions (evidence: `src/Routes.tsx`)
- Route dispatch → Categories: routes categories (evidence: `src/Routes.tsx`)
- Route dispatch → Currencies: routes currencies (evidence: `src/Routes.tsx`)
- Route dispatch → Debts: routes debts (evidence: `src/Routes.tsx`)
- Route dispatch → Subscriptions: routes subscriptions (evidence: `src/Routes.tsx`)
- Route dispatch → Subscription providers: routes providers (evidence: `src/Routes.tsx`)
- Route dispatch → Notifications: routes notifications (evidence: `src/Routes.tsx`)
- Route dispatch → Profile: routes profile (evidence: `src/Routes.tsx`)
- Route dispatch → User administration: guards admin (evidence: `src/Routes.tsx`)
- Session bootstrap → API manager: loads session (evidence: `src/hooks/useAppSession.tsx`)
- Session bootstrap → Feature flags: clears flags (evidence: `src/hooks/useAppSession.tsx`)
- Route dispatch → Feature flags: checks access (evidence: `src/Routes.tsx`)
- Query hooks → API manager: requests data (evidence: `src/hooks/queries/useTransactionCategoryAverage.tsx`)
- API manager → Finance API clients: provides clients (evidence: `src/lib/api/Manager.ts`)
- Finance API clients → Finance API: calls API
- Persisted query cache → User: scopes cache (evidence: `src/providers/QueryPersistence/QueryPersistenceProvider.tsx`)
