# Remaining Features - Maternal App

**Generated**: October 3, 2025
**Last Updated**: October 4, 2025
**Status**: 77 features remaining out of 139 total (55%)
**Completion**: 62 features completed (45%)
**Urgent**: ✅ All critical bugs fixed! 8 high-priority features remaining

This document provides a clear roadmap of all remaining features, organized by priority level. Use this as a tracking document for ongoing development.

---

## 📊 Summary

### Feature Status by Category
- **Bugs**: ✅ 0 critical bugs (all fixed!)
- **Backend**: 31 remaining / 55 total (44% complete)
- **Frontend**: 28 remaining / 52 total (46% complete)
- **Infrastructure**: 8 remaining / 21 total (62% complete)
- **Testing**: 13 remaining / 18 total (28% complete)

### Priority Breakdown
- **🔴 Critical (Pre-Launch)**: ✅ ALL COMPLETE!
- **🔥 Urgent Bugs**: ✅ ALL FIXED!
- **🟠 High Priority**: 16 features (8 existing + 8 new user-requested)
- **🟡 Medium Priority**: 18 features
- **🟢 Low Priority (Post-MVP)**: 40 features

---

## 🔴 CRITICAL PRIORITY (Pre-Launch) ✅

### All Critical Features Complete!

The following critical features have been successfully implemented:
- ✅ Testing Foundation (80%+ coverage achieved)
- ✅ COPPA/GDPR Compliance (data export, deletion, consent)
- ✅ Redux Persist (state persistence)
- ✅ Accessibility Foundation (WCAG 2.1 AA Phase 1)
- ✅ Real-Time Sync (WebSocket room management)
- ✅ AI Safety Integration (medical disclaimers, crisis hotlines)
- ✅ LangChain Context Management (4000 token budget)
- ✅ Security Hardening (Helmet.js, CSP, CORS)
- ✅ Localization (95% complete - 77 files, 7 languages)

**Status**: ✅ **LAUNCH READY** - All critical features implemented!

---

## 🔥 URGENT BUGS (0 Critical Issues) ✅

### All Critical Bugs Fixed!

#### ✅ BUG-1. Voice Tracking Not Saving Activities - FIXED
**Fixed**: October 4, 2025
**Solution**:
- Fixed data format transformation (timestamp/data instead of startedAt/metadata)
- Added sleep duration → startTime/endTime conversion
- Removed duplicate voice button from mobile menu

**Commits**:
- `53e3757` - feat: Add status dot indicator and fix voice tracking data format
- `962d0fb` - fix: Transform sleep voice command duration to startTime/endTime format

---

#### ✅ BUG-2. Session Persistence After Revocation - FIXED
**Fixed**: October 3, 2025
**Solution**: Added logout() calls after revoking sessions/devices to clear tokens and redirect to login

**Files Modified**:
- `maternal-web/components/settings/SessionsManagement.tsx`
- `maternal-web/components/settings/DeviceTrustManagement.tsx`

**Commit**: `2ab9874` - fix: Fix 3 critical bugs

---

#### ✅ BUG-3. Voice Modal Status Not Updating - FIXED
**Fixed**: October 3, 2025
**Solution**: Set identifiedActivity state in handleApprove and handleEdit to show proper status

**Files Modified**:
- `maternal-web/components/voice/VoiceFloatingButton.tsx`

**Commit**: `2ab9874` - fix: Fix 3 critical bugs

---

## 🟠 HIGH PRIORITY (16 Features)

### New User-Requested Features (8 features)

#### 9. User Profile Photo Upload
**Category**: Profile Management
**Effort**: 2 hours
**Files**:
- `app/settings/page.tsx`
- `components/features/settings/ProfilePhotoUpload.tsx` (new)
- Backend: `src/modules/auth/auth.controller.ts` (add upload endpoint)

**Requirements**:
- Upload profile photo from settings page
- Crop/resize interface (square aspect ratio)
- Photo preview before saving
- Replace existing photo
- Photo displayed in header/navigation

