Documentation Index
Fetch the complete documentation index at: https://docs.moodmnky.com/llms.txt
Use this file to discover all available pages before exploring further.
Supabase Local Development
This guide will help you set up and work with Supabase in your local development environment.Prerequisites
Before getting started, ensure you have the following installed:- Node.js (v18 or later)
- Docker
- Supabase CLI (This can be installed automatically by our setup script)
Quick Setup
The monorepo includes a setup script to quickly get Supabase running locally:- Check for prerequisites
- Configure your environment variables
- Start Supabase locally
- Optionally reset and seed the database
Manual Setup
If you prefer to set up Supabase manually, follow these steps:Configure Environment Variables
.env.local file in the root of the repo with these variables:Accessing Supabase Studio
Once Supabase is running, you can access the Supabase Studio at:- Browsing and editing your database tables
- Managing authentication settings
- Configuring storage buckets
- Testing edge functions
- Running SQL queries
- Viewing logs
Common Tasks
Managing the Database
Viewing and Editing Data
Viewing and Editing Data
- Open Supabase Studio at
http://localhost:54323 - Click on “Table Editor” in the sidebar
- Select a table to view or edit its data
Creating a Migration
Creating a Migration
- Update or create schema files in
/data/schemas/ - Generate a migration from the differences:
Resetting the Database
Resetting the Database
Working with Authentication
Creating a User
Creating a User
- Open Supabase Studio at
http://localhost:54323 - Go to “Authentication” → “Users”
- Click “Add User” and enter the user details
Testing Authentication
Testing Authentication
- Create a test user as described above
- Use the user credentials to sign in
- Auth state should persist between page reloads
Working with Storage
Creating a Bucket
Creating a Bucket
- Open Supabase Studio at
http://localhost:54323 - Go to “Storage”
- Click “New Bucket” and enter a name
- Configure public/private access as needed
Upload and Manage Files
Upload and Manage Files
Common Issues and Solutions
Docker Not Running
If you see errors about Docker not running, make sure Docker Desktop is started before running Supabase commands.
Port Conflicts
If Supabase fails to start due to port conflicts, check for other services using ports 54321-54325 and stop them.
Database Reset Errors
If database reset fails, try stopping and restarting Supabase:
supabase stop && supabase startAuth Not Working
If authentication isn’t working, check that your environment variables are correctly set in both the .env.local file and your application.
Best Practices
Use Migrations
Schema First
/data/schemas/ directory first, then generate migrationsLocal Only
RLS Policies
Types First
Test Data Reset
Next Steps
Now that you have Supabase running locally, you can:- Explore the Database Schema
- Learn about Supabase Integration in our stack
- Read the official Supabase documentation for more advanced topics