Files
radicle-explorer/crates/radicle-httpd/CLAUDE.md
T
Rūdolfs Ošiņš 357f4311f6 Document where the desktop app lives
So both the docs and agents know `desktop/` is its own project, with
commands run from there.
2026-10-13 17:23:20 +02:00

837 B

radicle-httpd

Rust backend for the Radicle web explorer, released together with radicle-search (see RELEASE.md at the repository root).

Code conventions

  • Each route module exposes pub fn router(ctx: Context) -> Router; handlers are private async fns
  • Handler signature: async fn handler(State(ctx): State<Context>, Path(rid): Path<RepoId>) -> impl IntoResponse
  • Annotate the error type on Ok: Ok::<_, Error>(Json(data))
  • All response structs: #[serde(rename_all = "camelCase")]
  • Optional fields: #[serde(skip_serializing_if = "Option::is_none")]
  • Use json!() macro for inline JSON; immutable_response() / cached_response() helpers for Cache-Control headers
  • Module structure: api/v1/ handlers, api/json/ serialization helpers, api/query.rs query param types, api/error.rs error types