Thanks for taking the time. Knowledge is a small project, so the rules are short.
git clone https://github.com/raphaelsty/knowledge && cd knowledge
make install-dev # creates .venv, installs ruff/mypy, arms git hooks
make up # starts postgres locally via docker composemake install-dev arms both pre-commit (per-file on commit) and
pre-push (changed-since-upstream on push) hooks, so a broken commit
can't leave your machine. If a hook ever fails, fix what it reports
and try again — do not bypass with --no-verify.
You're good to go. make serve runs the Rust API on :8080,
make web serves the static frontend on :3000, and make run walks the
pipeline (fetch → clean → tag → write) for whatever's in your local PG.
There is exactly one source of truth: .pre-commit-config.yaml.
- On commit: hooks run against the staged files. Fast.
- On push: hooks run again against everything you're about to send to the remote (changed-since-upstream). This is the safety net for anything that slipped past a per-file commit check.
- In CI: GitHub Actions runs the same hooks across the whole tree
(
uvx pre-commit run --all-files). What passes locally passes in CI.
If you want to bump a tool version, change it in .pre-commit-config.yaml
only — CI picks it up automatically. There are no other lint jobs to keep
in sync.
What runs:
ruff(lint + format) for Pythonmypyfor Python type-checksprettierforweb/JS / CSS / HTMLcargo fmt+cargo clippy -D warningsforapi/pre-commit-hooksfor trailing whitespace, line endings, large files, YAML syntax
- Lowercase imperative subjects, scoped where it helps:
caddy: bake web/ into a custom image. - Explain why in the body, not what — the diff already shows what.
- No
Co-Authored-By: Claudetrailers. - Don't amend or force-push to
mainunless you really mean it.
main is the live branch. Pushing to origin/main triggers Dokploy on the
Hetzner box, which rebuilds and redeploys via the GitHub webhook
(~1-2 min). Watch the build in the Dokploy UI at
dokploy.knowledge-web.org. Rollbacks
happen there too — every push leaves a deployment record.
For changes that touch the prod stack (compose / Caddy / migrations),
verify locally with make up first.
Contributions are licensed under PolyForm Noncommercial 1.0.0. By opening a pull request you're agreeing your changes ship under the same license. Commercial use of the project (including any contributed code) requires explicit permission from the maintainer.
Found a vulnerability? Email raphael.sourty@lighton.ai — please don't
open a public issue. See /.well-known/security.txt.