Bachelor thesis · 2026

Heartbeats

Bachelor thesis at HEIG-VD / REDS: design and implementation of a secure backend and web UI for an IoT ambulatory ECG cardiac monitor.

Open demo at tb.urs-behrmann.ch

Overview

Cardiovascular disease is the leading cause of death worldwide, and many arrhythmias are intermittent — a short hospital ECG can miss them. At the start of this bachelor thesis, the REDS institute already had an IoT device that acquires multi-lead ECG and flags suspicious events, but no complete chain to receive, store, and present that data securely to clinicians.

Heartbeats fills that gap: a Geruest/C++ server, PostgreSQL storage, and a secured website for cardiologists and technicians. The end-to-end demo was validated locally and on a public deployment at tb.urs-behrmann.ch.

Anomaly and continuous modes

The device talks to the server over HTTPS with token authentication. Two complementary acquisition modes cover both rare events and live review.

Anomaly mode

Default mode. When the device detects a suspicious event, it uploads a 10-second window in chunks. The server reassembles the segment, stores it, and triggers alerts for review.

Continuous mode

A cardiologist starts live monitoring from the website. The device streams one second at a time; the 12-lead graph extends as samples arrive over WebSocket.

What the platform does

Patient timeline

Browse patients and their ECG history on a chronological timeline.

12-lead ECG viewer

Clinical-style multi-lead graph built for the web — view anomaly segments and live streams.

Technician collaboration

Invite a technician by email with a segment-scoped link and collect feedback.

Roles & privacy

Access control for cardiologists and technicians, with personal-data minimization (pseudonyms).

Technical stack

Geruest · C++
PostgreSQL
WebSocket
Docker · Traefik

The server and static site run in one Geruest process: REST APIs for device upload and clinician actions, plus WebSocket push for continuous monitoring.

PostgreSQL stores patients, segments, and review metadata. The frontend is HTML, JavaScript, and Tailwind CSS with a custom 12-lead visualizer.

Deployment uses Docker Compose and Traefik for HTTPS. French and English UI are supported. The demo device (ESP32-C6) reads samples from microSD for end-to-end validation.

Back to the list of projects