Mobile client for the moveUP fitness platform.
- π Highlights
- π¦ Tech Stack
- ποΈ Architecture
- π Project Structure
- π οΈ Getting Started
- π§ͺ Testing
- π Documentation
- π Docker Build
- π Changelog
- π Fitness Start Onboarding: guest quiz, onboarding test catalog, guest test attempts, and completed-progress resume support before sign-up
- π End-to-end Auth Flow: sign in, sign up, email verification, password recovery, OTP verification, password reset, and logout
- πΆ Offline Flow: app-level connectivity tracking, blocking offline route, and automatic return to the auth flow after reconnect
- β¨ Startup Splash Flow: branded startup entry route with router-driven splash timing before auth or offline redirects
- ποΈ Clean Architecture in feature modules (Data β Domain β Presentation)
- π Network Layer built on Dio + Retrofit
- π§ Navigation with GoRouter, session-aware redirects, and startup/offline gating
- π¨ UIKit + Theming with shared buttons, dialogs, images, colors, gradients, and text styles
β οΈ Error Handling viaResultand typedFailurehierarchies- π Dependency Injection with GetIt + Provider
| Category | Technology |
|---|---|
| Framework | Flutter 3.41.0+ |
| State Management | flutter_bloc |
| Dependency Injection | get_it, provider |
| Navigation | go_router |
| Connectivity Tracking | connectivity_plus |
| HTTP Client | dio + retrofit |
| Code Generation | freezed, json_serializable, build_runner |
| Logging | logger |
| Testing | mockito, bloc_test, flutter_test |
| UI Components | flutter_svg, cached_network_image |
This app follows Clean Architecture principles:
βββββββββββββββββββββββββββββββββββββββββββ
β Presentation Layer β
β (Pages, Widgets, BLoC/Cubit) β
βββββββββββββββββββββ¬ββββββββββββββββββββββ
β
β uses
βββββββββββββββββββββΌββββββββββββββββββββββ
β Domain Layer β
β (Entities, UseCases, Repositories*) β * interfaces only
βββββββββββββββββββββ²ββββββββββββββββββββββ
β
β implements
βββββββββββββββββββββ΄ββββββββββββββββββββββ
β Data Layer β
β (DTOs, DataSources, Repositories Impl) β
βββββββββββββββββββββββββββββββββββββββββββ
lib/
βββ core/
β βββ constants/ # Shared app strings and asset references
β βββ di/ # Dependency injection
β βββ env/ # Envied-based environment config
β βββ failures/ # Feature and network failure types
β βββ network/ # Dio setup, interceptors, mappers, error DTOs
β βββ result/ # Result pattern
β βββ router/ # GoRouter config and route paths
β βββ services/ # Cross-feature services (network, token storage)
β βββ utils/ # Logger and analytics utilities
βββ features/
β βββ app/ # App composition and root widget
β βββ auth/
β β βββ data/ # DTOs, API client, repository implementation
β β βββ domain/ # Entities and repository contracts
β β βββ presentation/ # Pages, widgets, cubits, validators
β βββ fitness_start/ # Guest onboarding quiz, tests shell, and onboarding flow UI
β βββ offline/ # Connectivity state and blocking offline flow
β βββ splash/ # Branded startup splash screen
β βββ tests/ # Shared tests catalog and guest test attempt flow
β βββ debug/ # Internal debug screen
βββ uikit/
β βββ buttons/ # Shared buttons
β βββ dialogs/ # Shared dialogs
β βββ images/ # Shared image widgets
β βββ themes/ # Color, gradient, and typography system
βββ main.dart # Main entry point
βββ runner.dart # Bootstrap entrypoint
- Flutter SDK:
>=3.41.0 - Dart SDK:
>=3.11.0
-
Create a local
.envfile in the project root.touch .env
-
Fill in
API_URLin.env. -
Install dependencies:
flutter pub get
-
Run code generation:
flutter pub run build_runner build --delete-conflicting-outputs
-
Run the app:
flutter run
Run tests:
# Unit tests
flutter test
# Widget tests
flutter test test/features/*/presentation/
# Coverage (requires lcov)
flutter test --coverage
genhtml coverage/lcov.info -o coverage/htmlEnd-to-end auth and Fitness Start validation still requires a local .env with a reachable API_URL.
Generate API docs from Dart doc-comments:
dart doc --output doc/apiServe docs locally:
dart pub global activate dhttpd
dart pub global run dhttpd --path doc/apiThen open:
http://localhost:8080
Build Android APK using Docker:
docker build \
--build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
--build-arg VCS_REF=$(git rev-parse --short HEAD) \
--progress=plain \
--no-cache \
-t moveUP-app-android:latest .Extract APK files:
docker create --name temp-flutter moveUP-app-android:latest
docker cp temp-flutter:/artifacts/. ./apk-output/
docker rm temp-flutterAll notable changes to this project are documented in CHANGELOG.md.