Skip to content

Healthque is a Flutter-based mobile app for real-time workout tracking, health monitoring, and medication reminders with Firebase integration and Wear OS support

Notifications You must be signed in to change notification settings

tortamque/Healthque

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Healthque

Before you read...

Healthque is my diploma project, a Flutter-based mobile application for real-time tracking of workouts, vital health metrics and medication reminders. Enjoy this comprehensive documentation 👀

Description

Healthque is a cross-platform Flutter app that lets users log, monitor and visualize workouts and key health parameters (heart rate, blood pressure, glucose, temperature, hydration, stress) while managing medication schedules and reminders. Interactive charts, goal-setting and a personal health journal empower users to maintain an active, healthy lifestyle and make data-driven decisions about their well-being.
Built on Clean Architecture, Healthque combines the Repository pattern, Separation of Concerns, Dependency Injection and the BLoC state-management pattern to deliver modular, maintainable, testable code and an intuitive user experience.

Table of Contents

Used Technologies

Healthque uses Firebase Realtime Database for cloud storage and real-time data sync.
It employs Firebase Authentication (Google Sign-In) for user registration and login.
Firebase Analytics collects anonymized usage metrics to inform future enhancements.
Firebase Crashlytics captures and reports runtime errors and crashes in real time.

For offline data persistence and fast local reads, Healthque uses Hive.
Health metrics are imported via Google Health Connect on Wear OS (Wear OS → Health Connect → Healthque).
Push notifications and reminder scheduling are handled with flutter_local_notifications.

The app supports both English and Ukrainian via Flutter’s flutter_localizations and flutter_localization packages.

Architecture

Healthque fully embraces the Clean Architecture pattern, incorporating Bloc, Repository, Separation of Concerns, and Dependency Injection patterns.
Clean Architecture consists of the following layers:

  1. Data Layer
  2. Domain Layer (Business Logic)
  3. Presentation Layer (UI)

Call Flow Diagram:
Call Flow Diagram

Onion Diagram:
Onion Diagram

Features

  • Sign in/up with your Google account
  • Onboarding wizard to enter your age, gender, height, weight and daily goals
  • Automatic sync of workouts and health data across devices
  • Offline mode so you can log and view data without an internet connection
  • Workout tracking: add, view, delete and favorite your exercise sessions
  • Vital-sign logging and charts: heart rate, blood pressure, blood glucose, temperature, hydration, stress & mood
  • Sleep analysis: view duration and quality trends over time
  • Medication management: record doses, plan treatment courses and get reminder alerts
  • Push notifications for medication, workout, hydration and wellness reminders
  • Wear OS companion app for glanceable on-wrist charts and summaries
  • Interactive dashboards with charts for steps, calories, distance, sleep and more
  • Customizable color themes to personalize the look and feel
  • Full English and Ukrainian language support
  • Profile settings: update your personal info, goals, language, theme and manually trigger data sync

Data Synchronization

Healthque leverages Google Health Connect as a central hub for seamless data exchange between Wear OS smartwatches and the mobile application. This integration allows for a unified and consistent view of your health data across devices.

Here’s how the data synchronization works:

  1. Wear OS Data Collection: Smartwatches running Wear OS collect various health information (e.g., steps, heart rate, sleep, workouts) using their built-in sensors. This data is typically stored by a pre-installed health application on the watch (like Samsung Health).

  2. Health Connect Integration: When the Wear OS smartwatch is connected to an Android smartphone, its native health application transfers the collected measurements to Google Health Connect. Health Connect acts as a secure repository and an intermediary, managing permissions and data flow between different health apps on the Android device.

  3. Healthque Data Access: Once the user grants permission within their smartphone's Health Connect settings, Healthque can read and write health data through the Health Connect API. This allows Healthque to retrieve detailed information about workouts, vital signs, and sleep patterns, as well as push new data if applicable.

This bidirectional synchronization ensures that all your health-related information is up-to-date and accessible within Healthque, regardless of where it was originally recorded.

Below are diagrams illustrating the data flow:

image
Figure: Synchronization scheme between a Wear OS smartwatch and an Android device.

image
Figure: Communication scheme of a third-party application (e.g., Healthque) with a smartwatch via Google Health Connect.

Supported platforms

Healthque is a mobile application that supports Android platform.

Deployment

To deploy the Healthque app, follow these steps:

  1. Ensure the Flutter SDK is installed.
  2. Clone the repository and install dependencies:
    flutter pub get
  3. In the Firebase Console, create a new project and add an Android app using your package name (found in android/app/src/main/AndroidManifest.xml).
  4. Download the generated google-services.json and place it into android/app/.
  5. Generate firebase_options.dart via FlutterFire CLI
flutterfire configure
  1. Build the release Android App Bundle flutter build appbundle --release

Screenshot

Click here to view a lot of screenshots 👀 Screenshot_1 Screenshot_2 Screenshot_3 Screenshot_4 Screenshot_5 Screenshot_6 Screenshot_7 Screenshot_8 Screenshot_9 Screenshot_10 Screenshot_11 Screenshot_12 Screenshot_13 Screenshot_14 Screenshot_15 Screenshot_16 Screenshot_17 Screenshot_18 Screenshot_19 Screenshot_20 Screenshot_21 Screenshot_22 Screenshot_23 Screenshot_24 Screenshot_25 Screenshot_26 Screenshot_27 Screenshot_28 Screenshot_29 Screenshot_30 Screenshot_31 Screenshot_32 Screenshot_33 Screenshot_34 Screenshot_35 Screenshot_36 Screenshot_37 Screenshot_38 Screenshot_39 Screenshot_40 Screenshot_41 Screenshot_42 Screenshot_43 Screenshot_44 Screenshot_45 Screenshot_46 Screenshot_47 Screenshot_48 Screenshot_49 Screenshot_50 Screenshot_51 Screenshot_52

Changelog

[1.0] - 10.05.2025

Added

  • Initial release.

Firebase Realtime Database

Database Schema

  • users (object)
    • {userId} (object)
      • profile (object)
        • age: integer
        • avatarUrl: string
        • weight: integer
        • height: integer
        • gender: string
        • desiredSteps: integer
        • waterConsumption: integer
        • caloriesBurnInOneDay: integer
      • locale (object)
        • locale: string
      • themePreference (object)
        • seedColorValue: number
      • bloodPressureRecords (object)
        • records: array of objects
          • each object:
            • id: integer
            • systolic: integer
            • diastolic: integer
            • measurementTime: string (ISO-8601)
      • bloodSugarRecords (object)
        • records: array of objects
          • each object:
            • id: integer
            • glucose: integer
            • measurementTime: string (ISO-8601)
      • stressMoodRecords (object)
        • records: array of objects
          • each object:
            • id: integer
            • stress: integer
            • mood: integer
            • measurementTime: string (ISO-8601)
      • temperatureRecords (object)
        • records: array of objects
          • each object:
            • id: integer
            • temperature: float
            • measurementTime: string (ISO-8601)
      • waterRecords (object)
        • records: array of objects
          • each object:
            • id: integer
            • amount: float
            • datetime: string (ISO-8601)
      • workouts (object)
        • workouts: array of objects
          • each object:
            • createdAt: string (ISO-8601)
            • workoutType: string
            • durationMinutes: integer
            • intensity: integer
            • isFavorite: boolean
            • moodRating: integer
            • distance: float (optional)
            • tags: array[string] (optional)
            • notes: string (optional)
      • medications (object)
        • medications: array of objects
          • each object:
            • id: integer
            • course: string
            • createdAt: string (ISO-8601)
            • type: string
            • dosage: string
            • notes: string
      • courseTreatments (object)
        • courses: array of objects
          • each object:
            • id: integer
            • courseStart: string (ISO-8601)
            • courseEnd: string (ISO-8601)
            • medicationTime: string (ISO-8601)
            • repeatInterval: string
            • entries: array of objects
              • each entry:
                • name: string
                • dosage: string
                • medicationType: string
                • notes: string
      • notifications (object)
        • notifications: array of objects
          • each object:
            • id: integer
            • title: string
            • body: string
            • scheduledDate: string (ISO-8601)
            • type: string

Comparison with Analogues

Feature Healthque Samsung Health TakeYourPills Guava
User Registration & Login Yes Yes No Yes
Advertisements No No Yes No
Cloud Data Storage Yes Yes No Yes
Medication Tracking Yes No Yes No
Health Status Monitoring Yes Yes No Yes
Paid Subscription / Content No No Yes Yes
Wear OS Smartwatch Sync Yes Yes (Samsung only) No No
Dedicated Smartwatch App Yes Yes (Samsung only) No No

Diagrams

Usecase Diagram

Usecase

Sequence Diagram

Sequence

Used Packages

The Healthque app utilizes the following packages:

Name Version Link on pub.dev
firebase_core 3.12.1 Link
google_sign_in 6.3.0 Link
firebase_auth 5.5.1 Link
flutter_bloc 9.1.0 Link
freezed_annotation 3.0.0 Link
freezed 3.0.4 Link
intl_utils 2.8.10 Link
intl 0.19.0 Link
go_router 14.8.1 Link
google_nav_bar 5.0.7 Link
dio 5.8.0+1 Link
get_it 8.0.3 Link
gap 3.0.1 Link
syncfusion_flutter_sliders 28.2.12 Link
health 12.1.0 Link
permission_handler 11.4.0 Link
shared_preferences 2.5.2 Link
fl_chart 0.70.2 Link
flutter_localization 0.3.1 Link
hive 2.2.3 Link
hive_flutter 1.1.0 Link
hive_generator 2.0.1 Link
path_provider 2.1.5 Link
duration_picker 1.2.0 Link
toastification 3.0.2 Link
flutter_local_notifications 18.0.1 Link
timezone 0.10.0 Link
firebase_database 11.3.5 Link
firebase_analytics 11.4.5 Link
firebase_crashlytics 4.3.5 Link

Flutter & Dart Versions

  • Flutter 3.29.3
  • Dart 3.7.2

License

Apache License Version 2.0

About

Healthque is a Flutter-based mobile app for real-time workout tracking, health monitoring, and medication reminders with Firebase integration and Wear OS support

Resources

Stars

Watchers

Forks

Languages