# Meeting Recorder · מקליט ביקורים

A visit recorder for a doctor’s clinic. One button starts it. The conversation is transcribed live, the patient is recognised from what is said, and the doctor gets an AI-written clinical summary plus a plain-language letter for the patient.

**Status:** Private · Projects · 2026

- **Local checkout:** `/Users/simon/Developer/meeting-recorder` (branch `integration`, last commit 4e24dcd, 2026-11-08 — Out with the mailbox tab, in with the client card)
- **Repository:** https://github.com/ShimonNavon/meeting-recorder-
- **On another machine:** `git clone https://github.com/ShimonNavon/meeting-recorder-` — the paths below are Simon's Mac
- **Live:** https://dr-jaffe.handclinic.co.il/
- **GitHub:** https://projects.navonsimon.com/repo/meeting-recorder
- **Website:** https://handclinic.co.il/
- **Where it runs:** three namespaces (prod 30085, test 30084, whatsapp 30089) · ubuntu02 edge
- **Note:** In daily use at a clinic

## Stack

FastAPI, WebSocket, faster-whisper / ElevenLabs Scribe, SQLModel, Postgres, Jinja, Kubernetes, GitHub Actions, React Email (compiled to Jinja at build time)

## Start here

- `app/` — FastAPI app, transcript pipeline, summaries, print pages
- `deploy/k8s/` — prod, test and whatsapp manifests plus CI RBAC
- `deploy/rollout.sh, sync_and_backup.sh, watch.sh` — deployment and backup scripts
- `.github/workflows/` — CI/CD on the self-hosted runner
- `scripts/seed_demo.py` — eight demo patients
- `docs/` — operator and feature documentation
- `../meeting-recorder-test` — separate test checkout used for the staging instance
- `../build-ledger` — build ledger and MCP server for deployed builds
- `emails/` — React Email letter design (letter-email.jsx) and compile.tsx, which writes app/templates/patient_letter_email.html
- `AGENTS.md` — the agent brain: email pipeline rules, branding source of truth, send/allowlist procedure, deploy gotchas

## Commands

- **Run locally:** `./run.sh`
- **Tests:** `pytest`
- **Deploy:** `see deploy/rollout.sh and .github/workflows`
- **Email preview:** `cd emails && npm run dev  (http://localhost:3100)`
- **Compile the email template:** `cd emails && npm run compile  (CI fails on drift)`

## Deploy and where it runs

- Production: namespace meeting-recorder-prod, NodePort 30085, https://dr-jaffe.handclinic.co.il/.
- Test: namespace meeting-recorder-test, NodePort 30084, https://test-dr-jaffe.handclinic.co.il/.
- WhatsApp beta: namespace meeting-recorder-whatsapp, NodePort 30089, https://integration-dr-jaffe.handclinic.co.il/.
- GitHub Actions with a self-hosted runner deploys; builds are recorded in the build ledger.

## Current state

Live at the clinic and closed: since the 7 Nov go-live, production redirects / to /login (303) and /api/visits answers 401, so the clinic password is on and the visits are no longer public. Production and test run the Mail-tab build (image 9d9e2f8, ledger Triquetrum, 7 Nov 20:45); integration and the WhatsApp beta run Lumbrical (image d902f3c, 8 Nov 00:07, the round-4 detail capture that survives a reconnect). All three answer /api/health with stt ready over ElevenLabs. Open: #14 (confirm which caption the doctor meant), #17 (Outlook on the phone over Zoho IMAP) and #18 (spam plus DKIM/SPF/DMARC at Cloudflare). In the working tree on integration on 8 Nov (11 files, uncommitted): the Mail tab and the /api/mail/* proxy are being removed at Simon's request — the client card (emailed_at/emailed_to/emailed_kind plus the patient history) is the answer to what was sent to a patient. Full plan and request status: docs/doctor-requests.md.

## Watch out

- Refer to deployed builds by ledger name (Carpal…Lumbrical), never by tag or hash.
- Audio retention is optional; when enabled, the audio player is always manual and stops on navigation/tab hide.
- Identifiers never leave the machine in LLM calls; only age, sex and background do. Preserve that.
- The doctor's edited fields are protected from background summary regeneration; do not overwrite them.
- Hebrew UI is RTL with large type for an older, non-technical user; keep it simple.
- Content changes must also update versions.json in the build ledger after deploy.
- Integration and test email is allowlisted via MR_MAIL_ALLOW. Zoho paid SMTP is smtppro.zoho.com:465 with an app-specific password; MX/SPF/DKIM/DMARC live at Cloudflare.
- Email design lives in emails/emails/letter-email.jsx (React Email); never hand-edit app/templates/patient_letter_email.html — recompile (npm run compile), CI checks the committed output is fresh.
- No quotes inside Jinja expressions in the React source: React escapes ' to &#x27; and Jinja breaks; precompute such values in Python (visit_date_text).
- Gmail drops <html dir>: every email block pins its own dir / direction / text-align; start-side accent bars come from a dir-flipped table row.
- MR_PUBLIC_URL must equal the site's public host or email images 404; without it emails fall back to inline CID parts. SVG is never emailed.
- The Docker builder on ubuntu02 is the legacy one (no buildx); EMAIL_OUT is an output FILE path, not a directory.
- Sending a test letter needs a temporary MR_MAIL_ALLOW entry plus rollout restart, then revert; visit 1002 / patient 12 are the test record.
- Zoho files every SMTP send in Sent by itself: never add an IMAP copy-to-Sent step (duplicates). The doctor's Outlook (classic 16.0 plus a Microsoft-cloud client) syncs that same Sent folder over IMAP, so app letters appear in Outlook's Sent.
- Prod is closed now (/ to /login, /api/visits 401) — never deploy a build that drops the clinic password, and keep MR_MAIL_ALLOW empty there.
- MR_MAIL_ALLOW must be empty on prod. A non-empty list silently blocks patients' letters.
- Lunate's code is on integration; the address, clinic password and mail settings are env on each site, not in the build.
- The Mail tab and /api/mail/* are being removed (uncommitted on integration, 8 Nov). clinic-mail still holds the IMAP password and serves the doctor's Outlook; the app only sends.
- The doctor's requests live in clinic-tickets (https://tickets.handclinic.co.il); the recorder's own docs are docs/doctor-requests.md, docs/design-system.md and docs/ux-decisions.md.

## Secrets — locations only, never print values

- .env / .env.example; cluster Secrets are not in the repo.
- Zoho app-specific password lives in the namespace `<namespace>-env` Secret, not the repo; the mailbox password is with Simon/Dr. Jaffe.

## Links

- [Production (clinic password)](https://dr-jaffe.handclinic.co.il/)
- [Project page](https://projects.navonsimon.com/p/meeting-recorder)
- [The doctor's request desk](https://tickets.handclinic.co.il)
- [Marketing site for clinics](https://handclinic.co.il/)
- [Doctor requests & go-live plan](file:///Users/simon/Developer/meeting-recorder/docs/doctor-requests.md)

## Tags

Hebrew STT, LLM, Django, Postgres

---

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