# ๐ŸŽฏ Phase 2.7 Plan - MVP Prioritized **Based on:** Normogen MVP Research Summary (2026-01-05) **Phase:** 2.7 - Health Data Features (MVP-Focused) **Status:** โณ Not Started **MVP Core Value:** Tracking medication adherence and health trends --- ## ๐Ÿšจ MVP Priority Shift ### Original Plan (Generic) 1. Medications 2. Lab Results 3. Health Statistics 4. Appointments 5. Health Documents ### โœ… MVP-Aligned Plan (Prioritized) 1. **Medications** - MVP CRITICAL (adherence tracking) 2. **Health Statistics** - MVP CRITICAL (trends & patterns) 3. **Lab Results** - MVP IMPORTANT (reference ranges) 4. **Simple Notifications** - MVP CRITICAL (reminders) 5. **Basic Sharing** - MVP IMPORTANT (family access) --- ## ๐Ÿ“‹ MVP Requirements Analysis ### Core MVP Users (from research) 1. **Parents** tracking children's health 2. **Individuals** managing medications 3. **Families** sharing health data ### MVP Core Value Propositions - ๐Ÿ“Š **Track health variables over time** - ๐Ÿ’Š **Medication reminders & adherence** - ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง **Multi-person profiles** (family) - ๐Ÿ”— **Secure sharing** with caregivers - ๐Ÿ“ฑ **Simple, mobile-first UX** --- ## ๐ŸŽฏ MVP-Feature Matrix | Feature | MVP Priority | Use Case | Effort | Value | |---------|--------------|----------|--------|-------| | **Medication Tracking** | ๐Ÿ”ด CRITICAL | Daily meds, adherence | Medium | ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ | | **Health Statistics** | ๐Ÿ”ด CRITICAL | Track trends (BP, weight) | Medium | ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ | | **Simple Reminders** | ๐Ÿ”ด CRITICAL | Never miss a dose | High | ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ | | **Basic Sharing** | ๐Ÿ”ด IMPORTANT | Family access | Medium | ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ | | **Profile Management** | ๐Ÿ”ด IMPORTANT | Multi-person | Low | ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ | | **Lab Results** | ๐ŸŸก NICE-TO-HAVE | Track values | Medium | ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ | | **Appointments** | ๐ŸŸก NICE-TO-HAVE | Scheduling | Low | ๐Ÿ”ฅ๐Ÿ”ฅ | | **Document Upload** | ๐ŸŸข DEFER | Medical records | High | ๐Ÿ”ฅ | | **Advanced Analytics** | ๐ŸŸข DEFER | Insights | Very High | ๐Ÿ”ฅ | --- ## ๐Ÿš€ Revised Implementation Order ### Sprint 1: Core MVP (Week 1) **Focus:** Medication adherence + Health tracking #### Task 1.1: Medication Management ๐Ÿ’Š **Priority:** ๐Ÿ”ด CRITICAL (MVP Blocker) **Time:** 3 days **Endpoints:** - `POST /api/medications` - Add medication - `GET /api/medications` - List medications (by profile) - `PUT /api/medications/:id` - Update medication - `DELETE /api/medications/:id` - Delete medication - `POST /api/medications/:id/log` - Log dose taken - `GET /api/medications/:id/adherence` - Get adherence % **Key Features:** - Medication name, dosage, frequency - Time-based reminders - Dose logging (taken/skipped) - Adherence calculation - Profile-based (multi-person support) **Handler:** `backend/src/handlers/medications.rs` --- #### Task 1.2: Health Statistics Tracking ๐Ÿ“ˆ **Priority:** ๐Ÿ”ด CRITICAL (MVP Blocker) **Time:** 3 days **Endpoints:** - `POST /api/health-stats` - Add stat (weight, BP, etc.) - `GET /api/health-stats` - List stats (by profile & type) - `GET /api/health-stats/trend/:type` - Get trend data - `DELETE /api/health-stats/:id` - Delete stat **Key Features:** - Support for common metrics (weight, BP, temp, etc.) - Date-based tracking - Trend visualization support - Profile-based (track for each family member) **Handler:** `backend/src/handlers/health_stats.rs` **Important Stats for MVP:** - Weight - Blood Pressure (systolic/diastolic) - Heart Rate - Temperature - Blood Glucose - Custom notes --- #### Task 1.3: Profile Selection API ๐Ÿ‘ค **Priority:** ๐Ÿ”ด CRITICAL (Multi-person support) **Time:** 1 day **Endpoints:** - `GET /api/profiles` - List user's profiles - `POST /api/profiles` - Create profile (family member) - `PUT /api/profiles/:id` - Update profile - `GET /api/profiles/:id/health-stats` - Get profile's stats - `GET /api/profiles/:id/medications` - Get profile's meds **Handler:** `backend/src/handlers/profiles.rs` --- ### Sprint 2: Sharing & Notifications (Week 2) #### Task 2.1: Basic Health Sharing ๐Ÿ”— **Priority:** ๐Ÿ”ด IMPORTANT (MVP Core Value) **Time:** 3 days **Endpoints:** - `POST /api/shares` - Share health data - `GET /api/shares` - List shares - `DELETE /api/shares/:id` - Revoke share - `GET /api/shares/:token` - Access shared data (public link) **Key Features:** - Share specific data types (meds, stats) - Expiring links (1 day, 7 days, 30 days) - Access control (read-only) - Already mostly implemented (use existing Share model) **Enhancement to existing:** `backend/src/handlers/shares.rs` --- #### Task 2.2: Simple Notification System ๐Ÿ”” **Priority:** ๐Ÿ”ด CRITICAL (Medication reminders) **Time:** 4 days **Endpoints:** - `POST /api/notifications` - Create notification - `GET /api/notifications` - List notifications - `PUT /api/notifications/:id/read` - Mark as read - `DELETE /api/notifications/:id` - Delete notification **Key Features:** - Medication reminders (time-based) - Missed dose alerts - Simple in-app notifications - Email notification support (basic) **Model:** Create `Notification` model **Handler:** `backend/src/handlers/notifications.rs` **Notification Types:** - `MEDICATION_REMINDER` - `MISSED_DOSE` - `SHARING_INVITE` - `HEALTH_ALERT` --- ### Sprint 3: Polish & Integration (Week 3) #### Task 3.1: Lab Results (If Time) ๐Ÿงช **Priority:** ๐ŸŸก NICE-TO-HAVE **Time:** 3 days **Endpoints:** - `POST /api/lab-results` - Add lab result - `GET /api/lab-results` - List results - `GET /api/lab-results/:id` - Get result **Handler:** `backend/src/handlers/lab_results.rs` --- #### Task 3.2: Comprehensive Testing ๐Ÿงช **Priority:** ๐Ÿ”ด CRITICAL **Time:** 2 days - Integration tests for all MVP features - End-to-end workflows - Performance testing - Security testing --- #### Task 3.3: API Documentation ๐Ÿ“š **Priority:** ๐ŸŸก IMPORTANT **Time:** 2 days - OpenAPI/Swagger spec - Endpoint documentation - Example requests/responses --- ## ๐Ÿ“Š MVP Completion Criteria ### Must Have for MVP โœ… - [x] Users can create profiles for family members - [x] Users can add medications with schedules - [x] Users can log medication doses - [x] Users can track health statistics (weight, BP, etc.) - [x] Users can view trends over time - [x] Users receive medication reminders - [x] Users can share health data with family - [x] All data is private and secure - [x] Multi-person support works ### Nice to Have for MVP ๐ŸŽ - [ ] Lab result tracking - [ ] Appointment scheduling - [ ] Document upload - [ ] Advanced analytics - [ ] Data export --- ## ๐ŸŽฏ MVP User Stories ### Story 1: Parent Tracking Child's Medication **As** a parent **I want** to add my child's medication and set reminders **So that** I never miss a dose **Tasks:** - Create profile for child - Add medication with schedule - Receive daily reminder - Log dose when given - View adherence history --- ### Story 2: Individual Tracking Blood Pressure **As** an individual monitoring my health **I want** to track my blood pressure daily **So that** I can see trends and share with my doctor **Tasks:** - Create health stat entry for BP - View BP trend over time - Identify abnormal readings - Export data for doctor --- ### Story 3: Family Sharing Health Data **As** a caregiver **I want** to view my elderly parent's medications **So that** I can help them manage their health **Tasks:** - Parent creates share link - Caregiver accesses shared data - View medications and schedules - See adherence data --- ## ๐Ÿ“ Files to Create (MVP-Focused) ### Handlers (4 critical) ``` backend/src/handlers/ โ”œโ”€โ”€ medications.rs # MVP CRITICAL โ”œโ”€โ”€ health_stats.rs # MVP CRITICAL โ”œโ”€โ”€ notifications.rs # MVP CRITICAL โ””โ”€โ”€ profiles.rs # MVP CRITICAL (multi-person) ``` ### Models (1 new) ``` backend/src/models/ โ””โ”€โ”€ notification.rs # Notification model ``` ### Tests ``` backend/tests/ โ””โ”€โ”€ mvp_tests.rs # MVP integration tests ``` ### Scripts ``` backend/ โ”œโ”€โ”€ test-mvp-workflow.sh # End-to-end MVP test โ””โ”€โ”€ mvp-demo-data.sh # Seed demo data ``` --- ## ๐Ÿ”’ MVP Security Requirements ### All Endpoints Must: 1. **Profile Isolation** - Users can only access their profiles 2. **Permission Checks** - Use existing permission middleware 3. **Audit Logging** - Log all health data access 4. **Input Validation** - Sanitize all health data ### Special Considerations: - **Children's data** - Extra protection - **Sharing** - Explicit consent only - **Reminders** - No sensitive data in notifications --- ## ๐Ÿ“… Revised Timeline ### Week 1: Core MVP - **Days 1-3:** Medication management - **Days 4-6:** Health statistics - **Day 7:** Profile management ### Week 2: Sharing & Notifications - **Days 1-3:** Health sharing - **Days 4-7:** Notification system ### Week 3: Polish - **Days 1-3:** Lab results (if time) - **Days 4-5:** Integration testing - **Days 6-7:** Documentation & deployment --- ## โœ… Definition of Done (MVP) ### Functional - All MVP endpoints work - Multi-person profiles work - Medication reminders work - Health trends work - Sharing works - All tests pass ### Non-Functional - < 500ms response time - 80%+ test coverage - No security vulnerabilities - Production-ready - Deployed to Solaria --- ## ๐Ÿš€ Getting Started (MVP-Focused) ### Step 1: Create MVP branch ```bash git checkout -b phase-2.7-mvp ``` ### Step 2: Start with highest value Begin with **medications** - it's the core MVP feature ### Step 3: Build incrementally 1. Medications (3 days) 2. Health stats (3 days) 3. Profiles (1 day) 4. Sharing (3 days) 5. Notifications (4 days) ### Step 4: Test & deploy Comprehensive testing, then deploy to Solaria --- ## ๐Ÿ“Š Success Metrics (MVP) ### Technical - โœ… All MVP endpoints operational - โœ… < 500ms p95 response time - โœ… 99.9% uptime - โœ… Zero security issues ### User Value - โœ… Can manage medications for family - โœ… Can track health trends - โœ… Can receive reminders - โœ… Can share with caregivers --- ## ๐ŸŽฏ Next Phase Preview ### Phase 3: Frontend Development After MVP backend is complete: - React web app (mobile-first) - Profile switching UI - Medication dashboard - Health trend charts - Notification center - Sharing management --- ## ๐Ÿ“ Summary **Phase 2.7 is now MVP-focused and prioritized.** **Key Changes:** - โœ… Medications moved to CRITICAL (was just "first") - โœ… Health stats moved to CRITICAL (core value) - โœ… Notifications added as CRITICAL (adherence) - โœ… Profiles prioritized (multi-person support) - โš ๏ธ Lab results demoted to NICE-TO-HAVE - โš ๏ธ Appointments demoted to NICE-TO-HAVE - โŒ Documents removed from MVP (defer to Phase 4) **Focus:** Build the MINIMUM viable product that delivers core value: 1. Track medications 2. Track health stats 3. Set reminders 4. Share with family **Estimated time:** 2-3 weeks (same, but focused on MVP) **Ready to start?** Begin with **Task 1.1: Medication Management** - the heart of the MVP! --- **๐Ÿ“„ Saved to:** `PHASE_2.7_MVP_PRIORITIZED_PLAN.md`