Supabase Backend
API Keys & Setup
How to create a Supabase project and get your environment variables.
Initial Supabase Setup
To connect your React Native app to your database and authentication system, you need to set up a Supabase project and link your API keys.
1. Create a Project
- Log in to Supabase.
- Click on New Project and select your organization.
- Enter a name for your project, generate a secure database password, and choose the region closest to your target audience.
- Click Create new project. (Note: It usually takes 2-3 minutes for the database to be provisioned).
2. Get Your Environment Variables
Once your project is ready, you need to grab two specific keys for your mobile app's .env file.
- In your Supabase dashboard's left sidebar, go to Project Settings (the gear icon at the bottom).
- Click on API under the Configuration section.
- Copy the Project URL and paste it into your
.envfile:
EXPO_PUBLIC_SUPABASE_URL=[https://your-project.supabase.co](https://your-project.supabase.co)- Right below it, copy the anon / public key and paste it as well:
EXPO_PUBLIC_SUPABASE_ANON_KEY=your_long_anon_key_here⚠️ Security Warning: Never copy or use the service_role key in your mobile application. It bypasses all Row Level Security (RLS) policies and gives full admin access to your database!
