---
title: "The Vibe Coder's Guide to Supabase Environments"
description: "Separate Supabase projects for development and production, with all schema changes captured as timestamped SQL migrations in a Git-tracked supabase/ directory, keep a fast workflow from breaking live data."
url: "https://swe.quest/articles/the-vibe-coder-s-guide-to-supabase-environments-2ce71129a08af138"
canonical: "https://supabase.com/blog/the-vibe-coders-guide-to-supabase-environments"
source: "Supabase"
published: "2025-08-17"
difficulty: "medium"
kind: "How-to"
reading_minutes: 10
tags: ["schema-migrations","ci-cd","deployment","postgres","identity-auth"]
---

# The Vibe Coder's Guide to Supabase Environments

A post on [Supabase](https://swe.quest/sources/supabase.md), published 2025-08-17, 10 min read, How-to. Original: [https://supabase.com/blog/the-vibe-coders-guide-to-supabase-environments](https://supabase.com/blog/the-vibe-coders-guide-to-supabase-environments)

## Summary

Separate Supabase projects for development and production, with all schema changes captured as timestamped SQL migrations in a Git-tracked supabase/ directory, keep a fast workflow from breaking live data. Changes flow one way: local → dev → prod. Every migration is proven with \`supabase db reset\`, and GitHub Actions runs \`supabase db push\` automatically on merges to develop and main. The guide also covers enabling Row Level Security on every table, keeping service role keys out of NEXT\_PUBLIC\_ variables, nightly backups plus Point in Time Recovery with monthly restore drills, and wiring Vercel preview and production environments to the matching database.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Schema migrations](https://swe.quest/tags/schema-migrations.md) (Data & databases)
- [CI/CD](https://swe.quest/tags/ci-cd.md) (Reliability & operations)
- [Deployment](https://swe.quest/tags/deployment.md) (Reliability & operations)
- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)

## Prerequisites

- Git branching
- basic SQL ([easy posts on SQL](https://swe.quest/tags/sql.md?difficulty=easy))
- GitHub Actions basics ([easy posts on CI/CD](https://swe.quest/tags/ci-cd.md?difficulty=easy))

## Keywords

Supabase, Supabase CLI, Row Level Security, GitHub Actions, Vercel, Point in Time Recovery

## Related posts

- [Supabase Branching](https://swe.quest/articles/supabase-branching-4fbb0c9896d51627.md): Supabase · 2023-12-13 · Medium · 5 min read · Schema migrations, PostgreSQL, CI/CD, Deployment
  Supabase Branching gives each Git branch an isolated hosted Preview environment with its own Postgres database, Auth, Storage, Realtime, Edge Functions and APIs, plus separate credentials.
- [Supabase Local Dev: migrations, branching, and observability](https://swe.quest/articles/supabase-local-dev-migrations-branching-and-observability-770def662fe57683.md): Supabase · 2023-08-08 · Easy · 6 min read · PostgreSQL, Developer tools, Schema migrations, Testing, Deployment
  Supabase's CLI gains a batch of Postgres local-development features: \`supabase inspect db\` with 19 diagnostic commands adapted from Heroku's pg-extras, \`db dump\` backups built on pg\_dump, migration squashing and diffing via migra, pgTAP testing with \`supabase test\`, plpgsql\_check linting, seeding, and TypeScript type generation that now detects foreign-key relationships.
- [Supabase CLI v1 and Management API Beta](https://swe.quest/articles/supabase-cli-v1-and-management-api-beta-40e0f641270aa760.md): Supabase · 2022-08-15 · Medium · 4 min read · Schema migrations, Developer tools, PostgreSQL, CI/CD, API design
  Supabase CLI v1 leaves beta with commands to manage organizations, projects and Edge Functions, plus database migration tooling, CI/CD workflows and TypeScript type generation.
- [Supabase CLI](https://swe.quest/articles/supabase-cli-a62c53c7dbec808f.md): Supabase · 2021-03-31 · Medium · 7 min read · Schema migrations, PostgreSQL, Developer tools
  Supabase's new CLI runs the full Supabase stack locally via Docker Compose, using the same tooling as production, and walks through wiring it to a React app.
- [Faster config, migrations and functions on branches](https://swe.quest/articles/faster-config-migrations-and-functions-on-branches-f64718202c9feaa6.md): Supabase · 2026-10-15 · Medium · 7 min read · PostgreSQL, Schema migrations, Deployment, CI/CD, Serverless
  Supabase preview branches are separate projects that become ready in about 20 seconds (median) by running three mostly parallel workflows: copying configuration, applying migrations, and deploying Edge Functions.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
