- Node.js >= 24.16
- pnpm 12
- Git Large File Storage
queries in project/server/src/service/database/query are turned into typed query builders by tool/sql-codegen, which uses node:sqlite itself to validate queries and infer result types.
-
install dependencies and run
pnpm installin the repository root -
build the OpenAPI schema (
make --directory schema) -
start the server (
make --directory project/server start)no environment variables are required for development, all variables are documented in
project/server/src/config/index.tswhen a client is served from another origin (e.g. when doing frontend development) set
SECURE=false
this disarms cors, so consider it a reminder that the running configuration is not secure
- build with
make --directory project/server -f make/ops.mk build-container - run with
make --directory project/server start-container(a shorthand that exports required environment variables)
-
adding an endpoint
- add your endpoint definition to the OpenAPI schema (
schema/spec/main.yaml) - build the schema (
make --directory schema) - write a handler for your endpoint and prime it (
project/server/src/api/endpoint) - import / use your endpoint (
project/server/src/api/index.ts)
- add your endpoint definition to the OpenAPI schema (
-
writing a database migration
- create a new migration file (
make --directory project/server migration-new) - use
make --directory project/server migration-diffto ensure that migrations and schema don't diverge
- create a new migration file (