Local development requires Docker Desktop to be installed and running on your machine.
To setup the development environment, run:
pnpm dev:setup
Choose yes on prompted questions.
This will
- Install dependencies
- Start a postgres docker container on port 54322
- Start an inbucket docker container on port 54324 (for receiving emails)
- Build all the dependencies once
- Run the database migrations
With this, you should be all setup.
Then, start the dev server with
pnpm -w run dev
It's somewhat important to run the dev server from the root (the -w flag) such that at least the jobs runners are also running.
After install you can start the dev server with
pnpm run dev
We currently only use Prisma for managing migrations.
The Prisma Quickstart guide is how our prisma folder was initially created. That set of instructions has useful pointers for doing things like db migrations.
The ~/prisma/seed.ts file will initiate the database with a set of data. This seed is run using pnpm reset. You will have to run this each time you stop and start supabase since doing so clears the database.
Explore with pnpm prisma-studio.
/actionsConfiguration/lib for the action framework./appThe Next.JS app directory./libFunctions that are re-used in multiple locations throughout the codebase. Akin to a/utilsfolder./prismaConfig and functions for using Prisma/kyselyConfig and functions for using Kysely/publicStatic files that will be publicly available athttps://[URL]/<filename>./playwrightEnd-to-end tests
We are using Lucia for authentication.
It is a very minimal session-based authentication system.
See core/lib/authentication/README.md for more information.
cd core
cp .env.development .env.production.local
pnpm playwright:testYou can also run the tests in dev mode, which is faster as you don't have to build the app before running the tests, but more flaky.
pnpm playwright:test:devYou can also see what playwright is doing by running pnpm playwright:ui or pnpm playwright:ui:dev.