Native macOS Medical Imaging App — 45,000 Lines of Swift Built with AI

45,000
Lines of Code
137
Files
Zero
Dependencies
Built EndoMac Pro — a native macOS medical imaging application that replaces legacy Olympus Windows software for endoscopic procedures. 45,000 lines of Swift 6 across 137 files with zero third-party dependencies. NOM-024 compliant (Mexico's electronic health records standard). Shipped to TestFlight for clinical testing with a gastroenterologist performing 5-10 procedures daily. Built entirely through AI-assisted development — as a designer, not a programmer.
The Challenge
The legacy Olympus Windows software crashes multiple times per week during live endoscopic procedures, causing total loss of captured medical images. For a gastroenterologist performing 5-10 procedures per day, each crash means lost clinical documentation that can't be recreated.
The doctor needed a macOS-native replacement that could capture video from an Olympus CV-190 endoscopic processor via a capture card, render it in real-time using Metal, support foot pedal control during procedures (hands are occupied), manage patient records with regulatory compliance, and archive to NAS storage. No off-the-shelf solution exists for this workflow on macOS.
What I Delivered
- Full native macOS application in Swift 6 with strict concurrency (3 Swift actors, 10 @MainActor services)
- Metal rendering pipeline for real-time endoscopic video capture
- HID foot pedal integration for hands-free image capture during procedures
- NOM-024 compliance system: 18 finalization guard clauses, SHA-256 integrity hashing, amendment-only modification pattern, audit logging
- Patient record management with search, demographic data, and procedure history
- Medical video recorder integration with H.265 export
- NAS archival pipeline (Synology) with storage scaling validated against real export data
- Privacy manifests, entitlements, and sandbox configuration for App Store medical category submission
- Bilingual interface (Spanish/English)



The AI Workflow
Every line of code was generated through Claude Code — Opus for cross-file architectural reasoning and audit analysis, Sonnet for scoped mechanical fixes and localization. Developed a 10-tier audit methodology where Claude runs read-only diagnostic scans producing structured markdown reports, followed by targeted fix prompts grouped by dependency order to prevent regressions.
Created a CLAUDE.md specification file as institutional memory — a governance layer that prevents AI assistants from undoing intentional architectural decisions. Operated a dual-context workflow: main Claude chat for architectural planning and strategy, Claude Code terminal for implementation with leaner context for better code reasoning.
The result: 19/20 regression checks passed, zero build errors or warnings, full NOM-024 compliance — all built by a designer directing AI, not by a programmer.