Run the application

How to run the application locally.

Once you have cloned the repository and installed the dependencies, you can run the application with the following commands:

yarn turbo gen env

This will generate a new .env file in the root directory and create a symlink to apps/web/.env.

Alternatively, you can copy the .env.example file to .env and fill in the values.

cp .env.example .env
# MacOS/Linux
ln -s apps/web/.env .env
# Windows
mklink apps/web/.env .env

Then run the following command to start the local database and run database migrations:

docker-compose up && yarn db:migrate

To run the Next.js application, run the following command:

yarn dev:web

This will start the Next.js application at http://localhost:3000.

Authentication#

The application uses Auth.js (NextAuth) by default for authentication. Auth.js requires an AUTH_SECRET environment variable to be set.

When using the CLI to generate the .env file, a secret is automatically generated and set.

To generate a secret manually, run the following command:

openssl rand -base64 33

Now update the AUTH_SECRET environment variable in the .env file with the generated secret.

You can now log in with your email address, the confirmation URL will be printed in the console in case you haven't configured any email provider.

Next steps#

  • Configure Environment Variables
  • Configure email provider

Was this helpful?