For contributors: Repository Structure Changed
This repository has been restructured as a monorepo. All libraries, including
supabase-js
itself, have moved topackages/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 to learn more.
This monorepo contains the complete suite of Supabase JavaScript SDK:
Library | Description |
---|---|
@supabase/supabase-js | Main isomorphic sdk for Supabase |
@supabase/auth-js | Authentication sdk |
@supabase/postgrest-js | PostgREST sdk for database operations |
@supabase/realtime-js | Real-time subscriptions sdk |
@supabase/storage-js | File storage sdk |
@supabase/functions-js | Edge Functions sdk |
π‘ Note for Package Users: If you install and use these packages, nothing has changed. Continue installing packages normally:
npm install @supabase/supabase-js npm install @supabase/auth-jsThe monorepo structure only affects contributors. This is how we develop and maintain the code, not how you use it.
# Clone the repository
git clone https://github.com/supabase/supabase-js.git
cd supabase-js
# Install dependencies
npm install
# Build all packages
npx nx run-many --target=build --all
# Build a specific library
npx nx build auth-js
# Test a specific library
npx nx test postgrest-js
# Build affected projects (only build what changed)
npx nx affected --target=build
# Generate dependency graph
npx nx graph
# Format all code
npx nx format
# Check code formatting
npx nx format:check
Each library can be developed independently:
# Start development with watch mode
npx nx build auth-js --watch
npx nx test auth-js --watch
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Make your changes and add tests
- Run tests (
npx nx affected --target=test
) - Commit your changes (
npm run commit
) - Push to your branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Follow conventional commits 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 varies per package. See the top-level TESTING.md for an overview and links to package-specific guides.
Quick examples:
# Run tests for a specific package
npx nx test <package-name>
# Run tests with coverage
npx nx test <package-name> --coverage
- Auth sdk - Authentication and user management
- Database sdk - Database queries and operations
- Realtime sdk - Real-time subscriptions
- Storage sdk - File upload and management
- Functions sdk - Edge Functions invocation
- Main sdk - Combined sdk
- Contributing - Development guidelines
- Release Workflows - Release and publishing process
- Migration Guide - Migrating to the monorepo structure
- Security Policy - Security guidelines and reporting
You can verify registry signatures and provenance attestations for installed packages using the npm CLI:
npm audit signatures
Quick example for a single package install:
npm install @supabase/auth-js
npm audit signatures
Example output:
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.
supabase-js/
βββ packages/
β βββ core/ # Published libraries
β βββ 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
βββ ...
This project is licensed under the MIT License - see the LICENSE file for details.
- Documentation: supabase.com/docs
- Community: GitHub Discussions
- Issues: GitHub Issues
- Discord: Supabase Discord
Website β’ Documentation β’ Community β’ Twitter