normogen/docs/product/ROADMAP.md
goose 17efc4f656 docs: reconcile documentation with reality (P3)
Make the project's documentation match the code and remove the sprawl. The docs
claimed Phase 2.8 (drug interactions) was 'planning/0%' and the backend '~91%
complete' — both wrong: 2.8 is implemented and live, plus the P0/P1 security
and test work is done. Five root CI/CD docs described a 'docker-build' CI job
that was removed; ~18 backend/ status snapshots and ~24 docs/implementation
duplicates cluttered the tree.

Deletions (85 files):
- Root: 4 stale CI/CD reports (CI-CD-{COMPLETION-REPORT,IMPLEMENTATION-SUMMARY,
  STATUS-REPORT,FINAL-STATUS}.md) — all describe the removed docker-build job.
- backend/: 18 phase/build/fix snapshots and code-dump .txt files.
- docs/: the 3 one-time reorg reports; ~17 docs/implementation duplicates and
  process artifacts; 4 stale docs/development CI docs + git snapshots;
  redundant deployment/testing files.
- thoughts/: STATUS.md (said Phase 2.4 in-progress), superseded phase notes and
  duplicative research inputs. tmp/ (928KB of CI debug logs, gitignored).

Moves (18 files):
- 9 genuine decision records -> docs/adr/ (Architecture Decision Records),
  date-prefixes stripped, with an index README.
- 8 historical-but-valuable phase plans/specs + the old CI-CD-FINAL-SOLUTION ->
  docs/archive/ (now-populated, with a README explaining it's superseded
  material). thoughts/ tree removed.

Rewrites (13 files) to match reality:
- Drop the fake '% complete' figures everywhere in favor of Implemented /
  In-Progress / Planned with concrete endpoint/feature lists.
