Firebase (& GCP)
Firebase is used across all clients and the API, so treat it as core infrastructure. (Each Firebase project is backed by a GCP project of the same id.)
Placeholders like
<PROD_FIREBASE_PROJECT>/<STAGING_FIREBASE_PROJECT>and the staging hosts are filled with their real values in the private operations docs (kept out of this public site).
The two projects
| Environment | Firebase / GCP project id | Used by |
|---|---|---|
| Production | <PROD_FIREBASE_PROJECT> |
prod app flavor, web app, admin, API |
| Staging | <STAGING_FIREBASE_PROJECT> |
staging app flavor, staging API |
App IDs per platform are recorded in oxygen-alliance-app/firebase.json (Android, iOS, web for both projects).
FILL: which Google account OWNS these projects? Confirm it is an org/role account, not a
personal one. List all members + roles. Note GCP billing account + who pays — see [16 *(private handover docs)*.]
Firebase features in use
| Feature | Where | Notes |
|---|---|---|
| Authentication | app, web, admin | Google sign-in + email; API links users by Firebase UID |
| Cloud Storage | app/web upload; API deletes | bucket = FIREBASE_BUCKET_NAME; see 12-file-storage.md |
| Cloud Messaging (FCM) | API → devices | push notifications via Admin SDK; device tokens in device_id table |
| Crashlytics | app | crash reports; mapping.txt uploaded on prod builds |
| Analytics | app (and GA on web via nuxt-gtag) |
usage analytics |
Config files & where they live
| File | Component | Notes |
|---|---|---|
<PROD_FIREBASE_PROJECT>.json (Admin SDK service account) |
API | FIREBASE_FILE_NAME; loaded via FIREBASE_SERVICE_FILE remote link 🔑 |
google-services.json |
app (Android, per flavor) | prod → <PROD_FIREBASE_PROJECT>, staging → <STAGING_FIREBASE_PROJECT> |
GoogleService-Info.plist |
app (iOS) | for the planned iOS build |
firebaseConfig.ts / firebaseConfig.js |
web / admin | web SDK config (from VITE_* env) |
lib/firebase_options*.dart |
app | generated by FlutterFire |
These config files are gitignored in the repos (not present in these clones). The new engineer regenerates them with
flutterfire configure(app) or copies prod values from the Firebase console / vault.[TODO: confirm where the API's service-account JSON is hosted (theFIREBASE_SERVICE_FILEremote link) and back it up.]
Service accounts (Play)
The Google Play upload service accounts (PROD_/STAGING_SERVICE_ACCOUNT) are GCP service
accounts granted access in Play Console — related but distinct from the Firebase Admin SDK
account. See 10-mobile-app.md.