Create .env
files:
-
apps/app/.env
CLERK_PUBLISHABLE_KEY=[get from clerk] CLERK_SECRET_KEY=[get from clerk] VERCEL_ENV=development VERCEL_GIT_COMMIT_REF=localdev VERCEL_GIT_COMMIT_SHA=000000000000 APP_SIGNEDOUT_URL=http://localhost:3000 VERCEL_URL=localhost:3000 DATABASE_URL=[postgres db url]
-
packages/db-totality/.env
DATABASE_URL=[postgres db url] # we can't create dbs on neon so specify a branch to use as shadow db SHADOW_DATABASE_URL=[postgres db url]
$ npm install -g pnpm eslint turbo
$ pnpm install
$ turbo dev --filter=app
- Edit
schema.prisma
- Run
turbo db:migrate
- this will create a new migration SQL file and apply it to the dbDATABASE_URL
points to - Run
turbo db:generate
- this will regenerate bindings - Run
turbo db:deploy
(Optional) - applies all migrations to the dbDATABASE_URL
points to. For themain
db branch, this is automatic (configured in the vercel pipeline).