Axum + Diesel boilerplatekbve
The KBVE core Rust crate — an Axum and Diesel library for the kbve.com services, with accounts, Supabase, wallet and gate features.
Link only what you need
Bundles authentication, markdown, wallet, referral, and gate modules behind Cargo feature flags so each service links only what it needs.
- gate / gate-auth — the kbve-gate auth-proxy sidecar.
- supabase / kv — Supabase through bevy_supa plus a Valkey-backed KV layer.
What it gives you
Features
Axum + Diesel base
HTTP routing plus async Diesel (diesel-async, bb8 pool) for backend micro-services.
Authentication
Argon2 password hashing and JWT (jsonwebtoken) handling.
supabase / kv
Supabase through the bevy_supa client and a Valkey-backed key-value layer via jedi.
gate / gate-auth
An auth reverse proxy gating HTTP and WebSocket traffic on a Supabase JWT and a jwt-only or is_staff policy — the kbve-gate sidecar in front of upstreams such as Grafana.
image-gen, wallet, referral, markdown, lot
resvg image rendering, the wallet service and market, referrals, markdown rendering via pulldown-cmark, and the Minecraft lot system that settles through the wallet.
legacy-sync-db
The older synchronous Diesel modules (guild, models, runes, schema, spellbook).
Questions
Frequently asked
What is the kbve crate?
It is the KBVE core Rust crate — an Axum and Diesel library for the kbve.com services, with accounts, sessions, markdown and the diesel-async store behind them. jedi supplies the transport and holy the field-level sanitising, and services such as forum, chat, wallet, profile, metrics, rows and the gate build on it.
What features does the kbve crate expose?
Cargo feature flags gate optional capabilities — supabase (through bevy_supa), kv (Valkey through jedi), image-gen (resvg rendering), wallet (with referral and the Minecraft lot system), gate-auth and gate (the auth reverse proxy) — plus a legacy-sync-db path for the older synchronous Diesel modules.
What is the kbve gate feature for?
gate is a reusable auth reverse proxy that sits in front of an upstream and lets traffic through on a Supabase JWT plus an authz policy (jwt-only or is_staff), proxying HTTP and WebSockets. It runs as a sidecar so the upstream binds localhost; the kbve-gate binary is its thin consumer. gate-auth is the token-validation half alone, which the metrics service uses.
Discuss on the forum
Questions, fixes and notes on this page live in the KBVE forum.