This project is a complete real-time ECG waveform simulation, consisting of:
Python/Flask backend
– Generates synthetic MATLAB-accurate ECG
– Streams real-time ECG at 100 Hz over WebSockets
– Uses Fourier harmonic reconstruction
– Provides live signal + peak detection
React + Vite + Three.js frontend
– Plots ECG in real-time with a 3D line renderer in a 5 second window
– Extracts heart rate, QRS amplitude, T amplitude
– Computes realistic blood pressure heuristics
– Displays HR + BP in a polished UI overlay
This project is based on the following work:
Original Repository:
https://github.com/sanju214/heartTwin
The MATLAB + Blender implementation in that project served as the foundation for the ECG waveform logic and visualization concepts used here, which were re-implemented in Python and React for a real-time web-based system.
git clone https://github.com/abhimanyuskv/ECG_Simulation.git
cd ECG_Simulationcd backendpip install -r requirements.txtpython server.pycd frontendnpm installnpm run devhttp://localhost:5173/