Hotel Booking is an all-in-one property management suite for rental property websites. List unlimited accommodations and services, accept direct online reservations, synchronize all bookings across OTAs and more.
With the Hotel Booking Application you can:
- View and manage your bookings.
- View and manage your payments.
- Create new bookings or make changes to existing ones on-the-go.
- See real time availability.
Note: You will need a WordPress website and the Hotel Booking plugin from MotoPress to use this application.
- Flutter 3.38.1 or later, with Dart 3.10.0 or later, below 4.0.0 (see
pubspec.yaml). The web workflow has been verified with Flutter 3.38.10 / Dart 3.10.9. - A WordPress website served over HTTPS, with the MotoPress Hotel Booking REST API available and a consumer key/secret with permissions for the operations you use.
- Android development: JDK 17 and Android SDK Platform 36. The project uses Android Gradle Plugin 8.13.2, Gradle 8.13, and Kotlin 2.1.20. Android devices must run API 24 or later; compile and target SDK are 36.
- iOS development: macOS, Xcode, and CocoaPods. Device and release builds require Apple signing configuration.
- Install Flutter with the versions required above.
- Clone this repository and navigate to its
mphb_appdirectory. - Run
flutter doctorand resolve issues for the platform you intend to use. - Run
flutter pub getto install dependencies. - Run
flutter gen-l10nto generate localization files.
Run commands below from the repository root. Use flutter clean only when troubleshooting stale build caches, then rerun flutter pub get and flutter gen-l10n.
flutter run -d web-server --web-port 9999- Wait until Flutter reports that the app is being served.
- Open
http://localhost:9999/in your browser. Browser device emulation is useful for checking the mobile layout. - Edit app source in
lib/. - Use
rfor hot reload where supported, orRfor hot restart. Refresh the browser manually if needed. See Flutter hot reload.
Keep the same hostname and port between sessions so browser storage uses the same origin. The domain is stored in SharedPreferences; API credentials use flutter_secure_storage. When upgrading from the old storage format, credentials are migrated from SharedPreferences when their secure-storage entries are empty.
The browser must be able to call the website's REST API; the website must allow the web app's origin and Authorization header through its CORS configuration. Use localhost for local development and HTTPS when hosting the web app, as required by the web secure-storage implementation.
web/index.html uses Flutter's generated flutter_bootstrap.js and loads jsQR for browser QR scanning. See Flutter web initialization. Camera scanning needs browser permission and access to the jsQR CDN.
- Install and configure Xcode and CocoaPods; check
flutter doctor. - Run
open -a Simulator. - Run
flutter devicesto find the simulator ID. - Run
flutter run -d <device-id>, replacing<device-id>with that ID.
- Connect and trust the device, and configure signing in
ios/Runner.xcworkspace. - Enable Developer Mode on the device if required by iOS.
- Run
flutter devices, thenflutter run -d <device-id>. - Keep the device unlocked until the app launches.
- Install Android Studio, JDK 17, Android SDK Platform 36, and the required SDK tools. Run
flutter doctor --android-licensesto review and accept the SDK licenses. - Create and start an emulator using Android Studio, or connect an Android device with USB debugging enabled. Use API 24 or later.
- Run
flutter devices, thenflutter run -d <device-id>.
A release build is not required for emulator development.
- Edit translations in
lib/l10n/*.arb, then runflutter gen-l10n. Commit the updated generatedapp_localizations*.dartfiles alongside translation changes. - The app imports localization classes from
package:mphb_app/l10n/app_localizations.dart. qr_code_scanneris a local path dependency inthird_party/qr_code_scanner, with Android and web compatibility fixes. Keep this directory when cloning or packaging the source.- Keep dependency versions and overrides aligned with
pubspec.yamlandpubspec.lock.
flutter analyze
flutter test
flutter build webThe foundation tests cover API URL normalization, error messages, QR payload parsing, and create-booking validation. Also test login, bookings, payments, calendar refresh, booking creation, status changes, and deletion against a real Hotel Booking site before release. Login now checks API credentials before entering the app. When creating a booking, customer first name, last name, email, and phone are optional; an entered email must be valid. The booking status can be Confirmed (default) or Pending.
- Update the version name and build number in
pubspec.yaml. - Run
flutter pub getandflutter gen-l10n. - Run the checks above and verify the app on the target platform.
- Configure platform signing. Keep credentials, signing keys, and local configuration out of version control.
- Configure the signing team and provisioning in
ios/Runner.xcworkspace. - Run
flutter build ipato produce an archive and IPA. - Locate the archive at
build/ios/archive/Runner.xcarchiveand the exported IPA underbuild/ios/ipa/. - Validate and distribute the build using Apple's upload tools or Xcode Organizer.
See Flutter's iOS release guide.
The release build reads signing settings from android/key.properties. Create that local file with your keystore details:
storePassword=YOUR_STORE_PASSWORD
keyPassword=YOUR_KEY_PASSWORD
keyAlias=YOUR_KEY_ALIAS
storeFile=/absolute/path/to/upload-keystore.jksandroid/key.properties and Android keystore files are ignored by Git. Use the appropriate upload key for the existing app. See Flutter's Android signing guide.
- Run
flutter build appbundle. - Locate
build/app/outputs/bundle/release/app-release.aab. - Upload the bundle to Google Play Console for testing or release.
Run flutter build web. The deployable output is in build/web/.
- Run
flutter pub run flutter_launcher_icons:main. - Flutter Launcher Icons.
- App display name.
- https://docs.flutter.dev/get-started/install
- https://fonts.google.com/icons
- https://api.flutter.dev/flutter/material/Colors-class.html
- https://motopress.github.io/hotel-booking-rest-api/
Anyone is welcome to contribute.
Made with 💙 by MotoPress.
All trademarks, logos and brand names are the property of their respective owners.
