Admin Panel Deployment
Firebase Hosting Setupโ
The admin panel is deployed to Firebase Hosting under the acesense-prod project.
Initial Setupโ
# Login to Firebase
firebase login
# Initialize hosting (already done)
firebase init hosting
Configurationโ
firebase.json:
{
"hosting": {
"site": "acesense-admin",
"public": "dist",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"rewrites": [
{ "source": "**", "destination": "/index.html" }
],
"headers": [
{
"source": "**",
"headers": [
{ "key": "X-Robots-Tag", "value": "noindex, nofollow, noarchive" },
{ "key": "X-Frame-Options", "value": "DENY" },
{ "key": "X-Content-Type-Options", "value": "nosniff" },
{ "key": "Referrer-Policy", "value": "strict-origin-when-cross-origin" }
]
}
]
}
}
The admin panel is a private internal tool, so the headers block sets noindex + clickjacking/MIME protections. Deploy targets the named site acesense-admin.
.firebaserc:
{
"projects": {
"default": "acesense-prod"
}
}
Deployment Stepsโ
1. Build Production Bundleโ
cd acesense-admin
pnpm build
This type-checks (tsc -b) and creates an optimized build in the dist/ folder.
2. Deploy to Firebaseโ
firebase deploy --only hosting
3. Verify Deploymentโ
Visit: https://acesense-prod.web.app (or custom domain if configured)
Deployment Checklistโ
- Run
pnpm buildsuccessfully - No TypeScript errors
- Test locally with
pnpm preview - Firestore rules deployed
- Admin emails whitelisted
- Deploy with
firebase deploy --only hosting - Verify live site works
- Test Google Sign-In
Custom Domain (Optional)โ
To use a custom domain like admin.acesense.io:
- Go to Firebase Console โ Hosting
- Click "Add custom domain"
- Follow DNS verification steps
- Wait for SSL certificate provisioning
CI/CDโ
GitHub Actions is retired for this org (2026-08-24) โ CI runs locally. Run the family sweep before every push and treat a red sweep as a red pipeline:
cd acesenseprod # the family root
./ci-local.sh # every repo, every default gate
./ci-local.sh acesense-admin # just this repo
Deploys are equally local and manual: pnpm build then
firebase deploy --only hosting --project acesense-prod from the repo (or the
repo's own deploy.sh where one exists). There is no deploy automation to
misconfigure, and no runner holding production credentials.
Troubleshootingโ
Build Failsโ
- Check for TypeScript errors:
pnpm build(runstsc -b); lint separately withpnpm lint - Ensure all dependencies installed:
rm -rf node_modules && pnpm install
403 Forbiddenโ
- User not in admin whitelist
- Firestore rules not deployed
- Check browser console for auth errors
Blank Pageโ
- Check browser console for errors
- Ensure Firebase config is correct
- Verify
dist/folder exists