Docs hierarchy
- /ecosystems: create a new ecosystem and wire Firebase project-level config.
- /apps: create global or tenant apps under an ecosystem.
1. Create Firebase Project
- Create a new Firebase project.
- Switch billing plan from Spark to Blaze.
- Enable Authentication, Firestore, and Storage.
- Create a Web App for your global app.
- Save these values from Firebase Web config and place them as follows:
apiKey,authDomain,projectId,storageBucket,messagingSenderId,appId, optionalmeasurementId. - Create a service account key JSON for local admin/server tasks and place it at
packages/ecosystem/fireux-<name>/src/config/firebase/service-account.json.
Firebase console checklist (Bringli baseline):
- Auth providers: enable
Google,Email/Password, andAnonymous. - Google Auth support email can be temporary now. TODO: replace personal Gmail with business support email.
- Set server region to Zurich
europe-west6. - TODO (FireUX): enable additional auth providers later.
2. Create Ecosystem Package
Fast path command (repo-local scaffolder):
pnpm create:ecosystem -- --name <name> --firebase-project <firebase-project-id> This is the repo equivalent of an npm create flow for ecosystems. Use pnpm create:ecosystem -- --help for options. Display labels are auto-generated from <name>.
Install Firebase CLI first:
npm install -g firebase-toolsUse this package shape:
packages/ecosystem/fireux-<name>/package.jsonpackages/ecosystem/fireux-<name>/registry.jsonpackages/ecosystem/fireux-<name>/README.mdpackages/ecosystem/fireux-<name>/docs/packages/ecosystem/fireux-<name>/.firebasercpackages/ecosystem/fireux-<name>/tsconfig.jsonpackages/ecosystem/fireux-<name>/src/module.tspackages/ecosystem/fireux-<name>/src/config/firebase/ecosystem.config.tspackages/ecosystem/fireux-<name>/src/config/firebase/service-account.json(commit placeholder shape only; keep real credentials out of git)packages/ecosystem/fireux-<name>/src/runtime/public/
3. Place Firebase Values Correctly
- Put
apiKey,authDomain,projectId,storageBucket,messagingSenderIdinpackages/ecosystem/fireux-<name>/src/config/firebase/ecosystem.config.tsunder thefirebaseobject. - Put Firebase web
appIdin app.env:NUXT_FIREBASE_APP_ID. - Put optional Firebase web
measurementIdin app.env:NUXT_FIREBASE_MEASUREMENT_ID. - Save service account JSON at
packages/ecosystem/fireux-<name>/src/config/firebase/service-account.json. - Set default Firebase project binding in
packages/ecosystem/fireux-<name>/.firebaserc.
4. Create Global App
For full app scaffolding and app-level env/deploy configuration, continue to /apps.
projects/<ecosystem>/<app-id>/app/projects/<ecosystem>/<app-id>/public/projects/<ecosystem>/<app-id>/server/projects/<ecosystem>/<app-id>/nuxt.config.tsprojects/<ecosystem>/<app-id>/package.jsonprojects/<ecosystem>/<app-id>/tsconfig.jsonprojects/<ecosystem>/<app-id>/firebase.jsonprojects/<ecosystem>/<app-id>/.env
Add ecosystem-level Firebase project binding at projects/<ecosystem>/.firebaserc.
Do not place .firebaserc inside app folders under projects/*/*.
Setup Hosting during app scaffold and use a clean site id without numeric noise when possible (example: bringli).
TODO per app: define and test Firestore Database Rules before production release.
5. Nuxt Config Pattern
export default defineNuxtConfig(
defineFireuxConfig({
ecosystem: '<ecosystem>',
id: '<app-id>',
name: '<App Name>',
shortName: '<Short Name>',
role: 'global',
modules: ['fireux-<name>'],
})
)6. Local Credential Setup
Preferred local setup: GOOGLE_APPLICATION_CREDENTIALS points to packages/ecosystem/fireux-<name>/src/config/firebase/service-account.json.
Alternatives: FIREBASE_SERVICE_ACCOUNT_FILE or FIREBASE_SERVICE_ACCOUNT.
7. Validate
pnpm guardpnpm typecheck:packagespnpm typecheck:apps- Run app and verify
/devenvironment panel is healthy.