**Acceptance Criteria**:
- [ ] Photo upload button in settings
- [ ] Image cropper interface
- [ ] Preview before save
- [ ] Photo appears in user menu
- [ ] Photo appears in family member list
- [ ] API endpoint: PATCH /api/v1/auth/profile/photo

---

#### 10. Child Photo Upload Enhancement
**Category**: Child Management
**Effort**: 1.5 hours
**Files**:
- `components/features/children/ChildDialog.tsx`
- `components/features/children/ChildCard.tsx`

**Requirements**:
- Add photo upload to child creation/edit dialog
- Photo displayed on child card
- Photo in child selector dropdown
- Default avatar if no photo

**Acceptance Criteria**:
- [ ] Photo upload in child create/edit dialog
- [ ] Photo preview in dialog
- [ ] Photo displayed on child card
- [ ] Photo in child selection dropdown
- [ ] Default avatar fallback

---

#### 11. Mobile View Grid Layout (2 Cards per Row)
**Category**: UI/UX - Mobile
**Effort**: 1 hour
**Files**:
- `components/features/children/ChildrenList.tsx`
- `app/children/page.tsx`
- Potentially other grid layouts

**Requirements**:
- Display 2 child cards per row on mobile
- Responsive breakpoints (1 card on very small screens)
- Maintain touch target sizes
- Proper spacing between cards

**Acceptance Criteria**:
- [ ] 2 cards per row on mobile (width >= 360px)
- [ ] 1 card per row on very small screens (< 360px)
- [ ] Cards maintain 44x44px touch targets
- [ ] Proper gap spacing (8-16px)
- [ ] Test on iPhone SE, iPhone 14, Android

---

#### 12. Secondary Color Palette & Accessibility Toggle
**Category**: UI/UX - Theming
**Effort**: 4 hours
**Files**:
- `app/globals.css` (add secondary palette CSS variables)
- `app/settings/page.tsx` (add accessibility toggle)
- Redux: `lib/store/slices/uiSlice.ts` (theme preference)

**Requirements**:
- Create beautiful secondary color palette (e.g., blues/purples)
- Settings toggle for "Accessibility Mode" vs "Standard Mode"
- Accessibility Mode: High contrast, larger text, reduced animations
- Standard Mode: Current warm palette with animations
- Persist user preference

**Acceptance Criteria**:
- [ ] Secondary color palette designed (6-8 colors)
- [ ] Settings toggle: "Accessibility Mode"
- [ ] High contrast colors in accessibility mode
- [ ] Larger font sizes in accessibility mode (1.15x base)
- [ ] Reduced/disabled animations in accessibility mode
- [ ] User preference saved to localStorage
- [ ] Theme applied consistently across all pages

---

#### 13. Legal Pages & User Menu
**Category**: Compliance
**Effort**: 3 hours
**Files**:
- `app/legal/privacy/page.tsx` (new)
- `app/legal/terms/page.tsx` (new)
- `app/legal/eula/page.tsx` (new)
- `app/legal/cookies/page.tsx` (new)
- `components/layout/UserMenu.tsx` (add legal links)

**Requirements**:
- Privacy Policy page (GDPR/COPPA compliant)
- Terms of Service page
- EULA (End User License Agreement)
- Cookie Policy page
- Links in user menu footer
- Proper legal language for parenting app

**Acceptance Criteria**:
- [ ] Privacy Policy page with GDPR/COPPA disclosures
- [ ] Terms of Service page
- [ ] EULA page
- [ ] Cookie Policy page
- [ ] Links added to user menu
- [ ] Links in footer of all pages
- [ ] Mobile-responsive layout
- [ ] Last updated dates displayed

---

#### 14. EULA Agreement Popup on First Login
**Category**: Compliance
**Effort**: 2 hours
**Files**:
- `components/common/dialogs/EulaDialog.tsx` (new)
- `lib/auth/AuthContext.tsx` (show EULA on first login)
- Backend: User entity (add eulaAcceptedAt field)

