Repository navigation
1. Product Overview
TL;DR
DoseMate is a mobile app that helps adults managing chronic conditions stay consistent with their medications through smart reminders, simple medication tracking, and accessible education about side effects. It reduces stress, prevents missed doses, and builds medication confidence using adaptive notifications, progress tracking, and clear, plain-language guidance.
Repos
- Backend: DoseMate-backend
- Frontend: DoseMate-mobile
Jobs To Be Done (JTBD)
-
Tracking
As a patient managing multiple chronic conditions, I want to easily add and track my medications so I can follow my regimen with confidence and accuracy.
Value: reduces errors, maintains clear medication history. -
Smart Reminders
As a busy patient, I want adaptive reminders that fit around my lifestyle so I can stay consistent without feeling overwhelmed.
Value: increases adherence, reduces missed doses. -
Education & Side-Effect Understanding
As a patient concerned about side effects, I want clear explanations of my medications so I feel reassured and better understand their importance.
Value: decreases anxiety, increases trust in care.
Core Customer User Journeys (CUJs)
-
Account Creation – onboarding, profile setup, Google OAuth sign-in
-
Easily Adding Medications – search, scan, confirm dosage, schedule reminders
-
Understanding Medication Through Education – purpose, side-effects, plain-language info
-
Staying on Track With Smart Reminders – adaptive alerts, snooze, tracking streaks
2. MVP Development Justification
Initial Hypothesis
Core problem: Adults with chronic conditions routinely miss medications due to schedule complexity, poor reminder tools, and anxiety about side effects.
Initial idea: A medication-tracking app with reminders and education cards.
Key assumptions:
-
Users struggle with tracking schedules manually.
-
Reminder fatigue causes ignored notifications.
-
Users want very simple medication explanations.
-
Users will adopt the app if onboarding is frictionless (OAuth, simple UI).
Key Learnings & Pivots
- Learning 1 (User Survey – 46–75 aged adults)
75% miss doses weekly, 69% stop medications without consulting a doctor.
Pivot: Invest heavily in reminders + adherence tracking dashboards. - Learning 2
21% fear side effects and 58% feel stressed managing meds.
Pivot: Add medication education module + side-effect view. - Learning 3
Users value care-team visibility (90% want to share data).
Pivot: Add adherence report sharing. - Learning 4
Users want fast onboarding and hate forms.
Pivot: Add Google OAuth early to reduce friction. - Learning 5
Medication entry must be quick, and users want image upload or scan.
Pivot: Integrate OpenFDA + camera upload for medication search.
Justification of Final MVP
Our final MVP includes:
-
Account creation + Google OAuth → validates identity with low friction
-
Medication search + scan + OpenFDA ingestion → directly addresses the biggest JTBD: easy tracking
-
Plain-language education module → validated by user anxiety around side effects
-
Smart reminders → supports adherence, preventing missed doses
-
Adherence stats (daily/weekly/monthly) → reflects user desire for confidence and progress tracking
-
These features form the smallest possible set that solves the verified needs: accuracy, confidence, stress reduction, and adherence.
3. Functional and Dynamic MVP
Core Functionality
Our MVP delivers an end-to-end, working version of DoseMate across a Python/FastAPI backend and a React Native (Expo) mobile client. In its current state, users can:
- Account & Profile
- Sign up using email/password or Google OAuth.
- Review and accept a privacy notice before proceeding into the main app.
- Personalize their profile by entering age, conditions, allergies, and lifestyle factors.
- Medication Management
- Search for medications by name using an autocomplete search connected to a medication API.
- Use camera-based recognition of medication packaging to pre-fill medication information.
- View a list of matching medications and select the correct one.
- Confirm dosage details: strength and quantity.
- Configure a schedule: times of day, days of the week, PRN (“as needed”) vs recurring schedules.
- Save medications to the user’s profile, with a persistent history of active medications.
- Education & Side Effect Tracking
- See a plain-language medication overview pulled from OpenAI API.
- View side-effect information separated into common vs serious effects.
- See tips and “seek help” markers that flag when the user should contact a provider or go to emergency care.
- Smart Reminders / Adherence
- Receive push notifications that include medication name, dosage, and key instructions at scheduled times.
- From the notification or in-app reminders, tap “Taken” or “Snooze” for each dose.
- Use adaptive reminders that adjust based on time (and optionally snooze behaviour) to better match real routines.
- Adherence Tracking & Reporting
- View an adherence tracking dashboard with summaries of doses taken vs scheduled.
- See streaks and basic progress indicators to positively reinforce consistent use.
- Generate adherence summaries that can be shared with caregivers or providers (via PDF).
Dynamic vs. Static Content
Dynamic (backed by real data and logic)
- Account & profile: email + Google auth flows, privacy notice gating, and profile storage (age, conditions, allergies, lifestyle).
- Medication search and selection: autocomplete search against a medication API, listing matches, and saving selected medications to the user’s profile.
- Camera-based packaging scan: triggers real logic and data flow.
- Medication schedule: saving times, days, and PRN/recurring patterns to the backend and using them to compute upcoming doses.
- Medication details & education: fetching and displaying overview, side effects, and “seek help” markers from the backend/medication service.
- Reminders: creating reminder schedules, triggering notifications, and updating state when users tap “Taken” or “Snooze”.
- Adherence logging: persisting “taken” events, updating adherence stats, and reflecting them in the dashboard view.
- Caregiver/provider report generation: using real adherence data (PDF/email export).
Static / Semi-Static (scaffolded or partially implemented)
- There are no core CUJs implemented as static mockups; all primary user journeys (account creation, medication setup, viewing details, receiving reminders, logging doses, and viewing adherence) are fully dynamic and integrated with backend services.
4. Test Coverage
Code Coverage
Backend
- Backend coverage is measured using pytest and the coverage plugin.
pytest --cov=app --cov-report=term-missing --cov-report=xml - At the time of the final release, our backend test suite achieves 66%, which exceeds the course requirement of ≥65% coverage.
Frontend
- For the mobile app, Jest’s coverage reporting is enabled.
npm test -- --coverage - At the time of the final release, our frontend test suite achieves 71%, which exceeds the course requirement of ≥65% coverage.
CI and Coverage Reporting
We use GitHub Actions as our CI pipeline to enforce tests and coverage on every push and pull request to the main branch:
The CI workflow
- Checks out the repository.
- Installs backend and frontend dependencies.
- Runs database migrations or sets up a test database.
- Executes:
- Backend tests with coverage: pytest --cov=app --cov-report=term-missing --cov-report=xml
- Frontend tests with coverage: npm test -- --coverage
The pipeline
- Fails the build if tests fail.
- Generates a coverage.xml report for the backend (and Jest coverage for the frontend) that is stored as a CI artifact and uploaded.
Example CI run with coverage report
-
Backend: Successful CI Run
-
-
Frontend: Successful CI Run
-
5. Demo
dosemate.demo.mp4
Key Features to Test
User Login
- Google OAuth
- Email login
Onboarding Flow
- Privacy & security terms
- Patient info: age, conditions, allergies, sleep schedule, activity levels
Medicine Management
- Add medicine via:
- Text search
- Manual entry
- Image/OCR upload (work-in-progress)
- Fill out dosage, frequency, and customizable days
- Verify scheduled reminders appear at the correct time
Reminders
- Standard reminders with “Taken” and “Snooze” options
- Smart/adaptive reminders that adjust based on user patterns
In-App Medicine Education
- Open a scheduled medicine to view:
- Overview
- Side effects
- Interactions
Progress Tracking
- Dashboard showing:
- Taken vs missed doses
- Adherence percentage
- Recent activity
- Ability to set adherence targets
Report Generation
- Weekly and monthly adherence reports
- Export-ready summaries for patients and healthcare providers
Highlights of Our Work
- Built a full medication scheduling system with flexible dose and frequency options
- Designed a user-centric onboarding flow to personalize reminders
- Implemented early-stage OCR for image-to-text medicine input
- Added smart adaptive reminders informed by research on behavioral adherence
- Developed a clean progress dashboard and automated reporting feature
- Prioritized accessibility, clarity, and patient empowerment throughout the app
6. Deployment Documentation
6.1 Deployment Steps
Backend Deployment (Render)
The DoseMate backend runs on Render as a continuously deployed web service. Any push to the main branch triggers an automatic redeploy.
Prerequisites
- Render account
- Access to the GitHub repository
- Render PostgreSQL instance
- Required environment variables (
DATABASE_URL, OAuth configs, etc.)
Steps to Deploy (CD Setup Guide)
-
Create a Render account and connect it to GitHub.
-
Create a new Web Service → “Build from GitHub Repo”.
-
Configure the service:
-
Runtime: Python 3.11
-
Build command:
pip install -r requirements.txt -
Start command:
uvicorn app.main:app --host 0.0.0.0 --port 10000
-
-
Add environment variables (from config example or
.env). -
Render auto-deploys → verify at:
https://dosemate-backend.onrender.com/docs
Mobile
The DoseMate mobile app is built using React Native (Expo). All medication reminders are handled locally on-device, so no backend push notification services are needed.
Prerequisites
- Node.js + npm and install all packages;
npm i - Expo CLI (
npm install -g expo-cli) - EAS CLI (
npm install -g eas-cli) - Physical Android/iOS device or emulator
Steps to Build APK/AAB
-
Log in to Expo
eas login -
Configure EAS Build
eas build:configureThis creates
eas.jsonin your project. -
Build Android APK (for testing)
eas build --platform android --profile previewThe CLI outputs a link to download the
.apk. -
Build Android AAB (for Play Store)
eas build --platform android --profile productionThis generates a
.aabsuitable for uploading to the Google Play Console. -
Install on device
- Download the
.apkand install directly (testing) - Or use the Expo Go app for development testing
- Download the
Publishing to Google Play Store
- Go to the Google Play Console
- Create an app → Choose Internal Testing (or Production)
- Upload the
.aabfile - Add testers for internal testing
- Complete metadata (screenshots, description, privacy policy)
- Submit for review → Release
(Note: Google’s review typically takes 24–72 hours.)
6.2 Access Links
- Backend API: https://dosemate-backend.onrender.com/
- Swagger Docs: https://dosemate-backend.onrender.com/docs
- Mobile App (APK): Provided as project deliverable
7. Updated Architecture Diagram
Our final MVP uses a simplified architecture compared to the initial proposal.
During development, we discovered that Expo + React Native natively provide reliable background timers, local scheduled notifications, and offline reminder behavior.
As a result, we removed:
- Celery
- Redis
- Firebase FCM
All medication reminders are now scheduled directly on the user’s device via Expo Notifications, resulting in a leaner, more reliable system with fewer moving parts.
Updated Architecture Diagram
DoseMate’s final architecture is streamlined for reliability:
The React Native mobile app handles all notification scheduling locally through Expo’s Notifications API, ensuring reminders work offline and without Celery, Redis, or FCM.
The FastAPI backend provides authentication, medication management, schedule definitions, and adherence logging, while PostgreSQL stores all persistent data. Render hosts and deploys the backend infrastructure. This simplified architecture reduces operational complexity and provides a more stable MVP aligned with core medication adherence needs.