Production URL: https://typedash.songyang.dev
Ensure you have Docker installed, it is used for the backend.
make install(installs all system dependencies and tools)- Add
export PATH="$HOME/go/bin:$PATH"to~/.zshrcfor pre-commit and Go tools make db-migratemake db-seedmake dev
We use go-migrate CLI to generate migrations, and sqlc to generate type-safe queries from the migrations. Manual is found at migrate -help
migrate create -ext sql -dir server/db/migrations -seq <migration_name>- Write up and down migrations, ensuring idempotency (refer to the tutorial)
make sqlcto generate queriesmake db-migrateto run migrations
- Update db/queries/*
make sqlcto generate queriesmake db-migrateto run migrations
docker compose -f ~/typedash/compose.prod.yaml exec -T db psql -U typedash -d typedash < ~/typedash/db/seed.sql