A comprehensive Flutter-based medication reminder application with AI-powered features, caregiver support, and voice reminders.
- Medicine Management: Add, edit, and track medications with images
- Smart Reminders: Timezone-aware notifications with voice reminders
- Adherence Tracking: Monitor medication intake with detailed logs and statistics
- Side Effects Logging: Track and monitor medication side effects
- AI Symptom Analysis: "I Feel" feature powered by Google Gemini AI
- Caregiver Support: Share access with family members or caregivers
- Voice Reminders: Personalized voice reminders using ElevenLabs
- Offline Support: Works offline with Firestore persistence
- Multi-language: English and Arabic support
- Dark Mode: Full dark mode support
- Framework: Flutter 3.0+
- Backend: Firebase (Firestore, Auth, Storage, Functions, Messaging)
- State Management: Riverpod
- Local Storage: Hive, SharedPreferences, SQLite
- AI Services: Google Gemini AI, ElevenLabs TTS
- Notifications: Firebase Cloud Messaging, Local Notifications
- Flutter SDK >=3.0.0 <4.0.0
- Dart SDK >=3.0.0
- Node.js 20+ (for Cloud Functions)
- Firebase account and project
- Android Studio / Xcode (for platform-specific builds)
git clone <repository-url>
cd Tickdo# Flutter dependencies
flutter pub get
# Cloud Functions dependencies
cd functions
npm install
cd ..-
Create a Firebase project at Firebase Console
-
Enable the following services:
- Authentication (Email/Password, Google, Apple)
- Firestore Database
- Firebase Storage
- Cloud Functions
- Cloud Messaging
- Remote Config
- Crashlytics
- Analytics
-
Configure Firebase for your platforms:
# Install Firebase CLI if not already installed npm install -g firebase-tools # Login to Firebase firebase login # Initialize Firebase (if not already done) firebase init
-
Download configuration files:
- Android:
google-services.json→android/app/google-services.json - iOS:
GoogleService-Info.plist→ios/Runner/GoogleService-Info.plist - macOS:
GoogleService-Info.plist→macos/Runner/GoogleService-Info.plist
Note: These files contain API keys and are excluded from git. See
.examplefiles for templates. - Android:
-
Generate
firebase_options.dart:flutterfire configure
This will generate
lib/firebase_options.dartwith your Firebase configuration.
-
Create a
.envfile in the root directory:cp .env.example .env
-
Add your API keys (optional for local development):
GEMINI_API_KEY=your_gemini_api_key ELEVENLABS_API_KEY=your_elevenlabs_api_key -
Recommended: Configure API keys in Firebase Remote Config instead:
- Go to Firebase Console → Remote Config
- Add parameters:
GEMINI_API_KEYandELEVENLABS_API_KEY - Publish configuration
-
Release Keystore (for production builds):
# Generate keystore (if not exists) keytool -genkey -v -keystore android/app/upload-keystore.jks \ -keyalg RSA -keysize 2048 -validity 10000 \ -alias upload -
Add SHA-1 Fingerprints to Firebase:
- Get debug SHA-1:
cd android && ./gradlew signingReport - Get release SHA-1:
keytool -list -v -keystore android/app/upload-keystore.jks -alias upload - Add both to Firebase Console → Project Settings → Your Android App
- Get debug SHA-1:
-
Re-download google-services.json after adding SHA-1
-
Apple Sign-In Configuration:
- Enable Sign in with Apple in Firebase Console
- Configure in Xcode: Signing & Capabilities → Add "Sign in with Apple"
-
Push Notifications:
- Enable Push Notifications capability in Xcode
- Upload APNs certificate to Firebase Console
-
Deep Linking:
- Configure Associated Domains in Xcode
- Add domain:
applinks:tickdose.app
# Deploy Firestore rules
firebase deploy --only firestore:rules
# Deploy Firestore indexes
firebase deploy --only firestore:indexes
# Deploy Storage rules
firebase deploy --only storage
# Deploy Cloud Functions
cd functions
npm install
cd ..
firebase deploy --only functions# Run on connected device/emulator
flutter run
# Run in debug mode
flutter run --debug
# Run in release mode (for testing)
flutter run --release# Build APK
flutter build apk --release
# Build App Bundle (for Play Store)
flutter build appbundle --release# Build for iOS
flutter build ios --release
# Archive in Xcode for App Store submissionlib/
├── core/
│ ├── constants/ # App constants
│ ├── icons/ # Custom icons
│ ├── models/ # Data models
│ ├── providers/ # Global providers
│ ├── services/ # Core services (Firebase, AI, etc.)
│ ├── theme/ # App theming
│ └── utils/ # Utility functions
├── features/ # Feature modules
│ ├── auth/ # Authentication
│ ├── home/ # Home screen
│ ├── medicines/ # Medicine management
│ ├── reminders/ # Reminder management
│ ├── tracking/ # Medication tracking
│ ├── profile/ # User profile
│ └── ...
└── main.dart # App entry point
functions/ # Cloud Functions
├── index.js # Function definitions
└── package.json # Node.js dependencies
- Riverpod: Primary state management solution
- Provider: Used for dependency injection
- UI Layer: Flutter widgets and screens
- State Layer: Riverpod providers and notifiers
- Service Layer: Business logic and API calls
- Data Layer: Firestore, Storage, Local databases
FirebaseAuthService: AuthenticationFirestoreService: Database operationsNotificationService: Local notificationsFirebaseMessagingService: Push notificationsGeminiService: AI symptom analysisElevenLabsService: Voice generationMedicineService: Medicine CRUD operationsReminderService: Reminder managementTrackingService: Medication logging
- User data is isolated by
userId - Read/write access restricted to authenticated users
- Caregiver relationships properly secured
- User files protected by authentication
- File size limits enforced (5MB images, 10MB audio)
- Path-based access control
- Stored in Firebase Remote Config (recommended)
- Never committed to version control
.envfile in.gitignore
# Run all tests
flutter test
# Run specific test file
flutter test test/unit/medicine_service_test.dart
# Run with coverage
flutter test --coverage- All Firestore rules deployed
- All Firestore indexes deployed
- Storage rules deployed
- Cloud Functions deployed
- Release SHA-1 added to Firebase Console
-
google-services.jsonupdated with release SHA-1 - Keystore password changed from default
- Keystore backed up securely
- API keys configured in Remote Config
- Release build tested thoroughly
- Monitor Firebase Console for errors
- Check Crashlytics for crashes
- Monitor API quota usage
- Review Analytics data
- Test push notifications
- Verify offline functionality
-
Google Sign-In fails in release build
- Verify release SHA-1 is in Firebase Console
- Re-download
google-services.json - Clean and rebuild:
flutter clean && flutter build apk --release
-
Cloud Functions deployment fails
- Ensure billing is enabled on Firebase project
- Check Node.js version (requires 20+)
- Verify Firebase CLI is up to date
-
Offline persistence not working
- Check Firestore settings initialization
- Verify cache size is not limited
- Test on physical device (emulators may have issues)
-
Push notifications not received
- Verify FCM token is stored in Firestore
- Check notification permissions
- Test on physical device
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For issues and questions:
- Create an issue in the repository
- Check existing documentation
- Review Firebase Console logs
- Firebase for backend infrastructure
- Google Gemini for AI capabilities
- ElevenLabs for voice synthesis
- Flutter team for the amazing framework