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.
- Sign in with Firebase CLI:
npm install -g firebase-tools firebase login firebase use --add - Create the second hosting target for the Admin Panel:
firebase hosting:sites:create yourhotel-admin - Apply hosting targets to your sites:
firebase target:apply hosting admin yourhotel-admin firebase target:apply hosting customer your-primary-project-id - Create
firebase.jsonin 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" }] } ] } - 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:
- Compile web release builds:
cd admin_panel && flutter build web --release cd ../customer && flutter build web --release - Upload the contents of
admin_panel/build/web/to your admin subdomain (e.g.admin.yourhotel.com). - Upload the contents of
customer/build/web/to your main customer domain (e.g.www.yourhotel.com). - Ensure
.htaccessis uploaded so single-page URL rewrites (such as/bookings) resolve without 404 errors.