Lean EHR Platform
A FHIR-inspired EHR with KMS-backed envelope encryption, cryptographic access control, and BigQuery financial analytics.
Lean EHR is still heavily under development. APIs, schema, and UI may change.

Overview
A Lean EHR monorepo containing the assisted-living module and a Snowstorm-Lite service for SNOMED CT terminology lookups.
The platform uses Next.js 15 App Router and Server Actions with Firebase Admin and Firestore, Google Cloud KMS for envelope encryption, Memorystore for sessions and caching, and BigQuery for financial analytics.
Resident records are FHIR-inspired: the resident is the aggregate root, with clinical, contact, and financial records in subcollections. Access is role-gated at the KMS key class, not just in application code.
What I built
- Built a FHIR-inspired resident record with clinical, contact, and financial subcollections, plus a SNOMED CT terminology service.
- Implemented envelope encryption with per-document DEKs and four KMS key classes, making role-based decryption a cryptographic boundary.
- Streamed financial collections into BigQuery for dashboards while deliberately keeping clinical and contact data out of analytics.
- Added a plaintext-mode provider behind the same crypto interface, with distinct storage schemes and fail-closed reads.