pixelysg cuts out the Supabase middleman for database calls

An optional toggle lets the app talk to Postgres directly while keeping the rest of the codebase none the wiser.

infrastructuresecurity

pixelysg has added a switch that, when flipped, routes all database reads and writes straight to Postgres instead of going through Supabase's hosted API. Authentication still runs through Supabase - only the data layer changes. To pull this off, the team built their own query layer that mimics the shape of the Supabase client the rest of the app already speaks to, so nothing upstream had to be rewritten.

The likely motive lines up with pixelysg's parallel work to deploy on Cloudflare's edge network: cutting out the hosted gateway trims latency and frees the app to point at any Postgres-compatible database, including a local one for tests. The trade-offs are real - it's a hand-rolled adapter covering only what the codebase uses today, and it sidesteps Supabase's row-level security, so whatever credentials you hand it run with full access.

So what Worth a look for anyone running Mike who wants portability away from Supabase's hosted layer or is chasing edge-deployment latency.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

1 commit from pixelysg/mike, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
27f2ffc9 feat: support direct Postgres via DATABASE_URL Jia Jian Goi 2026-05-15 ↗ GitHub
commit body
When DATABASE_URL is set, data queries route to a direct Postgres
connection using a Supabase-compatible query builder. Auth continues
through Supabase. Falls back to existing Supabase client when unset.

Supports optional DATABASE_SCHEMA env var for custom schema prefix.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-394.md from inside the repo you want the changes in.

⬇ Download capture-thread-394.md