No description
Find a file
goose 149ce37654 feat: zero-knowledge encryption Phase 1 — backend opaque + crypto module (WIP)
Backend: server can no longer read user data. All data blobs (medication,
appointment, profile name) are now opaque client-encrypted ciphertext — the
server stores and returns them verbatim, never deserializing the contents.

- Medication: removed MedicationData + flat MedicationResponse; new
  MedicationResponse echoes metadata + encrypted_data blob. Create/update
  accept opaque blobs (whole-blob replace). Update is no longer load-mutate-
  reserialize (server can't read the data).
- Appointment: same opaque treatment; status moved to a top-level document
  field so it remains filterable without decryption.
- Profile: name is now an opaque encrypted blob (name_data/name_iv). Auto-
  created profile on register starts with an empty name; client sets it.
- EncryptedFieldWire type shared across medication/appointment.

Frontend (partial): crypto module using Web Crypto API —
- crypto/keys.ts: double-PBKDF2 derivation (auth secret sent to server +
  encryption key kept in memory); in-memory key store (set/get/clear).
- crypto/cipher.ts: AES-GCM encrypt/decrypt + JSON convenience wrappers.
- crypto/index.ts: re-exports.

NOT YET DONE (frontend integration): auth store key derivation on login/register,
stores decrypt-on-load/encrypt-on-write, types update, UI components wired,
crypto round-trip tests, ADR. This commit is a verified checkpoint — backend
builds clean (21 tests, 0 warnings); frontend crypto module exists but is not
yet wired into the data flow.
2026-06-28 20:08:38 -03:00
.forgejo/workflows fix(backend): P1 — handler unwrap cleanup + rewrite integration tests 2026-06-27 14:26:39 -03:00
backend feat: zero-knowledge encryption Phase 1 — backend opaque + crypto module (WIP) 2026-06-28 20:08:38 -03:00
docs fix(backend): P2 config & Docker consistency 2026-06-27 19:54:32 -03:00
scripts fix(backend): P1 — handler unwrap cleanup + rewrite integration tests 2026-06-27 14:26:39 -03:00
web/normogen-web feat: zero-knowledge encryption Phase 1 — backend opaque + crypto module (WIP) 2026-06-28 20:08:38 -03:00
.cursorrules docs: reconcile documentation with reality (P3) 2026-06-27 16:02:16 -03:00
.gitignore chore: Update .gitignore to exclude tmp and log files 2026-02-20 13:13:29 -03:00
.gooserules docs: reconcile documentation with reality (P3) 2026-06-27 16:02:16 -03:00
README.md fix(backend): P2 config & Docker consistency 2026-06-27 19:54:32 -03:00

Normogen

Normogen (Mapudungun for "Balanced Life") is an open-source health data platform for private, secure health data management.

📚 Documentation

All project documentation has been organized into the docs/ directory:

🚀 Quick Start

# Clone repository
git clone <forgejo-url> normogen
cd normogen/backend

# Setup configuration
cp .env.example .env
# Edit .env with your values

# Run with Docker Compose
docker compose up -d

# Check status (default port is 6500 via NORMOGEN_PORT; Solaria maps it to host 6800)
curl http://localhost:6500/health

📊 Current Status

  • Backend: Phase 2.x feature-complete (Rust + Axum + MongoDB), including drug interactions (Phase 2.8). Security-hardened: token-version validation, hashed refresh-token persistence, fail-fast config, real-IP audit logging. Deployed on Solaria.
  • Frontend: 🚧 Early (React + TypeScript) — Login/Register pages + API/store layer exist; router not yet wired.
  • Tests: 18 unit + 13 integration (auth + medication), CI-gated with MongoDB.
  • Deployment: Docker on Solaria (image built manually — CI can't run DinD on Forgejo).
  • See docs/product/STATUS.md for the full breakdown.

🗂️ Documentation Structure

docs/
├── product/          # Product definition, features, roadmap
├── implementation/   # Phase plans, specs, progress reports
├── testing/          # Test scripts and results
├── deployment/       # Deployment guides and scripts
├── development/      # Git workflow, CI/CD, development tools
└── archive/          # Historical documentation

📖 Full Documentation

See the Documentation Index for complete project documentation.


Last Updated: 2026-06-27