- Phase 2.8 -> Implemented; add /api/interactions/* and /api/auth/{refresh,
  logout} to the endpoint lists; fix 'Rust 1.93' -> edition 2021.
- Add a Security section (token_version validation, hashed refresh-token
  persistence, fail-fast config, real-IP audit) and correct the test-coverage
  and deployment claims to reality.
- New canonical docs/development/CI-CD.md (4 jobs: format/clippy/build/test,
  mongo service, no docker-build + why).
- README, docs/README, product/{STATUS,ROADMAP,PROGRESS,README,introduction},
  implementation/README, development/README, testing/README, AI_AGENT_GUIDE,
  .cursorrules, .gooserules all updated.

Verified: greps for 'Phase 2.8 (Planning)', 'PLANNING (0%)', 'Rust 1.93',
'91%/10%/85% complete', and 'docker-build' return nothing outside docs/archive;
all internal doc links resolve; backend/src untouched (cargo build clean).
2026-06-27 16:02:16 -03:00

266 lines
7.5 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Normogen Development Roadmap
## Phase 1: Foundation ✅ COMPLETE
**Timeline**: 2025-Q4
**Status**: 100% Complete
### Completed Features
- ✅ User authentication (JWT)
- ✅ Basic profiles
- ✅ Database setup (MongoDB 7.0)
- ✅ Security infrastructure
- ✅ Docker deployment
- ✅ CI/CD pipeline
---
## Phase 2: Core Backend Development ✅ IMPLEMENTED
### Phase 2.1-2.5 ✅ IMPLEMENTED
**Timeline**: 2025-Q4 to 2026-02-15
#### Completed Features
- ✅ User management
- ✅ Profile management
- ✅ Basic security (JWT, PBKDF2)
- ✅ Session management
- ✅ Permission-based access control
- ✅ Share management system
- ✅ Password recovery (zero-knowledge phrases)
---
### Phase 2.6 ✅ IMPLEMENTED
**Timeline**: Completed 2026-02-20
#### Completed Features
- ✅ Enhanced security
- ✅ Audit logging
- ✅ Session management (list, revoke)
- ✅ Account lockout policies
#### Still Open
- 📋 Rate limiting (middleware is a stub — deferred)
---
### Phase 2.7 ✅ IMPLEMENTED
**Timeline**: Started 2026-02-20, Completed 2026-03-08
#### Completed Features ✅
- ✅ Medication management (CRUD operations)
- ✅ Medication adherence tracking
- ✅ Health statistics tracking (weight, BP, etc.)
- ✅ Lab results storage
- ✅ OpenFDA integration for drug data
---
### Phase 2.8 ✅ IMPLEMENTED (core)
**Timeline**: Drug interaction checking implemented.
#### Implemented ✅
-**Drug interaction checking** - `/api/interactions/check` + `/check-new`, ingredient mapper, interaction service
#### Not Yet Started (stretch)
- 🔔 **Automated reminder system** - Medication and appointment reminders
- 📊 **Advanced health analytics** - Trend analysis and insights
- 📄 **Healthcare data export** - Export to FHIR, HL7 formats
- 💊 **Medication refill tracking** - Track supply and refill reminders
- ⚙️ **User preferences** - Notification settings, display preferences
- 👥 **Caregiver access** - Grant limited access to caregivers
---
### P0/P1 Security + Tests ✅ IMPLEMENTED
- ✅ token_version validation, hashed refresh-token persistence, `/refresh` + `/logout`
- ✅ Fail-fast config (`APP_ENVIRONMENT`), real client-IP audit logging
- ✅ Handler `.unwrap()` cleanup; integration tests rewritten against a test DB
---
## Phase 3: Frontend Development 🔮 PLANNED
### Phase 3.1: Frontend Foundation 🔮 PLANNED
**Timeline**: Q2 2026 (estimated)
#### Planned Features
- 🔮 Complete React app setup
- 🔮 Authentication flow (login, register, logout)
- 🔮 Protected routes
- 🔮 API service layer (axios)
- 🔮 State management (Zustand)
- 🔮 Basic UI components (Material-UI)
**Status**: 10% complete - Basic structure exists
---
### Phase 3.2: Core Features 🔮 PLANNED
**Timeline**: Q2 2026 (estimated)
#### Planned Features
- 🔮 Dashboard with health overview
- 🔮 Medication management UI (add, edit, delete)
- 🔮 Health statistics visualization (charts, graphs)
- 🔮 Lab results viewer
- 🔮 Profile and settings pages
- 🔮 Data export functionality
---
### Phase 3.3: Advanced Features 🔮 PLANNED
**Timeline**: Q3 2026 (estimated)
#### Planned Features
- 🔮 Medication reminders UI
- 🔮 Notification center
- 🔮 Caregiver access management
- 🔮 Data sharing interface
- 🔮 Advanced analytics dashboard
---
## Phase 4: Advanced Features (Future) 🔮
### Phase 4.1: Mobile Optimization 🔮 FUTURE
**Timeline**: Q4 2026 (estimated)
#### Planned Features
- 🔮 Mobile app backend optimization
- 🔮 Push notification system
- 🔮 Offline sync
- 🔮 Biometric authentication (fingerprint, face ID)
---
### Phase 4.2: Integration 🔮 FUTURE
**Timeline**: 2027 (estimated)
#### Planned Features
- 🔮 Wearable device integration (Apple Health, Google Fit)
- 🔮 EHR system integration (Epic, Cerner)
- 🔮 Pharmacy APIs (pill identification, refill alerts)
- 🔮 Telehealth integration
- 🔮 Lab result import (direct from labs)
---
### Phase 4.3: AI/ML Features 🔮 FUTURE
**Timeline**: 2027 (estimated)
#### Planned Features
- 🔮 Symptom prediction (based on trends)
- 🔮 Medication optimization (timing, interactions)
- 🔮 Health risk scoring
- 🔮 Personalized recommendations
- 🔮 Anomaly detection (unusual health patterns)
---
### Phase 4.4: Enterprise Features 🔮 FUTURE
**Timeline**: 2027+ (estimated)
#### Planned Features
- 🔮 Multi-tenant support (for healthcare providers)
- 🔮 Healthcare provider portal
- 🔮 Advanced analytics dashboard
- 🔮 Compliance tools (HIPAA, GDPR)
- 🔮 Audit reporting
- 🔮 Bulk data export/import
---
## Phase 5: Scale & Polish (Future) 🔮
### Phase 5.1: Performance 🔮 FUTURE
**Timeline**: 2027+ (estimated)
#### Planned Features
- 🔮 Caching layer (Redis)
- 🔮 Database optimization (indexing, sharding)
- 🔮 CDN integration (static assets)
- 🔮 Load balancing (multiple backend instances)
- 🔮 Database replication (high availability)
---
### Phase 5.2: Internationalization 🔮 FUTURE
**Timeline**: 2027+ (estimated)
#### Planned Features
- 🔮 Multi-language support (i18n)
- 🔮 Regional medication databases
- 🔮 Currency and localization
- 🔮 Compliance by region (GDPR, HIPAA, etc.)
- 🔮 Time zone handling
---
## Current Status
**Backend**: Phase 2.x feature-complete (through drug interactions); security-hardened; deployed on Solaria.
**Frontend**: Early stage (Login/Register + API/store layer; router not yet wired).
**Database**: MongoDB 7.0
**Deployment**: Docker on Solaria (image built manually — not in CI).
**Tests**: 18 unit + 13 integration (auth + medication), CI-gated with MongoDB.
---
## Technology Stack
### Backend ✅
- **Language**: Rust (edition 2021)
- **Framework**: Axum 0.7 (async web framework)
- **Database**: MongoDB 7.0
- **Authentication**: JWT — access (default 15 min) + hashed/rotated refresh tokens (default 7 days, persisted in Mongo)
- **Security**: PBKDF2 (100K iterations); `token_version` invalidation; account lockout; audit logging with real client-IP resolution
- **Deployment**: Docker, Docker Compose (image built manually)
- **CI/CD**: Forgejo Actions (format / clippy / build / test)
### Frontend 🚧
- **Framework**: React 19.2.4 + TypeScript 4.9.5 (Create React App)
- **UI Library**: Material-UI (MUI) 7.3.9
- **State Management**: Zustand 5.0.11
- **HTTP Client**: Axios 1.13.6
- **Charts**: Recharts 3.8.0, MUI X-Charts 8.27.4
- **Status**: Early — Login/Register + API/store layer; router not yet wired.
---
## Estimated Timeline
| Phase | Start | End | Duration | Status |
|-------|-------|-----|----------|--------|
| Phase 1 | 2025-Q4 | 2025-Q4 | 3 months | ✅ Implemented |
| Phase 2.1-2.5 | 2025-Q4 | 2026-02-15 | 3 months | ✅ Implemented |
| Phase 2.6 | 2026-02-15 | 2026-02-20 | 1 week | ✅ Implemented |
| Phase 2.7 | 2026-02-20 | 2026-03-08 | 2 weeks | ✅ Implemented |
| Phase 2.8 | 2026-03 | — | — | ✅ Implemented (core) |
| P0/P1 Security + Tests | 2026-06 | — | — | ✅ Implemented |
| Phase 3 | TBD | TBD | 3-4 months | 🚧 Next (frontend) |
| Phase 4 | TBD | TBD | 6-12 months | 🔮 Future |
---
## Milestones
### ✅ Completed
- ✅ Foundation (2025-Q4)
- ✅ Core Features — Phases 2.12.5 (2026-02-15)
- ✅ Security Hardening — Phase 2.6 (2026-02-20)
- ✅ Health Data Features — Phase 2.7 (2026-03-08)
- ✅ Drug Interactions — Phase 2.8 core
- ✅ P0/P1 Security + Test rewrite
### 🚧 Up Next
- 🚧 Frontend (Phase 3)
### 🔮 Future
- 🔮 Phase 2.8 stretch (reminders, analytics, export, caregiver access)
- 🔮 Mobile Apps (Phase 4)
- 🔮 AI/ML Features (Phase 5)
---
*Last Updated: 2026-06-27*