Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cursorrules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Cursor Rules for Supabase JS Libraries Monorepo

You are working in a unified Nx monorepo that consolidates all Supabase JavaScript client libraries. This migration from 6 separate repositories addresses maintenance overhead, dependency duplication, and release coordination challenges.
You are working in a unified Nx monorepo that consolidates all Supabase JavaScript SDKs. This migration from 6 separate repositories addresses maintenance overhead, dependency duplication, and release coordination challenges.

## Repository Context

Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,33 +100,33 @@ jobs:
</head>
<body>
<h1>Supabase JavaScript Libraries - API Documentation</h1>
<p>TypeScript/JavaScript API documentation for all Supabase client libraries.</p>
<p>TypeScript/JavaScript API documentation for all Supabase JS SDKs.</p>

<h2>Available Documentation:</h2>
<ul>
<li>
<a href="auth-js/v2/spec.json">@supabase/auth-js</a>
<div class="description">Authentication client library</div>
<div class="description">Authentication SDK</div>
</li>
<li>
<a href="functions-js/v2/spec.json">@supabase/functions-js</a>
<div class="description">Edge Functions client library</div>
<div class="description">Edge Functions SDK</div>
</li>
<li>
<a href="postgrest-js/v2/spec.json">@supabase/postgrest-js</a>
<div class="description">PostgREST database client</div>
<div class="description">PostgREST database SDK</div>
</li>
<li>
<a href="realtime-js/v2/spec.json">@supabase/realtime-js</a>
<div class="description">Realtime subscriptions client</div>
<div class="description">Realtime subscriptions SDK</div>
</li>
<li>
<a href="storage-js/v2/spec.json">@supabase/storage-js</a>
<div class="description">File storage client</div>
<div class="description">File storage SDK</div>
</li>
<li>
<a href="supabase-js/v2/spec.json">@supabase/supabase-js</a>
<div class="description">Main isomorphic client combining all libraries</div>
<div class="description">Main isomorphic SDK combining all SDKs</div>
</li>
</ul>

Expand Down
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Claude AI Instructions for Supabase JS Libraries Monorepo

You are assisting with development in a unified Nx monorepo that consolidates all Supabase JavaScript client libraries, built with Nx for optimal developer experience and maintainability. This strategic migration from 6 separate repositories addresses critical maintenance overhead, dependency duplication, and release coordination challenges while maintaining **zero breaking changes** for consumers.
You are assisting with development in a unified Nx monorepo that consolidates all Supabase JavaScript SDKs, built with Nx for optimal developer experience and maintainability. This strategic migration from 6 separate repositories addresses critical maintenance overhead, dependency duplication, and release coordination challenges while maintaining **zero breaking changes** for consumers.

> **📚 Essential Documentation**: Always refer to these guides for detailed information:
>
Expand Down Expand Up @@ -777,4 +777,4 @@ _No user-facing changes in this release._
- Unchanged packages show "No user-facing changes"
- Single npm install updates entire SDK suite

Remember: This monorepo optimizes for developer experience and maintenance efficiency while ensuring zero breaking changes for the millions of developers using Supabase client libraries.
Remember: This monorepo optimizes for developer experience and maintenance efficiency while ensuring zero breaking changes for the millions of developers using Supabase SDKs.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to Supabase JS Libraries

Thank you for your interest in contributing to the Supabase JavaScript client libraries! This guide will help you get started with contributing to the Supabase JS monorepo.
Thank you for your interest in contributing to the Supabase JavaScript SDK! This guide will help you get started with contributing to the Supabase JS monorepo.

> **Repository Structure Changed:** This repository has been restructured as a monorepo. **All libraries, including `supabase-js`, are now under `packages/core/`**. If you previously contributed to `supabase-js`, `auth-js`, `postgrest-js`, `realtime-js`, `storage-js`, or `functions-js`, please read our **[Migration Guide](docs/MIGRATION.md)** to understand:
>
Expand Down
43 changes: 23 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</picture>
</a>

<h1 align="center">Supabase JS Client Libraries</h1>
<h1 align="center">Supabase JS SDK</h1>

<p align="center">
<a href="https://supabase.com/docs/guides/getting-started">Guides</a>
Expand All @@ -19,6 +19,9 @@

<div align="center">

