Contributing
Read the relevant specification in docs/specs/ before changing a module (start with project.md);
answered design questions are in docs/specs/decisions/.
Git
- Conventional commits:
type(scope): subject, typesfeat,fix,docs,style,refactor,perf,test,build,ci,chore,revert; subject up to 72 characters,!for breaking changes. Example:feat(members): add CSV import. - Every commit is signed (
git commit -S, GPG or SSH signing key). - No
Co-Authored-Bytrailer and no AI attribution in commits or pull requests; thecommit-msghook rejects co-author trailers. - Branch prefixes are the commit types:
feat/,fix/,docs/,refactor/,chore/,ci/,test/,perf/. Never commit directly onmain.
Hooks (lefthook)
Install once with make hooks (go tool lefthook install). Configuration: lefthook.yml.
| Hook | Check |
|---|---|
| pre-commit | golangci-lint on staged *.go (tools/golangci-lint.sh), Biome on staged web files, ruff check on staged *.py (in parallel) |
| commit-msg | tools/commit-msg.sh: conventional commit subject, no co-author trailer |
Code style
- Google style for Go, TypeScript and Python. Doc comments: godoc (Go), TSDoc (TS), Google docstrings (Python); keep them short and only where needed.
- Go is the backend language; TypeScript only for the frontend; Python only with a real incentive (
vision). - Linters: golangci-lint (
.golangci.yml: gofmt, goimports, gosec, revive, errorlint, …), Biome, ruff. - File size: target under 300 lines, 600 lines maximum. Generated files (protobuf, mocks, OpenAPI clients) and configuration files are excluded.
- Code and developer documentation in English; UI and seeded data in French (with an English translation).
Rules for every change
- Configuration through env vars only; no data on local volumes (databases and S3 only).
- Every list endpoint is cursor-paginated (
pkg/pagination). - Every write is audited (
pkg/audit), with identifiers only — no PII in audit records. - IDs: Keycloak ID for users, ULID elsewhere (
pkg/ids). - Permissions: declare them in
pkg/catalog, check them through authz (pkg/authzclient), deny by default. - Events go through the outbox (
pkg/outbox); PII in events is encrypted per subject (pkg/cryptox). - Errors are RFC 9457 problems (
pkg/problem).
Tests
- Coverage target 85–90 % (
make cover). - Unit tests with fakes (
make test-short), integration tests with testcontainers (make test, needs Docker). - Run
make lintandmake testbefore opening a pull request.
Adding a service
- Create
services/<name>/with its owngo.mod, add it togo.work, andcmd/<name>/main.go+internal/config(env vars, defaults suited to local development). - Declare its permissions in
pkg/catalog/permissions.go(elevated / sensitive flags where relevant). - Write
services/<name>/openapi.yaml: the API reference of this site is generated from it (add the service todocs/site/api-services.tsif it is not listed). - Add a route in the gateway (
GATEWAY_ROUTES) and a service indocker-compose.yml(profileapps). - Document it: a page under
docs/site/docs/dev/services/, the Kafka topics table, and the French user guide.
Documentation
This site lives in docs/site (Docusaurus). pnpm build must pass: broken links and anchors fail the build.
User documentation is written in French (docs/guide), developer documentation in English (docs/dev).