https://github.com/supabase/supabase-js
An isomorphic Javascript client for Supabase. Query your Supabase database, subscribe to realtime events, upload and download files, browse typescript examples, invoke postgres functions via rpc, invoke supabase edge functions, query pgvector.
https://github.com/supabase/supabase-js
client-library database isomorphic javascript js mit-license node-js nuxt orm postgres postgresql postgrest supabase svelte ts typescript
Last synced: 3 days ago
JSON representation
An isomorphic Javascript client for Supabase. Query your Supabase database, subscribe to realtime events, upload and download files, browse typescript examples, invoke postgres functions via rpc, invoke supabase edge functions, query pgvector.
- Host: GitHub
- URL: https://github.com/supabase/supabase-js
- Owner: supabase
- License: mit
- Created: 2020-05-15T12:52:16.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-04-25T11:17:51.000Z (9 months ago)
- Last Synced: 2025-04-29T18:26:09.957Z (9 months ago)
- Topics: client-library, database, isomorphic, javascript, js, mit-license, node-js, nuxt, orm, postgres, postgresql, postgrest, supabase, svelte, ts, typescript
- Language: TypeScript
- Homepage: https://supabase.com
- Size: 4.98 MB
- Stars: 3,623
- Watchers: 56
- Forks: 336
- Open Issues: 171
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Supabase JS SDK
[](https://github.com/supabase/supabase-js/actions?query=branch%3Amaster)
[](https://www.npmjs.com/package/@supabase/postgrest-js)
[](#license)
[](https://pkg.pr.new/~/supabase/supabase-js)
> **For contributors: Repository Structure Changed**
>
> This repository has been restructured as a monorepo. All libraries, including `supabase-js` itself, have moved to `packages/core/`:
>
> | What You're Looking For | Where It Is Now |
> | ----------------------- | ---------------------------- |
> | Main supabase-js code | `packages/core/supabase-js/` |
> | Other libraries | `packages/core/*/` |
>
> Read the **[Migration Guide](./docs/MIGRATION.md)** to learn more.
## ๐ฆ Libraries
This monorepo contains the complete suite of Supabase JavaScript SDK:
| Library | Description |
| ---------------------------------------------------------- | ------------------------------------- |
| **[@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 |
## Support Policy
This section outlines the scope of support for various runtime environments in Supabase JavaScript client.
### Node.js
We only support Node.js versions that are in **Active LTS** or **Maintenance** status as defined by the [official Node.js release schedule](https://nodejs.org/en/about/previous-releases#release-schedule). This means we support versions that are currently receiving long-term support and critical bug fixes.
When a Node.js version reaches end-of-life and is no longer in Active LTS or Maintenance status, Supabase will drop it in a **minor release**, and **this won't be considered a breaking change**.
> โ ๏ธ **Node.js 18 Deprecation Notice**
>
> Node.js 18 reached end-of-life on April 30, 2025. As announced in [our deprecation notice](https://github.com/orgs/supabase/discussions/37217), support for Node.js 18 was dropped in version `2.79.0`.
>
> If you must use Node.js 18, please use version `2.78.0`, which is the last version that supported Node.js 18.
### Deno
We support Deno versions that are currently receiving active development and security updates. We follow the [official Deno release schedule](https://docs.deno.com/runtime/fundamentals/stability_and_releases/) and only support versions from the `stable` and `lts` release channels.
When a Deno version reaches end-of-life and is no longer receiving security updates, Supabase will drop it in a **minor release**, and **this won't be considered a breaking change**.
### Browsers
All modern browsers are supported. We support browsers that provide native `fetch` API. For Realtime features, browsers must also support native `WebSocket` API.
### Bun
We support Bun runtime environments. Bun provides native fetch support and is compatible with Node.js APIs. Since Bun does not follow a structured release schedule like Node.js or Deno, we support current stable versions of Bun and may drop support for older versions in minor releases without considering it a breaking change.
### React Native
We support React Native environments with fetch polyfills provided by the framework. Since React Native does not follow a structured release schedule, we support current stable versions and may drop support for older versions in minor releases without considering it a breaking change.
### Cloudflare Workers
We support Cloudflare Workers runtime environments. Cloudflare Workers provides native fetch support. Since Cloudflare Workers does not follow a structured release schedule, we support current stable versions and may drop support for older versions in minor releases without considering it a breaking change.
### Important Notes
- **Experimental features**: Features marked as experimental may be removed or changed without notice
## ๐ Quick Start
### Installation
```bash
npm install @supabase/supabase-js
```
Read more in each package's README file.
## ๐ค Contributing
We welcome contributions! Please see our [Contributing Guide](./CONTRIBUTING.md) for details.
### Quick Contribution Steps
1. **Fork the repository**
2. **Create a feature branch** (`git checkout -b feature/amazing-feature`)
3. **Make your changes** and add tests
4. **Run tests** (`npx nx affected --target=test`)
5. **Commit your changes** (`npm run commit`)
6. **Push to your branch** (`git push origin feature/amazing-feature`)
7. **Open a Pull Request**
### Development Guidelines
- Follow [conventional commits](https://www.conventionalcommits.org/) for commit messages
- Add tests for new functionality
- Update documentation for API changes
- Run `npx nx format` before committing
- Ensure all tests pass with `npx nx affected --target=test`
## ๐งช Testing
Testing varies per package. See the top-level [TESTING.md](docs/TESTING.md) for an overview and links to package-specific guides.
## ๐ Documentation
### API Documentation
- **[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
- **[Contributing](./CONTRIBUTING.md)** - Development guidelines
- **[Release Workflows](./docs/RELEASE.md)** - Release and publishing process
- **[Migration Guide](./docs/MIGRATION.md)** - Migrating to the monorepo structure
- **[Security Policy](./docs/SECURITY.md)** - Security guidelines and reporting
## ๐ Verifying provenance attestations
You can verify registry signatures and provenance attestations for installed packages using the npm CLI:
```bash
npm audit signatures
```
Quick example for a single package install:
```bash
npm install @supabase/auth-js
npm audit signatures
```
Example output:
```text
audited 1 package in 0s
1 package has a verified registry signature
```
Because provenance attestations are a new capability, security features may evolve over time. Ensure you are using the latest npm CLI to verify attestation signatures reliably. This may require updating npm beyond the version bundled with Node.js.
## ๐ License
This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.
## ๐ Support
- **Documentation**: [supabase.com/docs](https://supabase.com/docs)
- **Community**: [GitHub Discussions](https://github.com/supabase/supabase/discussions)
- **Issues**: [GitHub Issues](https://github.com/supabase/supabase-js/issues)
- **Discord**: [Supabase Discord](https://discord.supabase.com)
---
**[Website](https://supabase.com) โข [Documentation](https://supabase.com/docs) โข [Community](https://github.com/supabase/supabase/discussions) โข [Twitter](https://twitter.com/supabase)**