supabase-js

The official isomorphic JavaScript SDK for Supabase — database, auth, realtime, storage, and edge functions in one client.

SDK
npm
v2.118.0
4,598 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
95 /100 Excellent
Development Activity 100
Maintenance 100
Community 80
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
91 /100 Excellent
Architecture 92
Code Quality 90
Innovation 93
Learning Curve 85

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 createClient client 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

TypeScript
91%
Apache 2.0

Helicone

AI Development · Analytics · Monitoring

6,235

An open-source AI gateway and LLM observability platform that routes requests to 100+ models while logging cost, latency, and full traces for every call.

View details
74
Repo Health
81
Technical
65
Dependency
Built with
TypeScript 91%
Updated yesterday
TypeScript
71%
Other

highlight.io

Analytics · Developer Tools · Monitoring

9,384

Open-source full-stack monitoring that unifies session replay, error tracking, logging, and distributed tracing so you can stop context-switching between tools.

View details
76
Repo Health
78
Technical
65
Dependency
Built with
TypeScript 71%
Go 16%
Updated 2 days ago
JavaScript
55%
Other

Lokus

Knowledge Management · Note Taking

829

Local-first note-taking with graph view, canvas & AI plugins—your Markdown files, zero telemetry, blazing-fast Rust performance.

View details
75
Repo Health
75
Technical
64
Dependency
Built with
JavaScript 55%
HTML 21%
Rust 12%
Updated 1 months ago
JavaScript
98%
Other

Markdrop

Note Taking

360

Visual drag-and-drop markdown editor with GitHub-specific blocks, cloud sync, and offline PWA support

View details
38
Repo Health
57
Technical
69
Dependency
Built with
JavaScript 98%
Updated 7 months ago
TypeScript
99%
Apache 2.0

Mastra Code

AI Code Assistants

29,041

"A coding agent that never compacts" — a terminal-based AI coding agent built on the Mastra framework, with Observational Memory instead of context compaction, multi-model support, and OAuth login for Claude Max or ChatGPT Plus.

View details
90
Repo Health
73
Technical
65
Dependency
Built with
TypeScript 99%
Updated yesterday
TypeScript
53%
MIT

MentraOS

AI Development · Developer Tools

2,391

The open source operating system and SDK that lets developers build one app and run it across smart glasses from Even Realities, Vuzix, Mentra Live, and more.

View details
92
Repo Health
77
Technical
66
Dependency
Built with
TypeScript 53%
Java 16%
Updated yesterday
TypeScript
96%
AGPL 3.0

Midday

Invoicing Finance · Productivity

15,091

All-in-one AI-powered business operations platform for freelancers and solo entrepreneurs to manage invoicing, time tracking, banking, and financial intelligence.

View details
51
Repo Health
78
Technical
67
Dependency
Built with
TypeScript 96%
Updated 4 months ago
TypeScript
96%
AGPL 3.0

Midday

Invoicing Finance · Productivity

15,091

All-in-one AI-powered business operations platform for freelancers and solo entrepreneurs to manage invoicing, time tracking, banking, and financial intelligence.

View details
51
Repo Health
78
Technical
67
Dependency
Built with
TypeScript 96%
Updated 4 months ago
TypeScript
92%
Other

n8n

Automation · No Code Platforms

208,437

Code when you need it, UI when you don't — the workflow automation platform built for technical teams who refuse to choose.

View details
95
Repo Health
87
Technical
62
Dependency
Built with
TypeScript 92%
Updated 2 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers