# Life Admin

A private record vault for one person: documents stored once by hash, facts that must cite the document they came from, deadlines in two jurisdictions, cases, and an audit trail of every read. Rule-based extraction proposes candidates; a human confirms them. Same data reaches an agent through four narrow MCP tools that can search, read and ask for a portal handoff — never file, pay or submit.

**Status:** Private · Projects · 2026

- **Local checkout:** `/Users/simon/Developer/life-admin` (branch `main`, last commit 88168d4, 2026-10-30 — Use neutral figures in examples; no real balances in the repo)
- **Repository:** https://github.com/ShimonNavon/life-admin
- **On another machine:** `git clone https://github.com/ShimonNavon/life-admin` — the paths below are Simon's Mac
- **On my tailnet:** http://ubuntu03:30112/
- **Where it runs:** namespace life-admin · NodePort 30112 · ubuntu03
- **Note:** Private · tailnet only

## Stack

Single-file HTML, Python stdlib, SQLite, MCP stdio server, Kubernetes

## Start here

- `index.html` — the whole UI: vault, facts with citations, deadlines, cases, sources, audit
- `life_admin.py` — HTTP API, ingest and extraction, CLI and the four MCP tools, all standard library
- `ARCHITECTURE.md` — components, agents and their limits, data model, API surface, model routing, phasing
- `index.html + README.md` — the original records-access research matrix (IL/US, API vs portal vs licensed)
- `kubernetes.yaml` — namespace, 2Gi local-path PVC, ConfigMap-backed Deployment and NodePort 30112
- `deploy.sh` — builds the ConfigMap from the two app files and rolls out on ubuntu03

## Commands

- **Run locally:** `LIFE_ADMIN_DATA=./data python3 life_admin.py serve --port 8080`
- **Ingest a file:** `python3 life_admin.py ingest file.pdf --source eca`
- **Read facts:** `python3 life_admin.py facts --kind amount`
- **MCP server in the cluster:** `ssh ubuntu03 'kubectl -n life-admin exec -i deploy/life-admin -- python /app/life_admin.py mcp'`
- **Deploy:** `sh deploy.sh`

## Deploy and where it runs

- Namespace life-admin, NodePort 30112 on ubuntu03, reachable at http://ubuntu03:30112/ over Tailscale.
- One replica, Recreate strategy, python:3.12-alpine, non-root with a read-only root filesystem; app files from a ConfigMap, data on a 2Gi local-path PVC at /data.

## Current state

Live and private. Phase 1 of ARCHITECTURE.md is built: hashed vault, cited facts with rule-based candidates, deadlines, cases, audit, four MCP tools. No portal is connected and no credentials are stored.

## Watch out

- This holds real personal records: never put balances, case numbers, filenames or identity details into the repo, ConfigMap, screenshots or this brief.
- No authentication; the service is only reachable on the tailnet. Do not expose it beyond it.
- Encryption at rest is not implemented; files sit on the node volume at mode 0600. Say so rather than implying the vault is encrypted.
- Facts without a document_id are rejected by the API on purpose; keep that rule when changing the schema.
- Auto-extracted facts are candidates at 0.55–0.6 confidence; anything stated to Simon must come from a reviewed fact or a document.
- SQLite with WAL, single writer, one replica. Do not scale the Deployment up without moving to Postgres.

## Tags

Kubernetes, MCP, SQLite, Local-first

---

Brief generated 2026-11-08 from `~/Developer/my-projects/context/`. Canonical URL: https://projects.navonsimon.com/context/life-admin.md
