-
Node.js >= 24.0
-
sqlcdue to upstream moving a bit slow lately, we are using a fork with a bunch of sqlite-related fixups. install go and run
make install-dependency-sqlcto get everything configured (global installs ofsqlcremain untouched,GOPATHis set to.ephemeral/go)we use a custom wasm codegen plugin (
tool/sqlc-generate-typescript-plugin) to generate ergonomic query types. awasm32-wasip1Rust toolchain is required to build the plugin, but the plugin itself is also checked into lfs.
- install dependencies and
npm installinschema,project/server - build the OpenAPI schema (
make --directory schema) - start the server (
make --directory project/server start)
- 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 (