Skip to content

Development Setup

Commands for working on Stuff Stash locally.

Use this page when you are changing Stuff Stash itself. If you only want to evaluate the app, start with Run Stuff Stash.

  • Go 1.25.8 or newer.
  • Docker with Compose.
  • Lefthook.
  • pnpm 11.0.7.

The repository pins dependencies, container images, GitHub Actions, and tooling versions intentionally. Supply-chain security is part of the project boundary.

Runtime settings are listed in the Configuration Reference.

Run the API with in-memory local adapters:

Terminal window
make run

Check health:

Terminal window
curl http://localhost:8080/healthz

Expected response:

{"service":"stuff-stash","status":"healthy"}

Run API tests:

Terminal window
make test

Run Postgres, SpiceDB, Dex, migrations, and the API with Docker:

Terminal window
make compose-up-oidc

With the Docker stack, verify the OIDC and authorization flow:

Terminal window
make verify-dex-oidc-api

Stop the Docker stack:

Terminal window
make compose-down

If you use the local Dex binary, start Dex and the API as host processes:

Terminal window
make dex-local
make run-oidc-local

Verify the native mobile authorization-code flow, PKCE exchange, refresh exchange, API mobile metadata, and /me with the refreshed mobile ID token:

Terminal window
make verify-mobile-oidc-pkce-local

For physical-device mobile OIDC testing, run Dex and the API with a LAN-reachable issuer. Replace 192.168.1.50 with this machine’s LAN IP:

Terminal window
make dex-local STUFF_STASH_LOCAL_HOST=192.168.1.50
make run-oidc-local STUFF_STASH_LOCAL_HOST=192.168.1.50
STUFF_STASH_LOCAL_HOST=192.168.1.50 make verify-mobile-oidc-pkce-local

The Docker workflow can also use a LAN issuer:

Terminal window
make compose-up-oidc-lan STUFF_STASH_LAN_HOST=192.168.1.50

Start the web app:

Terminal window
make web-install
make web-dev

Open http://localhost:5173.

Run web checks:

Terminal window
make web-test
make web-check
make web-build

The browser app uses the generated TypeScript API client at its adapter boundary. When the OpenAPI contract changes, regenerate and check it:

Terminal window
make api-client-generate
make api-client-test
make api-client-check
make api-client-check-generated

Run the docs site:

Terminal window
make docs-install
make docs-dev

Build the docs:

Terminal window
make docs-build

Run the configured hooks:

Terminal window
lefthook run pre-commit --all-files

The hook runs Go formatting, Go tests, and structural checks for common project drift such as raw SQL in Go code, ad hoc prints, oversized Go files, HTTP adapter organization drift, and GORM adapter catch-all files.