# rohansingh3593/bubble-time-progress-app-flutter- architecture

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

- Interactive diagram: https://gitdiagram.com/rohansingh3593/bubble-time-progress-app-flutter-
- Repository: https://github.com/rohansingh3593/bubble-time-progress-app-flutter-

## Overview

Momentum is a Flutter time-progress and task-management app, with a FastAPI/MongoDB starter backend for live task sync. The main user flow is viewing year, month, week, or day bubbles, opening date-specific tasks, and tracking completion; the README explicitly documents the bubble-to-task navigation and sync flow. Other screens in the tree indicate journaling, goals, motivation, productivity, rewards, and timeline features, but their detailed behavior was not sampled. Edges are limited to README statements and backend source excerpts; unsampled Dart internals are not assumed.

Main entry points: [`lib/main.dart`](https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/main.dart) (Flutter App), [`lib/widgets/bubble_widget.dart`](https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/widgets/bubble_widget.dart) (Bubble UI), [`backend/main.py`](https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/backend/main.py) (FastAPI Backend), [`lib/services/sync_service.dart`](https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/services/sync_service.dart) (Sync Client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_time["Time Progress"]
  node_app["Flutter App<br/>[main.dart]"]
  node_year["Year View<br/>[year_view.dart]"]
  node_month["Month View<br/>[month_view.dart]"]
  node_week["Week View<br/>[week_view.dart]"]
  node_day["Day View<br/>[day_view.dart]"]
  node_bubbles["Bubble UI<br/>[bubble_widget.dart]"]
end

subgraph group_tasks["Tasks and Records"]
  node_taskscreen["Task Screen<br/>[task_screen.dart]"]
  node_taskmodel["Task Model<br/>[task_model.dart]"]
  node_hive[("Local Storage<br/>[hive_service.dart]")]
  node_journal["Journal<br/>[journal_view.dart]"]
  node_journey["Journey Timeline"]
end

subgraph group_insights["Personal Insights"]
  node_goals["Goal Dashboard"]
  node_productivity["Productivity Timeline"]
  node_motivation["Motivation Dashboard"]
  node_rewards["Reward History"]
end

subgraph group_sync["Live Sync"]
  node_syncclient["Sync Client<br/>[sync_service.dart]"]
  node_api["FastAPI Backend<br/>[main.py]"]
  node_models["Sync Payloads<br/>[models.py]"]
  node_manager["WebSocket Manager"]
  node_collection[("Task Collection<br/>[database.py]")]
end

subgraph group_platform["App Hosts"]
  node_windows["Windows Host<br/>[flutter_window.cpp]"]
  node_linux["Linux Host<br/>[my_application.cc]"]
  node_android["Android Host<br/>[MainActivity.kt]"]
  node_ios["iOS Host<br/>[AppDelegate.swift]"]
end

node_user(("App User"))
node_mongo[("MongoDB")]
node_websocket(("WebSocket Clients"))

node_user -->|"uses"| node_app
node_app -.->|"shows time"| node_year
node_app -.->|"shows time"| node_month
node_app -.->|"shows time"| node_week
node_app -.->|"shows time"| node_day
node_year -.->|"renders"| node_bubbles
node_month -.->|"renders"| node_bubbles
node_week -.->|"renders"| node_bubbles
node_day -.->|"renders"| node_bubbles
node_bubbles -->|"opens on tap"| node_taskscreen
node_taskscreen -.->|"manages"| node_taskmodel
node_taskmodel -->|"stored by"| node_hive
node_user -->|"syncs tasks"| node_syncclient
node_syncclient -->|"sends events"| node_api
node_api -->|"reads and writes"| node_collection
node_api -->|"validates payloads"| node_models
node_api -->|"broadcasts events"| node_manager
node_collection -.->|"stores tasks"| node_mongo
node_manager -->|"broadcasts to"| node_websocket
node_websocket -->|"delivers updates"| node_syncclient
node_app -.->|"hosted by"| node_windows
node_app -.->|"hosted by"| node_linux
node_app -.->|"hosted by"| node_android
node_app -.->|"hosted by"| node_ios

click node_app "https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/main.dart"
click node_year "https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/screens/year_view.dart"
click node_month "https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/screens/month_view.dart"
click node_week "https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/screens/week_view.dart"
click node_day "https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/screens/day_view.dart"
click node_bubbles "https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/widgets/bubble_widget.dart"
click node_taskscreen "https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/screens/task_screen.dart"
click node_taskmodel "https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/models/task_model.dart"
click node_hive "https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/services/hive_service.dart"
click node_journal "https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/screens/journal_view.dart"
click node_journey "https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/screens/journey_timeline_view.dart"
click node_goals "https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/screens/goal_dashboard_view.dart"
click node_productivity "https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/screens/productivity_timeline_view.dart"
click node_motivation "https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/screens/motivation_motto_dashboard_view.dart"
click node_rewards "https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/screens/reward_money_history_view.dart"
click node_syncclient "https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/services/sync_service.dart"
click node_api "https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/backend/main.py"
click node_models "https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/backend/models.py"
click node_manager "https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/backend/websocket_manager.py"
click node_collection "https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/backend/database.py"
click node_windows "https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/windows/runner/flutter_window.cpp"
click node_linux "https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/linux/runner/my_application.cc"
click node_android "https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/android/app/src/main/kotlin/com/example/momentum/MainActivity.kt"
click node_ios "https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/ios/Runner/AppDelegate.swift"

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_year,node_month,node_week,node_day,node_bubbles,node_user,node_websocket toneBlue
class node_taskscreen,node_taskmodel,node_hive,node_journal,node_journey,node_mongo toneAmber
class node_goals,node_productivity,node_motivation,node_rewards toneMint
class node_syncclient,node_api,node_models,node_manager,node_collection toneRose
class node_windows,node_linux,node_android,node_ios toneIndigo
```

## Components

### Time Progress

- [Flutter App](https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/main.dart): `lib/main.dart`
- [Year View](https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/screens/year_view.dart): `lib/screens/year_view.dart`
- [Month View](https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/screens/month_view.dart): `lib/screens/month_view.dart`
- [Week View](https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/screens/week_view.dart): `lib/screens/week_view.dart`
- [Day View](https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/screens/day_view.dart): `lib/screens/day_view.dart`
- [Bubble UI](https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/widgets/bubble_widget.dart): `lib/widgets/bubble_widget.dart`

### Tasks and Records

- [Task Screen](https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/screens/task_screen.dart): `lib/screens/task_screen.dart`
- [Task Model](https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/models/task_model.dart): `lib/models/task_model.dart`
- [Local Storage](https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/services/hive_service.dart): `lib/services/hive_service.dart`
- [Journal](https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/screens/journal_view.dart): `lib/screens/journal_view.dart`
- [Journey Timeline](https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/screens/journey_timeline_view.dart): `lib/screens/journey_timeline_view.dart`

### Personal Insights

- [Goal Dashboard](https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/screens/goal_dashboard_view.dart): `lib/screens/goal_dashboard_view.dart`
- [Productivity Timeline](https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/screens/productivity_timeline_view.dart): `lib/screens/productivity_timeline_view.dart`
- [Motivation Dashboard](https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/screens/motivation_motto_dashboard_view.dart): `lib/screens/motivation_motto_dashboard_view.dart`
- [Reward History](https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/screens/reward_money_history_view.dart): `lib/screens/reward_money_history_view.dart`

### Live Sync

- [Sync Client](https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/lib/services/sync_service.dart): `lib/services/sync_service.dart`
- [FastAPI Backend](https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/backend/main.py): `backend/main.py`
- [Sync Payloads](https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/backend/models.py): `backend/models.py`
- [WebSocket Manager](https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/backend/websocket_manager.py): `backend/websocket_manager.py`
- [Task Collection](https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/backend/database.py): `backend/database.py`

### App Hosts

- [Windows Host](https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/windows/runner/flutter_window.cpp): `windows/runner/flutter_window.cpp`
- [Linux Host](https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/linux/runner/my_application.cc): `linux/runner/my_application.cc`
- [Android Host](https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/android/app/src/main/kotlin/com/example/momentum/MainActivity.kt): `android/app/src/main/kotlin/com/example/momentum/MainActivity.kt`
- [iOS Host](https://github.com/rohansingh3593/bubble-time-progress-app-flutter-/blob/main/ios/Runner/AppDelegate.swift): `ios/Runner/AppDelegate.swift`

### Other components

- **App User**
- **MongoDB**
- **WebSocket Clients**

## Connections

- App User → Flutter App: uses (evidence: `README.md`)
- Flutter App → Year View: shows time
- Flutter App → Month View: shows time
- Flutter App → Week View: shows time
- Flutter App → Day View: shows time
- Year View → Bubble UI: renders
- Month View → Bubble UI: renders
- Week View → Bubble UI: renders
- Day View → Bubble UI: renders
- Bubble UI → Task Screen: opens on tap (evidence: `README.md`)
- Task Screen → Task Model: manages
- Task Model → Local Storage: stored by (evidence: `README.md`)
- App User → Sync Client: syncs tasks (evidence: `README.md`)
- Sync Client → FastAPI Backend: sends events (evidence: `README.md`)
- FastAPI Backend → Task Collection: reads and writes (evidence: `backend/main.py`)
- FastAPI Backend → Sync Payloads: validates payloads (evidence: `backend/main.py`)
- FastAPI Backend → WebSocket Manager: broadcasts events (evidence: `backend/main.py`)
- Task Collection → MongoDB: stores tasks
- WebSocket Manager → WebSocket Clients: broadcasts to (evidence: `backend/websocket_manager.py`)
- WebSocket Clients → Sync Client: delivers updates (evidence: `README.md`)
- Flutter App → Windows Host: hosted by
- Flutter App → Linux Host: hosted by
- Flutter App → Android Host: hosted by
- Flutter App → iOS Host: hosted by
