A biometric-authenticated medical logging application built with Flutter, Riverpod, and Supabase.
- Multi-role Support: Patient, Doctor, Pharmacist, and First Responder roles
- Biometric Authentication: Face ID / Fingerprint for secure, quick sign-in
- Prescription Management: Create, view, and dispense prescriptions
- Emergency QR Code: Scannable QR for first responders to access critical medical data
- Privacy Controls: Patients can mark data as public or private
- Flutter 3.7+ - Cross-platform framework
- Riverpod - State management
- Supabase - Backend (Auth, Database, Storage)
- local_auth - Biometric authentication
- go_router - Navigation
- Flutter SDK 3.7+
- A Supabase project
flutter pub get- Create a new project at supabase.com
- Go to SQL Editor and run the contents of
supabase/schema.sql - Copy your project URL and anon key
Edit lib/core/config/env_config.dart:
abstract class EnvConfig {
static const String supabaseUrl = 'YOUR_SUPABASE_URL';
static const String supabaseAnonKey = 'YOUR_SUPABASE_ANON_KEY';
}Download the Outfit font family and place in assets/fonts/:
- Outfit-Regular.ttf
- Outfit-Medium.ttf
- Outfit-SemiBold.ttf
- Outfit-Bold.ttf
Or remove the fonts section from pubspec.yaml to use system fonts.
flutter runlib/
├── main.dart # Entry point
├── app.dart # App configuration
├── core/
│ ├── config/ # Environment configuration
│ └── theme/ # App theme, colors, spacing
├── features/
│ ├── auth/ # Authentication flow
│ ├── patient/ # Patient dashboard & features
│ ├── doctor/ # Doctor dashboard & features
│ ├── pharmacist/ # Pharmacist dashboard & features
│ ├── first_responder/ # First responder features
│ └── shared/ # Shared widgets & models
├── routing/ # Navigation routes
└── services/ # Supabase, biometric, storage services
See supabase/schema.sql for the complete database schema including:
profiles- User profiles with rolesuser_devices- Biometric device bindingspatients- Patient-specific datadoctors/pharmacists/first_responders- Role-specific dataprescriptions- Medical prescriptionsprescription_items- Individual medicinesdispensing_records- Pharmacy transactionsmedical_conditions- Allergies, chronic conditions (for emergency access)
- New User: Sign up with email → Biometric enrollment prompt → Device UUID generated and stored
- Returning User (same device): Biometric verification → Instant sign-in
- New Device: Email/password sign-in → Biometric enrollment for new device
Each device has its own biometric binding - biometric data never leaves the device.
MIT