Mobile app setup
The student app is in hostelhive-mobileapp and built with Flutter. It’s where students keep their QR pass, ask for late access, say they’re going home, file complaints and read their inbox. You’ll need Flutter 3.47 or newer on the stable channel (Dart 3.13+), plus Android Studio or Xcode. The app supports Android 10 and later.
-
Clone it and switch to
develop.Terminal window git clone https://github.com/Hostel-Hive/hostelhive-mobileapp.gitcd hostelhive-mobileappgit checkout develop -
Create
.envfrom the example and fill it in.Terminal window cp .env.example .envAPI_BASE_URL=https://YOUR_API_HOST/api/v1FIREBASE_API_KEY=your-firebase-web-api-keyUnlike the web app, this URL includes
/api/v1. From the Android emulator, a backend on your own machine is athttp://10.0.2.2:18080/api/v1. -
Run it.
Terminal window flutter pub getflutter run --dart-define-from-file=.env
Students sign in with the email address they were invited with. The first time, they finish setting up from the link in that email.
Push notifications need Firebase Cloud Messaging configured in the app and FCM_ENABLED=true on the backend. The backend’s push notification guide covers both sides.
Checks
Section titled “Checks”These run in GitHub Actions on every push, and it’s worth running them before you push:
dart format --set-exit-if-changed .flutter analyzeflutter test --coverageflutter build apk --debugThe code is organised as lib/core for theme, routing and shared widgets, lib/data for models and repositories, and lib/features with one folder per feature (auth, passes, complaints, inbox, qr, profile, home). Tests are in test/.