Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,21 @@ jobs:
supabase status
exit 1

- name: Enable corepack and pnpm
run: |
corepack enable
corepack prepare pnpm@9 --activate
pnpm -v
node -v
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 9

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'

- name: Install
run: pnpm install

- name: Install LaunchQL CLI globally
- name: Install pgpm CLI globally
run: npm install -g pgpm

- name: Build
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2025 Interweb, Inc. <developers@interweb.co>
Copyright (c) 2025 Constructive <developers@constructive.io>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
42 changes: 32 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Supabase Test Suite

<p align="center" width="100%">
<img height="250" src="https://raw.githubusercontent.com/launchql/supabase-test/refs/heads/main/docs/img/logos.svg" />
<img height="250" src="https://raw.githubusercontent.com/constructive-io/supabase-test-suite/refs/heads/main/docs/img/logos.svg" />
</p>

<p align="center" width="100%">
<a href="https://github.com/launchql/supabase-test/actions/workflows/ci.yml">
<img height="20" src="https://github.com/launchql/supabase-test/actions/workflows/ci.yml/badge.svg" />
<a href="https://github.com/constructive-io/supabase-test-suite/actions/workflows/ci.yml">
<img height="20" src="https://github.com/constructive-io/supabase-test-suite/actions/workflows/ci.yml/badge.svg" />
</a>
<a href="https://github.com/launchql/supabase-test/blob/main/LICENSE"><img height="20" src="https://img.shields.io/badge/license-MIT-blue.svg"/></a>
<a href="https://github.com/constructive-io/supabase-test-suite/blob/main/LICENSE"><img height="20" src="https://img.shields.io/badge/license-MIT-blue.svg"/></a>
</p>

A friendly playground for building and validating Supabase Row-Level Security (RLS) using LaunchQL. It includes real-world examples, migrations, and a comprehensive test suite you can run locally.
A friendly playground for building and validating Supabase Row-Level Security (RLS). It includes real-world examples, migrations, and a comprehensive test suite you can run locally.