**Requirements**:
- Show EULA dialog on first login only
- User must scroll to bottom before accepting
- "I agree" checkbox required
- Block app usage until accepted
- Store acceptance timestamp
- Link to full EULA page

**Acceptance Criteria**:
- [ ] EULA dialog shows on first login
- [ ] User must scroll to enable "I agree" checkbox
- [ ] "Continue" button disabled until checkbox checked
- [ ] EULA acceptance timestamp saved to database
- [ ] Dialog doesn't show on subsequent logins
- [ ] Link to full EULA page in dialog

---

#### 15. Cookie Consent Banner
**Category**: Compliance
**Effort**: 2 hours
**Files**:
- `components/common/banners/CookieConsent.tsx` (new)
- `lib/store/slices/uiSlice.ts` (cookie preferences)
- `app/layout.tsx` (add banner)

**Requirements**:
- Cookie consent banner at bottom of page
- Options: Essential, Analytics, Marketing
- "Accept All" / "Reject All" / "Customize" buttons
- Store user preferences in localStorage
- Respect user choice (disable analytics if rejected)
- Link to Cookie Policy

**Acceptance Criteria**:
- [ ] Banner shows on first visit
- [ ] Three toggle options: Essential (always on), Analytics, Marketing
- [ ] "Accept All" accepts all cookies
- [ ] "Reject All" only accepts essential
- [ ] "Customize" shows detailed preferences
- [ ] Preferences saved to localStorage
- [ ] Analytics scripts only load if accepted
- [ ] Link to full Cookie Policy

---

#### 16. Collapsible Active Sessions Section
**Category**: UI/UX - Settings
**Effort**: 1 hour
**Files**:
- `app/settings/page.tsx`
- `components/features/settings/ActiveSessions.tsx`

**Requirements**:
- Make "Active Sessions" section collapsible
- Start collapsed by default (show count)
- Expand to show session details
- Same for "Trusted Devices" section

**Acceptance Criteria**:
- [ ] Active Sessions section is collapsible
- [ ] Shows "Active Sessions (3)" when collapsed
- [ ] Expand/collapse icon (chevron)
- [ ] Smooth accordion animation
- [ ] State persisted during session (not across refreshes)
- [ ] Trusted Devices section also collapsible

---

### Existing High Priority Features (8 features)

### Backend (2 features)

#### 1. AI Personalization System
**Category**: AI Features  
**Effort**: 4 hours  
**Files**:
- `src/modules/ai/personalization.service.ts` (exists but needs enhancement)
- `src/modules/ai/ai.service.ts` (integrate personalization)

**Requirements**:
- Track user preferences (tone, detail level, topics)
- Learn from feedback (thumbs up/down)
- Adjust response style based on history
- Store preference profiles in UserPreferences entity

**Acceptance Criteria**:
- [ ] Preference tracking for tone/style
- [ ] Feedback integration for learning
- [ ] Personalized prompt generation
- [ ] A/B testing for response styles

---

#### 2. Growth Spurt Detection
**Category**: Analytics  
**Effort**: 3 hours  
**Files**:
- `src/modules/analytics/pattern-detection.service.ts` (new)
- `src/modules/analytics/analytics.service.ts` (integrate)

**Requirements**:
- Analyze feeding frequency patterns
- Detect sleep regression periods
- Identify growth spurt indicators
- Generate parent notifications

**Acceptance Criteria**:
- [ ] Feeding frequency spike detection (>20% increase)
- [ ] Sleep pattern disruption detection
- [ ] Growth spurt probability calculation
- [ ] Smart notification generation

---

### Frontend (4 features)

#### 3. AI Response Feedback UI
**Category**: AI Features  
**Effort**: 2 hours  
**Files**:
- `components/features/ai-chat/AIChatInterface.tsx` (modify)
- `components/features/ai-chat/MessageFeedback.tsx` (new)

**Requirements**:
- Thumbs up/down buttons on each AI message
- Optional feedback text input
- Visual confirmation on submission
- Integration with existing feedback API

**Acceptance Criteria**:
- [ ] Thumbs up/down buttons on assistant messages
- [ ] Feedback modal for additional comments
- [ ] Success toast on submission
- [ ] API integration with POST /feedback

**API Endpoints**: Already exists - `POST /feedback`

---

#### 4. Touch Target Verification
**Category**: Accessibility  
**Effort**: 3 hours  
**Files**: All interactive components

**Requirements**:
- Verify all buttons/links meet 44x44px (iOS) / 48x48dp (Android)
- Add padding where necessary
- Test on mobile devices
- Document exceptions

**Acceptance Criteria**:
- [ ] Audit all clickable elements
- [ ] Fix undersized touch targets
- [ ] Test on iOS simulator
- [ ] Test on Android emulator

---

#### 5. Alt Text for Images
**Category**: Accessibility  
**Effort**: 2 hours  
**Files**:
- `components/features/photos/PhotoGallery.tsx`
- `components/features/children/ChildCard.tsx`
- All components with images

**Requirements**:
- Add alt text to all images
- Use descriptive, meaningful text
- Support user-provided descriptions for photos
- Follow WCAG 2.1 guidelines

**Acceptance Criteria**:
- [ ] Alt text on all <img> tags
- [ ] Photo upload form includes alt text field
- [ ] Default alt text generation for child photos
- [ ] Screen reader testing

---

#### 6. Form Accessibility Enhancement
**Category**: Accessibility  
**Effort**: 2 hours  
**Files**:
- `components/common/forms/` (all form components)
- Activity tracking forms
- Settings forms

**Requirements**:
- Explicit label associations (htmlFor)
- Error message associations (aria-describedby)
- Required field indicators (aria-required)
- Form validation announcements

**Acceptance Criteria**:
- [ ] All inputs have associated labels
- [ ] Error messages linked with aria-describedby
- [ ] Required fields marked with aria-required
- [ ] Form submission errors announced

---

### Infrastructure (2 features)

#### 7. Docker Production Images
**Category**: Deployment  
**Effort**: 3 hours  
**Files**:
- `maternal-app-backend/Dockerfile.production` (new)
- `maternal-web/Dockerfile.production` (new)
- `docker-compose.production.yml` (new)

**Requirements**:
- Multi-stage builds for optimization
- Security scanning in CI/CD
- Non-root user execution
- Minimal base images (Alpine)
- Layer caching optimization

**Acceptance Criteria**:
- [ ] Backend Dockerfile with multi-stage build
- [ ] Frontend Dockerfile with Next.js optimization
- [ ] Image size < 200MB for backend, < 150MB for frontend
- [ ] Security scan passes (Trivy/Snyk)

---

#### 8. Integration & E2E Testing
**Category**: Testing  
**Effort**: 12 hours  
**Priority**: High

**Requirements**:
- Integration tests for API flows
- E2E tests for critical user journeys
- Test coverage reports
- CI/CD integration

**Files to Create**:
- `test/integration/` (multiple test files)
- `test/e2e/` (Playwright/Cypress tests)

**Acceptance Criteria**:
- [ ] Integration tests for auth flow
- [ ] Integration tests for activity tracking
- [ ] E2E test: User registration to first activity
- [ ] E2E test: AI chat conversation
- [ ] E2E test: Family invitation flow
- [ ] Coverage reports in CI/CD

**Testing Tools**:
- Jest (integration tests)
- Playwright or Cypress (E2E tests)
- Coverage: Jest + Istanbul

---

## 🟡 MEDIUM PRIORITY (18 Features)

### Backend Features (10 features)

#### 9. Meal Planning System
**Category**: Tracking Features  
**Effort**: 8 hours  

**Requirements**:
- Weekly meal planning interface
- Recipe suggestions by age group
- Nutritional tracking
- Shopping list generation
- Family meal coordination