[![Build](https://github.com/supabase/supabase-js/workflows/CI/badge.svg)](https://github.com/supabase/supabase-js/actions?query=branch%3Amaster)
[![Package](https://img.shields.io/npm/v/@supabase/supabase-js)](https://www.npmjs.com/package/@supabase/postgrest-js)
[![License: MIT](https://img.shields.io/npm/l/@supabase/supabase-js)](#license)
[![pkg.pr.new](https://pkg.pr.new/badge/supabase/supabase-js)](https://pkg.pr.new/~/supabase/supabase-js)

</div>
Expand All @@ -36,16 +39,16 @@

## 📦 Libraries

This monorepo contains the complete suite of Supabase JavaScript client libraries:
This monorepo contains the complete suite of Supabase JavaScript SDK:

| Library | Description |
| ---------------------------------------------------------- | ---------------------------------------- |
| **[@supabase/supabase-js](./packages/core/supabase-js)** | Main isomorphic client for Supabase |
| **[@supabase/auth-js](./packages/core/auth-js)** | Authentication client |
| **[@supabase/postgrest-js](./packages/core/postgrest-js)** | PostgREST client for database operations |
| **[@supabase/realtime-js](./packages/core/realtime-js)** | Real-time subscriptions client |
| **[@supabase/storage-js](./packages/core/storage-js)** | File storage client |
| **[@supabase/functions-js](./packages/core/functions-js)** | Edge Functions client |
| **[@supabase/supabase-js](./packages/core/supabase-js)** | Main isomorphic sdk for Supabase |
| **[@supabase/auth-js](./packages/core/auth-js)** | Authentication sdk |
| **[@supabase/postgrest-js](./packages/core/postgrest-js)** | PostgREST sdk for database operations |
| **[@supabase/realtime-js](./packages/core/realtime-js)** | Real-time subscriptions sdk |
| **[@supabase/storage-js](./packages/core/storage-js)** | File storage sdk |
| **[@supabase/functions-js](./packages/core/functions-js)** | Edge Functions sdk |

> **💡 Note for Package Users:** If you install and use these packages, **nothing has changed**. Continue installing packages normally:
>
Expand Down Expand Up @@ -147,12 +150,12 @@ npx nx test <package-name> --coverage

### API Documentation

- **[Auth Client](./packages/core/auth-js/README.md)** - Authentication and user management
- **[Database Client](./packages/core/postgrest-js/README.md)** - Database queries and operations
- **[Realtime Client](./packages/core/realtime-js/README.md)** - Real-time subscriptions
- **[Storage Client](./packages/core/storage-js/README.md)** - File upload and management
- **[Functions Client](./packages/core/functions-js/README.md)** - Edge Functions invocation
- **[Main Client](./packages/core/supabase-js/README.md)** - Combined client library
- **[Auth sdk](./packages/core/auth-js/README.md)** - Authentication and user management
- **[Database sdk](./packages/core/postgrest-js/README.md)** - Database queries and operations
- **[Realtime sdk](./packages/core/realtime-js/README.md)** - Real-time subscriptions
- **[Storage sdk](./packages/core/storage-js/README.md)** - File upload and management
- **[Functions sdk](./packages/core/functions-js/README.md)** - Edge Functions invocation
- **[Main sdk](./packages/core/supabase-js/README.md)** - Combined sdk

### Architecture Documentation

Expand Down Expand Up @@ -194,12 +197,12 @@ Because provenance attestations are a new capability, security features may evol
supabase-js/
├── packages/
│ └── core/ # Published libraries
│ ├── auth-js/ # Authentication client
│ ├── functions-js/ # Edge Functions client
│ ├── postgrest-js/ # PostgREST database client
│ ├── realtime-js/ # Real-time subscriptions client
│ ├── storage-js/ # File storage client
│ └── supabase-js/ # Main isomorphic client
│ ├── auth-js/ # Authentication sdk
│ ├── functions-js/ # Edge Functions sdk
│ ├── postgrest-js/ # PostgREST database sdk
│ ├── realtime-js/ # Real-time subscriptions sdk
│ ├── storage-js/ # File storage sdk
│ └── supabase-js/ # Main isomorphic sdk
├── nx.json # npx nx workspace configuration
├── package.json # Root package.json and workspaces setup
└── ...
Expand Down
20 changes: 10 additions & 10 deletions WARP.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This file provides guidance to WARP (warp.dev) when working with code in this re

## Repository Overview

This is a unified Nx monorepo consolidating all Supabase JavaScript client libraries, built with Nx for optimal developer experience and maintainability. This strategic migration from 6 separate repositories addresses critical maintenance overhead, dependency duplication, and release coordination challenges while maintaining **zero breaking changes** for consumers.
This is a unified Nx monorepo consolidating all Supabase JavaScript SDKs, built with Nx for optimal developer experience and maintainability. This strategic migration from 6 separate repositories addresses critical maintenance overhead, dependency duplication, and release coordination challenges while maintaining **zero breaking changes** for consumers.

> **📚 Key Documentation**: For comprehensive guides, see:
>
Expand Down Expand Up @@ -46,12 +46,12 @@ This monorepo replaces the following individual repositories:
```text
supabase-js/
├── packages/core/ # Published libraries
│ ├── supabase-js/ # Main isomorphic client for Supabase (@supabase/supabase-js)
│ ├── auth-js/ # Authentication client (@supabase/auth-js)
│ ├── postgrest-js/ # PostgREST client for database operations (@supabase/postgrest-js)
│ ├── realtime-js/ # Real-time subscriptions client (@supabase/realtime-js)
│ ├── storage-js/ # File storage client (@supabase/storage-js)
│ └── functions-js/ # Edge Functions client (@supabase/functions-js)
│ ├── supabase-js/ # Main isomorphic SDK for Supabase (@supabase/supabase-js)
│ ├── auth-js/ # Authentication SDK (@supabase/auth-js)
│ ├── postgrest-js/ # PostgREST SDK for database operations (@supabase/postgrest-js)
│ ├── realtime-js/ # Real-time subscriptions SDK (@supabase/realtime-js)
│ ├── storage-js/ # File storage SDK (@supabase/storage-js)
│ └── functions-js/ # Edge Functions SDK (@supabase/functions-js)
├── docs/ # Documentation guides
│ ├── CONTRIBUTING.md # Contribution guidelines
│ ├── TESTING.md # Testing guide
Expand Down Expand Up @@ -172,15 +172,15 @@ Each library has its own testing infrastructure. See the [TESTING.md](docs/TESTI

### Core Architecture

The main `@supabase/supabase-js` package aggregates all individual client libraries:
The main `@supabase/supabase-js` package aggregates all individual SDKs:

- **auth-js**: Handles authentication and user management
- **postgrest-js**: Provides database query capabilities via PostgREST
- **realtime-js**: Manages real-time subscriptions and channels
- **storage-js**: Handles file uploads and storage operations
- **functions-js**: Invokes Supabase Edge Functions

Each library is designed to work independently but integrates seamlessly when used together through the main client.
Each library is designed to work independently but integrates seamlessly when used together through the main SDK.

### Development Infrastructure

Expand Down Expand Up @@ -259,7 +259,7 @@ nx affected --target=test

| Library | Docker Required | Primary Use Case |
| ------------ | --------------- | -------------------------- |
| supabase-js | ❌ No | Main isomorphic client |
| supabase-js | ❌ No | Main isomorphic SDK |
| auth-js | ✅ Yes | Authentication & user mgmt |
| postgrest-js | ✅ Yes | Database queries |
| realtime-js | ❌ No | Real-time subscriptions |
Expand Down
6 changes: 3 additions & 3 deletions docs/MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ This guide is for contributors who need to understand where code moved and how t

## Why We Migrated

We converted the `supabase-js` repository into a monorepo and absorbed the other js client libraries to solve several challenges:
We converted the `supabase-js` repository into a monorepo and absorbed the other js SDKs to solve several challenges:

### Problems with Separate Repos

Expand Down Expand Up @@ -134,7 +134,7 @@ github.com/supabase/storage-js
github.com/supabase/functions-js
```

**After:** The Supabase JS monorepo (absorbed all client libraries)
**After:** The Supabase JS monorepo (absorbed all SDKs)

```tree
github.com/supabase/supabase-js
Expand Down Expand Up @@ -325,7 +325,7 @@ Use these names with Nx commands:
- `postgrest-js` - PostgREST library
- `realtime-js` - Realtime library
- `storage-js` - Storage library
- `supabase-js` - Main client library
- `supabase-js` - Main SDK

### Useful New Commands

Expand Down
40 changes: 28 additions & 12 deletions packages/core/auth-js/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,34 @@
# `auth-js`

An isomorphic JavaScript client library for the [Supabase Auth](https://github.com/supabase/auth) API.
<br />
<p align="center">
<a href="https://supabase.io">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/supabase/supabase/master/packages/common/assets/images/supabase-logo-wordmark--dark.svg">
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/supabase/supabase/master/packages/common/assets/images/supabase-logo-wordmark--light.svg">
<img alt="Supabase Logo" width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/packages/common/assets/images/logo-preview.jpg">
</picture>
</a>

<h1 align="center">Supabase Auth JS SDK</h1>

<h3 align="center">An isomorphic JavaScript SDK for the <a href="https://github.com/supabase/auth">Supabase Auth</a> API.</h3>

<p align="center">
<a href="https://supabase.com/docs/guides/auth">Guides</a>
·
<a href="https://supabase.com/docs/reference/javascript/auth-signup">Reference Docs</a>
·
<a href="https://supabase.github.io/supabase-js/auth-js/v2/spec.json">TypeDoc</a>
</p>
</p>

<div align="center">

[![Build](https://github.com/supabase/supabase-js/workflows/CI/badge.svg)](https://github.com/supabase/supabase-js/actions?query=branch%3Amaster)
[![Package](https://img.shields.io/npm/v/@supabase/auth-js)](https://www.npmjs.com/package/@supabase/auth-js)
[![License: MIT](https://img.shields.io/npm/l/@supabase/supabase-js)](#license)
[![pkg.pr.new](https://pkg.pr.new/badge/supabase/auth-js)](https://pkg.pr.new/~/supabase/auth-js)

</div>

## Docs

- Using `auth-js`: https://supabase.com/docs/reference/javascript/auth-signup
- TypeDoc: https://supabase.github.io/supabase-js/auth-js/v2/spec.json

## Quick start

Install
Expand All @@ -31,9 +47,9 @@ const GOTRUE_URL = 'http://localhost:9999'
const auth = new AuthClient({ url: GOTRUE_URL })
```

- `signUp()`: https://supabase.io/docs/reference/javascript/auth-signup
- `signIn()`: https://supabase.io/docs/reference/javascript/auth-signin
- `signOut()`: https://supabase.io/docs/reference/javascript/auth-signout
- `signUp()`: https://supabase.com/docs/reference/javascript/auth-signup
- `signIn()`: https://supabase.com/docs/reference/javascript/auth-signin
- `signOut()`: https://supabase.com/docs/reference/javascript/auth-signout

### Custom `fetch` implementation

Expand Down
2 changes: 1 addition & 1 deletion packages/core/auth-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@supabase/auth-js",
"version": "0.0.0",
"private": false,
"description": "Official client library for Supabase Auth",
"description": "Official SDK for Supabase Auth",
"keywords": [
"auth",
"supabase",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/auth-js/src/lib/error-codes.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Known error codes. Note that the server may also return other error codes
* not included in this list (if the client library is older than the version
* not included in this list (if the SDK is older than the version
* on the server).
*/
export type ErrorCode =
Expand Down
34 changes: 25 additions & 9 deletions packages/core/functions-js/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,35 @@
# `functions-js`
<br />
<p align="center">
<a href="https://supabase.io">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/supabase/supabase/master/packages/common/assets/images/supabase-logo-wordmark--dark.svg">
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/supabase/supabase/master/packages/common/assets/images/supabase-logo-wordmark--light.svg">
<img alt="Supabase Logo" width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/packages/common/assets/images/logo-preview.jpg">
</picture>
</a>

<h1 align="center">Supabase Functions JS SDK</h1>

<h3 align="center">JavaScript SDK to interact with Supabase Edge Functions.</h3>

<p align="center">
<a href="https://supabase.com/docs/guides/functions">Guides</a>
·
<a href="https://supabase.com/docs/reference/javascript/functions-invoke">Reference Docs</a>
·
<a href="https://supabase.github.io/supabase-js/functions-js/v2/spec.json">TypeDoc</a>
</p>
</p>

<div align="center">

[![Build](https://github.com/supabase/supabase-js/workflows/CI/badge.svg)](https://github.com/supabase/supabase-js/actions?query=branch%3Amaster)
[![Package](https://img.shields.io/npm/v/@supabase/functions-js)](https://www.npmjs.com/package/@supabase/functions-js)
[![License: MIT](https://img.shields.io/npm/l/@supabase/supabase-js)](#license)
[![pkg.pr.new](https://pkg.pr.new/badge/supabase/functions-js)](https://pkg.pr.new/~/supabase/functions-js)

</div>

JS Client library to interact with Supabase Functions.

## Docs

- **API Reference**: <https://supabase.com/docs/reference/javascript/functions-invoke>
- **Functions Guide**: <https://supabase.com/docs/guides/functions>
- **Typedoc**: <https://supabase.github.io/supabase-js/functions-js/v2/spec.json>

## Quick Start

### Installation
Expand Down
2 changes: 1 addition & 1 deletion packages/core/functions-js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@supabase/functions-js",
"version": "0.0.0-automated",
"description": "JS Client library to interact with Supabase Functions.",
"description": "JS SDK to interact with Supabase Functions.",
"main": "dist/main/index.js",
"module": "dist/module/index.js",
"types": "dist/module/index.d.ts",
Expand Down
Loading