Flutter 3.9 + Firebase • Healthcare Companion

Empathetic Medication Care.
Instant Peace of Mind.

Gentle Dose seamlessly bridges patients and family caregivers. Combining intuitive, senior-friendly medication logs, appointment calendars, and automated missed-dose cloud escalation to ensure no treatment is left behind.

99.4% On-Time Dose Adherence
< 30s Caregiver Escalation Alert
100% Offline-First Capable
9:41
Patient Avatar
● Live Sync
Today's Medications

Adherence Goal: 5 Doses

3/5
Aspirin • 500mg

Scheduled: 10:00 AM • Take after meal

Upcoming
Atorvastatin • 20mg

Scheduled: 8:00 PM • Bedtime

Upcoming
Dr. Ahmad Khan (Cardio)

Tomorrow, 10:30 AM • City Hospital

Reminder 15m

Designed for Calm, Accurate Care

Engineered to eliminate forgotten doses and missed medical appointments through automated safeguards and empathetic design.

Smart Dose Buckets

Organizes medications into Morning, Afternoon, Evening, and Bedtime slots with custom dosage directions and food instructions.

Caregiver Escalation

If a patient fails to check off a dose within the configurable grace window, Firebase Cloud Functions instantly dispatch high-priority notifications to caregivers.

Appointment Sync

Integrates medical visits, dental cleanings, and eye exams with clinic location, doctor details, and 15m/30m reminder notifications.

Adherence Analytics

Visual tracking charts for completed vs missed medications, adherence percentage rings, and weekly compliance reports.

Multi-Lingual Ready

Native multi-language selection at onboarding ensures patients and caregivers can operate in their most comfortable native language.

Offline-First Engine

Alarms and schedules fire via device-native alarms even without internet access. Automatic background synchronization happens as soon as connectivity resumes.

Two Dedicated Portals, One Connected Lifeline

Gentle Dose provides specialized workflows tailored to whether you are taking medication yourself or caring for an elderly parent or family member.

Patient Role

I am a Patient

Simple, high-contrast, effortless adherence

Designed for senior accessibility with large tap targets, distinct medication badges, and gentle reminder tones.

  • ✓ One-tap dose confirmation: "Mark as Taken" or "Snooze 15m"
  • ✓ High-contrast visual timeline for Morning, Noon, and Evening
  • ✓ Integrated Doctor Visit appointment calendar with travel reminders
  • ✓ Automatic caregiver pairing via secure SMS code or QR scan
Patient Onboarding
Senior-Friendly Onboarding

Minimal clutter, crystal clear guidance.

Caregiver Role

I am a Caregiver

Remote peace of mind & real-time safety net

Empowers sons, daughters, and professional nurses to monitor multiple patients without invasive calling or micro-management.

  • ✓ Multi-patient dashboard tracking adherence progress in real time
  • ✓ Instant push alerts when a dose or doctor visit is missed
  • ✓ One-click direct phone dial and gentle check-in nudges
  • ✓ Audit log of past medical adherence for healthcare consultations
Caregiver Onboarding
Caregiver Handshake

Verified link ensures safe medical oversight.

Automated Missed-Dose Escalation Engine

Walk through the 4-phase lifecycle of a medication dose from local alarm to caregiver push notification.

1
Scheduled Time

Local notification rings on patient device.

2
Grace Window

15–30 min timer begins waiting for confirmation.

3
Cloud Escalation

Entry written to Firestore missed_doses collection.

4
Caregiver Alert

High-priority FCM push pinged to caregiver with direct dial.

// Initializing simulator state...
Runtime: Flutter 3.9 + Firebase Cloud Messaging (FCM) + flutter_local_notifications

Developer Hub & Architecture Guide

Complete guides for running, integrating, and deploying the Gentle Dose Flutter mobile application and Firebase backend.

Gentle Dose Architecture Overview

A cross-platform Flutter application tailored for medication adherence, appointment scheduling, and caregiver safety monitoring.

End-to-End System Flow

Patient Device

Flutter App (Local Cron & Alarms)

➔
Firebase Cloud

Firestore + Cloud Functions Escalation

➔
Caregiver Device

FCM Push Alerts & Actionable HUD

Core Technical Stack

Component Technology Role
Mobile Framework Flutter 3.9.x / Dart Cross-platform UI (Android, iOS)
Typography & UI Google Fonts (Poppins, Inter) Accessible, high-legibility clinical theme
Local Alarms flutter_local_notifications Offline reliable scheduled reminders
Job Scheduling cron + timezone Repetitive daily/weekly dose timers
Cloud Backend Firebase Firestore & FCM Real-time synchronization & priority alerts

Setup & Local Development

Follow these steps to run Gentle Dose locally on your Android emulator or physical test device.

Prerequisites

  • Flutter SDK ^3.9.0 installed and verified with flutter doctor
  • Dart SDK ^3.9.0
  • Android Studio with SDK 34 / Xcode 15+ for iOS builds
bash
# 1. Clone the repository
git clone https://github.com/your-org/gentle_dose.git
cd gentle_dose

# 2. Install Flutter packages
flutter pub get

# 3. Verify connected devices
flutter devices

# 4. Run application in debug mode
flutter run

Configuration Flags

Ensure notification permissions are enabled on Android 13+ devices via POST_NOTIFICATIONS permission in AndroidManifest.xml.

Firestore Cloud Data Schema

Gentle Dose leverages 4 core Firestore collections to power real-time synchronization between patients and caregivers.

json
// 1. users/{userId}
{
  "userId": "usr_882910",
  "userType": "patient", // "patient" | "caregiver"
  "phoneNumber": "+14155552671",
  "name": "Mustafa Ali",
  "fcmToken": "fcm_token_device_hash_...",
  "createdAt": "2026-08-24T10:00:00Z"
}

// 2. patient_caregiver_connections/{connectionId}
{
  "patientId": "usr_882910",
  "caregiverId": "usr_caregiver_33",
  "status": "active", // "pending" | "active" | "declined"
  "verificationCode": "492810",
  "confirmedAt": "2026-08-24T10:05:12Z"
}

// 3. missed_doses/{missedDoseId}
{
  "patientId": "usr_882910",
  "medicationName": "Aspirin 500mg",
  "scheduledTime": "2026-08-24T10:00:00Z",
  "missedAt": "2026-08-24T10:30:00Z",
  "caregiverIds": ["usr_caregiver_33"],
  "notified": true
}

Patient-Caregiver Handshake Protocol

How patients securely link with caregivers and activate real-time escalation alerts.

  1. Initiation: Patient navigates to Caregiver Connection Screen and enters Caregiver's validated mobile phone number.
  2. OTP Generation: System generates a 6-digit cryptographic verification code and pushes an invite payload to the caregiver.
  3. Confirmation: Caregiver inputs the 6-digit confirmation code on their Gentle Dose app.
  4. Active Link: The connection status transforms to active, enabling real-time missed-dose notification routing.
dart
class ConnectionService {
  static Future<bool> verifyConnection({
    required String connectionId,
    required String codeEntered,
  }) async {
    final doc = await FirebaseFirestore.instance
        .collection('patient_caregiver_connections')
        .doc(connectionId)
        .get();

    if (doc.exists && doc.data()?['verificationCode'] == codeEntered) {
      await doc.reference.update({
        'status': 'active',
        'confirmedAt': FieldValue.serverTimestamp(),
      });
      return true;
    }
    return false;
  }
}

Flutter Data Models (Dart)

Core models defining medications, appointments, and patient states in lib/core/models/.

dart
enum MedicationStatus { upcoming, completed, missed }

class Medication {
  final String id;
  final String name;
  final String dosage;
  final String time;
  final String notes;
  final MedicationStatus status;

  Medication({
    required this.id,
    required this.name,
    required this.dosage,
    required this.time,
    required this.notes,
    this.status = MedicationStatus.upcoming,
  });

  Medication copyWith({MedicationStatus? status}) {
    return Medication(
      id: id,
      name: name,
      dosage: dosage,
      time: time,
      notes: notes,
      status: status ?? this.status,
    );
  }
}

Local Notifications & Cron Engine

Leverages device-level alarm scheduling to ensure alerts trigger even when disconnected from the internet.

dart
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:cron/cron.dart';
import 'package:timezone/timezone.dart' as tz;

class NotificationService {
  static final FlutterLocalNotificationsPlugin _plugin =
      FlutterLocalNotificationsPlugin();

  static Future<void> scheduleDailyDose({
    required int id,
    required String medName,
    required int hour,
    required int minute,
  }) async {
    await _plugin.zonedSchedule(
      id,
      'Time for your $medName',
      'Tap to confirm or snooze dose',
      _nextInstanceOfTime(hour, minute),
      const NotificationDetails(
        android: AndroidNotificationDetails(
          'med_channel',
          'Medication Reminders',
          importance: Importance.max,
          priority: Priority.high,
          playSound: true,
        ),
      ),
      uiLocalNotificationDateInterpretation:
          UILocalNotificationDateInterpretation.absoluteTime,
      matchDateTimeComponents: DateTimeComponents.time,
    );
  }
}

Security, HIPAA & Offline Privacy

Guidelines on protecting Protected Health Information (PHI) within Gentle Dose.

  • Local Encryption: Medical prescriptions and appointment notes are stored using encrypted key-value storage locally on-device.
  • Caregiver Explicit Authorization: Connections require mutual consent via cryptographic OTP. Patients can revoke caregiver access instantly.
  • Minimal Cloud Footprint: Missed dose logs only contain non-identifying medication dosage markers and timestamps, adhering to privacy-by-design standards.
  • Audit Logging: All status transitions (Upcoming ➔ Taken / Missed) are timestamped with immutability guarantees.

Answers for Patients, Families & Developers

Yes! Local notifications and reminders are scheduled on-device using native Android and iOS alarm managers. You will still receive audio alerts and alarms when offline. Once back online, the app syncs adherence states to the cloud.
When a dose is scheduled, a configurable grace window (e.g. 30 minutes) starts. If the patient does not mark the medication as "Taken", the app triggers a Firebase Cloud record which immediately sends a high-priority push notification to the paired caregiver.
Yes. The Caregiver portal is designed to support multiple patients simultaneously, displaying individual adherence progress bars, medication schedules, and quick-call actions for each patient.
Gentle Dose is built on Flutter 3.9+ and Dart 3.9+, with Material 3 theming, Google Fonts (Poppins & Inter), and modern local notification plugins.

Start Caring with Gentle Dose

Give your family the reassurance of automated medical adherence and connected care.

Test Live Simulator Read Documentation