supabase-js
The official isomorphic JavaScript SDK for Supabase — database, auth, realtime, storage, and edge functions in one client.
Repository Health
Technical Analysis
supabase-js is the official isomorphic JavaScript client for Supabase, the open-source Firebase alternative built on Postgres. A single createClient call gives you a typed gateway to your entire backend: query and mutate your Postgres database through PostgREST, authenticate and manage users, subscribe to realtime database changes over WebSockets, upload and download files, and invoke edge functions.
The package composes five focused sub-libraries (auth-js, postgrest-js, realtime-js, storage-js, and functions-js) behind one ergonomic, fully typed surface. It runs anywhere JavaScript runs — Node.js, Deno, Bun, browsers, and React Native — and can generate end-to-end types from your database schema so queries are checked at compile time.
What You Get
- A single typed
createClientclient that exposes database, auth, realtime, storage, and edge-function APIs - A chainable PostgREST query builder (
.from().select().eq()...) with generated TypeScript types from your schema - Built-in authentication and session management with support for email, OAuth, magic links, and more
- Realtime subscriptions to Postgres changes and broadcast/presence channels over WebSockets
- Isomorphic support across Node.js, Deno, Bun, browsers, and React Native
Common Use Cases
- Building full-stack web and mobile apps backed by a hosted Supabase Postgres database
- Adding authentication and row-level-secured data access to a frontend without a custom backend
- Streaming live data into a UI via realtime subscriptions to table changes
- Handling user file uploads and downloads through Supabase Storage
- Calling server-side logic through Supabase Edge Functions from client code
Under The Hood
Architecture — supabase-js is a thin composition layer that lives in packages/core/supabase-js/src of an Nx-managed pnpm monorepo. createClient (in index.ts) instantiates a SupabaseClient (SupabaseClient.ts) that acts as a facade, constructing and holding five specialized sub-clients — SupabaseAuthClient (extending auth-js), PostgrestClient from postgrest-js, RealtimeClient from realtime-js, StorageClient from storage-js, and FunctionsClient from functions-js — and wiring them together with a shared authenticated fetch (lib/fetch.ts) plus resolved defaults from lib/constants.ts and lib/helpers.ts. Calls like .from(), .auth, .channel(), .storage, and .functions are delegated straight to the relevant sub-client.
Tech Stack — Written in TypeScript (~5.8) and published as dual CJS/ESM with generated .d.ts types. Its runtime dependencies are the five @supabase/* sub-packages consumed as workspace references; there are no other production dependencies, and it relies on the platform’s native fetch and WebSocket APIs for isomorphism. Tooling is Nx 22 for the monorepo, Vite/Vitest and Jest for tests, ESLint + Prettier + Husky + commitlint for quality gates, and pnpm as the package manager.
Code Quality — Testing is thorough and multi-runtime: test/ contains unit tests, integration tests, browser (integration.browser.test.ts) and Deno suites, plus dedicated module-resolution and Hermes/React-Native bundle-compatibility checks that assert the package resolves correctly under CJS, ESM, and various bundlers. Types are strict and heavily generic — the SupabaseClient/createClient signatures thread a Database schema type through to compile-time-checked queries — and conventional-commit enforcement keeps the changelog automated.
API Design — The developer experience is a core strength: a single createClient(url, key) returns one object from which every capability hangs via readable, chainable calls (supabase.from('profiles').select('*')). Naming is consistent across sub-clients, the schema-driven generics give autocomplete and type-safety without boilerplate, and getting started requires only two arguments. Extensive official guides and reference docs back the API up.
Used by 32 apps in this directory
Open Scouts
AI Agents · Automation
Create automated AI scouts that continuously search the web and send email alerts when they find what you're looking for.
OpenPanel
Devops · Hosting Control Panel
Docker-powered web hosting control panel that gives every user a fully isolated environment with dedicated web server, database, and networking — VPS-grade security on shared hardware.
Plasmic
CMS · Design Tools · Low Code Platforms
The open-source visual builder that lets teams design React apps and websites with drag-and-drop while integrating seamlessly with your codebase.
Skrun
AI Agents
An open, self-hostable, multi-model agent runtime that deploys any agent skill as an API via POST /run — an open-source alternative to Claude Managed Agents and Google's Gemini Enterprise Agent Platform.
Hexclave
Authentication · Developer Tools
The open-source user infrastructure platform — authentication, teams, payments, emails, analytics, and more on a single unified user model.
Stirling PDF
Digital Signiture · Productivity
The open-source PDF platform you can run anywhere — edit, convert, sign, and automate PDFs without sending files to external servers.
Suna
AI Agents
Turn your company into a git repo — one config, one command center, a workforce of AI agents that runs the real work around the clock.
Supabase
Authentication · Databases · Developer Tools
The open-source Postgres development platform that replaces Firebase with authentication, real-time APIs, edge functions, storage, and vector embeddings — all built on PostgreSQL.
Supabase
Authentication · Databases · Developer Tools
The open-source Postgres development platform that replaces Firebase with authentication, real-time APIs, edge functions, storage, and vector embeddings — all built on PostgreSQL.