Deployment and Production
Deploy the admin panel after Firebase, roles, data setup, app-specific workflows, and production QA are complete. The admin panel is a privileged web application, so deployment should be handled with the same care as any backend service that can read and update production data.
Production Requirements
Use a hosting provider that supports Next.js server routes and secure server-side environment variables.
Recommended baseline:
| Requirement | Recommendation |
|---|---|
| Node.js | Node.js 20.9 or newer |
| Package manager | Yarn through Corepack |
| Framework support | Next.js App Router with server routes |
| Firebase | Production Firebase project with Auth, Firestore, Storage, and any app-specific services enabled |
| Secrets | Server-side environment variables managed by the hosting provider |
| HTTPS | Required for production login, cookies, uploads, and provider callbacks |
Build locally before deploying:
corepack enable
corepack yarn install --immutable
corepack yarn typecheck
corepack yarn build
Environment Variables
Production needs two groups of Firebase values.
Public Firebase web config:
NEXT_PUBLIC_FIREBASE_API_KEY=
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=
NEXT_PUBLIC_FIREBASE_PROJECT_ID=
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=
NEXT_PUBLIC_FIREBASE_APP_ID=
Server-only Firebase Admin SDK values:
FIREBASE_PROJECT_ID=
FIREBASE_CLIENT_EMAIL=
FIREBASE_PRIVATE_KEY=
FIREBASE_STORAGE_BUCKET=
The public values are safe to expose to the browser. The Admin SDK values are not. Add Admin SDK values only in the hosting provider's encrypted environment variable manager.
App-specific integrations may require additional values:
SENDGRID_API_KEY=
EMAIL_FROM_ADDRESS=
STRIPE_SECRET_KEY=
OPENAI_API_KEY=
TWILIO_ACCOUNT_SID=
TWILIO_AUTH_TOKEN=
GOOGLE_MAPS_API_KEY=
Only configure provider keys for features enabled in the selected app.
Security Settings
Before production:
- set
ADMIN_ALLOW_ID_TOKEN_SESSION_FOR_SMOKE=0; - remove development-only test accounts;
- keep at least two owner accounts for recovery;
- restrict who can assign owner roles;
- keep service account JSON files out of Git and deployment artifacts;
- store private keys as server-side secrets;
- rotate credentials that were shared during setup;
- verify Firestore and Storage rules for the React Native app;
- confirm Audit Log records settings, uploads, imports, exports, and workflow actions.