# idreesalhamli-wq/accounts architecture

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

- Interactive diagram: https://gitdiagram.com/idreesalhamli-wq/accounts
- Repository: https://github.com/idreesalhamli-wq/accounts

## Overview

This is a Flutter accounts and financial-management application, organized into domain features under `lib/features` and shared services under `lib/core`. The tree indicates workflows for account management, disbursements, revenues, spreadsheets, month opening, reports, backups, and settings. Source excerpts cover native platform launchers, not the Dart application flow; therefore feature relationships are shown as capabilities, without inferred call or data-flow edges. The native launcher edges reflect the excerpts and SOURCE INDEX references.

Main entry points: [`linux/runner/main.cc`](https://github.com/idreesalhamli-wq/accounts/blob/main/linux/runner/main.cc) (Linux launcher), [`linux/runner/my_application.h`](https://github.com/idreesalhamli-wq/accounts/blob/main/linux/runner/my_application.h) (Linux application), [`windows/runner/flutter_window.h`](https://github.com/idreesalhamli-wq/accounts/blob/main/windows/runner/flutter_window.h) (Flutter window host), [`windows/runner/main.cpp`](https://github.com/idreesalhamli-wq/accounts/blob/main/windows/runner/main.cpp) (Windows launcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_daily["Daily operations"]
  node_app["Flutter app<br/>[main.dart]"]
  node_home["Dashboard and month opening"]
end

subgraph group_finance["Financial workflows"]
  node_accounts["Account management and transfers"]
  node_disbursements["Disbursements and repayments"]
  node_revenues["Revenue management"]
  node_spreadsheets["Spreadsheet management"]
end

subgraph group_insights["Reporting and recovery"]
  node_reports["Financial reports and exports"]
  node_backup["Backup and restore"]
  node_settings["Application settings"]
  node_storage[("Local database<br/>[hive_service.dart]")]
  node_finance_services["Snapshots and synchronization"]
end

subgraph group_platform["Platform runtime"]
  node_linux_entry["Linux launcher<br/>[main.cc]"]
  node_linux_app["Linux application<br/>[my_application.h]"]
  node_windows_entry["Windows launcher<br/>[main.cpp]"]
  node_flutter_window["Flutter window host<br/>[flutter_window.h]"]
  node_win_window["Windows window<br/>[win32_window.cpp]"]
end

node_user(("User"))

node_linux_entry -->|"creates and runs"| node_linux_app
node_linux_app -.->|"returns exit status"| node_linux_entry
node_windows_entry -->|"creates window"| node_flutter_window
node_flutter_window -->|"inherits window"| node_win_window

click node_app "https://github.com/idreesalhamli-wq/accounts/blob/main/lib/main.dart"
click node_home "https://github.com/idreesalhamli-wq/accounts/tree/main/lib/features/home"
click node_accounts "https://github.com/idreesalhamli-wq/accounts/tree/main/lib/features/accounts"
click node_disbursements "https://github.com/idreesalhamli-wq/accounts/tree/main/lib/features/disbursements"
click node_revenues "https://github.com/idreesalhamli-wq/accounts/tree/main/lib/features/revenues"
click node_spreadsheets "https://github.com/idreesalhamli-wq/accounts/tree/main/lib/features/spreadsheets"
click node_reports "https://github.com/idreesalhamli-wq/accounts/tree/main/lib/features/reports"
click node_backup "https://github.com/idreesalhamli-wq/accounts/tree/main/lib/features/backup"
click node_settings "https://github.com/idreesalhamli-wq/accounts/tree/main/lib/features/settings"
click node_storage "https://github.com/idreesalhamli-wq/accounts/blob/main/lib/core/database/hive_service.dart"
click node_finance_services "https://github.com/idreesalhamli-wq/accounts/tree/main/lib/core/finance"
click node_linux_entry "https://github.com/idreesalhamli-wq/accounts/blob/main/linux/runner/main.cc"
click node_linux_app "https://github.com/idreesalhamli-wq/accounts/blob/main/linux/runner/my_application.h"
click node_windows_entry "https://github.com/idreesalhamli-wq/accounts/blob/main/windows/runner/main.cpp"
click node_flutter_window "https://github.com/idreesalhamli-wq/accounts/blob/main/windows/runner/flutter_window.h"
click node_win_window "https://github.com/idreesalhamli-wq/accounts/blob/main/windows/runner/win32_window.cpp"

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_home,node_user toneBlue
class node_accounts,node_disbursements,node_revenues,node_spreadsheets toneAmber
class node_reports,node_backup,node_settings,node_storage,node_finance_services toneMint
class node_linux_entry,node_linux_app,node_windows_entry,node_flutter_window,node_win_window toneRose
```

## Components

### Daily operations

- [Flutter app](https://github.com/idreesalhamli-wq/accounts/blob/main/lib/main.dart): `lib/main.dart`
- [Dashboard and month opening](https://github.com/idreesalhamli-wq/accounts/tree/main/lib/features/home): `lib/features/home`

### Financial workflows

- [Account management and transfers](https://github.com/idreesalhamli-wq/accounts/tree/main/lib/features/accounts): `lib/features/accounts`
- [Disbursements and repayments](https://github.com/idreesalhamli-wq/accounts/tree/main/lib/features/disbursements): `lib/features/disbursements`
- [Revenue management](https://github.com/idreesalhamli-wq/accounts/tree/main/lib/features/revenues): `lib/features/revenues`
- [Spreadsheet management](https://github.com/idreesalhamli-wq/accounts/tree/main/lib/features/spreadsheets): `lib/features/spreadsheets`

### Reporting and recovery

- [Financial reports and exports](https://github.com/idreesalhamli-wq/accounts/tree/main/lib/features/reports): `lib/features/reports`
- [Backup and restore](https://github.com/idreesalhamli-wq/accounts/tree/main/lib/features/backup): `lib/features/backup`
- [Application settings](https://github.com/idreesalhamli-wq/accounts/tree/main/lib/features/settings): `lib/features/settings`
- [Local database](https://github.com/idreesalhamli-wq/accounts/blob/main/lib/core/database/hive_service.dart): `lib/core/database/hive_service.dart`
- [Snapshots and synchronization](https://github.com/idreesalhamli-wq/accounts/tree/main/lib/core/finance): `lib/core/finance`

### Platform runtime

- [Linux launcher](https://github.com/idreesalhamli-wq/accounts/blob/main/linux/runner/main.cc): `linux/runner/main.cc`
- [Linux application](https://github.com/idreesalhamli-wq/accounts/blob/main/linux/runner/my_application.h): `linux/runner/my_application.h`
- [Windows launcher](https://github.com/idreesalhamli-wq/accounts/blob/main/windows/runner/main.cpp): `windows/runner/main.cpp`
- [Flutter window host](https://github.com/idreesalhamli-wq/accounts/blob/main/windows/runner/flutter_window.h): `windows/runner/flutter_window.h`
- [Windows window](https://github.com/idreesalhamli-wq/accounts/blob/main/windows/runner/win32_window.cpp): `windows/runner/win32_window.cpp`

### Other components

- **User**

## Connections

- Linux launcher → Linux application: creates and runs (evidence: `linux/runner/main.cc`)
- Linux application → Linux launcher: returns exit status (evidence: `linux/runner/main.cc`)
- Windows launcher → Flutter window host: creates window (evidence: `windows/runner/main.cpp`)
- Flutter window host → Windows window: inherits window (evidence: `windows/runner/flutter_window.h`)