Built with [`supabase-test`](https://www.npmjs.com/package/supabase-test) — a Supabase-optimized version of [`pgsql-test`](https://www.npmjs.com/package/pgsql-test) for instant, isolated Postgres test databases with automatic rollbacks and Supabase defaults.

Expand Down Expand Up @@ -41,7 +41,7 @@ pnpm test:watch

## Repository Structure

This is a LaunchQL workspace combining `pnpm` and `pgpm` for modular Postgres packages:
This is a pgpm workspace combining `pnpm` and `pgpm` for modular Postgres packages:

- **`packages/supabase`** - Supabase-focused SQL, tests, and helpers
- **`packages/hello-world`** - Demo extension showcasing RLS with users/products
Expand Down Expand Up @@ -85,13 +85,35 @@ Common issues:
- Check that ports match those shown by `npx supabase start`
- Use Node.js 20+ to avoid compatibility issues

## Related LaunchQL Tooling
## Education and Tutorials

* [launchql/pgsql-test](https://github.com/launchql/launchql/tree/main/packages/pgsql-test): **📊 Isolated testing environments** with per-test transaction rollbacks—ideal for integration tests, complex migrations, and RLS simulation.
* [launchql/supabase-test](https://github.com/launchql/launchql/tree/main/packages/supabase-test): **🧪 Supabase-native test harness** preconfigured for the local Supabase stack—per-test rollbacks, JWT/role context helpers, and CI/GitHub Actions ready.
1. 🚀 [Quickstart: Getting Up and Running](https://constructive.io/learn/quickstart)
Get started with modular databases in minutes. Install prerequisites and deploy your first module.

2. 📦 [Modular PostgreSQL Development with Database Packages](https://constructive.io/learn/modular-postgres)
Learn to organize PostgreSQL projects with pgpm workspaces and reusable database modules.

3. ✏️ [Authoring Database Changes](https://constructive.io/learn/authoring-database-changes)
Master the workflow for adding, organizing, and managing database changes with pgpm.

4. 🧪 [End-to-End PostgreSQL Testing with TypeScript](https://constructive.io/learn/e2e-postgres-testing)
Master end-to-end PostgreSQL testing with ephemeral databases, RLS testing, and CI/CD automation.

5. ⚡ [Supabase Testing](https://constructive.io/learn/supabase)
Use TypeScript-first tools to test Supabase projects with realistic RLS, policies, and auth contexts.

6. 💧 [Drizzle ORM Testing](https://constructive.io/learn/drizzle-testing)
Run full-stack tests with Drizzle ORM, including database setup, teardown, and RLS enforcement.

7. 🔧 [Troubleshooting](https://constructive.io/learn/troubleshooting)
Common issues and solutions for pgpm, PostgreSQL, and testing.

## Credits

**🛠 Built by the [Constructive](https://constructive.io) team — creators of modular Postgres tooling for secure, composable backends. If you like our work, contribute on [GitHub](https://github.com/constructive-io).**

## Disclaimer

AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED "AS IS", AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND.
AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED AS IS, AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND.

No developer or entity involved in creating this software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the code, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value.
10 changes: 3 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "launchql-extensions",
"name": "supabase-test-suite",
"version": "0.0.1",
"author": "launchql <[email protected]>",
"author": "Constructive <[email protected]>",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/launchql/extensions"
"url": "https://github.com/constructive-io/supabase-test-suite"
},
"license": "MIT",
"engines": {
Expand All @@ -14,10 +14,6 @@
"publishConfig": {
"access": "restricted"
},
"packageManager": "[email protected]",
"workspaces": [
"packages/*"
],
"scripts": {
"bundle": "pnpm -r bundle",
"lint": "pnpm -r lint",
Expand Down
2 changes: 1 addition & 1 deletion packages/hello-world/LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
The MIT License (MIT)

Copyright (c) 2025 Dan Lynch <[email protected]>
Copyright (c) 2025 Interweb, Inc.
Copyright (c) 2025 Constructive

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
37 changes: 32 additions & 5 deletions packages/hello-world/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Supabase RLS Demo

<p align="center" width="100%">
<img height="250" src="https://raw.githubusercontent.com/launchql/supabase-test/refs/heads/main/docs/img/logos.svg" />
<img height="250" src="https://raw.githubusercontent.com/constructive-io/supabase-test-suite/refs/heads/main/docs/img/logos.svg" />
</p>

<p align="center" width="100%">
<a href="https://github.com/launchql/supabase-test/actions/workflows/ci.yml">
<img height="20" src="https://github.com/launchql/supabase-test/actions/workflows/ci.yml/badge.svg" />
<a href="https://github.com/constructive-io/supabase-test-suite/actions/workflows/ci.yml">
<img height="20" src="https://github.com/constructive-io/supabase-test-suite/actions/workflows/ci.yml/badge.svg" />
</a>
<a href="https://github.com/launchql/supabase-test/blob/main/LICENSE"><img height="20" src="https://img.shields.io/badge/license-MIT-blue.svg"/></a>
<a href="https://github.com/constructive-io/supabase-test-suite/blob/main/LICENSE"><img height="20" src="https://img.shields.io/badge/license-MIT-blue.svg"/></a>
</p>

Supabase RLS (Row Level Security) demo, showcasing best practices for implementing secure, multi-tenant applications.
Expand Down Expand Up @@ -36,8 +36,35 @@ pnpm test
pnpm test:watch
```

## Education and Tutorials

1. 🚀 [Quickstart: Getting Up and Running](https://constructive.io/learn/quickstart)
Get started with modular databases in minutes. Install prerequisites and deploy your first module.

2. 📦 [Modular PostgreSQL Development with Database Packages](https://constructive.io/learn/modular-postgres)
Learn to organize PostgreSQL projects with pgpm workspaces and reusable database modules.

3. ✏️ [Authoring Database Changes](https://constructive.io/learn/authoring-database-changes)
Master the workflow for adding, organizing, and managing database changes with pgpm.

4. 🧪 [End-to-End PostgreSQL Testing with TypeScript](https://constructive.io/learn/e2e-postgres-testing)
Master end-to-end PostgreSQL testing with ephemeral databases, RLS testing, and CI/CD automation.

5. ⚡ [Supabase Testing](https://constructive.io/learn/supabase)
Use TypeScript-first tools to test Supabase projects with realistic RLS, policies, and auth contexts.

6. 💧 [Drizzle ORM Testing](https://constructive.io/learn/drizzle-testing)
Run full-stack tests with Drizzle ORM, including database setup, teardown, and RLS enforcement.

7. 🔧 [Troubleshooting](https://constructive.io/learn/troubleshooting)
Common issues and solutions for pgpm, PostgreSQL, and testing.

## Credits

**🛠 Built by the [Constructive](https://constructive.io) team — creators of modular Postgres tooling for secure, composable backends. If you like our work, contribute on [GitHub](https://github.com/constructive-io).**

## Disclaimer

AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED "AS IS", AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND.
AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED AS IS, AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND.

No developer or entity involved in creating this software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the code, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value.
2 changes: 1 addition & 1 deletion packages/hello-world/deploy/rls-demo.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- Deploy: rls-demo to pg
-- made with <3 @ launchql.com
-- made with <3 @ constructive.io

-- Create rls_test schema
CREATE SCHEMA IF NOT EXISTS rls_test;
Expand Down
2 changes: 1 addition & 1 deletion packages/hello-world/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@pgpm/hello-world",
"version": "0.5.0",
"author": "Interweb <developers@interweb.co>",
"author": "Constructive <developers@constructive.io>",
"description": "Hello World extension with Row Level Security (RLS) demo",
"private": true,
"scripts": {
Expand Down
37 changes: 32 additions & 5 deletions packages/supabase/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# @pgpm/supabase

<p align="center" width="100%">
<img height="250" src="https://raw.githubusercontent.com/launchql/supabase-test/refs/heads/main/docs/img/logos.svg" />
<img height="250" src="https://raw.githubusercontent.com/constructive-io/supabase-test-suite/refs/heads/main/docs/img/logos.svg" />
</p>

<p align="center" width="100%">
<a href="https://github.com/launchql/supabase-test/actions/workflows/ci.yml">
<img height="20" src="https://github.com/launchql/supabase-test/actions/workflows/ci.yml/badge.svg" />
<a href="https://github.com/constructive-io/supabase-test-suite/actions/workflows/ci.yml">
<img height="20" src="https://github.com/constructive-io/supabase-test-suite/actions/workflows/ci.yml/badge.svg" />
</a>
<a href="https://github.com/launchql/supabase-test/blob/main/LICENSE"><img height="20" src="https://img.shields.io/badge/license-MIT-blue.svg"/></a>
<a href="https://github.com/constructive-io/supabase-test-suite/blob/main/LICENSE"><img height="20" src="https://img.shields.io/badge/license-MIT-blue.svg"/></a>
</p>

Supabase-focused SQL, tests, and helpers for building robust applications with Row-Level Security.
Expand All @@ -30,8 +30,35 @@ pnpm test
pnpm test:watch
```

## Education and Tutorials

1. 🚀 [Quickstart: Getting Up and Running](https://constructive.io/learn/quickstart)
Get started with modular databases in minutes. Install prerequisites and deploy your first module.

2. 📦 [Modular PostgreSQL Development with Database Packages](https://constructive.io/learn/modular-postgres)
Learn to organize PostgreSQL projects with pgpm workspaces and reusable database modules.

3. ✏️ [Authoring Database Changes](https://constructive.io/learn/authoring-database-changes)
Master the workflow for adding, organizing, and managing database changes with pgpm.

4. 🧪 [End-to-End PostgreSQL Testing with TypeScript](https://constructive.io/learn/e2e-postgres-testing)
Master end-to-end PostgreSQL testing with ephemeral databases, RLS testing, and CI/CD automation.

5. ⚡ [Supabase Testing](https://constructive.io/learn/supabase)
Use TypeScript-first tools to test Supabase projects with realistic RLS, policies, and auth contexts.

6. 💧 [Drizzle ORM Testing](https://constructive.io/learn/drizzle-testing)
Run full-stack tests with Drizzle ORM, including database setup, teardown, and RLS enforcement.

7. 🔧 [Troubleshooting](https://constructive.io/learn/troubleshooting)
Common issues and solutions for pgpm, PostgreSQL, and testing.

## Credits

**🛠 Built by the [Constructive](https://constructive.io) team — creators of modular Postgres tooling for secure, composable backends. If you like our work, contribute on [GitHub](https://github.com/constructive-io).**

## Disclaimer

AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED "AS IS", AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND.
AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED AS IS, AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND.

No developer or entity involved in creating this software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the code, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value.
8 changes: 4 additions & 4 deletions packages/supabase/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@pgpm/supabase",
"version": "0.5.0",
"author": "Interweb <developers@interweb.co>",
"author": "Constructive <developers@constructive.io>",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -13,10 +13,10 @@
},
"repository": {
"type": "git",
"url": "https://github.com/launchql/supabase-test-suite"
"url": "https://github.com/constructive-io/supabase-test-suite"
},
"homepage": "https://github.com/launchql/supabase-test-suite",
"homepage": "https://github.com/constructive-io/supabase-test-suite",
"bugs": {
"url": "https://github.com/launchql/supabase-test-suite/issues"
"url": "https://github.com/constructive-io/supabase-test-suite/issues"
}
}