logo
0
0
WeChat Login

Supabase

Supabase is an open source Firebase alternative. We're building the features of Firebase using enterprise-grade open source tools.

  • Hosted Postgres Database. Docs
  • Authentication and Authorization. Docs
  • Auto-generated APIs.
  • Functions.
    • Database Functions. Docs
    • Edge Functions Docs
  • File Storage. Docs
  • AI + Vector/Embeddings Toolkit. Docs
  • Dashboard

Supabase Dashboard

Watch "releases" of this repo to get notified of major updates.

Watch this repo

Documentation

For full documentation, visit supabase.com/docs

To see how to Contribute, visit Getting Started

Community & Support

  • Community Forum. Best for: help with building, discussion about database best practices.
  • GitHub Issues. Best for: bugs and errors you encounter using Supabase.
  • Email Support. Best for: problems with your database or infrastructure.
  • Discord. Best for: sharing your applications and hanging out with the community.

How it works

Supabase is a combination of open source tools. We're building the features of Firebase using enterprise-grade, open source products. If the tools and communities exist, with an MIT, Apache 2, or equivalent open license, we will use and support that tool. If the tool doesn't exist, we build and open source it ourselves. Supabase is not a 1-to-1 mapping of Firebase. Our aim is to give developers a Firebase-like developer experience using open source tools.

Architecture

Supabase is a hosted platform. You can sign up and start using Supabase without installing anything. You can also self-host and develop locally.

Architecture

  • Postgres is an object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.
  • Realtime is an Elixir server that allows you to listen to PostgreSQL inserts, updates, and deletes using websockets. Realtime polls Postgres' built-in replication functionality for database changes, converts changes to JSON, then broadcasts the JSON over websockets to authorized clients.
  • PostgREST is a web server that turns your PostgreSQL database directly into a RESTful API.
  • GoTrue is a JWT-based authentication API that simplifies user sign-ups, logins, and session management in your applications.
  • Storage a RESTful API for managing files in S3, with Postgres handling permissions.
  • pg_graphql a PostgreSQL extension that exposes a GraphQL API.
  • postgres-meta is a RESTful API for managing your Postgres, allowing you to fetch tables, add roles, and run queries, etc.
  • Kong is a cloud-native API gateway.

Client libraries

Our approach for client libraries is modular. Each sub-library is a standalone implementation for a single external system. This is one of the ways we support existing tools.

LanguageClientFeature-Clients (bundled in Supabase client)
SupabasePostgRESTGoTrueRealtimeStorageFunctions
⚡️ Official ⚡️
JavaScript (TypeScript)supabase-jspostgrest-jsgotrue-jsrealtime-jsstorage-jsfunctions-js
Fluttersupabase-flutterpostgrest-dartgotrue-dartrealtime-dartstorage-dartfunctions-dart
Swiftsupabase-swiftpostgrest-swiftauth-swiftrealtime-swiftstorage-swiftfunctions-swift
Pythonsupabase-pypostgrest-pygotrue-pyrealtime-pystorage-pyfunctions-py
💚 Community 💚
C#supabase-csharppostgrest-csharpgotrue-csharprealtime-csharpstorage-csharpfunctions-csharp
Go-postgrest-gogotrue-go-storage-gofunctions-go
Java--gotrue-java-storage-java-
Kotlinsupabase-ktpostgrest-ktauth-ktrealtime-ktstorage-ktfunctions-kt
Rubysupabase-rbpostgrest-rb----
Rust-postgrest-rs----
Godot Engine (GDScript)supabase-gdscriptpostgrest-gdscriptgotrue-gdscriptrealtime-gdscriptstorage-gdscriptfunctions-gdscript

Badges

Made with Supabase

[![Made with Supabase](https://supabase.com/badge-made-with-supabase.svg)](https://supabase.com)
<a href="https://supabase.com"> <img width="168" height="30" src="https://supabase.com/badge-made-with-supabase.svg" alt="Made with Supabase" /> </a>

Made with Supabase (dark)

[![Made with Supabase](https://supabase.com/badge-made-with-supabase-dark.svg)](https://supabase.com)
<a href="https://supabase.com"> <img width="168" height="30" src="https://supabase.com/badge-made-with-supabase-dark.svg" alt="Made with Supabase" /> </a>

Translations

Supabase 本地部署指南

快速启动

方法1:使用 docker/ 目录(推荐用于开发)

cd docker cp .env.example .env # 编辑 .env 文件设置你的密钥 docker compose up -d

方法2:使用 supabase-project/ 目录(生产就绪)

cd supabase-project # .env 文件已配置好安全密钥 docker compose up -d

服务访问端点

默认凭据

  • Studio 用户名: supabase
  • Studio 密码: this_password_is_insecure_and_should_be_updated
  • 数据库用户: postgres
  • 数据库密码: 见 .env 文件中的 POSTGRES_PASSWORD

配置差异说明

两个配置的主要差异:

  1. docker/ - 开发环境配置,健康检查较宽松
  2. supabase-project/ - 生产环境配置,健康检查更严格,包含启动缓冲时间

故障排除

Docker 守护进程连接问题

如果遇到 Docker 守护进程连接问题:

  1. 确保 Docker Desktop 正在运行
  2. 检查 Docker 服务状态:systemctl status docker
  3. 重启 Docker 服务:sudo systemctl restart docker

3000端口无法访问问题

如果 Studio 界面无法访问:

  1. 确保已修复 docker-compose.yml 中 studio 服务的端口映射
  2. 重启服务:docker compose down && docker compose up -d
  3. 等待所有服务完全启动(约2-3分钟)
  4. 访问 http://localhost:3000

服务启动顺序

服务按以下顺序启动,请耐心等待:

  1. vector, db (数据库)
  2. analytics (分析服务)
  3. auth, rest, meta, kong (核心API服务)
  4. studio (管理界面) - 最后启动

环境变量说明

关键环境变量已配置:

  • POSTGRES_PASSWORD: 数据库密码
  • JWT_SECRET: JWT 签名密钥
  • ANON_KEY: 匿名访问密钥
  • SERVICE_ROLE_KEY: 服务角色密钥

About

https://github.com/supabase/supabase.git

1.64 GiB
0 forks0 stars663 branches45 TagREADMEApache-2.0 license
Language
TypeScript73.5%
SVG11.3%
JavaScript5.1%
Markdown2.6%
Others7.5%