**Files to Create**:
- `src/modules/meal-planning/meal-planning.module.ts`
- `src/modules/meal-planning/meal-planning.service.ts`
- `src/modules/meal-planning/meal-planning.controller.ts`
- `src/database/entities/meal-plan.entity.ts`

---

#### 10. Financial Tracking
**Category**: Tracking Features  
**Effort**: 6 hours  

**Requirements**:
- Track child-related expenses
- Budget planning
- Cost per child reports
- Category breakdown
- Monthly summaries

---

#### 11. Calendar Integration
**Category**: Integrations  
**Effort**: 6 hours  

**Requirements**:
- Google Calendar sync
- Apple Calendar sync (CalDAV)
- Outlook Calendar sync
- Appointment tracking
- Reminder sync

---

#### 12. Smart Home Integration
**Category**: Integrations  
**Effort**: 8 hours  

**Requirements**:
- Alexa skill for voice tracking
- Google Home actions
- Voice commands for common activities
- Voice query responses

---

#### 13. Email Digests
**Category**: Notifications  
**Effort**: 4 hours  

**Requirements**:
- Daily/weekly email summaries
- Activity highlights
- Pattern insights
- Customizable frequency

---

#### 14. Photo Tagging System
**Category**: Photos  
**Effort**: 4 hours  

**Requirements**:
- Tag people in photos
- Tag activities/events
- Tag milestones
- Search photos by tags

---

#### 15. Advanced Export Formats
**Category**: Analytics  
**Effort**: 3 hours  

**Requirements**:
- Export to CSV
- Export to JSON
- Generate PDF reports
- Custom date ranges
- Multi-child exports

---

#### 16. Medication Reminders Enhanced
**Category**: Notifications  
**Effort**: 3 hours  

**Requirements**:
- Recurring medication schedules
- Dosage tracking
- Refill reminders
- Multiple medications per child

---

#### 17. GraphQL Subscriptions
**Category**: API Enhancement  
**Effort**: 4 hours  

**Requirements**:
- Real-time data updates via GraphQL subscriptions
- Activity creation subscriptions
- Family sync subscriptions
- Notification subscriptions

---

#### 18. Voice Suggested Prompts
**Category**: Voice Features  
**Effort**: 2 hours  

**Requirements**:
- Context-aware voice suggestions
- Common phrase templates
- Recent activity suggestions
- Time-based suggestions

---

### Frontend Features (6 features)

#### 19. Suggested Follow-Up Questions (AI Chat)
**Category**: AI UX  
**Effort**: 3 hours  

**Requirements**:
- Quick reply buttons in AI chat
- Context-aware suggestions
- 3-5 suggestions per response
- One-tap to ask follow-up

---

#### 20. Meal Planning UI
**Category**: Tracking Features  
**Effort**: 6 hours  

**Requirements**:
- Weekly calendar view
- Recipe cards
- Drag-and-drop meal assignment
- Shopping list view
- Nutritional summaries

---

#### 21. Financial Tracking UI
**Category**: Tracking Features  
**Effort**: 5 hours  

**Requirements**:
- Expense entry form
- Budget dashboard
- Category breakdown charts
- Monthly reports
- Export functionality

---

#### 22. Photo Tagging UI
**Category**: Photos  
**Effort**: 4 hours  

**Requirements**:
- Tag input on photo view
- Auto-complete for existing tags
- Tag filtering in gallery
- Bulk tagging support

---

#### 23. Community Forums UI (Post-MVP)
**Category**: Social Features  
**Effort**: 8 hours  

**Requirements**:
- Topic-based discussion forums
- Post creation/editing
- Comment threading
- Moderation tools
- Topic subscriptions

---

#### 24. Calendar Integration UI
**Category**: Integrations  
**Effort**: 4 hours  

**Requirements**:
- Calendar connection settings
- Event sync status
- Appointment list view
- Sync conflict resolution UI

---

### Infrastructure (2 features)

#### 25. Performance Monitoring Dashboard
**Category**: Monitoring  
**Effort**: 4 hours  

