BookMyStay BookMyStay Docs Buy Now
Updates & Maintenance

Upgrade Guide

How to safely upgrade your BookMyStay codebase to newer releases while preserving your database, images, and custom configurations.

Upgrading Code Sync

Because all hotel bookings, branch records, room inventory, and configuration settings reside in Cloud Firestore and Storage, upgrading the application code will never delete or corrupt your live database.

Pre-Upgrade Backup

Always create a full zip archive of your project directory before applying updates, and review the Changelog for any breaking schema adjustments.

Files to Preserve#

Keep these files safe before copying the new update so your Firebase keys, signing certificates, and credentials remain intact:

File Path What It Contains
admin_panel/lib/firebase_options.dart Admin Panel Firebase credentials
customer/lib/firebase_options.dart Customer App Firebase credentials
customer/android/app/google-services.json Android Firebase configuration
customer/ios/Runner/GoogleService-Info.plist iOS Firebase configuration
customer/android/key.properties & *.jks Production Android release signing keys
functions/service-account.json Firebase Admin SDK credentials (if configured)

Also keep your custom app icons, names, and package names.

Update the code#

  1. Commit your current project to main in GitHub Desktop or Git.
  2. Create a branch named after the version, for example v1.1.0.
  3. Unzip the new release into a separate folder. Copy its admin_panel/lib, customer/lib, each pubspec.yaml and assets/, functions/ (without node_modules) and firebase_setup/ into your project.
  4. Put back your own files from the table above, and commit.
  5. Merge the branch into main. If there are conflicts, keep the right lines between <<<<<<< and >>>>>>>.
  1. Back up your existing project directory to a separate location or ZIP archive.
  2. Unzip the new release into a new folder.
  3. Copy your preserved files from the table above into their matching locations in the new folder.
  4. Open the new folder in VS Code or Android Studio as your working project.

Redeploy and rebuild#

Run the new setup tool

Start the new firebase_setup tool with a fresh service account key and keep the mode Only add documents that don't exist yet. It updates the rules, indexes and Cloud Functions, and adds any new starter settings without touching your data.

Refresh each app

flutter clean
flutter pub get

Run these commands inside both admin_panel/ and customer/ folders. On a Mac, also run pod install --repo-update in the customer/ios/ folder.

Redeploy Cloud Functions & Hosting

cd functions && npm install && firebase deploy --only functions
cd ..
cd admin_panel && flutter build web --release && cd ..
cd customer && flutter build web --release && cd ..
firebase deploy --only hosting