Prerequisite: You should have installed Node.js (version 20 or higher).

Installation

Step 1. Install pnpm on your machine (if you don’t already have it yet), by running the following command:

Check out why we recommend using pnpm instead of npm or yarn by checking out their motivation and feature comparison.

Step 2. After installing pnpm, you can install all dependencies by running the following command:

To complete the initial setup, please restart your IDE so that it can recognize the newly installed dependencies. Additionally, some recommended VS Code Extensions may only work after restarting your IDE.

If you’re using VS Code, you can install following the recommended extensions that will help you with the development process: ESLint, Prettier, Vitest, Tailwind CSS IntelliSense, Version Lens, Error Lens, Pretty TypeScript Errors, Material Icon Theme.

Development

Start Next.js apps

To develop all apps and packages (without requiring a local setup), run the following command:

pnpm
pnpm dev

This command will start all Next.js apps in development mode. You can access the apps by visiting the following URL: http://localhost:7803

Start Local Supabase Instance

To start a local supabase instance (database), run the following command:

pnpm
pnpm sb:start

This command will start a local supabase instance on your machine. You can access the supabase instance by visiting the following URL: http://localhost:8003

You need to have Docker installed and running on your machine to start a local supabase instance.

Stop Local Supabase Instance

To stop the local supabase instance, run the following command:

Better Development Experience

In case you want to run all local development servers, run the following command:

pnpm
pnpm devx

Running devx will:

  1. Stop the currently running supabase instance and save current data as backup (if there is any)
  2. Install all dependencies
  3. Start a new supabase instance (using backed up data)
  4. Start all Next.js apps in development mode

If you want to have the same procedure without the backup, you can run pnpm devrs instead. This will:

  1. Stop the currently running supabase instance (if there is any)
  2. Install all dependencies
  3. Start a new supabase instance (with clean data from seed.sql)
  4. Start all Next.js apps in development mode

In case you don’t want to run a local supabase instance, you can run pnpm dev instead.

Local development

Seed accounts

There are 5 seed accounts that are already set up for local development:

  1. local@tuturuuu.com
  2. user1@tuturuuu.com
  3. user2@tuturuuu.com
  4. user3@tuturuuu.com
  5. user4@tuturuuu.com

You can use any of these accounts to log in to the app and quickly test the functionality of the app, since they are already set up with the necessary data.

Authentication

A local mail server (InBucket) is automatically set up by Supabase to handle authentication emails.

You can access the mail server by visiting the following URL: http://localhost:8004

Build

To build all apps and packages, run the following command:

pnpm
pnpm build

Test

To run all tests, run the following command:

pnpm
pnpm test

Tests are still a work in progress. We’re currently working on adding tests to all packages to ensure the best quality possible.