# cypherr00/vitaltrack architecture

> Architecture diagram of the GitHub repository cypherr00/vitaltrack, 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/cypherr00/vitaltrack
- Repository: https://github.com/cypherr00/vitaltrack

## Overview

Vital Track is a Flutter health-tracking app, with modules for authentication, vital records, history, settings, and PDF export. The apparent user journey is app launch, sign-in or registration, then use of a home view and history; Supabase is indicated by the configuration and service paths. The README only describes a starter Flutter project, and Dart implementation excerpts were not provided, so workflow connections below are dashed and unverified rather than asserted as inspected calls.

Main entry points: [`lib/features/main/screens/main_layout.dart`](https://github.com/cypherr00/vitaltrack/blob/main/lib/features/main/screens/main_layout.dart) (Main layout), [`lib/features/splash/screens/splash_screen.dart`](https://github.com/cypherr00/vitaltrack/blob/main/lib/features/splash/screens/splash_screen.dart) (Launch screen), [`lib/features/home/screens/home_screen.dart`](https://github.com/cypherr00/vitaltrack/blob/main/lib/features/home/screens/home_screen.dart) (Home dashboard), [`lib/features/history/screens/history_screen.dart`](https://github.com/cypherr00/vitaltrack/blob/main/lib/features/history/screens/history_screen.dart) (Vital history)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App navigation"]
  node_entry["App entry<br/>[main.dart]"]
  node_splash["Launch screen<br/>[splash_screen.dart]"]
  node_layout["Main layout<br/>[main_layout.dart]"]
end

subgraph group_health["Health tracking"]
  node_home["Home dashboard<br/>[home_screen.dart]"]
  node_summary["Vital summary"]
  node_record["Vital records<br/>[vital_record.dart]"]
  node_threshold["Health thresholds"]
  node_history["Vital history"]
  node_export["PDF export"]
end

subgraph group_identity["Identity and settings"]
  node_login["Sign in<br/>[login_screen.dart]"]
  node_register["Registration"]
  node_auth["Auth state<br/>[auth_provider.dart]"]
  node_profile["User profile<br/>[user_profile.dart]"]
  node_settings["Settings"]
  node_theme["Theme state"]
end

subgraph group_platform["Services and platform"]
  node_supabase["Supabase service"]
  node_config["Supabase config"]
end

node_user(("User"))
node_database[("Supabase")]

node_user -.->|"launches"| node_entry
node_entry -.->|"starts"| node_splash
node_splash -.->|"routes to"| node_login
node_splash -.->|"routes to"| node_layout
node_user -.->|"signs in"| node_login
node_user -.->|"registers"| node_register
node_login -.->|"uses"| node_auth
node_register -.->|"uses"| node_auth
node_layout -.->|"shows"| node_home
node_layout -.->|"routes to"| node_history
node_layout -.->|"routes to"| node_settings
node_home -.->|"renders"| node_summary
node_summary -.->|"presents"| node_record
node_home -.->|"uses"| node_threshold
node_history -.->|"shows"| node_record
node_history -.->|"exports"| node_export
node_settings -.->|"edits"| node_profile
node_settings -.->|"configures"| node_theme
node_auth -.->|"uses"| node_supabase
node_supabase -.->|"uses"| node_config
node_supabase -.->|"accesses"| node_database

click node_entry "https://github.com/cypherr00/vitaltrack/blob/main/lib/main.dart"
click node_splash "https://github.com/cypherr00/vitaltrack/blob/main/lib/features/splash/screens/splash_screen.dart"
click node_layout "https://github.com/cypherr00/vitaltrack/blob/main/lib/features/main/screens/main_layout.dart"
click node_home "https://github.com/cypherr00/vitaltrack/blob/main/lib/features/home/screens/home_screen.dart"
click node_summary "https://github.com/cypherr00/vitaltrack/blob/main/lib/features/home/widgets/vital_summary_card.dart"
click node_record "https://github.com/cypherr00/vitaltrack/blob/main/lib/core/models/vital_record.dart"
click node_threshold "https://github.com/cypherr00/vitaltrack/blob/main/lib/core/models/health_threshold.dart"
click node_history "https://github.com/cypherr00/vitaltrack/blob/main/lib/features/history/screens/history_screen.dart"
click node_export "https://github.com/cypherr00/vitaltrack/blob/main/lib/core/services/pdf_export_service.dart"
click node_login "https://github.com/cypherr00/vitaltrack/blob/main/lib/features/auth/screens/login_screen.dart"
click node_register "https://github.com/cypherr00/vitaltrack/blob/main/lib/features/auth/screens/register_screen.dart"
click node_auth "https://github.com/cypherr00/vitaltrack/blob/main/lib/core/providers/auth_provider.dart"
click node_profile "https://github.com/cypherr00/vitaltrack/blob/main/lib/core/models/user_profile.dart"
click node_settings "https://github.com/cypherr00/vitaltrack/blob/main/lib/features/settings/screens/settings_screen.dart"
click node_theme "https://github.com/cypherr00/vitaltrack/blob/main/lib/core/theme/theme_provider.dart"
click node_supabase "https://github.com/cypherr00/vitaltrack/blob/main/lib/core/services/supabase_service.dart"
click node_config "https://github.com/cypherr00/vitaltrack/blob/main/lib/core/config/supabase_config.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_entry,node_splash,node_layout,node_user toneBlue
class node_home,node_summary,node_record,node_threshold,node_history,node_export,node_database toneAmber
class node_login,node_register,node_auth,node_profile,node_settings,node_theme toneMint
class node_supabase,node_config toneRose
```

## Components

### App navigation

- [App entry](https://github.com/cypherr00/vitaltrack/blob/main/lib/main.dart): `lib/main.dart`
- [Launch screen](https://github.com/cypherr00/vitaltrack/blob/main/lib/features/splash/screens/splash_screen.dart): `lib/features/splash/screens/splash_screen.dart`
- [Main layout](https://github.com/cypherr00/vitaltrack/blob/main/lib/features/main/screens/main_layout.dart): `lib/features/main/screens/main_layout.dart`

### Health tracking

- [Home dashboard](https://github.com/cypherr00/vitaltrack/blob/main/lib/features/home/screens/home_screen.dart): `lib/features/home/screens/home_screen.dart`
- [Vital summary](https://github.com/cypherr00/vitaltrack/blob/main/lib/features/home/widgets/vital_summary_card.dart): `lib/features/home/widgets/vital_summary_card.dart`
- [Vital records](https://github.com/cypherr00/vitaltrack/blob/main/lib/core/models/vital_record.dart): `lib/core/models/vital_record.dart`
- [Health thresholds](https://github.com/cypherr00/vitaltrack/blob/main/lib/core/models/health_threshold.dart): `lib/core/models/health_threshold.dart`
- [Vital history](https://github.com/cypherr00/vitaltrack/blob/main/lib/features/history/screens/history_screen.dart): `lib/features/history/screens/history_screen.dart`
- [PDF export](https://github.com/cypherr00/vitaltrack/blob/main/lib/core/services/pdf_export_service.dart): `lib/core/services/pdf_export_service.dart`

### Identity and settings

- [Sign in](https://github.com/cypherr00/vitaltrack/blob/main/lib/features/auth/screens/login_screen.dart): `lib/features/auth/screens/login_screen.dart`
- [Registration](https://github.com/cypherr00/vitaltrack/blob/main/lib/features/auth/screens/register_screen.dart): `lib/features/auth/screens/register_screen.dart`
- [Auth state](https://github.com/cypherr00/vitaltrack/blob/main/lib/core/providers/auth_provider.dart): `lib/core/providers/auth_provider.dart`
- [User profile](https://github.com/cypherr00/vitaltrack/blob/main/lib/core/models/user_profile.dart): `lib/core/models/user_profile.dart`
- [Settings](https://github.com/cypherr00/vitaltrack/blob/main/lib/features/settings/screens/settings_screen.dart): `lib/features/settings/screens/settings_screen.dart`
- [Theme state](https://github.com/cypherr00/vitaltrack/blob/main/lib/core/theme/theme_provider.dart): `lib/core/theme/theme_provider.dart`

### Services and platform

- [Supabase service](https://github.com/cypherr00/vitaltrack/blob/main/lib/core/services/supabase_service.dart): `lib/core/services/supabase_service.dart`
- [Supabase config](https://github.com/cypherr00/vitaltrack/blob/main/lib/core/config/supabase_config.dart): `lib/core/config/supabase_config.dart`

### Other components

- **User**
- **Supabase**

## Connections

- User → App entry: launches
- App entry → Launch screen: starts
- Launch screen → Sign in: routes to
- Launch screen → Main layout: routes to
- User → Sign in: signs in
- User → Registration: registers
- Sign in → Auth state: uses
- Registration → Auth state: uses
- Main layout → Home dashboard: shows
- Main layout → Vital history: routes to
- Main layout → Settings: routes to
- Home dashboard → Vital summary: renders
- Vital summary → Vital records: presents
- Home dashboard → Health thresholds: uses
- Vital history → Vital records: shows
- Vital history → PDF export: exports
- Settings → User profile: edits
- Settings → Theme state: configures
- Auth state → Supabase service: uses
- Supabase service → Supabase config: uses
- Supabase service → Supabase: accesses
