# abdullah-819/fitness-app-flutter architecture

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

- Interactive diagram: https://gitdiagram.com/abdullah-819/fitness-app-flutter
- Repository: https://github.com/abdullah-819/fitness-app-flutter

## Overview

This is a Flutter step-counter and walking-goals app: users track activity, compare it with a daily goal, and review progress over time. The README describes an offline, local-first architecture with presentation, state management, core services, and persistence. The tree also contains authentication, live route tracking, and water-tracking features, which are represented as product areas; their runtime connections are not established by the sampled source, so uncertain links are omitted.

Main entry points: [`lib/features/home/presentation/screens/home_screen.dart`](https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/features/home/presentation/screens/home_screen.dart) (Home Dashboard), [`lib/features/history/data/models/history_record_model.dart`](https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/features/history/data/models/history_record_model.dart) (History Records), [`lib/core/services/local_database.dart`](https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/core/services/local_database.dart) (Local Database), [`lib/features/history/presentation/screens/report_screen.dart`](https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/features/history/presentation/screens/report_screen.dart) (Progress Reports)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_activity["Step Activity"]
  node_dashboard["Home Dashboard<br/>[home_screen.dart]"]
  node_goal["Step Goals<br/>[goal_model.dart]"]
  node_steprecord["Step Records"]
end

subgraph group_insights["Progress Insights"]
  node_history["Activity History"]
  node_historydata["History Records"]
  node_report["Progress Reports<br/>[report_screen.dart]"]
  node_streak["Goal Streaks<br/>[streak_model.dart]"]
  node_export["Data Export"]
end

subgraph group_platform["App Infrastructure"]
  node_app["Flutter App<br/>[main.dart]"]
  node_stepservice["Step Sensor"]
  node_database[("Local Database")]
  node_permissions["Permissions"]
end

subgraph group_additional["Additional Features"]
  node_auth["Auth Screens"]
  node_tracking["Route Tracking"]
  node_location["Location Service"]
  node_water["Water Tracker"]
end

node_user(("App User"))
node_hardware["Device Sensors"]

node_user -->|"uses"| node_app
node_app -.->|"presents"| node_dashboard
node_hardware -->|"provides sensor data"| node_stepservice
node_stepservice -.->|"supplies step data"| node_dashboard
node_dashboard -->|"shows goal progress"| node_goal
node_dashboard -->|"shows step count"| node_steprecord
node_steprecord -->|"stored locally"| node_database
node_goal -->|"stored locally"| node_database
node_history -->|"shows daily logs"| node_historydata
node_historydata -->|"stored locally"| node_database
node_report -->|"summarizes activity"| node_historydata
node_report -->|"shows goal streaks"| node_streak
node_export -->|"exports history"| node_historydata
node_tracking -.->|"uses location"| node_location
node_tracking -.->|"requires permissions"| node_permissions

click node_app "https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/main.dart"
click node_dashboard "https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/features/home/presentation/screens/home_screen.dart"
click node_stepservice "https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/core/services/step_sensor_service.dart"
click node_goal "https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/features/goals/data/models/goal_model.dart"
click node_steprecord "https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/features/home/data/models/step_record_model.dart"
click node_database "https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/core/services/local_database.dart"
click node_history "https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/features/history/presentation/screens/history_screen.dart"
click node_historydata "https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/features/history/data/models/history_record_model.dart"
click node_report "https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/features/history/presentation/screens/report_screen.dart"
click node_streak "https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/features/streak/data/models/streak_model.dart"
click node_export "https://github.com/abdullah-819/fitness-app-flutter/tree/Production/lib/features/export"
click node_auth "https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/features/auth/presentation/screens/sign_in_screen.dart"
click node_tracking "https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/features/track/presentation/providers/track_provider.dart"
click node_location "https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/features/track/data/location_tracking_service.dart"
click node_water "https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/features/water_tracker/presentation/screens/water_tracker_screen.dart"
click node_permissions "https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/core/services/permission_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_dashboard,node_goal,node_steprecord,node_user toneBlue
class node_history,node_historydata,node_report,node_streak,node_export toneAmber
class node_app,node_stepservice,node_database,node_permissions toneMint
class node_auth,node_tracking,node_location,node_water toneRose
class node_hardware toneIndigo
```

## Components

### Step Activity

- [Home Dashboard](https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/features/home/presentation/screens/home_screen.dart): `lib/features/home/presentation/screens/home_screen.dart`
- [Step Goals](https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/features/goals/data/models/goal_model.dart): `lib/features/goals/data/models/goal_model.dart`
- [Step Records](https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/features/home/data/models/step_record_model.dart): `lib/features/home/data/models/step_record_model.dart`

### Progress Insights

- [Activity History](https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/features/history/presentation/screens/history_screen.dart): `lib/features/history/presentation/screens/history_screen.dart`
- [History Records](https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/features/history/data/models/history_record_model.dart): `lib/features/history/data/models/history_record_model.dart`
- [Progress Reports](https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/features/history/presentation/screens/report_screen.dart): `lib/features/history/presentation/screens/report_screen.dart`
- [Goal Streaks](https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/features/streak/data/models/streak_model.dart): `lib/features/streak/data/models/streak_model.dart`
- [Data Export](https://github.com/abdullah-819/fitness-app-flutter/tree/Production/lib/features/export): `lib/features/export`

### App Infrastructure

- [Flutter App](https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/main.dart): `lib/main.dart`
- [Step Sensor](https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/core/services/step_sensor_service.dart): `lib/core/services/step_sensor_service.dart`
- [Local Database](https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/core/services/local_database.dart): `lib/core/services/local_database.dart`
- [Permissions](https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/core/services/permission_service.dart): `lib/core/services/permission_service.dart`

### Additional Features

- [Auth Screens](https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/features/auth/presentation/screens/sign_in_screen.dart): `lib/features/auth/presentation/screens/sign_in_screen.dart`
- [Route Tracking](https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/features/track/presentation/providers/track_provider.dart): `lib/features/track/presentation/providers/track_provider.dart`
- [Location Service](https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/features/track/data/location_tracking_service.dart): `lib/features/track/data/location_tracking_service.dart`
- [Water Tracker](https://github.com/abdullah-819/fitness-app-flutter/blob/Production/lib/features/water_tracker/presentation/screens/water_tracker_screen.dart): `lib/features/water_tracker/presentation/screens/water_tracker_screen.dart`

### Other components

- **App User**
- **Device Sensors**

## Connections

- App User → Flutter App: uses (evidence: `README.md`)
- Flutter App → Home Dashboard: presents
- Device Sensors → Step Sensor: provides sensor data (evidence: `README.md`)
- Step Sensor → Home Dashboard: supplies step data
- Home Dashboard → Step Goals: shows goal progress (evidence: `README.md`)
- Home Dashboard → Step Records: shows step count (evidence: `README.md`)
- Step Records → Local Database: stored locally (evidence: `README.md`)
- Step Goals → Local Database: stored locally (evidence: `README.md`)
- Activity History → History Records: shows daily logs (evidence: `README.md`)
- History Records → Local Database: stored locally (evidence: `README.md`)
- Progress Reports → History Records: summarizes activity (evidence: `README.md`)
- Progress Reports → Goal Streaks: shows goal streaks (evidence: `README.md`)
- Data Export → History Records: exports history (evidence: `README.md`)
- Route Tracking → Location Service: uses location
- Route Tracking → Permissions: requires permissions
