Skip to content

toxicbishop/VITAL-Health-App-Flutter

Repository files navigation

VITAL Health — Android (Flutter)

A premium health tracking app built with Flutter & Supabase

Dart Flutter Supabase License: GPL v3


Screenshots

Dashboard Trends Journal
Home Dashboard showing daily metrics, streak counter, and vital alerts Trends analytics screen with charts, high/low summaries, and time filters Chronological health journal timeline displaying recorded vitals and notes
Medications Settings
Medication tracker showing scheduled pills and refill countdowns Settings screen with profile details, health goals, and backup options

Features

Health Tracking

Feature Description
Weight Logging Track weight with kg units, averages & trend charts
Blood Pressure Split systolic/diastolic input, status badges (Normal/Elevated/High)
Heart Rate BPM logging with min/max/avg analytics and status indicators
Mood Logging Emoji-based mood picker with optional notes
Medication Management Mark as taken, add new prescriptions, daily/weekly/custom frequency

Smart Features

Feature Description
Streak Counter Tracks consecutive logging days to encourage consistency
Trend Alerts Dismissable warnings for elevated BP or high heart rate
Refill Countdown Tracks remaining pills and days until refill needed
Doctor Visit Log Schedule and track appointments with notes
Clinical Reports Monthly health summary + PDF export with share intent

Trends & Analytics

  • Week / Month / Year segmented filtering with real-time recalculation
  • Date Picker — filter data from a specific date onward
  • Weight trend chart — bar visualization via fl_chart with delta tracking
  • BP & HR analytics — average values with color-coded status badges
  • Dynamic Health Insights — pattern detection (morning vs evening BP, weight direction, HR trends)

Journal

  • Daily health timeline — chronological, color-coded entries
  • Free-form health notes — via floating action button
  • All log types displayed — weight, BP, HR, mood, medication, appointments

Settings & Account

  • Onboarding flow — first-launch setup for name, goals, and preferences
  • Dark Mode — warm espresso/charcoal palette that complements the light theme
  • Health Goals — target weight, BP, daily steps, water intake
  • Notification Preferences — medication reminders, vitals logging, weekly summaries
  • Cloud Backup/Restore — sync health logs to/from Supabase PostgreSQL
  • Google Sheets Export — export logs directly to a personal spreadsheet

Tech Stack

Layer Technology
Language Dart 3.x
UI Flutter (Material 3)
State Provider
Local DB Floor (SQLite) — v3 schema with isSynced flags
Cloud Supabase (Auth, Postgrest, Storage)
Export Google Sheets API via googleapis
Async Dart Streams & async/await
PDF pdf + printing packages
Charts fl_chart
Notifs flutter_local_notifications + timezone

Architecture

The app is built with Clean Architecture, separating concerns across three distinct layers for testability and long-term maintainability:

  • Presentation Layer: Flutter screens consuming ChangeNotifier Providers for state. Widgets are split into reusable components under presentation/widgets/.
  • Domain Layer: Business logic and processing services (PDF generation, health insight engine) fully decoupled from UI and data sources.
  • Data Layer: HealthRepository mediates between the Local DB (Floor SQLite for offline-first) and Remote (Supabase for cloud sync & auth).
lib/
├── core/                  # App-wide theme, constants, notification service
├── data/
│   ├── daos/              # Floor DAOs (HealthLogDao, MedicationDao, etc.)
│   ├── database/          # VitalDatabase + migration definitions
│   └── entities/          # Floor entities (HealthLogEntity, MedicationEntity)
├── domain/
│   ├── models/            # Pure Dart domain models
│   ├── repositories/      # HealthRepository (local + cloud sync)
│   └── services/          # PDF service, health insight engine
├── presentation/
│   ├── providers/         # HealthDataProvider, MedicationProvider, SettingsProvider
│   ├── screens/           # Dashboard, Trends, Journal, Medications, Settings, etc.
│   └── widgets/           # MetricCard, TrendsChart, MoodSelector, SectionHeader
└── main.dart              # Entry point with routing

Getting Started

Prerequisites

  • Flutter SDK 3.x & Dart ^3.11.0
  • Android Studio / VS Code with Flutter extension
  • A Supabase project

Supabase Setup

  1. Create a Supabase project
  2. Enable Email Auth in Authentication settings
  3. Create a health_logs table:
    CREATE TABLE health_logs (
      id TEXT PRIMARY KEY,
      logType TEXT NOT NULL,
      value TEXT NOT NULL,
      unit TEXT NOT NULL,
      notes TEXT,
      timestamp BIGINT NOT NULL,
      isSynced BOOLEAN DEFAULT TRUE
    );
  4. Create an avatars storage bucket (public)

Configuration

  1. Open your Supabase config file in lib/
  2. Replace supabaseUrl and supabaseKey with your project credentials

Never commit production secrets to public repositories.

Build & Run

flutter pub get
flutter run

Or click Run in Android Studio / VS Code.

To regenerate Floor database code after schema changes:

dart run build_runner build --delete-conflicting-outputs

Design

  • Light Mode: Clean white/grey surfaces with teal accents and Material 3 components
  • Dark Mode: Warm espresso charcoal with off-white text — no jarring blues
  • Typography: Material 3 type scale with custom heading weights
  • Charts: Smooth fl_chart bar & line graphs with animated transitions

Testing Note

When repeatedly signing up during testing, you may hit Supabase's Email Rate Limit. To work around this:

  • Go to Supabase Dashboard → Auth → Rate Limits and increase temporarily
  • Or log in with pre-created accounts from the Supabase Dashboard

License

This project is licensed under the GNU General Public License v3.0 — see the LICENSE file for details.

About

A premium, multi-platform health ecosystem (Android) with a minimalist aesthetic. Tracks daily metrics—weight, blood pressure, heart rate—with offline-first persistence and seamless cloud sync via Supabase.

Resources

License

Security policy

Stars

Watchers

Forks

Contributors