A dual-app Android medication adherence system built with Kotlin, Jetpack Compose, and Clean Architecture. Designed specifically for elderly patients with comprehensive accessibility features, plus a family caregiver monitoring app.
This Medication Adherence app solves one of healthcare's most pressing issues: medication non-adherence. It consists of two interconnected applications:
- Patient App: Simple, accessible medication management for elderly users
- Family App: Remote monitoring and alert system for caregivers
Target Users: Elderly patients (65+) managing multiple medications and their family caregivers
Core Value: Reliable medication tracking with family peace of mind
The app follows Clean Architecture with three distinct layers:
app/
βββ data/ # Data Layer
β βββ local/ # Room database & local storage
β β βββ entity/ # Room entities (DB tables)
β β βββ dao/ # Data Access Objects (queries)
β β βββ database/ # Room database configuration
β β βββ converter/ # Type converters (DateTime, List)
β β βββ mapper/ # Entity β Domain model mappers
β β βββ LocalMedicationDataSource.kt
β βββ repository/ # Repository implementations
β βββ work/ # WorkManager (background tasks)
β
βββ domain/ # Domain Layer
β βββ model/ # Pure business models
β βββ repository/ # Repository interfaces
β
βββ presentation/ # Presentation Layer
βββ patient/ # Patient app
β βββ screen/ # Patient screens
β βββ viewmodel/ # ViewModels
βββ family/ # Family app
β βββ *.kt # Family screens
βββ common/ # Shared UI
β βββ components/ # Reusable components
βββ theme/ # Material Design 3 theme
Architecture Patterns:
- Clean Architecture - Separation of concerns (Data/Domain/Presentation)
- MVVM - Model-View-ViewModel for UI
- Repository Pattern - Data abstraction
- Dependency Injection - Hilt for DI
- β Modern Patient Dashboard - Personalized greeting, daily stats, medication list
- β Medication Management - Add, view, and track medications
- β Today's Progress Tracking - Visual progress indicators (streak, doses taken)
- β One-Tap Medication Logging - Simple TAKE button for dose confirmation
- β Medication Details - Full medication information with adherence history
- β Sample Data Seeding - 3 sample medications auto-loaded on first launch
- β Room Database - Local persistence with proper entities
- β MVVM Architecture - Clean separation with ViewModels
- β Kotlin Coroutines & Flow - Reactive data streams
- β WorkManager - Reliable background reminder system
- β Hilt Dependency Injection - Modular, testable code
- β Large Touch Targets - Minimum 44dp for easy tapping
- β Scalable Text - 18sp+ body text, 22sp+ headings
- β High Contrast Colors - Better visibility for low vision
- β TalkBack Support - Full screen reader compatibility
- β Content Descriptions - Semantic labels for assistive tech
- β Visual Status Indicators - Color-coded medication states
- β Family Dashboard - Real-time patient status overview
- β Patient Monitoring - Track multiple patients simultaneously
- β Alert System - Missed dose notifications (Critical/Warning/Info)
- β Activity Timeline - Chronological medication event log
- β Progress Tracking - Today's adherence with visual indicators
- β Quick Actions - Message, call, or check patient status
- β Reports Screen - Adherence analytics and trends
- β Real-Time Updates - See medication status changes instantly
- β Alert Prioritization - Critical alerts for missed important doses
- β Multi-Patient Support - Monitor multiple family members
- β Adherence Analytics - Week/month/quarter views with trends
- Welcome Screen - Onboarding for new users
- Dashboard - Today's medications with large, accessible cards
- Add Medication - Simple form with validation
- Take Medication - One-tap confirmation
- Progress Tracking - Visual feedback on adherence
- History View - Detailed adherence records over time
- Family Dashboard - Overview of all monitored patients
- Alerts Screen - Filter and respond to medication issues
- Patient Status - Detailed view of patient's medication schedule
- Messaging - Quick communication with patient
- Reports - Long-term adherence analytics and insights
// Android Core
androidx.core:core-ktx:1.12.0
androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0
androidx.activity:activity-compose:1.8.2// UI Framework
androidx.compose:compose-bom:2023.10.01
androidx.compose.material3:material3
androidx.compose.material:material-icons-extended// Local Persistence
androidx.room:room-runtime:2.6.1
androidx.room:room-ktx:2.6.1
kapt("androidx.room:room-compiler:2.6.1")// Hilt DI
com.google.dagger:hilt-android:2.48
kapt("com.google.dagger:hilt-compiler:2.48")
// WorkManager
androidx.work:work-runtime-ktx:2.9.0
androidx.hilt:hilt-work:1.1.0// Cloud Services (Future)
com.google.firebase:firebase-firestore-ktx
com.google.firebase:firebase-auth-ktx
com.google.firebase:firebase-messaging-ktx| Component | Purpose | Location |
|---|---|---|
| Entities | Room database tables | data/local/entity/Entities.kt |
| DAOs | Database queries | data/local/dao/Daos.kt |
| Database | Room configuration | data/local/database/MedicationDatabase.kt |
| Mappers | Entity β Model conversion | data/local/mapper/DataMappers.kt |
| Repository | Data source abstraction | data/repository/MedicationRepositoryImpl.kt |
| WorkManager | Background tasks | data/work/MedicationReminderWorker.kt |
| Component | Purpose | Location |
|---|---|---|
| Models | Business logic models | domain/model/Models.kt |
| Repository Interfaces | Data contracts | domain/repository/RepositoryInterfaces.kt |
| Component | Purpose | Location |
|---|---|---|
| Screens | Full-screen composables | presentation/patient/screen/, presentation/family/ |
| ViewModels | State management | presentation/patient/viewmodel/ |
| UI Components | Reusable composables | presentation/common/components/ |
| Theme | Material Design 3 | presentation/theme/ |
This repository includes comprehensive documentation:
- CURRENT_APP_STATUS.md - Detailed feature status and implementation
- DEMO_PRESENTATION_GUIDE.md - Complete demo script for presentations
- PROJECT_STRUCTURE_GUIDE.md - Component reference and architecture patterns
- BUILD_INSTRUCTIONS.md - Setup and build guide
- Android Studio Hedgehog (2023.1.1) or later
- JDK 17 or higher
- Android SDK 24+ (target SDK 34)
- Clone the repository
git clone https://github.com/yourusername/medication-adherence-app.git
cd medication-adherence-app-
Open in Android Studio
- Open Android Studio
- Select "Open an Existing Project"
- Navigate to the project directory
-
Sync Gradle
- Android Studio will automatically sync Gradle
- Wait for dependencies to download
-
Run the app
- Connect an Android device or start an emulator
- Click "Run" or press
Shift+F10
- The app will seed 3 sample medications on first launch
- Patient Dashboard shows today's medications
- Family App provides mock data for demonstration
MedicationViewModelTest- ViewModel logicRepositoryTest- Data layerAdherenceTrackingTest- Adherence calculations
- Patient flow (add β reminder β take)
- Family monitoring flow
- Alert system verification
Run tests:
./gradlew test
./gradlew connectedAndroidTest- Color Palette: Custom blue, green, orange, gray scales
- Typography: Scalable text system (18sp+ body, 22sp+ headings)
- Components: Material 3 Cards, Buttons, TextFields
- Accessibility: WCAG 2.1 AA compliant
// Primary
Blue600 (0xFF2563EB) // App brand
Green600 (0xFF16A34A) // Success states
Orange600 (0xFFEA580C) // Warnings
Red600 (0xFFDC2626) // Errors
// Neutral
Gray50 (0xFFF9FAFB) // Background
Gray600 (0xFF6B7280) // Secondary text
Gray900 (0xFF111827) // Primary text- Patient App MVP
- Modern UI with Material Design 3
- Room Database implementation
- WorkManager reminders
- Accessibility features
- Sample data seeding
- Family App MVP
- Alert system
- Reports and analytics
- Firebase Authentication
- Firestore data sync
- Real-time push notifications
- Edit medication functionality
- Patient settings screen
- Multi-language support
- Medication interaction warnings
- Doctor/pharmacy integration
- Health data export
- Advanced analytics
- Integration with health apps
- β Simple, accessible interface
- β Reliable reminder system
- β Progress tracking
- β One-tap medication logging
- β Large touch targets and readable text
- β Real-time status monitoring
- β Alert system for missed doses
- β Multi-patient support
- β Comprehensive adherence analytics
- β Quick communication features
- β Clean Architecture implementation
- β MVVM pattern with ViewModels
- β Room database for offline support
- β Hilt dependency injection
- β WorkManager for background tasks
- β Accessibility compliance (WCAG 2.1 AA)
- Elderly Patients (65+) - Managing 3+ daily medications
- Family Caregivers - Monitoring loved ones remotely
- Healthcare Workers - Providing medication adherence support
- Simple medication management for elderly users
- Family peace of mind through remote monitoring
- Reduced medication errors and missed doses
- Better health outcomes through improved adherence
This is a course project (MSD Project). Contributions, issues, and pull requests are welcome!
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Kotlin style guide compliance
- Clean Architecture principles
- Accessibility-first design
- Material Design 3 guidelines
- Comprehensive test coverage
This project is created for educational purposes as part of the MSD (Mobile Software Development) course.
For questions or support, please refer to the project documentation or contact the development team.
- Material Design 3 - Google
- Jetpack Compose - Google
- Room Database - Android
- Hilt - Google Dagger
- Clean Architecture - Robert C. Martin (Uncle Bob)
Built with β€οΈ for elderly patients and their families