This guide shows how to inspect a Supabase Postgres database, generate GoMyAdmin resources from the schema, and run the generated admin locally.
In the Supabase dashboard, open the project and click Connect. For most local development machines, copy the Session pooler connection string because it works on IPv4-only networks. Use the direct connection string when your network supports IPv6 or your project has the IPv4 add-on.
Set the connection string in your shell and replace the placeholders with your own project reference, region, and database password:
export DATABASE_URL='postgres://postgres.<project-ref>:<database-password>@aws-0-<region>.pooler.supabase.com:5432/postgres?sslmode=require'Keep this value in your local shell or an uncommitted .env file. Do not commit Supabase passwords or connection strings.
Install the CLI and write the Supabase schema to schema.json:
go install github.com/darwvin-dev/gomyadmin/cmd/gomyadmin@latest
gomyadmin introspect --database-url "$DATABASE_URL" > schema.jsonInspect the file before generating resources:
head -40 schema.jsonCreate a generated admin app and copy the schema into it:
gomyadmin init supabase-admin --backend go --db postgres --frontend next --ui shadcn
cp schema.json supabase-admin/schema.json
cd supabase-adminGenerate resource files from the Supabase schema:
gomyadmin generate from-schema schema.json --package admin --forceThe generated files are written under backend/internal/admin/. Review them, then register the generated resource functions from backend/internal/admin/resources.go.
Copy the example environment and point the backend at Supabase:
cp .env.example .env
grep -v '^DATABASE_URL=' .env > .env.tmp
printf 'DATABASE_URL=%s\n' "$DATABASE_URL" > .env
cat .env.tmp >> .env
rm .env.tmpStart the generated stack:
docker compose up --buildOpen http://localhost:3000/admin and sign in with the generated app's local admin credentials:
admin@example.com / password
If you run the backend without Docker, keep DATABASE_URL in your shell and start the services separately:
make backend
make frontend- Use SSL for hosted Supabase Postgres connections, so keep
sslmode=requirein the URL. - Use a local
.envfile or secret manager for the connection string. Do not commit real credentials. - The generated app's demo migrations and seed files are for local demo databases. When connecting to an existing Supabase project, inspect the live schema and generate resources from
schema.jsoninstead of running demo migrations against production data. - Supabase's connection guide explains the direct connection, session pooler, and transaction pooler options: https://supabase.com/docs/guides/database/connecting-to-postgres