- Create a Supabase dev project and run the setup SQL to create tables
- Fill local.properties with Supabase and Google OAuth values instead of hardcoding secrets
- Register the Android app in Firebase and keep google-services.json out of Git
Set Up Supabase SQL, Auth Secrets, and Firebase
Prepare the backend tables, auth configuration, and Firebase Android project needed before the first serious app run.
Lesson video is on the way
While you wait, read the full text version below: complete theory, code samples and the hands-on checklist.
Lesson Goals
You will prepare the minimum backend setup the app needs before the first serious build: Supabase, Google OAuth values, local secret files, and a Firebase Android project.
This lesson is not the time to build features. The goal is to remove ambiguous setup errors before entering the architecture lessons.
Part 1: Create a Supabase Dev Project
Open the Supabase dashboard and create a dev project:
kotlin-accelerator-dev
| Value | Does Android need it? | Notes |
|---|---|---|
| Project URL | Yes | The client calls Supabase through this URL |
| Publishable or anon client key | Yes | Client-safe, but it identifies the project |
| Service role or secret key | No | Backend-only; do not paste into Android |
| Database password | No | Used only for admin/server access |
Part 2: Run the Minimum Supabase SQL
Option 1: Run it manually
Open the Supabase SQL Editor, then open the kotlin-accelerator-ai project and find the scripts/sql/setup.sql file to copy its contents.
Then paste the setup SQL into Supabase and execute it. Keep watching the result, then switch to the Database tab. You will see the tables already created.
Option 2: Through Supabase MCP
Go to your Supabase project, choose Connect > MCP > pick your AI Client > do NOT tick Read-only > Copy Prompt > paste into the AI Client > Run. MCP will run the setup automatically.
Restart the AI Client > call @scripts/sql/mcp-bootstrap-prompt.md and run it. MCP will run the setup automatically. > call @scripts/sql/mcp-seed-prompt.md to seed sample data.
Part 3: Configure Auth Secrets
Open Terminal, cd into the root of the kotlin-accelerator-ai project, then run this script:
python3 crypto.py decrypt
Keep pressing Enter until it succeeds.
At this point, the placeholder values will be set in the local.properties file:
sdk.dir=XXX
supabase.url=XXXX
supabase.anon.key=XXXX
supabase.server.clientId=XXXXX
Right now you can already use Supabase to practice the Login by Email feature in our project.
However, to fully use features like Google Authentication or Firebase, you need one more step below.
Get the Supabase URL and Supabase anon key from the Supabase dashboard > Project Settings > API > Project URL and Anon Key. Paste them into the matching fields in local.properties.
Go to the Google Cloud Console, then follow these steps:
- Create a project with any name. For example,
kotlin-accelerator-dev. - Next, set up Credentials.
After this step, you are almost done. However, Firebase is an essential part of Mobile Development. Continue to the next major section to set up Firebase.
Part 4: Create a Firebase Android Project
Open Firebase Console, create kotlin-accelerator-dev, then add an Android app:
- Find the real Android package name in the project.
- Register that exact package name in Firebase.
- Add the debug SHA-1 if the app uses Google sign-in or Firebase Auth.
- Download
google-services.json. - Place the file at
app/google-services.json.
To get the debug SHA-1:
./scripts/get-sha1-fingerprint.sh
Make sure you never ship google-services.json into Git. Although this file does not contain too much sensitive information, it contains identifying information for your app. To keep the setup secure, always add this file to .gitignore.
Part 5: Fill Local Config, Do Not Hardcode
Now we have all the values needed for local.properties. Just paste them in and you can start the project.
Verification Pass
- Launch the app on a device or emulator.
- Pass Onboarding -> Menu.
- Select Login by Email -> check login, logout, register, reset password.
- Select Sign in with Google -> if you have not set up Google Auth, it will fail. Set up Google Auth according to the video -> Check.
Checkpoint
You are done when Supabase SQL has been applied, Auth has been configured, Firebase has an Android app, app/google-services.json is ignored, local config contains only client-safe values, and the Authentication-related features work correctly.