# spotcorner/fin-track-ui architecture

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

- Interactive diagram: https://gitdiagram.com/spotcorner/fin-track-ui
- Repository: https://github.com/spotcorner/fin-track-ui

## Overview

fin-track-ui is the React frontend for a personal finance tracker. After login, users browse transactions or upload a statement; extraction results may need column mapping before a selected batch is saved as a draft, reviewed, and finalized. Separate routes manage accounts, tags, activity, profile and sharing, and help. The graph includes documented capabilities whose implementation was not sampled; their exact route or service wiring is only represented where evidence supports it. UI-to-API relationships are shown at the service boundary, not inferred beyond it.

Main entry points: [`src/App.jsx`](https://github.com/spotcorner/fin-track-ui/blob/main/src/App.jsx) (Route shell), [`src/components/drafts/ExtractionResults.jsx`](https://github.com/spotcorner/fin-track-ui/blob/main/src/components/drafts/ExtractionResults.jsx) (Extraction results), [`src/services/http.js`](https://github.com/spotcorner/fin-track-ui/blob/main/src/services/http.js) (HTTP client), [`src/components/transactions/TransactionsLayout.jsx`](https://github.com/spotcorner/fin-track-ui/blob/main/src/components/transactions/TransactionsLayout.jsx) (Transactions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application and session"]
  node_login["OAuth login<br/>[Login.jsx]"]
  node_routes["Route shell<br/>[App.jsx]"]
  node_layout["App layout<br/>[AppLayout.jsx]"]
end

subgraph group_money["Transactions and insights"]
  node_transactions["Transactions"]
  node_transactionview["Transaction list"]
  node_filters["Filters<br/>[FiltersView.jsx]"]
  node_summary["Summary and budget<br/>[SummaryTable.jsx]"]
  node_stats["Charts and stats<br/>[StatsView.jsx]"]
end

subgraph group_import["Statement import and drafts"]
  node_upload["Statement upload<br/>[CrudDraftModal.jsx]"]
  node_results["Extraction results"]
  node_mapping["Column mapping"]
  node_preview["Transaction preview"]
  node_drafts["Draft batches<br/>[DraftsView.jsx]"]
  node_draftdetail["Draft review"]
end

subgraph group_manage["Finance management"]
  node_accounts["Accounts<br/>[Accounts.jsx]"]
  node_tags["Tags<br/>[Tags.jsx]"]
  node_activity["Activity<br/>[ActivityView.jsx]"]
  node_profile["Profile and sharing<br/>[Profile.jsx]"]
end

subgraph group_core["Shared data services"]
  node_http["HTTP client<br/>[http.js]"]
  node_transactionapi["Transaction API"]
  node_draftapi["Draft API<br/>[draftService.js]"]
  node_accountapi["Account API<br/>[accountService.js]"]
  node_tagapi["Tag API<br/>[tagService.js]"]
  node_accessapi["Access API<br/>[accessService.js]"]
  node_state[("User state<br/>[userSlice.js]")]
  node_mappingutil["Mapping utilities"]
end

node_user(("User"))

node_user -->|"signs in"| node_login
node_routes -->|"requires session"| node_login
node_routes -->|"wraps routes"| node_layout
node_routes -->|"routes to"| node_transactions
node_routes -->|"routes to"| node_drafts
node_routes -->|"routes to"| node_draftdetail
node_routes -->|"routes to"| node_accounts
node_routes -->|"routes to"| node_tags
node_routes -->|"routes to"| node_activity
node_routes -->|"routes to"| node_profile
node_transactions -->|"renders"| node_stats
node_transactions -->|"renders"| node_summary
node_transactions -.->|"renders"| node_transactionview
node_transactions -.->|"uses filters"| node_filters
node_transactionview -.->|"manages transactions"| node_transactionapi
node_filters -.->|"filters list"| node_transactionview
node_upload -->|"shows results"| node_results
node_results -->|"renders mapping"| node_mapping
node_results -->|"renders preview"| node_preview
node_results -->|"applies mapping"| node_mappingutil
node_results -->|"saves draft"| node_draftapi
node_drafts -->|"opens batch"| node_draftdetail
node_draftdetail -->|"loads and finalizes"| node_draftapi
node_draftdetail -->|"renders results"| node_results
node_draftapi -->|"sends requests"| node_http
node_transactionapi -->|"sends requests"| node_http
node_accounts -.->|"manages accounts"| node_accountapi
node_tags -.->|"manages tags"| node_tagapi
node_profile -->|"manages access"| node_accessapi
node_accountapi -->|"sends requests"| node_http
node_tagapi -->|"sends requests"| node_http
node_accessapi -->|"sends requests"| node_http
node_state -->|"fetches accounts"| node_accountapi
node_state -->|"fetches tags"| node_tagapi
node_state -->|"fetches access"| node_accessapi
node_http -->|"reports errors"| node_user

click node_login "https://github.com/spotcorner/fin-track-ui/blob/main/src/components/login/Login.jsx"
click node_routes "https://github.com/spotcorner/fin-track-ui/blob/main/src/App.jsx"
click node_layout "https://github.com/spotcorner/fin-track-ui/blob/main/src/components/layout/AppLayout.jsx"
click node_transactions "https://github.com/spotcorner/fin-track-ui/blob/main/src/components/transactions/TransactionsLayout.jsx"
click node_transactionview "https://github.com/spotcorner/fin-track-ui/blob/main/src/components/transactions/TransactionsView.jsx"
click node_filters "https://github.com/spotcorner/fin-track-ui/blob/main/src/components/transactions/FiltersView.jsx"
click node_summary "https://github.com/spotcorner/fin-track-ui/blob/main/src/components/transactions/SummaryTable.jsx"
click node_stats "https://github.com/spotcorner/fin-track-ui/blob/main/src/components/transactions/stats/StatsView.jsx"
click node_upload "https://github.com/spotcorner/fin-track-ui/blob/main/src/components/drafts/CrudDraftModal.jsx"
click node_results "https://github.com/spotcorner/fin-track-ui/blob/main/src/components/drafts/ExtractionResults.jsx"
click node_mapping "https://github.com/spotcorner/fin-track-ui/blob/main/src/components/upload/ColumnMappingTable.jsx"
click node_preview "https://github.com/spotcorner/fin-track-ui/blob/main/src/components/upload/TransactionPreview.jsx"
click node_drafts "https://github.com/spotcorner/fin-track-ui/blob/main/src/components/drafts/DraftsView.jsx"
click node_draftdetail "https://github.com/spotcorner/fin-track-ui/blob/main/src/components/drafts/DraftDetailView.jsx"
click node_accounts "https://github.com/spotcorner/fin-track-ui/blob/main/src/components/accounts/Accounts.jsx"
click node_tags "https://github.com/spotcorner/fin-track-ui/blob/main/src/components/tags/Tags.jsx"
click node_activity "https://github.com/spotcorner/fin-track-ui/blob/main/src/components/activity/ActivityView.jsx"
click node_profile "https://github.com/spotcorner/fin-track-ui/blob/main/src/components/profile/Profile.jsx"
click node_http "https://github.com/spotcorner/fin-track-ui/blob/main/src/services/http.js"
click node_transactionapi "https://github.com/spotcorner/fin-track-ui/blob/main/src/services/transactionService.js"
click node_draftapi "https://github.com/spotcorner/fin-track-ui/blob/main/src/services/draftService.js"
click node_accountapi "https://github.com/spotcorner/fin-track-ui/blob/main/src/services/accountService.js"
click node_tagapi "https://github.com/spotcorner/fin-track-ui/blob/main/src/services/tagService.js"
click node_accessapi "https://github.com/spotcorner/fin-track-ui/blob/main/src/services/accessService.js"
click node_state "https://github.com/spotcorner/fin-track-ui/blob/main/src/store/userSlice.js"
click node_mappingutil "https://github.com/spotcorner/fin-track-ui/blob/main/src/utils/transactionGroupUtil.js"

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_login,node_routes,node_layout,node_user toneBlue
class node_transactions,node_transactionview,node_filters,node_summary,node_stats toneAmber
class node_upload,node_results,node_mapping,node_preview,node_drafts,node_draftdetail toneMint
class node_accounts,node_tags,node_activity,node_profile toneRose
class node_http,node_transactionapi,node_draftapi,node_accountapi,node_tagapi,node_accessapi,node_state,node_mappingutil toneIndigo
```

## Components

### Application and session

- [OAuth login](https://github.com/spotcorner/fin-track-ui/blob/main/src/components/login/Login.jsx): `src/components/login/Login.jsx`
- [Route shell](https://github.com/spotcorner/fin-track-ui/blob/main/src/App.jsx): `src/App.jsx`
- [App layout](https://github.com/spotcorner/fin-track-ui/blob/main/src/components/layout/AppLayout.jsx): `src/components/layout/AppLayout.jsx`

### Transactions and insights

- [Transactions](https://github.com/spotcorner/fin-track-ui/blob/main/src/components/transactions/TransactionsLayout.jsx): `src/components/transactions/TransactionsLayout.jsx`
- [Transaction list](https://github.com/spotcorner/fin-track-ui/blob/main/src/components/transactions/TransactionsView.jsx): `src/components/transactions/TransactionsView.jsx`
- [Filters](https://github.com/spotcorner/fin-track-ui/blob/main/src/components/transactions/FiltersView.jsx): `src/components/transactions/FiltersView.jsx`
- [Summary and budget](https://github.com/spotcorner/fin-track-ui/blob/main/src/components/transactions/SummaryTable.jsx): `src/components/transactions/SummaryTable.jsx`
- [Charts and stats](https://github.com/spotcorner/fin-track-ui/blob/main/src/components/transactions/stats/StatsView.jsx): `src/components/transactions/stats/StatsView.jsx`

### Statement import and drafts

- [Statement upload](https://github.com/spotcorner/fin-track-ui/blob/main/src/components/drafts/CrudDraftModal.jsx): `src/components/drafts/CrudDraftModal.jsx`
- [Extraction results](https://github.com/spotcorner/fin-track-ui/blob/main/src/components/drafts/ExtractionResults.jsx): `src/components/drafts/ExtractionResults.jsx`
- [Column mapping](https://github.com/spotcorner/fin-track-ui/blob/main/src/components/upload/ColumnMappingTable.jsx): `src/components/upload/ColumnMappingTable.jsx`
- [Transaction preview](https://github.com/spotcorner/fin-track-ui/blob/main/src/components/upload/TransactionPreview.jsx): `src/components/upload/TransactionPreview.jsx`
- [Draft batches](https://github.com/spotcorner/fin-track-ui/blob/main/src/components/drafts/DraftsView.jsx): `src/components/drafts/DraftsView.jsx`
- [Draft review](https://github.com/spotcorner/fin-track-ui/blob/main/src/components/drafts/DraftDetailView.jsx): `src/components/drafts/DraftDetailView.jsx`

### Finance management

- [Accounts](https://github.com/spotcorner/fin-track-ui/blob/main/src/components/accounts/Accounts.jsx): `src/components/accounts/Accounts.jsx`
- [Tags](https://github.com/spotcorner/fin-track-ui/blob/main/src/components/tags/Tags.jsx): `src/components/tags/Tags.jsx`
- [Activity](https://github.com/spotcorner/fin-track-ui/blob/main/src/components/activity/ActivityView.jsx): `src/components/activity/ActivityView.jsx`
- [Profile and sharing](https://github.com/spotcorner/fin-track-ui/blob/main/src/components/profile/Profile.jsx): `src/components/profile/Profile.jsx`

### Shared data services

- [HTTP client](https://github.com/spotcorner/fin-track-ui/blob/main/src/services/http.js): `src/services/http.js`
- [Transaction API](https://github.com/spotcorner/fin-track-ui/blob/main/src/services/transactionService.js): `src/services/transactionService.js`
- [Draft API](https://github.com/spotcorner/fin-track-ui/blob/main/src/services/draftService.js): `src/services/draftService.js`
- [Account API](https://github.com/spotcorner/fin-track-ui/blob/main/src/services/accountService.js): `src/services/accountService.js`
- [Tag API](https://github.com/spotcorner/fin-track-ui/blob/main/src/services/tagService.js): `src/services/tagService.js`
- [Access API](https://github.com/spotcorner/fin-track-ui/blob/main/src/services/accessService.js): `src/services/accessService.js`
- [User state](https://github.com/spotcorner/fin-track-ui/blob/main/src/store/userSlice.js): `src/store/userSlice.js`
- [Mapping utilities](https://github.com/spotcorner/fin-track-ui/blob/main/src/utils/transactionGroupUtil.js): `src/utils/transactionGroupUtil.js`

### Other components

- **User**

## Connections

- User → OAuth login: signs in
- Route shell → OAuth login: requires session (evidence: `src/App.jsx`)
- Route shell → App layout: wraps routes (evidence: `src/App.jsx`)
- Route shell → Transactions: routes to (evidence: `src/App.jsx`)
- Route shell → Draft batches: routes to (evidence: `src/App.jsx`)
- Route shell → Draft review: routes to (evidence: `src/App.jsx`)
- Route shell → Accounts: routes to (evidence: `src/App.jsx`)
- Route shell → Tags: routes to (evidence: `src/App.jsx`)
- Route shell → Activity: routes to (evidence: `src/App.jsx`)
- Route shell → Profile and sharing: routes to (evidence: `src/App.jsx`)
- Transactions → Charts and stats: renders (evidence: `src/components/transactions/TransactionsLayout.jsx`)
- Transactions → Summary and budget: renders (evidence: `src/components/transactions/TransactionsLayout.jsx`)
- Transactions → Transaction list: renders
- Transactions → Filters: uses filters
- Transaction list → Transaction API: manages transactions
- Filters → Transaction list: filters list
- Statement upload → Extraction results: shows results
- Extraction results → Column mapping: renders mapping (evidence: `src/components/drafts/ExtractionResults.jsx`)
- Extraction results → Transaction preview: renders preview (evidence: `src/components/drafts/ExtractionResults.jsx`)
- Extraction results → Mapping utilities: applies mapping (evidence: `src/components/drafts/ExtractionResults.jsx`)
- Extraction results → Draft API: saves draft (evidence: `src/components/drafts/ExtractionResults.jsx`)
- Draft batches → Draft review: opens batch (evidence: `src/components/drafts/DraftsView.jsx`)
- Draft review → Draft API: loads and finalizes (evidence: `src/components/drafts/DraftDetailView.jsx`)
- Draft review → Extraction results: renders results (evidence: `src/components/drafts/DraftDetailView.jsx`)
- Draft API → HTTP client: sends requests (evidence: `src/services/draftService.js`)
- Transaction API → HTTP client: sends requests (evidence: `src/services/transactionService.js`)
- Accounts → Account API: manages accounts
- Tags → Tag API: manages tags
- Profile and sharing → Access API: manages access (evidence: `src/components/profile/Profile.jsx`)
- Account API → HTTP client: sends requests (evidence: `src/services/accountService.js`)
- Tag API → HTTP client: sends requests (evidence: `src/services/tagService.js`)
- Access API → HTTP client: sends requests (evidence: `src/services/accessService.js`)
- User state → Account API: fetches accounts (evidence: `src/store/userSlice.js`)
- User state → Tag API: fetches tags (evidence: `src/store/userSlice.js`)
- User state → Access API: fetches access (evidence: `src/store/userSlice.js`)
- HTTP client → User: reports errors (evidence: `src/services/http.js`)
