Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/holger-ui

crates/holger-ui-server/Cargo.toml

[package]
name = "holger-ui-server"
description = "The holger console's thin server as a library: the built bundle and a same-origin pass-through to holger (gRPC-web and the passkey door). The program is `cargo install holger-ui`; holger's estate front links it too."
version.workspace = true
edition = "2021"
authors = ["Ignalina ApS", "Vetra Automation AB"]
license = "AGPL-3.0-only"
repository = "https://git.gunnar.rs/nordisk/holger-ui"

# ── What this crate is (thin layer, 2026-10-17) ──────────────────────────────
#
# The owner's rule: the UI only calls the server (holger) and renders. No
# users, permissions, stores or business logic here. So this crate does two
# things and nothing else:
#
# * serves the built console bundle (and the static login page in it);
# * passes the browser's calls through, same origin, to holger: gRPC-web
#   (`/grpc/*`) to holger's gRPC door, and the passkey door, the front page and
#   its assets (`/-/*`, `/`) to holger's HTTP door.
#
# The person's session is holger's (minted by holger's passkey door, carried
# by the browser as a bearer); holger checks it on every call. Nothing here
# reads it.
#
# It used to be a full backend-for-frontend: its own WebAuthn, redb store,
# cookie sessions, role ladder, invites, and a shop that talked to monetize
# itself. All of that is gone; holger owns the people, and the ONE shop sells.

[features]
default = []
# **The paid half, compiled out** (A28 M13; Gunnar's `gunnar-ui-server` `metered`, the same
# word holger and holger-estate-front use). Without it this server serves the console and its
# login page and passes calls to holger: no sign-up, no welcome, no order page, no pay link,
# no buy route, and those pages and paths are refused by name (404), never the console.
# holger-estate-front's `metered` turns it on.
metered = []
# **holger.rs's public face** (TASKS-12 S-6, the owner's SLIM and AIRGAP rules,
# 2026-10-25): robots.txt, the sitemap, llms.txt, llms-full.txt and the front
# page's head tags, all in the separate `holger-public-site` crate (no HTTP
# client: no outbound call) and mounted around this router. OFF by default:
# the default build links none of it (`tests/public_site_feature.rs`).
# holger-estate-front's `public-site` turns it on.
public-site = ["dep:holger-public-site"]

[dependencies]
axum = { version = "0.8", default-features = false, features = ["tokio", "http1", "http2"] }
tower = "0.5"
# `fs` serves the bundle; the two compression features keep the wasm small on
# the wire. Both are pure Rust.
tower-http = { version = "0.7", features = ["fs", "compression-gzip", "compression-br"] }
http = "1"
# The pass-through: hyper's own client over the hyper-util connector.
hyper = { version = "1", features = ["client", "http1"] }
hyper-util = { version = "0.1", features = ["client-legacy", "http1", "tokio"] }
tokio = { version = "1", features = ["rt-multi-thread", "macros", "net", "signal", "time"] }
# The content-security-policy hashes trunk's inline bootstrap.
sha2 = "0.11"
base64 = "0.23"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
# The public site (`public-site` only); see the feature above.
holger-public-site = { version = "3.0.0", path = "../holger-public-site", optional = true }
# The person's session cookie (A34-38): edda's one `__Host-` HttpOnly cookie, the one Gunnar's
# console sets; the session answer's token is moved into it (`session`).
nornir-identity-session = { version = "0.1.1", features = ["session"] }
serde_json = "1"
http-body-util = "0.1"
# The login page helpers, edda's one copy for both consoles (A34-51, M-7), served at
# /login-helpers.js. From crates.io, in a lone clone and in the estate alike.
nornir-identity-web = { version = "0.1.0", default-features = false, features = ["login-js"] }

[dev-dependencies]
tempfile = "3"
http-body-util = "0.1"