ADR-001: Mobile Technology Stack
Status
Accepted
Context
The platform must be delivered as a native-quality app on both Android and iOS. The target users — students and field coordinators — are in urban schools where device diversity is high: some users will be on current-generation Android hardware; others on entry-level handsets from 2019–2021. The key constraints are:
- Single codebase preferred: A small team (2 frontend developers) cannot maintain two native codebases.
- Low-end device compatibility: The app must perform acceptably on 2GB RAM Android devices.
- Offline-first: Core features (health logging, video playback) must work without internet — a critical requirement for field coordinators.
- Rapid iteration: Iteration 1 has a 10-week delivery window.
Options Considered
| Option | Description | Trade-offs |
|---|---|---|
| Flutter | Google's cross-platform SDK using Dart | Single codebase, near-native performance, strong offline support |
| React Native | JavaScript-based cross-platform | Large ecosystem, but weaker performance on low-end Android and heavier JS bridge overhead |
| Native (Swift + Kotlin) | Separate iOS and Android codebases | Best performance, but doubles team size requirement and delivery timeline |
Decision
We will use Flutter for the mobile application development across Android and iOS.
Dart compiles to native ARM code, eliminating JavaScript bridge overhead. Flutter's widget system gives pixel-perfect control without relying on native OS components — critical for consistent UX on diverse Android hardware.
Rationale
- Flutter's offline support via
sqfliteandhivepackages directly satisfies the offline-first requirement (see ADR-004). - The single codebase reduces Iteration 1 delivery risk significantly.
- Flutter has proven performance benchmarks on sub-2GB Android devices in comparable health data collection apps.
Consequences
Positive
- Single codebase for Android and iOS — one release pipeline, one test suite.
- Dart compiles to native ARM — strong performance on budget devices.
- Rich widget library reduces custom UI development time.
- Large plugin ecosystem for camera, GPS, local storage, and notifications.
Negative
- Flutter apps have a larger initial download size (~15–25 MB) compared to native.
- Dart is less widely known than JavaScript — team familiarity must be assessed at Discovery.
- Any specialised peripheral hardware would require a platform channel bridge (no such hardware currently identified).