System Case Study

Sarcopenia Diagnostic System

Clinical Tablet Monorepo (5 Sub-Apps + Web)

Flutter MonorepoBLE/USBFlutter Web
RoleCore Developer (Scratch Build)
Duration6 Months
ContextSPPB Geriatric Diagnostics
Main StackFlutter Monorepo • Melos • Flutter Web
01

The Concept & Purpose

A landscape-locked Android tablet system built from scratch to digitize the SPPB (Short Physical Performance Battery) clinical protocol. Developed as a Melos-managed Flutter monorepo with a shell orchestrator app and five standalone sub-apps — Balance Plate, Gait Speed, Chair Stand, Hand Grip, and Anthropometry — each runnable independently or launched on-demand by the shell. The same codebase also compiles Flutter Web builds for browser-based access.

02

Architecture & Data Routing

Shell Layersarcopenia — Orchestration, Auth, Patient search, Reports, and sub-app launcher
SubApps Layerbalance_plate, gait_speed, chair_stand, hand_grip, anthropometry (each standalone-capable)
SharedCore LayerShared package: BLE Manager, USB raw parser, ThemeBuilder, session contracts
Targets LayerAndroid (landscape-locked tablet) + Flutter Web from the same codebase
03

Toughest Challenge & Hard Decision

Enabling the shell app to launch sub-apps and receive their results while each sub-app also remains fully runnable in isolation. I solved this by defining a clean session-contract interface in the shared core package — the shell passes patient context via GoRouter deep links, and each sub-app reads from a scoped BLoC state that resolves whether it was launched standalone or orchestrated. Separately, connecting five BLE/USB sensors without thread blockage required a centralized reactive stream manager in the shared layer.

Technical Snippet Overview

sarcopenia-monorepo.snippet
// Melos monorepo check and GoRouter session orchestration
class SarcopeniaSessionNavigator implements ModuleNavigator {
  final GoRouter _router;
  final SarcopeniaSessionState _sessionState;

  @override
  void continueToModule(SarcopeniaModule nextModule) {
    _sessionState.markCompleted(_sessionState.currentModule);
    _sessionState.setCurrentModule(nextModule);
    
    final String targetPath = switch(nextModule) {
      SarcopeniaModule.balancePlate => AppRoutePaths.balancePlate,
      SarcopeniaModule.gaitSpeed => AppRoutePaths.gaitSpeed,
      SarcopeniaModule.chairStand => AppRoutePaths.chairStand,
      SarcopeniaModule.handGrip => AppRoutePaths.handGrip,
      SarcopeniaModule.anthropometry => AppRoutePaths.anthropometry,
    };
    
    _router.pushReplacement(targetPath);
  }
}

Systems Specs Registry

hardware5 BLE/USB medical sensors
targetsAndroid tablet + Flutter Web
isolationStandalone + orchestrated sub-apps
View Source Code

Implementation Features

  • Shell app orchestrates and launches sub-apps via GoRouter deep links with patient session context
  • Each sub-app runs fully standalone or within the shell — same binary, two modes
  • Flutter Web build targets served alongside the Android tablet client from a single codebase
  • Real-time BLE telemetry from ESP32 FSR sensors and Hand Dynamometers
  • USB Serial raw byte stream parsing for static balance plate stability tests
  • Automated SPPB clinical metric score aggregation and structured PDF reports

Technologies

Flutter MonorepoMelosFlutter WebBLE / USB SerialClean ArchitectureBLoC PatternMulti-App Orchestration
ankit.singh4x@gmail.com

© 2026 SaveBytes. All rights reserved.