Skip to content

feat(NES-49): add an optional local Supabase parity stack via the Supabase CLI - #71

Merged
ericfisherdev merged 1 commit into
mainfrom
nes-49-supabase-cli
Jun 22, 2026
Merged

feat(NES-49): add an optional local Supabase parity stack via the Supabase CLI#71
ericfisherdev merged 1 commit into
mainfrom
nes-49-supabase-cli

Conversation

@ericfisherdev

@ericfisherdev ericfisherdev commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Summary

Provides an opt-in local Supabase stack (Postgres + the Supavisor pooler) via the Supabase CLI, so contributors can develop and test against a Supabase-shaped environment without a hosted project (NES-49). The default developer workflow stays on docker-compose Postgres.

Changes

  • supabase/config.toml: pins a local stack scoped to the database + pooler only (db :54322, pooler :54329, transaction pool mode). Auth, Storage, Realtime, Studio, and Edge Functions are disabled — Nestova uses only the database.
  • Makefile: opt-in supabase-up / supabase-down / supabase-status targets wrapping the CLI, listed under make help, each guarded by a clear error if the CLI isn't installed.
  • README: a "Local Supabase via the CLI" subsection documenting the targets and an .env snippet wiring the local pooler/direct URLs with sslmode=require (the CLI's Postgres serves TLS, satisfying the supabase provider's TLS requirement from NES-46).

Acceptance criteria

  • make supabase-up starts a local Supabase Postgres + pooler; the app connects with DB_PROVIDER=supabase and the documented .env.
  • The DB-gated suite can run against the local stack (via NESTOVA_TEST_DATABASE_URL → direct DB URL).
  • The default workflow (docker compose up + make run) is unchanged; the new targets are clearly marked optional in README and make help.

Note: purely additive — compose.yaml and the make run defaults are untouched.

Jira: NES-49

Summary by CodeRabbit

  • Documentation

    • Added an opt-in guide for running a local Supabase Postgres + connection pooler stack via the Supabase CLI, including .env setup, TLS guidance, and how to run the DB-gated test suite.
  • Chores

    • Added new make commands to start, stop, and check the status of the local Supabase stack (with a fast check for the required Supabase CLI version).
  • New Features

    • Introduced a Supabase CLI configuration that enables only Postgres and the pooler, with other Supabase services disabled for local development.

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6440094a-e930-4b27-8d66-ebf7cb44ccb6

📥 Commits

Reviewing files that changed from the base of the PR and between f784238 and 3b84a99.

📒 Files selected for processing (3)
  • Makefile
  • README.md
  • supabase/config.toml

📝 Walkthrough

Walkthrough

Adds local Supabase CLI support: a supabase/config.toml enabling only Postgres and the Supavisor pooler (all other services disabled), three Makefile targets (supabase-up, supabase-down, supabase-status) gated by a CLI presence check, and a README.md section documenting connection URL configuration and TLS requirements.

Changes

Local Supabase CLI Integration

Layer / File(s) Summary
Supabase config and Makefile targets
supabase/config.toml, Makefile
supabase/config.toml configures the local stack with project id, Postgres port 54322 and version 17, Supavisor pooler in transaction mode on port 54329, and all non-database services disabled. Makefile expands .PHONY to include the new targets, adds require-supabase-cli to validate CLI presence and major version >= 2, and introduces supabase-up, supabase-down, supabase-status targets that depend on the CLI check and delegate to corresponding supabase commands.
README local Supabase workflow docs
README.md
Adds a subsection covering make supabase-up/status/down usage, .env snippets for pooler connection URL with DB_POOL_MODE=transaction vs direct connection for migrations, DB_PROVIDER=supabase setting, sslmode=require TLS guidance, and NESTOVA_TEST_DATABASE_URL setup for the DB-gated test suite.

Possibly related issues

  • NES-49: PR directly implements all acceptance criteria from this issue—supabase/config.toml scoped to Postgres + Supavisor, make supabase-up/down/status targets, and documented .env wiring with DB_PROVIDER=supabase and DB_POOL_MODE=transaction.
  • NES-46: The README documentation of DB_PROVIDER=supabase, DB_POOL_MODE=transaction, TLS (sslmode=require), and direct vs pooler URL selection directly supports the application-level Supabase connectivity described in this issue.

Possibly related PRs

  • ericfisherdev/nestova#65: Implements MIGRATE_DATABASE_URL and pooler-safe migration handling for Supabase, which the README in this PR directly references for direct/session connection URL guidance.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly and specifically describes the main addition: enabling an optional local Supabase stack via the Supabase CLI, directly aligned with the changeset.
Linked Issues check ✅ Passed All coding requirements from NES-49 are implemented: supabase/config.toml with Postgres+pooler configuration, three Makefile targets (supabase-up/down/status) with CLI validation, and README documentation with .env snippet and TLS guidance.
Out of Scope Changes check ✅ Passed All changes are directly scoped to NES-49 requirements: configuration file, Makefile targets, and documentation. No unrelated modifications or scope creep detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@ericfisherdev
ericfisherdev marked this pull request as ready for review June 22, 2026 02:36
@ericfisherdev

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Makefile`:
- Around line 129-135: The require-supabase-cli target only checks for the
binary's existence but does not validate the version, which can cause runtime
failures with older CLI versions incompatible with Postgres 17. Enhance the
require-supabase-cli target to add a version check in addition to the binary
presence check. Extract the version from supabase --version output and verify it
meets a minimum requirement (e.g., 2025 or later based on Postgres 17 support
added in April 2025), and provide a clear error message directing users to
update if their version is outdated.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 51081cc8-7fba-4cff-a92e-06771cf9aad8

📥 Commits

Reviewing files that changed from the base of the PR and between 2e4cbe6 and f784238.

📒 Files selected for processing (3)
  • Makefile
  • README.md
  • supabase/config.toml

Comment thread Makefile Outdated
…abase CLI

- supabase/config.toml: pin a local stack scoped to Postgres + the Supavisor
  pooler (port 54322 db, 54329 pooler, transaction pool mode), with Auth,
  Storage, Realtime, Studio, and Edge Functions disabled — Nestova uses only the
  database (NES-23).
- Makefile: add opt-in supabase-up / supabase-down / supabase-status targets
  wrapping the Supabase CLI, listed under make help.
- README: a "Local Supabase via the CLI" subsection documenting the targets and
  an .env snippet wiring the local pooler/direct URLs with sslmode=require (the
  CLI's Postgres serves TLS, satisfying the supabase provider's TLS requirement).

Why: lets contributors exercise the Supabase-shaped pooler path locally without a
hosted project. Purely additive — compose.yaml and the make run / docker compose
defaults are unchanged, so the standard workflow is unaffected.
@ericfisherdev

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ericfisherdev
ericfisherdev merged commit 9861aa9 into main Jun 22, 2026
3 of 4 checks passed
@ericfisherdev
ericfisherdev deleted the nes-49-supabase-cli branch June 22, 2026 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant