Back to projects

SmartLung

A proof-of-concept breathing trainer for elderly patients, built for WICO 2026: an ESP32 touchscreen device reading real pressure and pulse-ox sensors, a Go API that verifies each device by its signature, and a Next.js dashboard for clinicians.

SmartLung is a full-stack IoT health platform for respiratory muscle training in elderly patients, made of three parts: a touchscreen device for the patient, a Go backend, and a dashboard for clinicians.

I built it for WICO 2026, so it's a proof of concept: a working prototype of the whole system, not something deployed with real patients.

Patient device

ESP32-S3 firmware with a smooth, anti-aliased LVGL touchscreen UI. It guides patients through breathing sessions with a live pressure gauge, then uploads the results to the cloud.

It reads a differential pressure sensor (MPX100DP through an ADS1115 ADC) and a MAX30102 pulse oximeter over I²C, and handles WiFi onboarding, pairing to a patient, and running offline.

Security

Each device generates its own ECDSA P-256 keypair on first boot and signs every API request, with replay protection. Clinicians log in with JWT access/refresh tokens and bcrypt-hashed passwords.

Backend

A multi-tenant Go REST API. Clinics, nurses, patients, devices and sessions are all scoped per organization. It also estimates MIP (the patient's max breathing strength) and flags heart rate and SpO₂. It ships as a Docker image of about 8 MB.

Clinician dashboard

Next.js + TypeScript, with a patient list, custom SVG charts for pressure vs. target and adherence, a session log, device and WiFi management, and caseload reports.