This repository contains:
mobile/: Flutter mobile appbackend/: Node.js (Express) mock API used by the mobile app
- Flutter SDK (Dart is bundled with Flutter)
- Android Studio (or Android SDK + an emulator) for Android builds/runs
- Node.js + npm for the backend
- Windows PowerShell (recommended for the helper script)
From the repo root:
.\start-all.ps1Optional: run on a specific device/emulator ID:
.\start-all.ps1 -DeviceId <DEVICE_ID>What it does:
- Installs backend dependencies (if needed) and runs
npm startinbackend/ - Runs
flutter pub get(if needed) and thenflutter runinmobile/
cd .\backend
npm install
npm startBy default the API listens on port 3000 and binds to 0.0.0.0 (accessible from your phone on the same network).
cd .\mobile
flutter pub get
flutter runRun these commands from mobile/:
cd .\mobile
flutter build apk --debugcd .\mobile
flutter build apk --releaseAPK output path (default Flutter location):
- Release:
mobile/build/app/outputs/flutter-apk/app-release.apk - Debug:
mobile/build/app/outputs/flutter-apk/app-debug.apk
The mobile app uses a hardcoded API base URL in:
mobile/lib/services/api_service.dart→ApiService.baseUrl
Update this value to point to the machine where backend/ is running:
- Android Emulator (AVD): use
http://10.0.2.2:3000 - Real device: use your PC’s local IP on the same Wi‑Fi/LAN, e.g.
http://192.168.1.50:3000
Notes:
- Your phone and PC must be on the same network.
- Ensure Windows Firewall allows inbound connections to port 3000 (or allow Node.js).
- Can’t connect from device: verify
ApiService.baseUrl, backend is running, and port 3000 is reachable from the phone. - Emulator networking:
localhostfrom the emulator is the emulator itself; use10.0.2.2to reach your PC.