Use your own Firebase project
In shortPaste your Firebase service account key file into the Firebase connector in Backend → Cloud. MonstarX checks it with Google, then your app can use Firestore, Firebase sign-in, Cloud Storage, push messages and the Realtime Database. You can also make Firestore the app's main data store, and copy its existing tables across.
Firebase is Google’s set of app services: a document database called Firestore, sign-in, file storage, push notifications and more. If you already have a Firebase project — maybe with an existing mobile app — you can connect it to a MonstarX app and use any of those services from it.
You can use Firebase for one thing only (say, sending push notifications to your mobile app’s users) or make Firestore the app’s database, so your web app and your other apps share the same data.
Before you start
Section titled “Before you start”- A Firebase project, and access to its settings in the Firebase console.
- For signing people in with Firebase Authentication, a web app added to that Firebase project.
How do I connect Firebase?
Section titled “How do I connect Firebase?”-
In the Firebase console, open Project settings → Service accounts and click Generate new private key. A JSON file downloads.
-
In MonstarX, open your project and click Backend in the top bar, then Cloud.
-
Under Connectors, click Connect beside Firebase.
-
Open the JSON file in a text editor, copy all of it, and paste it into Service account key file. MonstarX reads your project’s id from it.
-
Fill in the optional fields only if you need them:
- Web API key — from Project settings → General → Your apps → Web app → apiKey. Only needed to sign people in with Firebase Authentication.
- Storage bucket — only if your files are not in the project’s default bucket.
- Realtime Database URL — only for the Realtime Database. Firestore needs nothing here.
-
Click Connect Firebase. MonstarX checks the key with Google before saving it, and shows what it found beside Connected — your project’s id and its Firestore collections, or “no Firestore database yet”.
If you pasted the wrong file — for example the small web app config instead of the service account key — MonstarX refuses it and says which fields are missing.
What can my app do with Firebase?
Section titled “What can my app do with Firebase?”Once connected, ask for the feature in plain words, like “send a push notification to members when a class is cancelled”. MonstarX builds it with Firebase:
| Firebase service | What your app can do |
|---|---|
| Firestore | Add, read, search, update and delete documents; count them |
| Authentication | Sign people up and in, reset passwords, and manage users (needs the web API key) |
| Cloud Storage | Upload files, get their download links, list and delete them |
| Cloud Messaging | Send push notifications to a device or a topic |
| Realtime Database | Read and write data (needs the Realtime Database URL) |
Everything runs on your app’s server, so visitors never see your key.
Can Firestore be my app’s database?
Section titled “Can Firestore be my app’s database?”Yes. Every app starts with MonstarX’s own database, but you can make Firestore the place it keeps its data instead.
-
Connect Firebase first (see above).
-
In BackendCloud, find Where this app keeps its data.
-
Choose Firestore (your Firebase project). Before Firebase is connected, it reads “connect Firebase first” and cannot be picked.
-
If the app already has data, click Copy existing data to bring it across, and confirm.
From then on:
- MonstarX builds with collections and documents instead of tables, and looks at your real collections before writing code — it never invents fields your data does not have.
- BackendDatabase shows your Firestore Collections and their documents. They are read-only there; the app writes them.
- Accounts stay with MonstarX. People still sign in the way they did, and BackendUsers works as before. That is why MonstarX keeps its own database rather than deleting it.
To switch back, choose MonstarX Database in the same place. The app returns to its own database exactly as it was.
What does Copy existing data do?
Section titled “What does Copy existing data do?”- Each table becomes a collection with the same name, and each row a document. The row’s id becomes the document’s id.
- Running it again updates those documents instead of doubling them.
- The four sign-in tables stay in MonstarX’s database, where accounts live.
- It deletes nothing, in either place.
- A large app may be copied in parts. If it says it stopped to keep the request short, run it again and it carries on where it left off.
Good to know
Section titled “Good to know”- Firestore or Supabase, not both. An app keeps its data in one place. To go from Supabase to Firestore, move the data back to MonstarX’s database first. The Firebase connector itself still works beside Supabase for storage, messaging or sign-in.
- No Firebase SDK in your app. MonstarX reaches Firebase through a built-in helper that works the same in the preview and the published app.
- Push to mobile devices needs a device token from your mobile app; MonstarX sends to tokens the app is given.
- Publishing to Google Cloud Run is a different connector: see Publish to other hosts.
Frequently asked questions
Section titled “Frequently asked questions”Where do I find the service account key file?
In the Firebase console: Project settings → Service accounts → Generate new private key. Paste the whole JSON file into Service account key file.
Can I use Firebase only for push notifications?
Yes. Connecting Firebase does not move your data. The app keeps using MonstarX's database unless you choose Firestore in Where this app keeps its data.
Will my users need new accounts if I switch to Firestore?
No. Accounts stay in MonstarX's database and sign-in works as before. Only the app's own data moves to Firestore.
It says "no Firestore database yet". Is that a problem?
Only if you want Firestore. It still connects, because the app may only need storage, sign-in or push. Create a Firestore database in the Firebase console to use it.
Does copying my data delete anything?
No. Copy existing data only adds or updates documents in Firestore. MonstarX's own database is left as it is.