Open-source, offline-first electronic health record (EHR) system for military forward operating bases, disaster relief zones, and small clinics in sub-Saharan Africa.
# Open Nucleus
Open-source, offline-first electronic health record (EHR) system for military forward operating bases, disaster relief zones, and small clinics in sub-Saharan Africa. Assumes zero connectivity as the default and treats network access as a bonus.
**Architecture:** `ARCHITECTURE.md` | **Security:** `SECURITY.md` | **Privacy:** `PRIVACY.md` | **Internals:** `agents.md`
## Quick Start
```bash
# 1. Start the IOTA Identity Bridge
cd ../open-anchor/identity-bridge && npm install && node index.js
# 2. Seed demo data (6 patients, cholera outbreak scenario)
go run ./cmd/seed
# 3. Start the server (port 8080)
NUCLEUS_BOOTSTRAP_SECRET=demo go run ./cmd/nucleus
# 4. Start the desktop app (in a separate terminal)
cd open-nucleus-app && pnpm install && pnpm tauri dev
```
Login with practitioner ID `demo-clinician` (or any ID — the app auto-registers new devices via bootstrap secret).
### Build from source
```bash
# Build server binary
go build -o nucleus ./cmd/nucleus
# Run with config
NUCLEUS_BOOTSTRAP_SECRET=demo ./nucleus --config config.yaml
# Build desktop app (macOS .app / Windows .msi)
cd open-nucleus-app && pnpm tauri build
```
### Minimal config.yaml
```yaml
data:
repo_path: data/repo # Git repository (source of truth)
db_path: data/nucleus.db # SQLite search index (rebuildable)
encryption:
enabled: false # set true + provide master key for production
tls:
mode: "off" # "auto" for self-signed, "provided" for your own
anchor:
backend: iota
network: testnet
rpc_url: "
api.testnet.iota.cafe"
anchor_package_id: "0x..." # deployed Move contract
identity_bridge_url: "
localhost"
```
## Ecosystem
Open Nucleus is a 5-repo ecosystem:
| Repo | Language | Purpose |
|------|----------|---------|
| **server** (this repo) | Go | Core EHR monolith — all services in-process |
| **open-anchor** | Go + Node.js | IOTA Move anchoring, IOTA Identity SDK (DIDs, VCs, notarisation) |
| **open-sentinel** | Python | LLM-powered sleeper a …