# rafidrahman1/ultimate architecture

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

- Interactive diagram: https://gitdiagram.com/rafidrahman1/ultimate
- Repository: https://github.com/rafidrahman1/ultimate

## Overview

Personal is a private Flutter data hub: users connect personal-data sources, select sources for a monthly analysis, read AI-generated insights and weekly checklists, then review progress against current-month data. The README documents these workflows and major capabilities; Dart implementation excerpts were not provided, so relationships below rely on those documented statements rather than inspected Dart calls.

Main entry points: [`lib/features/results/pipeline/analysis_snapshot_builder.dart`](https://github.com/rafidrahman1/ultimate/blob/main/lib/features/results/pipeline/analysis_snapshot_builder.dart) (Analysis pipeline), [`lib/features/home/home_screen.dart`](https://github.com/rafidrahman1/ultimate/blob/main/lib/features/home/home_screen.dart) (Home hub), [`lib/features/results`](https://github.com/rafidrahman1/ultimate/tree/main/lib/features/results) (Weekly checklists), [`lib/features/analysis/ui/analysis_confirm_dialog.dart`](https://github.com/rafidrahman1/ultimate/blob/main/lib/features/analysis/ui/analysis_confirm_dialog.dart) (Source selection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App experience"]
  node_home["Home hub<br/>[home_screen.dart]"]
  node_shell["Navigation shell<br/>[main_shell.dart]"]
end

subgraph group_sources["Personal data"]
  node_health["Health data"]
  node_expenses["Expense data"]
  node_location["Location data"]
  node_games["Game sessions"]
  node_calendar["Calendar events"]
end

subgraph group_analysis["Analysis workflow"]
  node_analysis_confirm["Source selection"]
  node_analysis_period["Monthly scope"]
  node_pipeline["Analysis pipeline"]
end

subgraph group_planning["Planning and review"]
  node_results["Insight results"]
  node_checklists["Weekly checklists"]
  node_progress["Progress review"]
  node_reminders["Local reminders"]
end

subgraph group_configuration["Configuration and export"]
  node_prompts["Prompt settings"]
  node_profile["Personal profile"]
  node_export["Data export"]
end

node_user(("User"))
node_ai{{"AI provider"}}

node_user -->|"opens"| node_home
node_home -.->|"navigates through"| node_shell
node_home -->|"opens data module"| node_health
node_home -->|"opens data module"| node_expenses
node_home -->|"opens data module"| node_location
node_home -->|"opens data module"| node_games
node_home -->|"opens data module"| node_calendar
node_home -->|"starts analysis"| node_analysis_confirm
node_user -->|"selects sources"| node_analysis_confirm
node_analysis_confirm -->|"confirms monthly run"| node_analysis_period
node_health -->|"feeds analysis"| node_pipeline
node_expenses -->|"feeds analysis"| node_pipeline
node_location -->|"feeds analysis"| node_pipeline
node_games -->|"feeds analysis"| node_pipeline
node_calendar -->|"feeds analysis"| node_pipeline
node_prompts -->|"configures reasoning"| node_pipeline
node_profile -->|"configures identity"| node_prompts
node_pipeline -->|"requests analysis"| node_ai
node_pipeline -->|"produces insights"| node_results
node_results -->|"turns actions into"| node_checklists
node_pipeline -->|"compares monthly data"| node_progress
node_checklists -->|"provides targets"| node_progress
node_user -->|"exports data"| node_export
node_checklists -->|"schedules optional alerts"| node_reminders

click node_home "https://github.com/rafidrahman1/ultimate/blob/main/lib/features/home/home_screen.dart"
click node_shell "https://github.com/rafidrahman1/ultimate/blob/main/lib/shell/main_shell.dart"
click node_health "https://github.com/rafidrahman1/ultimate/blob/main/lib/features/health/data/health_service.dart"
click node_expenses "https://github.com/rafidrahman1/ultimate/blob/main/lib/features/expenses/data/expenses_service.dart"
click node_location "https://github.com/rafidrahman1/ultimate/blob/main/lib/features/location/data/location_service.dart"
click node_games "https://github.com/rafidrahman1/ultimate/blob/main/lib/features/game_activity/data/game_activity_service.dart"
click node_calendar "https://github.com/rafidrahman1/ultimate/blob/main/lib/features/calendar/data/calendar_service.dart"
click node_analysis_confirm "https://github.com/rafidrahman1/ultimate/blob/main/lib/features/analysis/ui/analysis_confirm_dialog.dart"
click node_analysis_period "https://github.com/rafidrahman1/ultimate/blob/main/lib/core/period/analysis_period.dart"
click node_pipeline "https://github.com/rafidrahman1/ultimate/blob/main/lib/features/results/pipeline/analysis_snapshot_builder.dart"
click node_results "https://github.com/rafidrahman1/ultimate/tree/main/lib/features/results"
click node_checklists "https://github.com/rafidrahman1/ultimate/tree/main/lib/features/results"
click node_progress "https://github.com/rafidrahman1/ultimate/blob/main/lib/features/analysis/period_comparison.dart"
click node_prompts "https://github.com/rafidrahman1/ultimate/blob/main/lib/features/prompts/prompt_config_service.dart"
click node_profile "https://github.com/rafidrahman1/ultimate/blob/main/lib/features/prompts/personal_info_firestore_service.dart"
click node_export "https://github.com/rafidrahman1/ultimate/blob/main/lib/features/export/data_export_service.dart"
click node_reminders "https://github.com/rafidrahman1/ultimate/blob/main/lib/features/forecasts/reminders/advice_reminder_service.dart"

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_home,node_shell,node_user toneBlue
class node_health,node_expenses,node_location,node_games,node_calendar toneAmber
class node_analysis_confirm,node_analysis_period,node_pipeline toneMint
class node_results,node_checklists,node_progress,node_reminders toneRose
class node_prompts,node_profile,node_export,node_ai toneIndigo
```

## Components

### App experience

- [Home hub](https://github.com/rafidrahman1/ultimate/blob/main/lib/features/home/home_screen.dart): `lib/features/home/home_screen.dart`
- [Navigation shell](https://github.com/rafidrahman1/ultimate/blob/main/lib/shell/main_shell.dart): `lib/shell/main_shell.dart`

### Personal data

- [Health data](https://github.com/rafidrahman1/ultimate/blob/main/lib/features/health/data/health_service.dart): `lib/features/health/data/health_service.dart`
- [Expense data](https://github.com/rafidrahman1/ultimate/blob/main/lib/features/expenses/data/expenses_service.dart): `lib/features/expenses/data/expenses_service.dart`
- [Location data](https://github.com/rafidrahman1/ultimate/blob/main/lib/features/location/data/location_service.dart): `lib/features/location/data/location_service.dart`
- [Game sessions](https://github.com/rafidrahman1/ultimate/blob/main/lib/features/game_activity/data/game_activity_service.dart): `lib/features/game_activity/data/game_activity_service.dart`
- [Calendar events](https://github.com/rafidrahman1/ultimate/blob/main/lib/features/calendar/data/calendar_service.dart): `lib/features/calendar/data/calendar_service.dart`

### Analysis workflow

- [Source selection](https://github.com/rafidrahman1/ultimate/blob/main/lib/features/analysis/ui/analysis_confirm_dialog.dart): `lib/features/analysis/ui/analysis_confirm_dialog.dart`
- [Monthly scope](https://github.com/rafidrahman1/ultimate/blob/main/lib/core/period/analysis_period.dart): `lib/core/period/analysis_period.dart`
- [Analysis pipeline](https://github.com/rafidrahman1/ultimate/blob/main/lib/features/results/pipeline/analysis_snapshot_builder.dart): `lib/features/results/pipeline/analysis_snapshot_builder.dart`

### Planning and review

- [Insight results](https://github.com/rafidrahman1/ultimate/tree/main/lib/features/results): `lib/features/results`
- [Weekly checklists](https://github.com/rafidrahman1/ultimate/tree/main/lib/features/results): `lib/features/results`
- [Progress review](https://github.com/rafidrahman1/ultimate/blob/main/lib/features/analysis/period_comparison.dart): `lib/features/analysis/period_comparison.dart`
- [Local reminders](https://github.com/rafidrahman1/ultimate/blob/main/lib/features/forecasts/reminders/advice_reminder_service.dart): `lib/features/forecasts/reminders/advice_reminder_service.dart`

### Configuration and export

- [Prompt settings](https://github.com/rafidrahman1/ultimate/blob/main/lib/features/prompts/prompt_config_service.dart): `lib/features/prompts/prompt_config_service.dart`
- [Personal profile](https://github.com/rafidrahman1/ultimate/blob/main/lib/features/prompts/personal_info_firestore_service.dart): `lib/features/prompts/personal_info_firestore_service.dart`
- [Data export](https://github.com/rafidrahman1/ultimate/blob/main/lib/features/export/data_export_service.dart): `lib/features/export/data_export_service.dart`

### Other components

- **User**
- **AI provider**

## Connections

- User → Home hub: opens (evidence: `README.md`)
- Home hub → Navigation shell: navigates through
- Home hub → Health data: opens data module (evidence: `README.md`)
- Home hub → Expense data: opens data module (evidence: `README.md`)
- Home hub → Location data: opens data module (evidence: `README.md`)
- Home hub → Game sessions: opens data module (evidence: `README.md`)
- Home hub → Calendar events: opens data module (evidence: `README.md`)
- Home hub → Source selection: starts analysis (evidence: `README.md`)
- User → Source selection: selects sources (evidence: `README.md`)
- Source selection → Monthly scope: confirms monthly run (evidence: `README.md`)
- Health data → Analysis pipeline: feeds analysis (evidence: `README.md`)
- Expense data → Analysis pipeline: feeds analysis (evidence: `README.md`)
- Location data → Analysis pipeline: feeds analysis (evidence: `README.md`)
- Game sessions → Analysis pipeline: feeds analysis (evidence: `README.md`)
- Calendar events → Analysis pipeline: feeds analysis (evidence: `README.md`)
- Prompt settings → Analysis pipeline: configures reasoning (evidence: `README.md`)
- Personal profile → Prompt settings: configures identity (evidence: `README.md`)
- Analysis pipeline → AI provider: requests analysis (evidence: `README.md`)
- Analysis pipeline → Insight results: produces insights (evidence: `README.md`)
- Insight results → Weekly checklists: turns actions into (evidence: `README.md`)
- Analysis pipeline → Progress review: compares monthly data (evidence: `README.md`)
- Weekly checklists → Progress review: provides targets (evidence: `README.md`)
- User → Data export: exports data (evidence: `README.md`)
- Weekly checklists → Local reminders: schedules optional alerts (evidence: `README.md`)
