wiki: add Contributing page
50
Contributing.md
Normal file
50
Contributing.md
Normal file
@@ -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
|
||||
```
|
||||
Reference in New Issue
Block a user