- Development Setup
- Building Supabase
- Start a Development Server
- Monorepo
- Common Tasks
- Finally
- Community Channels
First off, thanks for your interest in Supabase and for wanting to contribute! before you begin, read the code of conduct and check out the existing issues. This document describes how to set up your development environment to build and test Supabase.
Before you can build Supabase, you must install and configure the following dependencies on your machine:
-
npm version 7+.
To contribute code to Supabase, you must fork the Supabase Repository. After you fork the repository, you may now begin editing the source code.
To build Supabase, you clone the source code repository:
-
Clone your GitHub forked repository:
git clone https://github.com/<github_username>/supabase.git
-
Go to the Supabase directory:
cd supabase
Before you start a development server, you must choose if you want to work on the Supabase Website, Supabase Docs, or Supabase Studio.
-
Go to the Supabase Website directory
cd apps/www
Go to the Supabase Docs directory
cd web
Go to the Supabase Studio directory
cd studio
-
Install npm dependencies:
npm
npm install
or with yarn
yarn install
To debug code, and to see changes in real time, it is often useful to have a local HTTP server. Click one of the three links below to choose which development server you want to start.
The website is moving to a new monorepo setup. See the Monorepo section below.
-
Build development server
npm
npm run build
or with yarn
yarn build
-
Start development server
npm
npm run start
or with yarn
yarn start
-
To access the local server, enter the following URL into your web browser:
http://localhost:3005/docs
-
Start development server
npm
npm run dev
or with yarn
yarn dev
-
To access the local server, enter the following URL into your web browser:
http://localhost:8082/
For more information on Supabase Studio, see the Supabase Studio readme.
We are in the process of migrating this repository to monorepo, using Turborepo. Eventually, the docs and the Studio will be run using Turborepo, which will significantly improve the developer workflow. You must be using NPM 7 or higher.
npm install # install dependencies
npm run dev # start all the applications
Then edit and visit any of the following sites:
/apps/www
: http://localhost:3000- The main website.
/apps/temp-docs
: http://localhost:3001- We are migrating the docs to a Next.js application.
/apps/temp-community-forum
: http://localhost:3002- pulls all our github discussions into a nextjs site. Temporary/POC
/apps/temp-community-tutorials
: http://localhost:3003- pulls all our DEV articles (which community members can write) into a nextjs site. Temporary/POC
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/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.
The format is: npm install <package name> -w=<workspace to install in>
.
For example:
npm install @supabase/ui -w common
: installs into./packages/common
npm install @supabase/ui -w www
: installs into./apps/www
You do not need to install devDependencies
in each workspace. These can all be installed in the root package.
npm run dev
To add a redirect, simple create a new entry in the next.config.js
file in our main site.
After making your changes to the file(s) you'd like to update, it's time to open a pull request. Once you submit your pull request, others from the Supabase team/community will review it with you.
Did you have an issue, like a merge conflict, or don't know how to open a pull request? 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
Stuck somewhere? Have any questions? please join the Discord Community Server or the Github Discussions. We are here to help!