feat: Phase 4 — dev experience complete
CI / Build, lint & test (push) Successful in 2m21s

Docs:
- .env.example: documents all environment variables with defaults
- CONTRIBUTING.md: dev setup, running tests, code style, design constraints
- MODDING.md: full schema reference for cards, packs, objectives, and SBCs
- .gitea/workflows/ci.yml: Gitea Actions CI (fmt check, clippy, build, test)

Middleware (#50-52):
- Body limit (256 KB) via DefaultBodyLimit on all routes (#50)
- Concurrency limit (256 concurrent requests) via semaphore middleware;
  returns 429 Too Many Requests when at capacity (#51)
- Correlation IDs via tower_http request_id layers; sets x-request-id
  UUID on every request and propagates it to the response headers (#52)

Layer order (outermost → innermost):
  CorsLayer → DefaultBodyLimit → concurrency limit → SetRequestId
  → TraceLayer → PropagateRequestId → routes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
funman300
2026-06-25 15:53:28 -07:00
parent 4ae1081aa9
commit f6dd41fd41
9 changed files with 384 additions and 2 deletions
Generated
+2
View File
@@ -1115,6 +1115,7 @@ dependencies = [
"axum-test",
"chrono",
"dotenvy",
"http 1.4.2",
"rand",
"serde",
"serde_json",
@@ -2134,6 +2135,7 @@ dependencies = [
"tower-layer",
"tower-service",
"tracing",
"uuid",
]
[[package]]