Steps to setup local development environment.
-
Run
npm install
to install dependencies -
Configure
.env.local
and update the values forNEXT_PUBLIC_SUPABASE_URL
andNEXT_PUBLIC_SUPABASE_ANON_KEY
from your Supabase project's API settings -
Run
npm run dev
to start the local development server
It may be helpful to set up the database locally for faster development.
You'll need to install the Supabase CLI (npm install supabase --save-dev
) and Docker Desktop.
Detailed steps can be found in the Supabase CLI Docs.
- Run
supabase start
to launch the Supabase stack. - Add the
DB_URL
variable asDATABASE_URL
to your.env.local
file.
WARNING: Migrations aren't working. Use
drizzle-kit push:pg
instead.
Use migrations to create and update tables and other database objects. https://orm.drizzle.team/docs/migrations
- Run
npx drizzle-kit generate:pg
to generate a migration file. - Run
npm run migrate
to run the migration.
WARNING: The seed command replaces all data in the database.
The drizzle:seed
command will seed the database with data for prototyping.
Content can be added to src/db/seed_content.json
.
npm run drizzle:seed