**Requirements**:
- Visualization of request duration metrics
- Slow query dashboard
- Cache hit/miss rates
- Error rate tracking
- Real-time updates

---

#### 26. Load Testing
**Category**: Testing  
**Effort**: 6 hours  

**Requirements**:
- k6 or Artillery setup
- API load testing
- Database stress testing
- WebSocket load testing

---

## 🟢 LOW PRIORITY - Post-MVP (40 Features)

### Backend Features (18 features)

27. Community Forums Backend
28. Advanced Pattern Recognition
29. Vaccination Tracking
30. Multi-Language Content Translation
31. Advanced Voice Features
32. AI Training Data Export
33. Third-Party Integrations (Fitbit, Apple Health)
34. Telemedicine Integration
35. School/Daycare Integration
36. Advanced Analytics (peer comparison)
37. Gamification System
38. Advanced Notifications (smart timing)
39. Data Science Features (predictive modeling)
40. Video Storage
41. Advanced Security (E2E encryption)
42. Performance Optimization (CDN, caching)
43. Microservices Architecture
44. Multi-Tenancy Support

---

### Frontend Features (15 features)

45. Advanced Data Visualization (D3.js)
46. Offline Mode Enhancements
47. Advanced Accessibility (high contrast, reduced motion)
48. Animations & Micro-interactions
49. Customization Features (themes)
50. Multi-Child Views (side-by-side)
51. Advanced Search
52. Sharing Features
53. Tutorial System
54. Voice UI Enhancements
55. Notification Center
56. Quick Actions Dashboard
57. Profile Customization
58. Advanced Settings

---

### Infrastructure & Testing (7 features)

59. Code Coverage Dashboard
60. Blue-Green Deployment
61. Mobile App Store Distribution
62. Fastlane Automation
63. TestFlight & Beta Distribution
64. CodePush OTA Updates
65. Advanced Monitoring (APM)
66. Security Auditing

---

## 📋 Implementation Checklist

### Next Steps (Recommended Order)

**Week 1-2: High Priority UX Polish**
- [ ] AI Response Feedback UI (2h)
- [ ] Touch Target Verification (3h)
- [ ] Alt Text for Images (2h)
- [ ] Form Accessibility Enhancement (2h)

**Week 3-4: Infrastructure Hardening**
- [ ] Docker Production Images (3h)
- [ ] Integration & E2E Testing (12h)

**Week 5-6: Medium Priority Features**
- [ ] Growth Spurt Detection (3h)
- [ ] AI Personalization System (4h)
- [ ] Suggested Follow-Up Questions (3h)

**Week 7-8: Post-MVP Planning**
- [ ] Meal Planning System (8h backend + 6h frontend)
- [ ] Financial Tracking (6h backend + 5h frontend)

---

## 📊 Pre-Launch Checklist

- ✅ Unit test coverage > 80%
- ⏳ Integration test coverage > 60% (current: 0%)
- ⏳ E2E test coverage for critical paths (current: 0%)
- ✅ WCAG 2.1 AA compliance (Phase 1)
- ✅ Security scan passed
- ✅ Performance budget met
- ✅ COPPA/GDPR compliance verified
- ⏳ Load testing completed (not yet)
- ⏳ Mobile app store ready (post-MVP)

---

## 🔗 Related Documentation

- **Main Plan**: [implementation-gaps.md](./implementation-gaps.md)
- **API Spec**: [maternal-app-api-spec.md](./maternal-app-api-spec.md)
- **Tech Stack**: [maternal-app-tech-stack.md](./maternal-app-tech-stack.md)
- **Testing Strategy**: [maternal-app-testing-strategy.md](./maternal-app-testing-strategy.md)
- **Accessibility Progress**: [ACCESSIBILITY_PROGRESS.md](./ACCESSIBILITY_PROGRESS.md)
- **Backup Strategy**: [BACKUP_STRATEGY.md](./BACKUP_STRATEGY.md)

---

**Last Updated**: October 3, 2025  
**Next Review**: Weekly during active development
