Skip to content

constructive-io/insforge-test-suite

Repository files navigation

InsForge Test Suite

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

Built with insforge-test — an InsForge-optimized version of pgsql-test for instant, isolated Postgres test databases with automatic rollbacks and InsForge defaults.

Developing

docker-compose up -d
pnpm install
make roles
cd packages/hello-world
pnpm test:watch

Note: Unlike Supabase (where supabase start pre-creates roles), the InsForge Docker image is vanilla Postgres. make roles runs pgpm admin-users bootstrap to create the anon, authenticated, and project_admin NOLOGIN roles before seeding test users.

InsForge Roles

InsForge uses three built-in PostgreSQL roles:

Role Description Use Case
anon Unauthenticated users Public read access
authenticated Logged-in users Standard user operations
project_admin System administrators Full access to all resources

These roles are mapped in pgpm.json and used by insforge-test for RLS testing.

Credits

Built by Constructive — creators of modular Postgres tooling for secure, composable backends. If you like our work, contribute on GitHub.

Disclaimer

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.

About

A friendly playground for building and validating InsForge Row‑Level Security (RLS)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors