Dev Tutorial: Building an Anesthesia / Emergency Simulator using Claude Code
Environment & Prerequisites
- Claude AI (specifically mentioned usage or Claude Max limits)
- Network access capable of supporting multi-device communication if scaling certain features like iPad support
- Deployment platform capability compatible with Vercel (implied by existing deployment URLs)
Step-by-Step Guide
- Architectural Setup:
Set up two distinct application endpoints to handle different user roles in the clinical environment:// Deployment targets for client controllers\nMonitor Screen URL: https://y-psi-lilac.vercel.app/monitor\nInstructor Control URL: https://y-psi-lilac.vercel.app/instructor - Client Interface Implementation - Monitor View:
Develop the display module responsible for rendering real-time vitals and waveforms.
Note: Ensure a click event handler is implemented on this screen to activate audio output, as browsers require direct interaction for sound playback. lack permissions without it. - Control Logic - Instructor Module:
Implement logic that allows an instructor device to send commands over a shared network to control simulation parameters (e.g., running simulations or changing patient states). If using mobile devices such as iPads, ensure they reside on the same local network. - Data Schema & Scenario Repository:
Create a repository structure capable of storing JSON-based scenario files so users can load custom medical emergencies into any simulator instance via external loading mechanisms. - Waveform Rendering Optimization:
Refine high-fidelity waveform generation algorithms if required by higher fidelity standards beyond current baseline implementation levels.
Best Practices & Gotches
- Audio Activation: Always include instructions or code triggers where certain screens must be clicked/tapped first to enable waywardly muted sound outputs (`monitor` screen activation requirement).
- Network Synchronization: For multi-device setups like iPad simulators, keep all hardware on the
same networkto prevent latency in command transmission between `instructor` and `monitor`. - Resource Management (Claude Max): When developing complex features rapidly through 'vibe-coding', monitor your usage limits carefully against Claude's capacity (noting that heavy development may consume significant token quotas quickly).
Bottom Line: The developer successfully builds an interactive enough simulation system for clinical training using distributed web endpoints, which can then be scaled with shared repositories for user-generated scenarios.
! DYOR (Do Your Own Research)