Skip to main content

๐Ÿ“ฑ Frontend Setup Guide

Run and verify the Flutter app from the checked-in toolchain.

Prerequisitesโ€‹

  • Flutter 3.41.9 (mise.toml)
  • Dart SDK compatible with ^3.10.3 (pubspec.yaml)
  • Firebase CLI for emulator/deploy work
  • Chrome for the fastest local smoke test
  • Android Studio or Xcode only when working on those native targets

Install and runโ€‹

git clone git@github.com:Acesense/acesense-frontend.git
cd acesense-frontend
flutter pub get
flutter doctor
flutter run -d chrome

Firebase configuration is generated in lib/firebase_options.dart. Native builds also use android/app/google-services.json and ios/Runner/GoogleService-Info.plist; do not commit replacement credentials from another project.

Source layoutโ€‹

lib/
โ”œโ”€โ”€ config/ # build and runtime flags
โ”œโ”€โ”€ ds/ # design tokens and reusable widgets
โ”œโ”€โ”€ features/ # feature-sliced screens
โ”œโ”€โ”€ l10n/ # six-language localization
โ”œโ”€โ”€ models/ # Firestore and analysis models
โ”œโ”€โ”€ routing/ # go_router and auth redirect
โ”œโ”€โ”€ services/ # Firebase, upload, analysis, coach, notifications
โ””โ”€โ”€ state/ # Riverpod providers

Verifyโ€‹

flutter analyze --no-fatal-infos
flutter test --coverage
dart run tool/check_coverage.dart 100 lib/models/job.dart lib/services/ai_consent_service.dart

Run a focused test with its real path, for example:

flutter test test/unit/services/storage_service_test.dart

Build and deploy webโ€‹

flutter build web --release
firebase deploy --only hosting:app,firestore:rules,storage --project acesense-prod

The checked-in ./deploy.sh performs those two commands. Firebase Hosting serves build/web and rewrites unknown paths to index.html for go_router.

Common setup failuresโ€‹

SymptomCheck
Package resolution failsflutter --version, then flutter clean && flutter pub get
Firebase calls failProject ID is acesense-prod; Functions use europe-west1
Upload is rejectedUser has an active entitlement/trial and durable AI consent
Route opens sign-inThe route is protected and no Firebase user is signed in