Demo Deployment Runbook
Use this page when you want the shortest executable path to turn the current frontend preview into a real hosted full-stack demo.
This runbook assumes:
- backend runtime uses
docker-compose.demo.yml - backend config starts from
.env.demo.example - frontend build starts from
.env.demo-live.example - the hosted demo points to a real Laravel backend, not the built-in demo runtime
1. Prepare the backend first
In the backend repository:
cp .env.demo.example .env.demo
docker compose -f docker-compose.demo.yml up -d
docker compose -f docker-compose.demo.yml exec app php artisan key:generate --force
docker compose -f docker-compose.demo.yml exec app php artisan migrate:fresh --seed --forceDo not build the live frontend bundle until the backend URL and health probes are stable.
2. Prepare the frontend live-demo environment
Create a dedicated env file:
cp .env.demo-live.example .env.demo-liveReplace these values:
VITE_SERVICE_BASE_URLVITE_OTHER_SERVICE_BASE_URLVITE_REVERB_SCHEMEVITE_REVERB_HOSTVITE_REVERB_PORTVITE_REVERB_APP_KEY
Keep:
VITE_APP_RUNTIME=backend
Do not use VITE_APP_RUNTIME=demo for a hosted full-stack environment.
3. Build the live demo frontend
pnpm install
pnpm build --mode demo-liveDeploy the generated dist directory to your static host.
Recommended first targets:
- Vercel
- Netlify
- object storage + CDN
- any Nginx-based static host
4. Verify frontend pairing
Before sharing the demo URL, run:
pnpm typecheck:api
pnpm test:fullstackThis confirms the generated SDK still matches the backend and that the frontend can log in and interact with the real seeded backend.
5. Manual smoke checks
Confirm these flows in the hosted environment:
- login succeeds
- tenant switching succeeds
- user page loads
- audit list loads
- selected demo-safe drawers such as language, organization, or team still save correctly
The public static preview is not enough to validate these flows. Use the hosted live-demo bundle instead.
6. Rollback
Frontend rollback should always be artifact-based.
Use this order:
- redeploy the previous static frontend bundle
- if the problem is contract drift, roll backend and frontend together according to the compatibility matrix
- rerun
pnpm typecheck:apiand the pairing smoke before re-promoting
7. First public promotion checklist
Do not share the hosted demo URL until all of these are true:
- backend health endpoints are green
- frontend live-demo build is deployed successfully
pnpm test:fullstackis green- compatibility matrix is current
- seeded credentials and reset policy are documented
- docs clearly distinguish:
- static preview
- hosted full-stack demo