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).
This commit is contained in:
goose 2026-06-27 16:02:16 -03:00
parent bd1b7c2925
commit 17efc4f656
119 changed files with 469 additions and 17801 deletions

View file

@ -14,9 +14,9 @@
---
## Phase 2: Core Backend Development 🚧 91% COMPLETE
## Phase 2: Core Backend Development ✅ IMPLEMENTED
### Phase 2.1-2.5 ✅ COMPLETE (100%)
### Phase 2.1-2.5 ✅ IMPLEMENTED
**Timeline**: 2025-Q4 to 2026-02-15
#### Completed Features
@ -30,19 +30,21 @@
---
### Phase 2.6 ✅ COMPLETE (100%)
### Phase 2.6 ✅ IMPLEMENTED
**Timeline**: Completed 2026-02-20
#### Completed Features
- ✅ Enhanced security
- ✅ Audit logging
- ✅ Rate limiting (tower-governor)
- ✅ Session management (list, revoke)
- ✅ Account lockout policies
#### Still Open
- 📋 Rate limiting (middleware is a stub — deferred)
---
### Phase 2.7 🚧 91% COMPLETE
### Phase 2.7 ✅ IMPLEMENTED
**Timeline**: Started 2026-02-20, Completed 2026-03-08
#### Completed Features ✅
@ -51,22 +53,16 @@
- ✅ Health statistics tracking (weight, BP, etc.)
- ✅ Lab results storage
- ✅ OpenFDA integration for drug data
- ✅ Comprehensive test coverage
#### In Progress 🚧
- 🚧 Full integration testing
- 🚧 Documentation updates
#### Moved to Phase 2.8 📋
- 📋 Drug interaction checking (will use new interactions handler)
---
### Phase 2.8 🎯 IN PLANNING
**Timeline**: Estimated 2-3 weeks (Starting 2026-03-10)
### Phase 2.8 ✅ IMPLEMENTED (core)
**Timeline**: Drug interaction checking implemented.
#### Planned Features
- ⚠️ **Drug interaction checking** - Check interactions between medications
#### 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
@ -74,8 +70,12 @@
- ⚙️ **User preferences** - Notification settings, display preferences
- 👥 **Caregiver access** - Grant limited access to caregivers
**Estimated Duration**: 2-3 weeks
**Prerequisites**: Phase 2.7 completion (91% done)
---
### 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
---
@ -199,34 +199,32 @@
## Current Status
**Active Phase**: Phase 2.8 - Drug Interactions & Advanced Features
**Progress**: 91% (Phase 2), 10% (Phase 3)
**Backend**: Production-ready for most features
**Frontend**: Early development stage
**Database**: MongoDB 7.0
**Deployment**: Docker on Solaria
**Test Coverage**: 85%
**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 1.93
- **Language**: Rust (edition 2021)
- **Framework**: Axum 0.7 (async web framework)
- **Database**: MongoDB 7.0
- **Authentication**: JWT (15min access, 30day refresh)
- **Security**: PBKDF2 (100K iterations), rate limiting
- **Deployment**: Docker, Docker Compose
- **CI/CD**: Forgejo Actions
- **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
### 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**: 10% complete
- **Status**: Early — Login/Register + API/store layer; router not yet wired.
---
@ -234,33 +232,35 @@
| Phase | Start | End | Duration | Status |
|-------|-------|-----|----------|--------|
| Phase 1 | 2025-Q4 | 2025-Q4 | 3 months | ✅ Complete |
| Phase 2.1-2.5 | 2025-Q4 | 2026-02-15 | 3 months | ✅ Complete |
| Phase 2.6 | 2026-02-15 | 2026-02-20 | 1 week | ✅ Complete |
| Phase 2.7 | 2026-02-20 | 2026-03-08 | 2 weeks | 🚧 91% |
| Phase 2.8 | 2026-03-10 | ~2026-03-31 | 2-3 weeks | 📋 Planned |
| Phase 3 | 2026-Q2 | 2026-Q3 | 3-4 months | 🔮 Planned |
| Phase 4 | 2026-Q4 | 2027 | 6-12 months | 🔮 Future |
| 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
- ✅ **Milestone 1**: Foundation (2025-Q4)
- ✅ **Milestone 2**: Core Features (2026-02-15)
- ✅ **Milestone 3**: Security Hardening (2026-02-20)
- ✅ **Milestone 4**: Health Data Features (2026-03-08, 91%)
- ✅ 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
- 📋 **Milestone 5**: Drug Interactions & Advanced Features (2026-03-31)
### 🚧 Up Next
- 🚧 Frontend (Phase 3)
### 🔮 Future
- 🔮 **Milestone 6**: Frontend Complete (2026-Q3)
- 🔮 **Milestone 7**: Mobile Apps (2026-Q4)
- 🔮 **Milestone 8**: AI/ML Features (2027)
- 🔮 Phase 2.8 stretch (reminders, analytics, export, caregiver access)
- 🔮 Mobile Apps (Phase 4)
- 🔮 AI/ML Features (Phase 5)
---
*Last Updated: 2026-03-09*
*Next Review: After Phase 2.8 completion*
*Last Updated: 2026-06-27*