No description
Find a file
goose d0efecf38f
All checks were successful
Lint and Build / format (pull_request) Successful in 36s
Lint and Build / clippy (pull_request) Successful in 1m43s
Lint and Build / build (pull_request) Successful in 3m50s
Lint and Build / test (pull_request) Successful in 3m41s
fix(sharing): gate falls back to direct ownership before share check
The share-gate I added in Phase B was too strict: it only admitted the
owner via the profiles collection, so any data item whose profile_id
didn't map to a real Profile document (legacy/test data, or a profile_id
the caller used at create time without a backing Profile) got 404'd on
read — even for the item's actual owner. CI caught this:
zk_integration_tests::medication_stored_as_ciphertext_not_plaintext
creates a medication with profile_id="default" (no Profile doc) and
the new get_medication gate returned 404.

Fix: in each list/get data handler, check direct ownership
(user_id == claims.sub, or has own data for the profile) FIRST, and
only fall through to the share-gate if the caller isn't the direct
owner. This preserves the original ownership model AND adds share-
recipient access, without breaking items whose profile_id isn't a real
Profile document.

The share-only path (recipient reading shared data they don't own)
still goes through the gate as before.
2026-07-19 11:40:44 -03:00
.forgejo/workflows ci: drop host port mapping for Mongo service container 2026-07-18 21:02:46 -03:00
backend fix(sharing): gate falls back to direct ownership before share check 2026-07-19 11:40:44 -03:00
docs docs: decide multi-person ZK sharing ADR; reconcile jwt/encryption docs 2026-07-18 19:26:43 -03:00
scripts fix(backend): P1 — handler unwrap cleanup + rewrite integration tests 2026-06-27 14:26:39 -03:00
web feat: profile sharing via X25519 envelope (Phase B, #3) 2026-07-19 07:21:11 -03:00
.cursorrules docs: reconcile documentation with reality (P3) 2026-06-27 16:02:16 -03:00
.gitignore feat(auth): add per-account X25519 identity keypair (#3) 2026-07-18 20:00:01 -03:00
.gooserules docs: add AGENTS.md and document issue-driven workflow 2026-07-18 11:20:14 -03:00
AGENTS.md docs: add AGENTS.md and document issue-driven workflow 2026-07-18 11:20:14 -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