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:
parent
bd1b7c2925
commit
17efc4f656
119 changed files with 469 additions and 17801 deletions
|
|
@ -1,21 +1,22 @@
|
|||
# Development Progress Dashboard
|
||||
|
||||
**Last Updated**: 2026-03-09 10:43:00 UTC
|
||||
**Last Updated**: 2026-06-27
|
||||
|
||||
> This dashboard uses qualitative status (Implemented / In Progress / Planned)
|
||||
> rather than percentage estimates. For the authoritative breakdown see
|
||||
> [STATUS.md](./STATUS.md).
|
||||
|
||||
---
|
||||
|
||||
## 📊 Overall Progress
|
||||
## 📊 Overall Status
|
||||
|
||||
```
|
||||
████████████████████████████████████████████░░░░░░░░ 75% Complete
|
||||
```
|
||||
|
||||
| Component | Progress | Status | Updated |
|
||||
|-----------|----------|--------|---------|
|
||||
| **Backend** | ████████████████████████████████████░░ 91% | 🚧 Active | 2026-03-08 |
|
||||
| **Frontend** | █████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 10% | 🚧 Early | 2026-03-01 |
|
||||
| **Testing** | ████████████████████████████████░░░░░ 85% | ✅ Good | 2026-03-08 |
|
||||
| **Deployment** | ████████████████████████████████████ 100% | ✅ Ready | 2026-02-20 |
|
||||
| Area | Status |
|
||||
|------|--------|
|
||||
| **Backend** | ✅ Phase 2.x feature-complete (through drug interactions); deployed on Solaria. |
|
||||
| **Security** | ✅ Hardening pass complete (token-version validation, hashed refresh tokens, fail-fast config, real-IP audit). |
|
||||
| **Tests** | ✅ 18 unit + 13 integration (auth + medication), CI-gated with MongoDB. |
|
||||
| **Frontend** | 🚧 Early — Login/Register + API/store layer; router not yet wired. |
|
||||
| **Deployment** | 🚧 Operational on Solaria; Docker image built manually (not in CI). |
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -39,19 +40,13 @@
|
|||
|
||||
---
|
||||
|
||||
### Phase 2: Backend Development 🚧 91%
|
||||
```
|
||||
█████████████████████████████████████████████░░░░░ 91%
|
||||
```
|
||||
### Phase 2: Backend Development ✅ IMPLEMENTED
|
||||
|
||||
**Started**: 2025-Q4
|
||||
**Estimated Completion**: 2026-03-31
|
||||
**Current Phase**: 2.8 - Drug Interactions
|
||||
**Started**: 2025-Q4
|
||||
**Status**: All planned 2.x phases implemented (including drug interactions).
|
||||
**Open follow-ups**: rate limiting (stub), reminders/analytics/export (Phase 2.8 stretch items), frontend.
|
||||
|
||||
#### Phase 2.1-2.5 ✅ 100%
|
||||
```
|
||||
██████████████████████████████████████████████████ 100%
|
||||
```
|
||||
#### Phase 2.1-2.5 ✅ Implemented
|
||||
|
||||
**Completed**: 2026-02-15
|
||||
|
||||
|
|
@ -62,22 +57,16 @@
|
|||
- [x] Permission-based access control
|
||||
- [x] Share management
|
||||
|
||||
#### Phase 2.6 ✅ 100%
|
||||
```
|
||||
██████████████████████████████████████████████████ 100%
|
||||
```
|
||||
#### Phase 2.6 ✅ Implemented
|
||||
|
||||
**Completed**: 2026-02-20
|
||||
|
||||
- [x] Rate limiting
|
||||
- [x] Account lockout policies
|
||||
- [x] Security audit logging
|
||||
- [x] Session management
|
||||
- [ ] Rate limiting (middleware is a stub — deferred)
|
||||
|
||||
#### Phase 2.7 🚧 91%
|
||||
```
|
||||
█████████████████████████████████████████████░░░░░ 91%
|
||||
```
|
||||
#### Phase 2.7 ✅ Implemented
|
||||
|
||||
**Completed**: 2026-03-08
|
||||
|
||||
|
|
@ -86,23 +75,21 @@
|
|||
- [x] Health statistics tracking
|
||||
- [x] Lab results storage
|
||||
- [x] OpenFDA integration
|
||||
- [x] Comprehensive testing
|
||||
- [ ] Full integration testing (9%)
|
||||
|
||||
#### Phase 2.8 📋 0%
|
||||
```
|
||||
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0%
|
||||
```
|
||||
#### Phase 2.8 ✅ Implemented (core)
|
||||
|
||||
**Planned**: 2026-03-10 to 2026-03-31 (2-3 weeks)
|
||||
- [x] Drug interaction checking (`/api/interactions/check`, `/check-new`)
|
||||
- [ ] Automated reminder system *(not started)*
|
||||
- [ ] Advanced health analytics *(not started)*
|
||||
- [ ] Healthcare data export (FHIR, HL7) *(not started)*
|
||||
- [ ] Medication refill tracking *(not started)*
|
||||
- [ ] Caregiver access *(not started)*
|
||||
|
||||
- [ ] Drug interaction checking
|
||||
- [ ] Automated reminder system
|
||||
- [ ] Advanced health analytics
|
||||
- [ ] Healthcare data export (FHIR, HL7)
|
||||
- [ ] Medication refill tracking
|
||||
- [ ] User preferences
|
||||
- [ ] Caregiver access
|
||||
#### P0/P1 Security + Tests ✅ Implemented
|
||||
|
||||
- [x] token_version validation, hashed refresh-token persistence, `/refresh` + `/logout`
|
||||
- [x] Fail-fast config (`APP_ENVIRONMENT`), real client-IP audit
|
||||
- [x] Handler `.unwrap()` cleanup; integration tests rewritten against a test DB
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -221,10 +208,9 @@
|
|||
- [x] Revoke session
|
||||
- [x] Revoke all sessions
|
||||
|
||||
### Drug Interactions 📋 0%
|
||||
- [ ] Check interactions
|
||||
- [ ] Check new medication
|
||||
- [ ] Get interaction details
|
||||
### Drug Interactions ✅ Implemented
|
||||
- [x] Check interactions (`POST /api/interactions/check`)
|
||||
- [x] Check new medication (`POST /api/interactions/check-new`)
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -232,61 +218,59 @@
|
|||
|
||||
| Handler | Status | Endpoints | Coverage |
|
||||
|---------|--------|-----------|----------|
|
||||
| **auth** | ✅ Complete | 5 | 100% |
|
||||
| **users** | ✅ Complete | 6 | 100% |
|
||||
| **medications** | ✅ Complete | 7 | 100% |
|
||||
| **health_stats** | ✅ Complete | 6 | 100% |
|
||||
| **lab_results** | ✅ Complete | 6 | 100% |
|
||||
| **shares** | ✅ Complete | 4 | 100% |
|
||||
| **permissions** | ✅ Complete | 1 | 100% |
|
||||
| **sessions** | ✅ Complete | 3 | 100% |
|
||||
| **interactions** | 📋 Planned | 2 | 0% |
|
||||
| **health** | ✅ Complete | 1 | 100% |
|
||||
| **auth** | ✅ Complete | 6 (incl. refresh, logout) | implemented |
|
||||
| **users** | ✅ Complete | 6 | implemented |
|
||||
| **medications** | ✅ Complete | 7 | implemented |
|
||||
| **health_stats** | ✅ Complete | 6 | implemented |
|
||||
| **lab_results** | ✅ Complete | 6 | implemented |
|
||||
| **shares** | ✅ Complete | 4 | implemented |
|
||||
| **permissions** | ✅ Complete | 1 | implemented |
|
||||
| **sessions** | ✅ Complete | 3 | implemented |
|
||||
| **interactions** | ✅ Complete | 2 | implemented |
|
||||
| **health** | ✅ Complete | 1 | implemented |
|
||||
|
||||
**Total**: 41 endpoints implemented, 2 planned
|
||||
**Total**: 41 endpoints implemented.
|
||||
|
||||
---
|
||||
|
||||
## Test Coverage
|
||||
|
||||
### Backend Tests
|
||||
- **Unit tests**: 90% coverage
|
||||
- **Integration tests**: 85% coverage
|
||||
- **API endpoint tests**: 95% coverage
|
||||
- **Security tests**: 80% coverage
|
||||
- **Unit tests**: 18 tests (`cargo test --lib`) — client-IP, JWT, refresh hashing, token-version cache, services.
|
||||
- **Integration tests**: 13 tests (`cargo test --test auth_tests --test medication_tests`) — in-process against an isolated test DB; cover auth, refresh rotation, logout, password-change invalidation, medication CRUD.
|
||||
|
||||
### Frontend Tests
|
||||
- **Unit tests**: 20% coverage (early stage)
|
||||
- **Integration tests**: 0% (not started)
|
||||
- **E2E tests**: 0% (planned)
|
||||
- Not started (frontend itself is early stage).
|
||||
|
||||
---
|
||||
|
||||
## Milestones
|
||||
|
||||
### ✅ Completed
|
||||
1. ✅ **Milestone 1**: Foundation (2025-Q4)
|
||||
2. ✅ **Milestone 2**: Core Features (2026-02-15)
|
||||
3. ✅ **Milestone 3**: Security Hardening (2026-02-20)
|
||||
4. ✅ **Milestone 4**: Health Data Features (2026-03-08, 91%)
|
||||
1. ✅ Foundation (2025-Q4)
|
||||
2. ✅ Core Features — Phases 2.1–2.5 (2026-02-15)
|
||||
3. ✅ Security Hardening — Phase 2.6 (2026-02-20)
|
||||
4. ✅ Health Data Features — Phase 2.7 (2026-03-08)
|
||||
5. ✅ Drug Interactions — Phase 2.8 (core)
|
||||
6. ✅ P0/P1 Security + Test rewrite
|
||||
|
||||
### 🎯 Up Next
|
||||
5. 📋 **Milestone 5**: Drug Interactions & Advanced Features (2026-03-31)
|
||||
### 🚧 Up Next
|
||||
7. 🚧 **Phase 3 — Frontend**: wire router, build dashboard + feature UIs.
|
||||
|
||||
### 🔮 Future
|
||||
6. 🔮 **Milestone 6**: Frontend Complete (2026-Q3)
|
||||
7. 🔮 **Milestone 7**: Mobile Apps (2026-Q4)
|
||||
8. 🔮 **Milestone 8**: AI/ML Features (2027)
|
||||
8. 🔮 Phase 2.8 stretch: reminders, analytics, export, caregiver access.
|
||||
9. 🔮 Phase 4 — Mobile apps.
|
||||
10. 🔮 Phase 5 — Integrations, AI/ML.
|
||||
|
||||
---
|
||||
|
||||
## Timeline Visualization
|
||||
|
||||
```
|
||||
2025-Q4 2026-02 2026-03 2026-Q2 2026-Q3 2027
|
||||
2025-Q4 2026-02 2026-03 2026-06 next later
|
||||
├──────────┼──────────┼──────────┼──────────┼──────────┼──
|
||||
Phase 1 2.1-2.5 2.6-2.7 2.8 Phase 3 Phase 4
|
||||
(100%) (100%) (91%) (0%) (0%) (0%)
|
||||
Phase 1 2.1-2.5 2.6-2.7 2.8 + Phase 3 Phase 4/5
|
||||
+P0/P1 security frontend
|
||||
```
|
||||
|
||||
---
|
||||
|
|
@ -300,7 +284,8 @@ tokio = "1.41.1"
|
|||
mongodb = "2.8.2"
|
||||
jsonwebtoken = "9.3.1"
|
||||
reqwest = "0.12.28"
|
||||
tower-governor = "0.4.3"
|
||||
pbkdf2 = "0.12.2"
|
||||
sha2 = "0.10" # refresh-token hashing
|
||||
```
|
||||
|
||||
### Frontend (TypeScript/React)
|
||||
|
|
@ -319,26 +304,20 @@ tower-governor = "0.4.3"
|
|||
|
||||
## Next Steps
|
||||
|
||||
### Immediate (This Week)
|
||||
1. ✅ Update STATUS.md with current progress
|
||||
2. ✅ Align ROADMAP.md with STATUS
|
||||
3. ✅ Expand README.md with quick start
|
||||
4. 📋 Start Phase 2.8 implementation
|
||||
### Immediate
|
||||
1. 🚧 **Phase 3 — Frontend**: wire the React Router, build the dashboard and feature UIs.
|
||||
2. 📋 Rate limiting (the middleware is currently a stub).
|
||||
3. 📋 Env-var/port convention cleanup across `.env` / docker-compose / config loader.
|
||||
|
||||
### Short-term (This Month)
|
||||
5. 📋 Implement drug interaction checking
|
||||
6. 📋 Build automated reminder system
|
||||
7. 📋 Create advanced health analytics
|
||||
8. 📋 Add healthcare data export
|
||||
### Short-term
|
||||
4. 📋 Phase 2.8 stretch: automated reminders, advanced analytics, data export.
|
||||
5. 📋 Docker image build automation (currently manual — CI can't run DinD).
|
||||
|
||||
### Medium-term (Next Quarter)
|
||||
9. 🔮 Complete Phase 2.8
|
||||
10. 🔮 Begin Phase 3 (Frontend)
|
||||
11. 🔮 Build dashboard UI
|
||||
12. 🔮 Implement data visualization
|
||||
### Medium-term
|
||||
6. 🔮 Complete Phase 3 (frontend).
|
||||
7. 🔮 Begin Phase 4 (mobile).
|
||||
|
||||
---
|
||||
|
||||
**Last Updated**: 2026-03-09 10:43:00 UTC
|
||||
**Next Review**: After Phase 2.8 completion
|
||||
**Last Updated**: 2026-06-27
|
||||
**Maintained By**: Project maintainers
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ The backend API will be available at `http://localhost:8000`
|
|||
### For Developers
|
||||
|
||||
#### 1. Prerequisites
|
||||
- **Backend**: Rust 1.93+, Docker
|
||||
- **Backend**: Rust (edition 2021 toolchain), Docker
|
||||
- **Frontend**: Node.js 18+, npm
|
||||
|
||||
#### 2. Backend Development
|
||||
|
|
@ -57,10 +57,10 @@ npm test # Run tests
|
|||
|
||||
## 📊 Current Status
|
||||
|
||||
**Phase**: 2.8 - Drug Interactions & Advanced Features (Planning)
|
||||
**Backend**: 91% complete
|
||||
**Frontend**: 10% complete
|
||||
**Deployment**: Docker on Solaria (production-ready)
|
||||
**Backend**: ✅ Phase 2.x feature-complete (through drug interactions); security-hardened; deployed on Solaria.
|
||||
**Frontend**: 🚧 Early (Login/Register + API/store layer; router not yet wired).
|
||||
**Deployment**: Docker on Solaria (image built manually — not in CI).
|
||||
**Tests**: 18 unit + 13 integration (auth + medication), CI-gated with MongoDB.
|
||||
|
||||
See [STATUS.md](./STATUS.md) for detailed progress tracking.
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ This file - Product documentation overview and quick start.
|
|||
#### [STATUS.md](./STATUS.md)
|
||||
**Current project status and progress tracking**
|
||||
|
||||
- Overall progress (Backend 91%, Frontend 10%)
|
||||
- Overall status (Backend feature-complete through Phase 2.8; Frontend early stage)
|
||||
- Phase-by-phase completion status
|
||||
- Recently completed features
|
||||
- Next milestones
|
||||
|
|
@ -135,14 +135,14 @@ This file - Product documentation overview and quick start.
|
|||
### Project Overview
|
||||
- **Name**: Normogen (Balanced Life in Mapudungun)
|
||||
- **Goal**: Open-source health data platform for private, secure health data management
|
||||
- **Current Phase**: 2.8 - Drug Interactions & Advanced Features
|
||||
- **Backend**: Rust + Axum + MongoDB (91% complete)
|
||||
- **Frontend**: React + TypeScript + Material-UI (10% complete)
|
||||
- **Current Phase**: 2.8 (drug interactions) implemented; open work is the frontend (Phase 3)
|
||||
- **Backend**: Rust + Axum + MongoDB (Phase 2.x feature-complete, security-hardened)
|
||||
- **Frontend**: React + TypeScript + Material-UI (early stage — Login/Register + API/store layer)
|
||||
|
||||
### Technology Stack
|
||||
|
||||
**Backend**:
|
||||
- Rust 1.93, Axum 0.7
|
||||
- Rust (edition 2021), Axum 0.7
|
||||
- MongoDB 7.0
|
||||
- JWT authentication (15min access, 30day refresh)
|
||||
- PBKDF2 password hashing (100K iterations)
|
||||
|
|
@ -284,19 +284,18 @@ cd web/normogen-web && npm test
|
|||
|
||||
## 📈 Project Progress
|
||||
|
||||
### Backend: 91% Complete ✅
|
||||
- ✅ Authentication & authorization
|
||||
### Backend: Phase 2.x feature-complete ✅
|
||||
- ✅ Authentication & authorization (JWT, refresh-token rotation, token_version invalidation)
|
||||
- ✅ User management
|
||||
- ✅ Medication management
|
||||
- ✅ Health statistics
|
||||
- ✅ Lab results
|
||||
- ✅ Security features
|
||||
- 🚧 Drug interactions (Phase 2.8)
|
||||
- ✅ Security features (audit logging, account lockout, fail-fast config, real-IP audit)
|
||||
- ✅ Drug interactions (Phase 2.8)
|
||||
|
||||
### Frontend: 10% Complete 🚧
|
||||
- 🚧 Basic React structure
|
||||
- 🚧 Login/register pages
|
||||
- 📋 Dashboard (planned)
|
||||
### Frontend: Early stage 🚧
|
||||
- 🚧 Login/register pages + API/store layer
|
||||
- 📋 Router wiring, dashboard (planned)
|
||||
- 📋 Medication UI (planned)
|
||||
|
||||
See [STATUS.md](./STATUS.md) for detailed progress.
|
||||
|
|
@ -305,8 +304,7 @@ See [STATUS.md](./STATUS.md) for detailed progress.
|
|||
|
||||
## 🗺️ Roadmap
|
||||
|
||||
### Phase 2.8 (Current - Planning)
|
||||
- Drug interaction checking
|
||||
### Phase 2.8 follow-ups (not started)
|
||||
- Automated reminders
|
||||
- Advanced analytics
|
||||
- Data export (FHIR, HL7)
|
||||
|
|
|
|||
|
|
@ -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.1–2.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*
|
||||
|
|
|
|||
|
|
@ -1,21 +1,25 @@
|
|||
# Normogen Project Status
|
||||
|
||||
## Project Overview
|
||||
**Project Name**: Normogen (Balanced Life in Mapudungun)
|
||||
**Goal**: Open-source health data platform for private, secure health data management
|
||||
**Current Phase**: Phase 2.8 - Drug Interactions & Advanced Features (Planning)
|
||||
**Last Updated**: 2026-03-09 10:43:00 UTC
|
||||
**Project Name**: Normogen (Balanced Life in Mapudungun)
|
||||
**Goal**: Open-source health data platform for private, secure health data management
|
||||
**Current Phase**: Phase 2.8 — Implemented (drug interactions live). Open work is the frontend (Phase 3).
|
||||
**Last Updated**: 2026-06-27
|
||||
|
||||
---
|
||||
|
||||
## 📊 Overall Progress
|
||||
## 📊 Overall Status
|
||||
|
||||
| Component | Progress | Status |
|
||||
|-----------|----------|--------|
|
||||
| **Backend** | 91% | 🚧 Active Development |
|
||||
| **Frontend** | 10% | 🚧 Early Development |
|
||||
| **Testing** | 85% | ✅ Good Coverage |
|
||||
| **Deployment** | 100% | ✅ Production Ready |
|
||||
| Area | Status |
|
||||
|------|--------|
|
||||
| **Backend** | ✅ Phase 2.x feature-complete (through drug interactions). Production-deployed on Solaria. |
|
||||
| **Security** | ✅ Hardening pass complete (token-version validation, refresh-token persistence, fail-fast config, real-IP audit). |
|
||||
| **Tests** | ✅ 18 unit tests + 13 integration tests (auth + medication flows), CI-gated with a MongoDB service. |
|
||||
| **Frontend** | 🚧 Early — Login/Register pages + API/store layer exist; router not yet wired; no dashboard. |
|
||||
| **Deployment** | 🚧 Docker image is built manually (CI can't run DinD on Forgejo); otherwise operational. |
|
||||
|
||||
The backend implements every planned 2.x phase. The honest open work is the
|
||||
**frontend** (Phase 3) and the operational gaps noted at the bottom.
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -103,31 +107,41 @@
|
|||
|
||||
---
|
||||
|
||||
#### Phase 2.7: Health Data Features 🚧 91% COMPLETE
|
||||
#### Phase 2.7: Health Data Features ✅ IMPLEMENTED
|
||||
- [x] Medication management (CRUD operations)
|
||||
- [x] Medication adherence tracking
|
||||
- [x] Health statistics tracking (weight, BP, etc.)
|
||||
- [x] Lab results storage
|
||||
- [x] OpenFDA API integration for drug data
|
||||
- [x] Comprehensive test coverage
|
||||
- [ ] Drug interaction checking (moved to Phase 2.8)
|
||||
- [ ] Full integration testing (in progress)
|
||||
|
||||
**Completed**: 2026-03-08 (91%)
|
||||
**Completed**: 2026-03-08
|
||||
|
||||
---
|
||||
|
||||
#### Phase 2.8: Advanced Features & Enhancements 📋 PLANNING (0%)
|
||||
- [ ] Drug interaction checking
|
||||
- [ ] Automated reminder system
|
||||
- [ ] Advanced health analytics
|
||||
- [ ] Healthcare data export (FHIR, HL7)
|
||||
- [ ] Medication refill tracking
|
||||
- [ ] User preferences
|
||||
- [ ] Caregiver access
|
||||
#### Phase 2.8: Drug Interactions ✅ IMPLEMENTED
|
||||
- [x] Drug interaction checking (`/api/interactions/check`, `/check-new`)
|
||||
- [x] Ingredient mapper
|
||||
- [x] Interaction service (in-memory interaction data)
|
||||
- [ ] Automated reminder system *(not yet started)*
|
||||
- [ ] Advanced health analytics *(not yet started)*
|
||||
- [ ] Healthcare data export (FHIR, HL7) *(not yet started)*
|
||||
- [ ] Medication refill tracking *(not yet started)*
|
||||
- [ ] Caregiver access *(not yet started)*
|
||||
|
||||
**Estimated Start**: 2026-03-10
|
||||
**Estimated Duration**: 2-3 weeks
|
||||
**Completed (core)**: drug interaction checking is live. The remaining items are
|
||||
future enhancements; see the [roadmap](./ROADMAP.md).
|
||||
|
||||
---
|
||||
|
||||
#### P0/P1 Security + Tests ✅ IMPLEMENTED
|
||||
- [x] `token_version` validation in the JWT middleware (stale tokens rejected after password change)
|
||||
- [x] Refresh tokens persisted **hashed** in MongoDB (survive restarts; revocable)
|
||||
- [x] `/api/auth/refresh` (rotation + reuse detection) and `/api/auth/logout`
|
||||
- [x] Fail-fast config (`APP_ENVIRONMENT=production` rejects insecure `JWT_SECRET`/`ENCRYPTION_KEY`)
|
||||
- [x] Real client-IP resolution in audit logs (`X-Forwarded-For` → `X-Real-IP` → socket)
|
||||
- [x] Handler `.unwrap()` cleanup (panics → clean error responses)
|
||||
- [x] Integration tests rewritten against an isolated test DB
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -182,48 +196,30 @@
|
|||
|
||||
## Current Status
|
||||
|
||||
**Active Development**: Phase 2.8 - Drug Interactions & Advanced Features
|
||||
**Backend Status**: 91% complete, production-ready for most features
|
||||
**Frontend Status**: 10% complete, basic structure exists
|
||||
**Database**: MongoDB 7.0
|
||||
**Deployment**: Docker on Solaria (homelab)
|
||||
**Test Coverage**: 85%
|
||||
**Backend**: Phase 2.x feature-complete; deployed on Solaria (Docker).
|
||||
**Frontend**: Early stage — Login/Register pages + API/store layer; router not yet wired.
|
||||
**Database**: MongoDB 7.0
|
||||
**Deployment**: Docker on Solaria (homelab); image built manually (not in CI).
|
||||
**Tests**: 18 unit + 13 integration (auth + medication), CI-gated with MongoDB.
|
||||
|
||||
---
|
||||
|
||||
## Recent Updates
|
||||
|
||||
### Phase 2.7 Progress (2026-03-08)
|
||||
- ✅ **Completed**: Medication management backend (91%)
|
||||
- CRUD operations for medications
|
||||
- Dose logging and adherence tracking
|
||||
- OpenFDA integration for drug data
|
||||
- Comprehensive test suite
|
||||
|
||||
- 🚧 **In Progress**: Integration testing and documentation
|
||||
|
||||
- 📋 **Moved to Phase 2.8**: Drug interaction checking (to be implemented with interactions handler)
|
||||
|
||||
### Phase 2.6 Complete (2026-02-20)
|
||||
- ✅ **Security Hardening Complete**
|
||||
- Rate limiting with tower-governor
|
||||
- Account lockout policies
|
||||
- Security audit logging
|
||||
- Session management API
|
||||
### Known security gaps (tracked, not in current scope)
|
||||
- Rate limiting middleware is a stub (deferred).
|
||||
- A few borderline `.unwrap()` calls remain in repository `inserted_id` paths.
|
||||
|
||||
---
|
||||
|
||||
## Tech Stack
|
||||
|
||||
### Backend
|
||||
- **Language**: Rust 1.93
|
||||
- **Language**: Rust (edition 2021)
|
||||
- **Framework**: Axum 0.7 (async web framework)
|
||||
- **Database**: MongoDB 7.0
|
||||
- **Authentication**: JWT (jsonwebtoken 9)
|
||||
- Access tokens: 15 minute expiry
|
||||
- Refresh tokens: 30 day expiry
|
||||
- Access tokens: default 15 minute expiry (configurable)
|
||||
- Refresh tokens: default 7 day expiry (configurable); stored hashed in MongoDB, rotated, revocable
|
||||
- **Password Security**: PBKDF2 (100K iterations)
|
||||
- **Deployment**: Docker, Docker Compose
|
||||
- **Security**: `token_version` invalidation; account lockout; audit logging with real client-IP resolution
|
||||
- **Deployment**: Docker, Docker Compose (image built manually)
|
||||
- **CI/CD**: Forgejo Actions
|
||||
|
||||
### Frontend
|
||||
|
|
@ -290,30 +286,22 @@
|
|||
- ✅ `DELETE /:id` - Delete health stat
|
||||
- ✅ `GET /trends` - Get trends
|
||||
|
||||
### Drug Interactions (`/api/interactions`) *(Phase 2.8)*
|
||||
- ✅ `POST /check` - Check interactions between a set of medications
|
||||
- ✅ `POST /check-new` - Check a new medication against existing ones
|
||||
|
||||
### Health Check
|
||||
- ✅ `GET /health` - Health check endpoint
|
||||
- ✅ `GET /ready` - Readiness check endpoint
|
||||
|
||||
---
|
||||
|
||||
## Next Milestones
|
||||
|
||||
1. 📋 **Phase 2.8** - Drug Interactions & Advanced Features (Planning)
|
||||
- Drug interaction checking
|
||||
- Automated reminders
|
||||
- Advanced analytics
|
||||
- Data export (FHIR, HL7)
|
||||
|
||||
2. 🔮 **Phase 3.0** - Frontend Development (Planned)
|
||||
- Complete React app
|
||||
- Dashboard and visualization
|
||||
- Medication management UI
|
||||
|
||||
3. 🔮 **Phase 4.0** - Mobile Development (Future)
|
||||
- iOS and Android apps
|
||||
|
||||
4. 🔮 **Phase 5.0** - Advanced Features (Future)
|
||||
- AI/ML features
|
||||
- Third-party integrations
|
||||
1. 🚧 **Phase 3 — Frontend** — wire the router, build the dashboard and feature UIs.
|
||||
2. 🔮 **Phase 2.8 follow-ups** — reminders, analytics, data export, caregiver access.
|
||||
3. 🔮 **Phase 4 — Mobile** — iOS and Android apps.
|
||||
4. 🔮 **Phase 5 — Advanced** — integrations, AI/ML features.
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -343,6 +331,5 @@ tower-governor = "0.4.3"
|
|||
|
||||
---
|
||||
|
||||
**Last Updated**: 2026-03-09 10:43:00 UTC
|
||||
**Next Review**: After Phase 2.8 completion
|
||||
**Last Updated**: 2026-06-27
|
||||
**Maintained By**: Project maintainers
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ Normogen's revenue will come from **user subscriptions**, not from using or sell
|
|||
### Technology Stack
|
||||
|
||||
#### Backend
|
||||
- **Language**: Rust 1.93 (performance, safety)
|
||||
- **Language**: Rust (edition 2021; performance, safety)
|
||||
- **Framework**: Axum 0.7 (async web framework)
|
||||
- **Database**: MongoDB 7.0 (flexible document storage)
|
||||
- **Security**: JWT authentication, PBKDF2 password hashing, AES-256-GCM encryption
|
||||
|
|
@ -190,10 +190,9 @@ Most sensors will have a common interface or data will be accessible through the
|
|||
|
||||
## Current Status
|
||||
|
||||
**Phase**: 2.8 - Drug Interactions & Advanced Features (Planning)
|
||||
**Backend**: 91% complete
|
||||
**Frontend**: 10% complete
|
||||
**Deployment**: Production-ready (Docker on Solaria)
|
||||
**Backend**: ✅ Phase 2.x feature-complete (through drug interactions); security-hardened.
|
||||
**Frontend**: 🚧 Early (Login/Register + API/store layer; router not yet wired).
|
||||
**Deployment**: Docker on Solaria (image built manually — not in CI).
|
||||
|
||||
See [STATUS.md](./STATUS.md) for detailed progress tracking.
|
||||
|
||||
|
|
@ -201,11 +200,11 @@ See [STATUS.md](./STATUS.md) for detailed progress tracking.
|
|||
|
||||
## Roadmap Highlights
|
||||
|
||||
### Phase 2.8 (Current - Planning)
|
||||
- Drug interaction checking
|
||||
- Automated reminder system
|
||||
- Advanced health analytics
|
||||
- Healthcare data export (FHIR, HL7)
|
||||
### Phase 2.8 (core implemented)
|
||||
- ✅ Drug interaction checking (`/api/interactions/check`, `/check-new`)
|
||||
- 🔔 Automated reminder system (not started)
|
||||
- 📊 Advanced health analytics (not started)
|
||||
- 📄 Healthcare data export, FHIR/HL7 (not started)
|
||||
|
||||
### Phase 3 (Planned - Q2 2026)
|
||||
- Complete frontend web application
|
||||
|
|
@ -274,4 +273,4 @@ We welcome contributions from developers, designers, and users. See [development
|
|||
|
||||
**Last Updated**: 2026-03-09
|
||||
**Maintained By**: Project maintainers
|
||||
**Version**: 0.2.8 (Phase 2.8 Planning)
|
||||
**Version**: 0.2.8 (Phase 2.8 implemented)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue