How ruqaiyasattar/digitalstethoecopeai works
Purpose and Runtime
Mboathoscope is a Flutter digital-stethoscope mobile app for recording, visualizing, playing, sharing, and managing heart/lung audio. The README describes future or intended ML-based abnormality analysis, but no dedicated model, inference, or backend code is present in the tree. Primary runtime target is Android, with Flutter web scaffolding also included.
Application Entry and Platform Bootstrap
Flutter starts from lib/main.dart, which initializes the app and routes into its screen flow. Android launches the Flutter host activity at android/app/src/main/kotlin/com/mboalab/community/opensource/outreachy/mboathoscope/MainActivity.kt, governed by android/app/src/main/AndroidManifest.xml. Web packaging is represented by web/index.html and web/manifest.json.
User Navigation and Screen Layer
The UI is organized as a linear onboarding-to-recording experience:
• lib/screens/StartPage.dart provides the initial/splash-facing entry.
• lib/screens/RolePage.dart implements the boarding/role selection stage.
• lib/screens/HomePage.dart is the main recording and recorded-audio workspace.
This screen boundary separates user navigation from reusable recording controls and device-facing services.
Recording and Audio Interaction Components
The lib/buttons/ area contains the main recording workflow UI:
• lib/buttons/app_body.dart and lib/buttons/headerHalf.dart compose the primary home content.
• lib/buttons/CustomButton.dart and lib/buttons/SaveButton.dart represent recording and persistence actions.
• lib/buttons/RecordingList.dart manages presentation of saved recordings.
• lib/buttons/WaveformButton.dart exposes waveform-oriented playback/visualization interaction.
Control flow is user action → recording/playback UI state → permission or storage service → updated recording list. The repository has no separate domain/model layer, so UI components likely own much of this orchestration.
Device and Persistence Boundary
Native device access is abstracted into Flutter services:
• lib/services/permission_management.dart handles microphone or storage permission flow.
• lib/services/storage_management.dart encapsulates local recording storage and retrieval.
• lib/services/toast_services.dart centralizes user-visible operation feedback.
These services form the boundary between Dart UI code and platform/file-system capabilities. Audio recordings appear designed for local-device lifecycle management rather than remote upload or server synchronization.
Supporting UI and Feedback
Reusable controls and dialogs support the primary workflow:
• lib/CustomButton.dart and lib/buttons/textButton.dart provide shared interaction elements.
• lib/Dialogue/alert_dialog_model.dart supports confirmation/error dialogs, likely for destructive recording actions.
• assets/images holds packaged visual assets.
Infrastructure and External Services
The application is dependency-managed through pubspec.yaml and runs with Flutter 2.5.3+. Android builds use Gradle under android/app/build.gradle; no cloud infrastructure, API client, database, authentication provider, or ML model artifact is represented. The only explicit external destination mentioned in product behavior is recording sharing, whose implementation is expected to be dependency/platform mediated rather than a repository-hosted service.
Main entry points: app_body.dart Home content composition · CustomButton.dart Recording controls · main.dart Flutter entry · SaveButton.dart Save recording
Components 20
Platform Bootstrap
- Flutter entry · Initializes the app and screen flow.
lib/main.dart - Android host activity
android/app/src/main/kotlin/com/mboalab/community/opensource/outreachy/mboathoscope/MainActivity.kt - Android manifest
android/app/src/main/AndroidManifest.xml - Web package shell
web/index.html - Web manifest
web/manifest.json - Flutter dependencies · Defines Flutter and platform-mediated capabilities.
pubspec.yaml - Android build
android/app/build.gradle
Flutter UI Flow
- Start page
lib/screens/StartPage.dart - Role selection
lib/screens/RolePage.dart - Home workspace · Main recording and saved-audio workspace.
lib/screens/HomePage.dart - Packaged images
assets/images
Recording Workflow
- Home content composition
lib/buttons/app_body.dart - Recording controls
lib/buttons/CustomButton.dart - Save recording
lib/buttons/SaveButton.dart - Saved recordings list
lib/buttons/RecordingList.dart - Waveform playback
lib/buttons/WaveformButton.dart - Confirmation dialogs
lib/Dialogue/alert_dialog_model.dart
Device Services
- Permission management · Handles microphone or storage permission flow.
lib/services/permission_management.dart - Local recording storage · Stores and retrieves recordings on-device.
lib/services/storage_management.dart - Operation feedback
lib/services/toast_services.dart
Connections 22
- Android manifest → Android host activity: launches
- Android host activity → Flutter entry: hosts
- Web package shell → Flutter entry: bootstraps
- Web manifest → Web package shell: metadata for
- Flutter entry → Start page: starts
- Start page → Role selection: continues to
- Role selection → Home workspace: enters
- Home workspace → Home content composition: composes
- Home content composition → Recording controls: includes
- Home content composition → Save recording: includes
- Home content composition → Saved recordings list: shows
- Home content composition → Waveform playback: provides
- Recording controls → Permission management: requests access
- Recording controls → Local recording storage: records via
- Save recording → Local recording storage: persists
- Local recording storage → Saved recordings list: loads recordings
- Saved recordings list → Waveform playback: selects audio
- Recording controls → Operation feedback: reports status
- Save recording → Confirmation dialogs: may confirm
- Flutter dependencies → Flutter entry: supplies packages
- Android build → Android host activity: builds
- Packaged images → Home workspace: supports UI