BookMyStay BookMyStay Docs Buy Now
Step 5 · Websites

Web Deployment (Admin Panel & Website)

Deploy the web Admin Panel and Customer Website to Firebase Hosting or standard Apache/Nginx web servers.

Web Hosting 20 min

BookMyStay has two web applications: the Admin Panel (admin_panel/) and the Customer Website (customer/). Both can be deployed to Firebase Hosting or uploaded to any cPanel / Nginx server.

Firebase Hosting provides global CDN edge delivery and free automated SSL certificates.

  1. Sign in with Firebase CLI:
    npm install -g firebase-tools
    firebase login
    firebase use --add
  2. Create the second hosting target for the Admin Panel:
    firebase hosting:sites:create yourhotel-admin
  3. Apply hosting targets to your sites:
    firebase target:apply hosting admin yourhotel-admin
    firebase target:apply hosting customer your-primary-project-id
  4. Create firebase.json in your root BookMyStay directory:
    firebase.json
    {
      "hosting": [
        {
          "target": "admin",
          "public": "admin_panel/build/web",
          "rewrites": [{ "source": "**", "destination": "/index.html" }]
        },
        {
          "target": "customer",
          "public": "customer/build/web",
          "rewrites": [{ "source": "**", "destination": "/index.html" }]
        }
      ]
    }
  5. Compile and deploy both web applications:
    cd admin_panel && flutter build web --release && cd ..
    cd customer && flutter build web --release && cd ..
    firebase deploy --only hosting

To deploy to cPanel, Apache, or Nginx:

  1. Compile web release builds:
    cd admin_panel && flutter build web --release
    cd ../customer && flutter build web --release
  2. Upload the contents of admin_panel/build/web/ to your admin subdomain (e.g. admin.yourhotel.com).
  3. Upload the contents of customer/build/web/ to your main customer domain (e.g. www.yourhotel.com).
  4. Ensure .htaccess is uploaded so single-page URL rewrites (such as /bookings) resolve without 404 errors.