Everyday

Setup

1

Hosting

2

Database

3

Auth

4

Billing

5

Email

6

Analytics

7

Wrap up

We'll use Vercel to host your app. If you're not familiar with Vercel, check out their tutorial on how to setup a project.

cd ~/your-repo
yarn global add vercel
yarn install
vercel login
vercel link
yarn dev

Over the next steps, we'll be adding multiple environment variables to Vercel and then pulling them down into our local environment. For the purposes of this tutorial, we'll assume everything is "production."

The first environment variable is NEXT_PUBLIC_HOST. Many features such as email sign in links and team email invite links need this URL to function. Set this var to the URL of the domain you're going to be deploying in (ex: https://yourproject.com). If this var is not set, Scalerepo will default to using VERCEL_URL. See src/utils/getBaseUrl.ts for this logic.

If you're not sure on how to add environment variables to Vercel, check out their documentation here. For the purposes of this onboarding, just check all three environments (Production, Preview, and Development).

Once you've added the env var, pull your variable down to your local dev environment by running yarn pull-secrets. If you've set your env var correctly, you should see your connection string in your .env.local file and the display below will show the value.

NEXT_PUBLIC_HOST
Set