System Case Study

UVThera App

Phototherapy Session & Dosage Tracker

FlutterBLEClean Architecture
RoleLead Software Developer
DurationActive Ongoing
ContextAyushman Bharat / BLE Medical app
Main StackFlutter • BLE Telemetry • ABHA ID Integration
01

The Concept & Purpose

A multi-platform Flutter application serving as the patient client for a clinical UV phototherapy device. Features real-time BLE therapy telemetry, local notification triggers, Google OAuth, and Ayushman Bharat Health Account (ABHA) demographic verification.

02

Architecture & Data Routing

Client LayerFlutter Cross-Platform Client (Android & iOS)
Authentication LayerFirebase Auth + Google Sign-In protocols
Telemetry LayerShared BLE connection core registering active sensor streams
Standard LayerABHA Card verification mapping to standard medical registry profiles
03

Toughest Challenge & Hard Decision

Synchronizing live Bluetooth sensor feedback (measuring uv intensity / duration) with visual circular loading ring states without UI lag. I resolved this by streaming BLE raw events through a lightweight RxDart buffer, dispatching updates directly to a dedicated BLoC state controller, which avoids rebuild triggers on the rest of the layout tree.

Technical Snippet Overview

uvthera-app.snippet
// Stream BLE telemetry and compute live phototherapy dosage
class DosageSessionController extends ValueNotifier<DosageSessionState> {
  final BleConnectionService _bleService;
  StreamSubscription? _bleSubscription;

  void startSession(double targetDoseJoules) {
    _bleSubscription = _bleService.telemetryStream.listen((sensorData) {
      final double liveIntensity = sensorData.intensityMwCm2;
      final double accumulatedDose = state.deliveredDose + (liveIntensity * 0.001);
      
      value = state.copyWith(
        deliveredDose: accumulatedDose,
        progress: (accumulatedDose / targetDoseJoules).clamp(0.0, 1.0),
      );
      if (accumulatedDose >= targetDoseJoules) {
        stopSession(completed: true);
      }
    });
  }
}

Systems Specs Registry

syncReal-time BLE dosage
verificationABHA Card verified
UXCustom circular gauge
View Source Code

Implementation Features

  • Custom circular visual gauge tracking live therapy dosage delivery status
  • Robust BLE abstraction services scanning and connecting to UV emitters
  • ABHA digital health account profile registration and parsing verification
  • Push notification systems reminding users of scheduled phototherapy treatments

Technologies

FlutterBLE TelemetryABHA ID IntegrationBLoC PatternGoRouter
ankit.singh4x@gmail.com

© 2026 SaveBytes. All rights reserved.