From 98790d11f95770c0e714b66e03dd6e811a0849a0 Mon Sep 17 00:00:00 2001 From: Gabriel Kaszewski Date: Fri, 29 May 2026 02:15:57 +0000 Subject: [PATCH] wiki: add Contributing page --- Contributing.md | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Contributing.md diff --git a/Contributing.md b/Contributing.md new file mode 100644 index 0000000..3e12cc8 --- /dev/null +++ b/Contributing.md @@ -0,0 +1,50 @@ +# Contributing + +--- + +## Dev setup + +```bash +git clone https://git.gabrielkaszewski.dev/GKaszewski/k-ap.git +cd k-ap +cargo build +``` + +No special tooling required beyond a recent stable Rust (edition 2024). + +--- + +## Make targets + +```bash +make check # rustfmt --check + clippy -D warnings + tests +make fmt # apply rustfmt +make fix # fmt + clippy --fix (auto-fixable lints) +``` + +Always run `make check` before pushing. CI runs the same checks. + +--- + +## Before opening a PR + +- `make check` passes with zero warnings +- New behavior has test coverage — tests live in `src/tests/` +- No unrelated refactoring mixed into the PR +- Commit messages follow imperative style: `feat: add X`, `fix: Y`, `refactor: Z` + +--- + +## Project structure + +``` +src/ +├── activities/ # One file per AP activity type (Follow, Create, Announce, ...) +├── repository/ # Trait definitions (ActivityRepository, FollowRepository, ...) +├── service/ # Service methods (broadcast, follow management, delivery, backfill) +├── tests/ # Unit and integration tests +├── content.rs # ApContentReader, ApObjectHandler traits +├── user.rs # ApUserRepository, ApUser, ApVisibility, LookedUpActor +├── data.rs # FederationData, EventPublisher, FederationEvent +└── lib.rs # Public API surface — all re-exports +``` \ No newline at end of file