.env.example: BUZZ_WEB_DIR comment implies it alone serves the web frontend at /, but BUZZ_SERVE_GIT_WEB_GUI is also required
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 82/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- rust
- Domain
- documentation
Research direction
Start with .env.example, then compare the BUZZ_WEB_DIR setting with BUZZ_SERVE_WEB_GUI in crates/buzz-relay/src/config.rs and the handling in crates/buzz-relay/src/router.rs. Update the example so the required configuration is explicit, and verify that a self-hoster can understand how to serve the frontend at /.
Written by the indexing model from the issue text.
Description
Description
.env.example documents BUZZ_WEB_DIR like this:
# Optional: path to the web UI dist directory. When set, the relay serves
# the web frontend at / for browser requests. Leave unset for local dev
# (use `just web` for Vite HMR instead).
# BUZZ_WEB_DIR=./web/dist
This reads as if setting BUZZ_WEB_DIR alone is sufficient to serve the web frontend at /. In practice it is not: nip11_or_ws_handler in crates/buzz-relay/src/router.rs only serves index.html for Accept: text/html requests to / when state.config.serve_git_web_gui is also true:
Err(_) => {
// Browser requesting HTML and Git web GUI is enabled → serve SPA.
if state.config.serve_git_web_gui {
if let Some(ref dir) = state.config.web_dir {
if accept.contains("text/html") {
let index = dir.join("index.html");
if let Ok(body) = tokio::fs::read(&index).await {
return axum::response::Html(body).into_response();
}
}
}
}
// Not a WS request and not asking for nostr+json — serve NIP-11 as fallback.
Json(nip11_document(&state, raw_host).await).into_response()
}
serve_git_web_gui is read from BUZZ_SERVE_GIT_WEB_GUI in crates/buzz-relay/src/config.rs and defaults to false. It isn't mentioned anywhere in .env.example.
Impact
A self-hoster who sets BUZZ_WEB_DIR (and confirms index.html exists on disk, which the relay validates and logs at startup) but doesn't separately know about BUZZ_SERVE_GIT_WEB_GUI will find that / always returns the NIP-11 JSON relay-info document — identically for both Accept: text/html and Accept: application/nostr+json — with no indication of why the web client never loads. There's no log line or config validation error pointing at the missing flag.
Suggested fix
Either:
- Document
BUZZ_SERVE_GIT_WEB_GUInext toBUZZ_WEB_DIRin.env.exampleand clarify that both are required to serve the web frontend at/, or - Reconsider gating web-frontend serving behind a flag named
serve_git_web_guiat all — the name reads as being about the git web GUI specifically, not the primary web client, which made this doubly confusing to debug.
Happy to submit a docs PR for option 1 if that's the preferred direction.
- Dominant language
- Rust
- Stars
- 33.7k
- Forks
- 4.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 239
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from block/buzz
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
workflow_sink's mention parser never masks code regions — @name inside a code span wakes the agent Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 Half a day Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bitcoindevkit/bdk-ffi#1125 ·