Thank you for expressing your interest in Supabase and your willingness to contribute!
To ensure a positive and inclusive environment, we kindly request you to read our code of conduct. Additionally, we encourage you to explore the existing issues to see how you can make a meaningful impact. This document will guide you through the process of setting up your development environment, enabling you to successfully build and test Supabase.
You will need to install and configure the following dependencies on your machine to build Supabase:
- Git
- Node.js v18.x (LTS)
- npm version 9.x.x
We are in the process of migrating this repository to monorepo, using Turborepo.
Eventually, all the apps will be run using Turborepo, which will significantly improve the developer workflow.
To contribute code to Supabase, you must fork the Supabase Repository.
-
Clone your GitHub forked repository:
git clone https://github.com/<github_username>/supabase.git
-
Go to the Supabase directory:
cd supabase
Supabase uses Turborepo to manage and run this monorepo.
-
Install the dependencies in the root of the repo.
npm install # install dependencies
-
After that you can run the apps simultaneously with the following.
npm run dev # start all the applications
Then visit, and edit, any of the following sites:
Site | Directory | Scope name | Description | Local development server |
---|---|---|---|---|
supabase.com | /apps/www |
www | The main website | http://localhost:3000 |
app.supabase.com | /studio |
studio | Studio dashboard | http://localhost:8082 |
supabase.com/docs | /apps/docs |
docs | Guides and Reference (Next.js based) | http://localhost:3001/docs |
You can run any of the sites individually by using the scope name. For example:
npm run dev:www
The monorepo has a set of shared components under /packages
:
/packages/common
: Common React code, shared between all sites./packages/config
: All shared config/packages/spec
: Generates documentation using spec files./packages/tsconfig
: Shared Typescript settings
Installing a package with NPM workspaces requires you to add the -w
flag to tell NPM which workspace you want to install into. Do not install dependencies in their local folder, install them from the route using the -w
flag.
The format is: npm install <package name> -w=<workspace to install in>
.
For example:
npm install react -w common
: installs into./packages/common
npm install react -w www
: installs into./apps/www
npm install react -w studio
: installs into./studio
You do not need to install devDependencies
in each workspace. These can all be installed in the root package.
Following the changes to the Supabase docs the following is needed to run the new docs locally:
- Inside of
apps/docs
create a.env.local
file with the following:NEXT_PUBLIC_NEW_DOCS=true
Now when you run a local development docs server you will see the new docs site.
After making your changes, open a pull request (PR). Once you submit your pull request, others from the Supabase team/community will review it with you.
If you have an issue, like a merge conflict, or don't know how to open a pull request then check out GitHub's pull request tutorial on how to resolve merge conflicts and other issues. Once your PR has been merged, you will be proudly listed as a contributor in the contributor chart.
Create a new entry in the redirects.js
file in our main site.
If you are stuck somewhere or have any questions, join our Discord Community Server or the Github Discussions. We are here to help!