Supabase Setup
Supabase is an open-source alternative to Firebase with a PostgreSQL database.
Firebase is Google’s mobile platform — it provides analytics, authentication, database, storage, and crash reporting in one place. It’s one of the most common backends for Flutter apps.
Analytics is the simplest Firebase service to set up and a good starting point. Once you have the base configuration in place, adding other Firebase services is much easier.
Create a Firebase project
Go to console.firebase.google.com and create a new project. You can disable Google Analytics during setup and add it later — it doesn’t matter either way.
Add an Android app
In your Firebase project, click “Add app” and select Android. Use your app’s package name from Primio project settings (Workspace → Project Settings).
Download google-services.json
Firebase generates this configuration file after you register your app. Download it — you’ll paste its contents into Primio.
Ask Primio to add Firebase Analytics
In the chat, ask the AI to integrate Firebase Analytics with basic event tracking, and paste the contents of your google-services.json into the same message. Send it and let the AI configure everything.
After analytics is working, you can ask Primio to add more Firebase services one at a time. Each service shares the same google-services.json configuration, so no additional Firebase setup is needed.
Authentication:
Database (Firestore):
Note: Create your Firestore collections and security rules in the Firebase Console. Then ask Primio to write the code that connects your app to those collections.
Storage:
Crash reporting:
Set up one service at a time. Adding Firebase Auth, Firestore, and Storage all in one prompt is likely to cause issues. Add one, test it in the Live Preview, then move on to the next.
Test each integration before adding the next. If something breaks, it’s much easier to debug when you’ve only changed one thing. Use Rollback if an integration doesn’t work as expected.
The google-services.json file is shared. You only download it once. All Firebase services in your app use the same configuration file.
Supabase Setup
Supabase is an open-source alternative to Firebase with a PostgreSQL database.
Prompting fundamentals
Write effective prompts to get better results when asking for integrations.