Using Supabase in Replit
Supabase can serve as a hosted Postgres database for Node.js repls on Replit, queried directly through supabase-js. The setup is short: create a Node.js repl, require createClient, plug in the project URL and anon key from Settings > API, and load the Countries sample dataset from the SQL tab. Example queries use both .then() and async/await syntax, along with filter methods such as or, is, in and neq, and practice challenges for learning the query interface.
Related posts
- NoSQL Postgres: Add MongoDB compatibility to your Supabase projects with FerretDB
Supabase mediumAdeptFerretDB, an open source MongoDB-compatible proxy, can run on top of a Supabase Postgres database, storing each collection as a table in a `ferretdb` schema with documents as JSONB rows. The walkthrough runs the FerretDB Docker image locally with `FERRETDB_POSTGRESQL_URL` pointed at a session-mode pooler connection string. It then connects with `mongosh` using PLAIN auth, performs inserts and updates, and inspects the resulting JSONB in the Supabase dashboard. For production it deploys FerretDB to Fly.io with a sample `fly.toml`, a secret for the database URL and a dedicated IPv4 address, which is a paid feature.
- Cal.com launches Expert Marketplace built with Next.js and Supabase.
Supabase mediumAdeptCal.com's open-source Platform Starter Kit for building expert marketplaces runs on Next.js and Supabase, having switched from SQLite to Postgres via Prisma shortly before launch once file storage was needed. Prisma connects through Supavisor using a pooled transaction-mode URL plus a direct session-mode URL, and its multiSchema feature keeps app tables out of the PostgREST-exposed public schema. Profile images upload to Supabase Storage via server-generated signed upload URLs, which works alongside Auth.js rather than Supabase Auth, and a custom Next.js Image loader serves resized images. A Vercel integration syncs environment variables and can provision a project with migrations and seeds in one click.
- supabase-js v2
Supabase mediumAdeptsupabase-js v2 brings incremental quality-of-life changes over v1. Types are now generated from the database via the CLI and set once on the client. signIn() is split into signInWithPassword() and signInWithOtp(), server-side auth moves to auth.admin, and the auth library is now async to fix a multi-tab token refresh race condition that logged users out. insert/update/upsert no longer return data unless select() is appended, which avoids surprise failures under Row Level Security. Constructor config is scoped per sub-library, each sub-library gets typed errors, Edge Function invocations auto-detect content type, and a new channel() API replaces from().on() for realtime and Postgres change subscriptions. v1 gets security and maintenance patches for three months.
- Supabase Local Dev: migrations, branching, and observability
Supabase easyNoviceSupabase's CLI gains a batch of Postgres local-development features: `supabase inspect db` with 19 diagnostic commands adapted from Heroku's pg-extras, `db dump` backups built on pg_dump, migration squashing and diffing via migra, pgTAP testing with `supabase test`, plpgsql_check linting, seeding, and TypeScript type generation that now detects foreign-key relationships. Local logs are viewable in the dashboard, and the CLI moves to a fortnightly stable-release cycle with a beta channel. Branching enters alpha: each GitHub pull request gets an isolated Firecracker-based preview environment that runs the repo's migrations and seed.sql, with migrations applied to production on merge. Production data cloning is deliberately deferred until copy-on-write with anonymization is judged safe.
- database.build v2: Bring-your-own-LLM
Supabase mediumAdeptdatabase.build, Supabase's in-browser Postgres sandbox built on PGlite, now lets users bring any OpenAI-compatible LLM, with no login and no rate limits. Requests go straight from the browser to the provider. This works because most LLM APIs send CORS headers, and a service worker intercepts the Vercel AI SDK's /api/chat route, reading its BYO-LLM config from IndexedDB. Models need reliable tool calling, SQL knowledge and Chart.js knowledge, so gpt-4o is recommended; local Ollama models still struggle with tool calls, and Ollama buffers tool-call streams. The release also adds one-click deploys to Supabase by piping server-side pg_dump over Live Share into pg_restore, and replaces the tar.gz export with a WASM pg_dump. Serverless PGlite was shelved because of its memory use and single-connection limit in multi-tenant setups and unreliable s3fs storage.