HAUMonsters is a Flutter app for adding, editing, deleting, and viewing monster spawn points on a map.
- Flutter installed
- XAMPP or any PHP + MySQL local server
- Android emulator, Android phone, Windows, or Chrome
In the project folder, run:
flutter pub get- Copy the
backendfolder to your server so it becomes:
C:\xampp\htdocs\haumonsters_api
- Start
ApacheandMySQLin XAMPP. - Import
backend/haumonstersDB.sqlinto phpMyAdmin. - If needed, update the database settings in:
backend/config/database.php
Default database values are already:
DB_HOST = 127.0.0.1
DB_PORT = 3306
DB_NAME = haumonstersDB
DB_USER = root
DB_PASS = ''Open these in your browser:
http://localhost/haumonsters_api/
http://localhost/haumonsters_api/get_monsters.php
If they return JSON, the backend is working.
The app needs a different URL depending on where it runs.
flutter run -d windows --dart-define=API_BASE_URL=http://127.0.0.1/haumonsters_apiflutter run -d chrome --dart-define=API_BASE_URL=http://localhost/haumonsters_apiflutter run -d emulator-5554 --dart-define=API_BASE_URL=http://10.0.2.2/haumonsters_apiUse your PC's local IP address:
flutter run -d YOUR_DEVICE_ID --dart-define=API_BASE_URL=http://YOUR_PC_IP/haumonsters_apiExample:
http://192.168.1.5/haumonsters_api
Your phone and PC must be connected to the same Wi-Fi.
- Server not found: make sure Apache is running
- Database error: check
backend/config/database.php - Android phone cannot connect: use your PC IP, not
localhost - Android emulator cannot connect: use
10.0.2.2, notlocalhost - Image upload fails: make sure the backend
uploadsfolder can be written to
- Run
flutter pub get - Put
backendinhtdocs/haumonsters_api - Start Apache and MySQL
- Import
haumonstersDB.sql - Run Flutter with the correct
API_BASE_URL