Deployment
Deployment model
This frontend is a static build distributed from the dist output:
bash
pnpm buildThe result can be served from:
- Nginx
- CDN + object storage
- GitHub Pages for docs +
/preview/demo mode - any static hosting platform that can serve SPA routes correctly
Environment modes
The project currently uses these environment files:
.env.env.demo.env.test.env.prod
For production deployment, build with:
bash
pnpm buildIf you need a local production preview:
bash
pnpm previewIf you want the hosted-preview runtime locally:
bash
pnpm dev:demo
pnpm build:demoBackend assumptions
Production deployment assumes the backend is already reachable and stable.
Before shipping a frontend release, confirm:
- backend compatibility matrix is satisfied
pnpm typecheck:apiis green- generated API files are committed
- tenant switching, auth, and menu payloads match the deployed backend
Release-grade frontend checks
Run this before a production deploy:
bash
pnpm check
pnpm typecheck:api
pnpm test:unit
pnpm test:vue
pnpm buildFor release parity, use:
bash
pnpm check:ciStatic hosting rules
Your host must:
- serve
index.htmlfor SPA routes - cache static hashed assets aggressively
- avoid stale HTML during release rollouts
- preserve the frontend base path if you deploy below
/
If you publish the docs site to GitHub Pages, the workflow already builds:
- docs site at the repository base path
- demo preview at
/preview/
Docs site deployment
The docs site is built with VitePress:
bash
pnpm docs:build
pnpm docs:previewGitHub Pages deployment is handled by:
.github/workflows/docs-site.yml
Repository-side setup is documented in:
docs/github/repository-setup-checklist.md