Mobile Application
Relevant source files
The following files were used as context for generating this wiki page:
The Mobile Application is a cross-platform client built using the Flutter framework, designed to serve as the primary interface for the ClassMate AI-powered meeting assistant. Its core purpose is to facilitate audio capture during lectures or meetings, manage recording sessions, and provide a user interface for viewing AI-generated transcriptions and notes.
The application follows a modular, feature-based architecture and integrates with a hybrid backend system. It utilizes Firebase for identity management and synchronization while offloading heavy AI processing tasks—such as transcription via Whisper and note generation—to a dedicated Dockerized AI backend.
Sources: mobile_app/pubspec.yaml, PROJECT_STRUCTURE.md:14-53, README.md:11-30
Architecture and Core Components
The mobile application is structured into several key layers: Core, Features, and Shared. This modularity allows for clear separation between global configurations, specific user-facing modules, and reusable business logic.
Technical Stack
| Category | Technology | Purpose |
|---|---|---|
| Framework | Flutter (Dart ^3.10.8) | Cross-platform UI development |
| State Management | Riverpod | Reactive state and dependency injection |
| Navigation | Go Router | Declarative routing |
| Audio | flutter_sound | Audio capture and recording |
| Backend Sync | Firebase | Authentication and real-time Firestore sync |
| Storage | sqflite & SharedPreferences | Local data persistence and settings |
Sources: mobile_app/pubspec.yaml:31-77, PROJECT_STRUCTURE.md:86-93
Logical Structure
The application's lib directory is organized into functional segments:
- Core: Handles application-wide concerns such as theming (
app_theme.dart) and routing (app_router.dart). - Features: Modular components representing specific user flows, including Onboarding, Recording, Sessions, Notes, Settings, and Export.
- Shared: Contains common data models (e.g.,
session_model.dart) and singleton services like theapi_client.dartandrecording_service.dart.
Sources: PROJECT_STRUCTURE.md:14-53
Recording Pipeline and Data Flow
The mobile app acts as the entry point for the system's data pipeline. Audio is captured locally and queued for transmission to the AI backend for asynchronous processing.
Audio Capture Flow
The following diagram illustrates the lifecycle of a recording session from the mobile client's perspective:
The application utilizes flutter_sound for audio capture and permission_handler to manage Android/iOS microphone access. Recorded audio is stored in a session-specific directory before being processed by the upload_queue_service.dart.
Sources: mobile_app/pubspec.yaml:45-46, PROJECT_STRUCTURE.md:122-130, GAPS_IMPLEMENTATION_SUMMARY.md:17-25
Data Synchronization
Synchronization is handled through a hybrid approach. User identity and session metadata are synchronized via Firebase Auth and Cloud Firestore, while high-volume audio data and large transcriptions are managed via REST API calls to the FastAPI backend.
Sources: README.md:11-30, PROJECT_STRUCTURE.md:115-120
Platform Configuration and Permissions
The application requires specific hardware and network permissions to function correctly, particularly on Android and iOS.
Android Manifest Requirements
The AndroidManifest.xml defines several critical permissions for background operation and hardware access:
- Audio Recording:
android.permission.RECORD_AUDIOis required for capturing lectures. - Foreground Services:
android.permission.FOREGROUND_SERVICEandandroid.permission.FOREGROUND_SERVICE_MICROPHONEensure the app can continue recording when minimized. - Networking:
android.permission.INTERNETfor backend communication and Firebase sync. - Storage:
android.permission.WRITE_EXTERNAL_STORAGEfor caching audio files locally.
Sources: mobile_app/android/app/src/main/AndroidManifest.xml:2-8
Security and Identity
The app utilizes Firebase for Google Sign-In and email authentication. Configuration for these services is maintained in the google-services.json file, which includes:
- Project ID:
classmate-3c4cc - Package Name:
com.deb.classmate(orcom.classmate.mobile_appper documentation updates) - OAuth Client IDs: Specific IDs for Android and web-based authentication flows.
Sources: mobile_app/android/app/google-services.json:2-25, MISSING_INFO.md:18-35
Key Features and Services
Core Services
| Service | File Path | Description |
|---|---|---|
| API Client | lib/shared/services/api_client.dart | Handles RESTful communication with the FastAPI backend. |
| Recording Service | lib/shared/services/recording_service.dart | Manages the audio hardware and recording state. |
| Upload Queue | lib/shared/services/upload_queue_service.dart | Ensures audio chunks are uploaded reliably, even during poor network conditions. |
| Session Manager | lib/shared/services/session_manager.dart | Handles the lifecycle of recording sessions and local metadata. |
Sources: PROJECT_STRUCTURE.md:44-50
User Interface Modules
The application is composed of several feature-specific pages:
- Onboarding: A multi-slide introduction to the app's recording capabilities.
- Recording Page: Features a real-time duration timer and (planned) waveform visualization.
- Notes Page: Displays AI-generated summaries, key points, and action items derived from transcripts.
- Processing Page: Shows the current status of background AI tasks like transcription and diarization.
Sources: PROJECT_STRUCTURE.md:25-42, GAPS_IMPLEMENTATION_SUMMARY.md:10-53
Conclusion
The ClassMate Mobile Application provides a comprehensive Flutter-based frontend that bridges local audio capture with sophisticated cloud-based AI processing. By leveraging a modular architecture and specialized services for recording and uploading, it enables students and professionals to convert long-form audio into actionable insights. While core UI and navigation are established, the system relies heavily on background services and foreground permissions to maintain recording integrity during extended sessions.