Contributing
Development environment
See Environment & Local Deployment. Development follows TDD: write a failing test first, then implement; tests live next to the source.
Local verification
bash
# backend
cd viewer/server && go test ./... && go vet ./...
# edit service
cd viewer/edit-service && uv run --group dev pytest
# frontend
cd viewer/web && npm test && npm run build
# converter
cd viewer/converter && npm test
# documentation (public site + API reference drift)
cd docs && npm ci && npm run docs:build && npm run check:apiDocumentation contributions
- The public site source lives in
docs/site/, the single source of truth; after changes you must runcd docs && npm run docs:build(dead links fail the build). docs/internal/is never part of the site — internal records only (the formerdocs/archive/was removed in the 2026-08-05 cleanup; see git history).- Pages that describe undelivered capabilities must be marked as Roadmap items and must not provide non-executable steps.
- After moving or archiving documents, update all Markdown relative links in the repository.
- Generated files (
docs/site/reference/edit-api-reference.md,docs/site/public/go-rest-api.routes.json) must not be edited by hand; regenerate withnpm run gen:apiand commit the result.npm run check:apidetects drift. - To add an English page, create the real translated content under
docs/site/en/; empty navigation or placeholder pages are not allowed.
Commits and PRs
- Commit messages follow the repository convention:
feat:/fix:/docs:/ci:/chore:prefix plus a short Chinese description. - PRs to
mainrun the viewer CI and the docs build; both must pass. - Never commit personal machine paths, secrets or runtime data (
viewer/data/).
License
This repository is AGPL-3.0-only. Contributing means you agree to release your contribution under that license; third-party attributions: License & third-party components (Chinese).