Running The Project

Learn how to run the project locally.

Make sure you have read and followed the instructions on installation before proceeding.

Instructions

Copy .env.example file

Copy and paste the .env.example file in the root directory of the project and rename it to .env.

cp .env.example .env

Run the local database (optional)

Start Docker Desktop and run the following command to start the local PostgreSQL database configured in the docker-compose.yml file.

docker compose up -d

If you don't have Docker Desktop installed, you can skip this step and use the remote database. Update the DATABASE_URL in the .env file to point to the remote/staging database.

DO NOT use the production database for local development.

Sync the database

Run the following command to sync the database schema.

pnpm db:push

Run the development servers

Start the development servers by running the following command.

pnpm dev

Since we use turborepo with pnpm workspaces, this command is going to run all the apps in the workspace with a dev script.

  1. The dashboard app be available at http://localhost:3000.
  2. The marketing site will be available at http://localhost:3001.
  3. The Email live server to preview your email templates will be available at http://localhost:3333.
  4. The database admin panel (Prisma Studio) will be available at http://localhost:5555.
  5. The local stripe webhook listener will forward all Stripe events to http://localhost:3000/api/stripe/webhook.

At this point you should have the projects running locally. Everything should be running smoothly, except for authentication, sending emails, and payments which require additional setup which is covered in the next sections.

Last updated on