Dough Git

commit

update

commit
1eb9a03688be281765914c4d32b1fa7a495dab8b
author
Clove <[email protected]>
date
2026-11-24 13:10

diff --git a/.env.example b/.env.example
new file mode 100644
index 0000000..c25e711
--- /dev/null
+++ b/.env.example
@@ -0,0 +1,10 @@
+# .env.example
+
+BIND_ADDR=127.0.0.1:3000
+SYSTEM_NAME=System
+ADMIN_USERNAME=admin
+ADMIN_PASSWORD=
+COMMAND_PREFIX='p$'
+DISCORD_TOKEN=
+OWNER_ID=
+PUBLIC_URL=
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..cf9f2e9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,15 @@
+.env
+*/supervise/
+data/
+
+.agents/
+.claude/
+.codex/
+.aws/
+target/
+
+web/dist/
+web/node_modules/
+web/.svelte-kit/
+
+logs/
diff --git a/Cargo.lock b/Cargo.lock
new file mode 100644
index 0000000..646e101
--- /dev/null
+++ b/Cargo.lock
@@ -0,0 +1,2141 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 4
+
+[[package]]
+name = "adler2"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
+
+[[package]]
+name = "aho-corasick"
+version = "1.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "android_system_properties"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "anyhow"
+version = "1.0.102"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
+
+[[package]]
+name = "arrayvec"
+version = "0.7.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "async-trait"
+version = "0.1.92"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.10",
+]
+
+[[package]]
+name = "atomic-waker"
+version = "1.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
+
+[[package]]
+name = "autocfg"
+version = "1.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
+
+[[package]]
+name = "base64"
+version = "0.22.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
+
+[[package]]
+name = "base64"
+version = "0.23.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5"
+
+[[package]]
+name = "bitflags"
+version = "2.13.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06"
+
+[[package]]
+name = "block-buffer"
+version = "0.10.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "bumpalo"
+version = "3.20.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87a0cf66fd1eb2fb7b822cb78370d82303750809bc6ba855f3f58e517d3238db"
+
+[[package]]
+name = "byteorder"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
+
+[[package]]
+name = "bytes"
+version = "1.12.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "776dfebd015e2d8732c684a2c71003674ccb49457b539b9e82151ba38e96dd7c"
+
+[[package]]
+name = "cc"
+version = "1.11.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "02f0e023adb368345ce0ca6cdfc0f24a06554468d0e8503e14a0841de79bfa69"
+dependencies = [
+ "find-msvc-tools",
+ "shlex",
+]
+
+[[package]]
+name = "cfg-if"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
+
+[[package]]
+name = "cfg_aliases"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527"
+
+[[package]]
+name = "chacha20"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06"
+dependencies = [
+ "cfg-if",
+ "cpufeatures 0.3.1",
+ "rand_core 0.10.1",
+]
+
+[[package]]
+name = "chrono"
+version = "0.4.45"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327"
+dependencies = [
+ "iana-time-zone",
+ "js-sys",
+ "num-traits",
+ "wasm-bindgen",
+ "windows-link",
+]
+
+[[package]]
+name = "core-foundation-sys"
+version = "0.8.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
+
+[[package]]
+name = "cpufeatures"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "cpufeatures"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "crc32fast"
+version = "1.5.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b929dd2a135771f40afabd1073f85eed59c800b7c61901e5c254270497dad64"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "crypto-common"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
+dependencies = [
+ "generic-array",
+ "typenum",
+]
+
+[[package]]
+name = "dashmap"
+version = "5.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856"
+dependencies = [
+ "cfg-if",
+ "hashbrown",
+ "lock_api",
+ "once_cell",
+ "parking_lot_core",
+ "serde",
+]
+
+[[package]]
+name = "data-encoding"
+version = "2.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4583a4551df46e2792f82ceeac45e850d2e2d5debba0b91f102385cda5b11f06"
+
+[[package]]
+name = "deranged"
+version = "0.5.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e9de72ce2ad1f90dc62fa25f0f430ef85eb4b0d8fa0be4f30373bc40a21d28e"
+dependencies = [
+ "serde_core",
+]
+
+[[package]]
+name = "digest"
+version = "0.10.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
+dependencies = [
+ "block-buffer",
+ "crypto-common",
+]
+
+[[package]]
+name = "displaydoc"
+version = "0.2.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.10",
+]
+
+[[package]]
+name = "dotenvy"
+version = "0.15.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b"
+
+[[package]]
+name = "errno"
+version = "0.3.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e35d6e78f4cebb90e51d543db8fe41528851d6deeef6ef21ebd4bfdc1e784776"
+dependencies = [
+ "libc",
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "fastrand"
+version = "2.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6"
+
+[[package]]
+name = "find-msvc-tools"
+version = "0.1.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1c66915cc5391097de7a2b0b972e8505aa33c0df401fd3a6811dbdb32881ba48"
+
+[[package]]
+name = "flate2"
+version = "1.1.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "626d4928326b646e70f65ed36fc7cf9f206bdb68a0019ee7c6b4709da4e084c4"
+dependencies = [
+ "crc32fast",
+ "miniz_oxide",
+ "zlib-rs",
+]
+
+[[package]]
+name = "form_urlencoded"
+version = "1.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "afa489199eaffb1211795df1c6236ce1ad0d41a6fa45250add73e3b02420f06e"
+dependencies = [
+ "percent-encoding",
+]
+
+[[package]]
+name = "futures"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a31d2a3fbaaeb2af2368bbdd904aa8e812d3c04a1ee10d3171f52d556e5d0a3"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-io",
+ "futures-sink",
+ "futures-task",
+ "futures-util",
+]
+
+[[package]]
+name = "futures-channel"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4"
+dependencies = [
+ "futures-core",
+ "futures-sink",
+]
+
+[[package]]
+name = "futures-core"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e"
+
+[[package]]
+name = "futures-io"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed"
+
+[[package]]
+name = "futures-macro"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.10",
+]
+
+[[package]]
+name = "futures-sink"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d"
+
+[[package]]
+name = "futures-task"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd"
+
+[[package]]
+name = "futures-util"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-io",
+ "futures-macro",
+ "futures-sink",
+ "futures-task",
+ "memchr",
+ "pin-project-lite",
+ "slab",
+]
+
+[[package]]
+name = "generic-array"
+version = "0.14.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
+dependencies = [
+ "typenum",
+ "version_check",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "libc",
+ "wasi",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "libc",
+ "r-efi",
+ "rand_core 0.10.1",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.14.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
+
+[[package]]
+name = "http"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0"
+dependencies = [
+ "bytes",
+ "itoa",
+]
+
+[[package]]
+name = "http-body"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c"
+dependencies = [
+ "bytes",
+ "http",
+]
+
+[[package]]
+name = "http-body-util"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "23169fe34a5fbcdd3f3862e78fb9b6fccd5f02a6dc6f732547005d45631ce71c"
+dependencies = [
+ "bytes",
+ "futures-core",
+ "http",
+ "http-body",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "httparse"
+version = "1.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
+
+[[package]]
+name = "httpdate"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
+
+[[package]]
+name = "hyper"
+version = "1.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2c3e324da4c95177d6291d4c8730197c0d1822f8a9766814a4a44fa5ab797c9c"
+dependencies = [
+ "atomic-waker",
+ "bytes",
+ "futures-core",
+ "http",
+ "http-body",
+ "httparse",
+ "httpdate",
+ "itoa",
+ "pin-project-lite",
+ "smallvec",
+ "tokio",
+ "want",
+]
+
+[[package]]
+name = "hyper-rustls"
+version = "0.27.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dfa8e654703247911e29c23fbeaa261834bd9bb74efba2f9acddc37bfb127f53"
+dependencies = [
+ "http",
+ "hyper",
+ "hyper-util",
+ "rustls 0.23.46",
+ "tokio",
+ "tokio-rustls 0.26.6",
+ "tower-service",
+ "webpki-roots 1.0.12",
+]
+
+[[package]]
+name = "hyper-util"
+version = "0.1.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ddc03d96684f9226b8a787cdb71488417b53ab5ea8fdb1dac946cb9431cc8bff"
+dependencies = [
+ "base64 0.23.1",
+ "bytes",
+ "futures-channel",
+ "futures-util",
+ "http",
+ "http-body",
+ "httparse",
+ "hyper",
+ "ipnet",
+ "libc",
+ "percent-encoding",
+ "pin-project-lite",
+ "socket2",
+ "tokio",
+ "tower-service",
+ "tracing",
+]
+
+[[package]]
+name = "iana-time-zone"
+version = "0.1.65"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470"
+dependencies = [
+ "android_system_properties",
+ "core-foundation-sys",
+ "iana-time-zone-haiku",
+ "js-sys",
+ "log",
+ "wasm-bindgen",
+ "windows-core",
+]
+
+[[package]]
+name = "iana-time-zone-haiku"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "icu_collections"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fe090a42a0d3140fed8c63263ed1fecc02422cb2f4bfe55cd8de2de1b8e105dd"
+dependencies = [
+ "displaydoc",
+ "potential_utf",
+ "utf8_iter",
+ "yoke",
+ "zerofrom",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_locale_core"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "25d29b57c17c6528d0dc4c2141cfa2d08200465acb537a3909c8b9b8a4a984c0"
+dependencies = [
+ "displaydoc",
+ "litemap",
+ "tinystr",
+ "writeable",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_normalizer"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "404a3b8c486f205c87fe7f23ab6894d84a4ad76d6e4671ae1981ba7def87c599"
+dependencies = [
+ "icu_collections",
+ "icu_normalizer_data",
+ "icu_properties",
+ "icu_provider",
+ "smallvec",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_normalizer_data"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "20f0088bfb7441f7a37fa0c9e20cb1e9cba1cac6b9ce8cd2a6dc44294f8e8cbc"
+
+[[package]]
+name = "icu_properties"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2ea83d991c56158f7cf898bf86436c1dfe7c07ee82fe88951f2695c9f37a379f"
+dependencies = [
+ "displaydoc",
+ "icu_collections",
+ "icu_locale_core",
+ "icu_properties_data",
+ "icu_provider",
+ "zerotrie",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_properties_data"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b98f29af82d02b163fe50161388350e743bb3107cc8e8c2f7314cb505faddfcf"
+
+[[package]]
+name = "icu_provider"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "413099315636c588ee8f011190b329b971a09a8fae9d157e01dcae8379468514"
+dependencies = [
+ "displaydoc",
+ "icu_locale_core",
+ "writeable",
+ "yoke",
+ "zerofrom",
+ "zerotrie",
+ "zerovec",
+]
+
+[[package]]
+name = "idna"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de"
+dependencies = [
+ "idna_adapter",
+ "smallvec",
+ "utf8_iter",
+]
+
+[[package]]
+name = "idna_adapter"
+version = "1.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714"
+dependencies = [
+ "icu_normalizer",
+ "icu_properties",
+]
+
+[[package]]
+name = "ipnet"
+version = "2.12.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "791930b43c0d5973160d90a8f3894509f2b273430f5c5c73b668636d0287c5c0"
+
+[[package]]
+name = "itoa"
+version = "1.0.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3bd1574e617a9a6c1f8f8181bd7e841e1f20e4277607ef28945765188d6284d4"
+
+[[package]]
+name = "jpcl"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7382dd2f498998b20f643f96c5a89dc49baad7f5d1d28d3d44dc8b56e9b42da7"
+
+[[package]]
+name = "js-sys"
+version = "0.3.107"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8dc09d2154098bbf4ef54eab6b117a3c24cbbffe94046b16ee6d6d4510584d3a"
+dependencies = [
+ "cfg-if",
+ "futures-util",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "libc"
+version = "0.2.191"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a"
+
+[[package]]
+name = "linux-raw-sys"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
+
+[[package]]
+name = "litemap"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae"
+
+[[package]]
+name = "lock_api"
+version = "0.4.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965"
+dependencies = [
+ "scopeguard",
+]
+
+[[package]]
+name = "log"
+version = "0.4.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5d15f86d12da44cd8d4ec3c73984537eb7f4cadcb9776a575a0a8a05ca11005c"
+
+[[package]]
+name = "lru-slab"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4050469837a6ff301cd14c1f8f24f88549e6d548f24f64e2148eb0f72cebc51f"
+
+[[package]]
+name = "memchr"
+version = "2.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
+
+[[package]]
+name = "mime"
+version = "0.3.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d5848f5a9e8117cf94f2f90faac24a87ff81600ff8628c1e3deaab572e76bfa1"
+
+[[package]]
+name = "mime_guess"
+version = "2.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e"
+dependencies = [
+ "mime",
+ "unicase",
+]
+
+[[package]]
+name = "miniz_oxide"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b63fbc4a50860e98e7b2aa7804ded1db5cbc3aff9193adaff57a6931bf7c4b4c"
+dependencies = [
+ "adler2",
+ "simd-adler32",
+]
+
+[[package]]
+name = "mio"
+version = "1.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "20521a903f02b0a573cd6840e9d0a5a0cc043d361fe924092cd70f8556cc9c4a"
+dependencies = [
+ "libc",
+ "wasi",
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "num-conv"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441"
+
+[[package]]
+name = "num-traits"
+version = "0.2.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.21.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
+
+[[package]]
+name = "parking_lot"
+version = "0.12.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a"
+dependencies = [
+ "lock_api",
+ "parking_lot_core",
+]
+
+[[package]]
+name = "parking_lot_core"
+version = "0.9.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "redox_syscall",
+ "smallvec",
+ "windows-link",
+]
+
+[[package]]
+name = "percent-encoding"
+version = "2.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
+
+[[package]]
+name = "pin-project-lite"
+version = "0.2.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c938015719552d665fd0553b90d96cd7ff58e83e4c061ca99e6bb78865a72752"
+
+[[package]]
+name = "potential_utf"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661"
+dependencies = [
+ "zerovec",
+]
+
+[[package]]
+name = "powerfmt"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4a6394b9e965e73d0a289ee54f589087e2c676aedf60885baf52c76b771e4958"
+
+[[package]]
+name = "ppv-lite86"
+version = "0.2.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"
+dependencies = [
+ "zerocopy",
+]
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.107"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "proxybot"
+version = "2.0.0"
+dependencies = [
+ "anyhow",
+ "base64 0.22.1",
+ "chrono",
+ "dotenvy",
+ "futures-util",
+ "http-body-util",
+ "hyper",
+ "hyper-util",
+ "jpcl",
+ "mime_guess",
+ "percent-encoding",
+ "regex",
+ "reqwest",
+ "ring",
+ "secrecy",
+ "serde",
+ "serde_json",
+ "serenity",
+ "tempfile",
+ "tokio",
+ "tokio-tungstenite",
+]
+
+[[package]]
+name = "quinn"
+version = "0.11.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4051e23e9185c255a7e33ef59cdbca87a22d359052eecd22fc6b901fb37d9d11"
+dependencies = [
+ "bytes",
+ "cfg_aliases",
+ "pin-project-lite",
+ "quinn-proto",
+ "quinn-udp",
+ "rustc-hash",
+ "rustls 0.23.46",
+ "socket2",
+ "thiserror 2.0.21",
+ "tokio",
+ "tracing",
+ "web-time",
+]
+
+[[package]]
+name = "quinn-proto"
+version = "0.11.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0e750cca55fe4f0439a15d0bb529da9651e79993e8e72c61a899a36d462befbe"
+dependencies = [
+ "bytes",
+ "getrandom 0.4.3",
+ "lru-slab",
+ "rand 0.10.4",
+ "rand_pcg",
+ "ring",
+ "rustc-hash",
+ "rustls 0.23.46",
+ "rustls-pki-types",
+ "slab",
+ "thiserror 2.0.21",
+ "tinyvec",
+ "tracing",
+ "web-time",
+]
+
+[[package]]
+name = "quinn-udp"
+version = "0.5.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af66907df18639dcf4db56ca65490cabc4b27a97dbadd96f2926cca73298f016"
+dependencies = [
+ "cfg_aliases",
+ "libc",
+ "once_cell",
+ "socket2",
+ "tracing",
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.47"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "r-efi"
+version = "6.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
+
+[[package]]
+name = "rand"
+version = "0.8.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e058c7de0b26af77780c769414d6257830bb240f3c38477dbc2c16e5f54d6d4c"
+dependencies = [
+ "libc",
+ "rand_chacha",
+ "rand_core 0.6.4",
+]
+
+[[package]]
+name = "rand"
+version = "0.10.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f6fa277c67e6ea590466f04c3fe82cb509f0864fe470643e5570de9514a9b11"
+dependencies = [
+ "chacha20",
+ "getrandom 0.4.3",
+ "rand_core 0.10.1",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
+dependencies = [
+ "ppv-lite86",
+ "rand_core 0.6.4",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
+dependencies = [
+ "getrandom 0.2.17",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69"
+
+[[package]]
+name = "rand_pcg"
+version = "0.10.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eb95882a1e14462c69aea9984bb261293ccfe6022ef8de0eda18bd5afb0052df"
+dependencies = [
+ "rand_core 0.10.1",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.5.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"
+dependencies = [
+ "bitflags",
+]
+
+[[package]]
+name = "regex"
+version = "1.13.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9807af0e638c12e753aa1b4e601791bf2a8f71274023c8bbeec12fc149950857"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-automata",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.4.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "41d60ef07df457506a0a1a2073112eb4aae5733dbd2813c3da77d1b0fd441158"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.8.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d902046e6a28a1e4c3cab97258a0ce11e994903f01c2d97a9447a0b3df85f4f6"
+
+[[package]]
+name = "reqwest"
+version = "0.12.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147"
+dependencies = [
+ "base64 0.22.1",
+ "bytes",
+ "futures-core",
+ "futures-util",
+ "http",
+ "http-body",
+ "http-body-util",
+ "hyper",
+ "hyper-rustls",
+ "hyper-util",
+ "js-sys",
+ "log",
+ "mime_guess",
+ "percent-encoding",
+ "pin-project-lite",
+ "quinn",
+ "rustls 0.23.46",
+ "rustls-pki-types",
+ "serde",
+ "serde_json",
+ "serde_urlencoded",
+ "sync_wrapper",
+ "tokio",
+ "tokio-rustls 0.26.6",
+ "tokio-util",
+ "tower",
+ "tower-http",
+ "tower-service",
+ "url",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "wasm-streams",
+ "web-sys",
+ "webpki-roots 1.0.12",
+]
+
+[[package]]
+name = "ring"
+version = "0.17.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7"
+dependencies = [
+ "cc",
+ "cfg-if",
+ "getrandom 0.2.17",
+ "libc",
+ "untrusted",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "rustc-hash"
+version = "2.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d"
+
+[[package]]
+name = "rustix"
+version = "1.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "891efababe418670775f199f0d233d84843c227a0949a883ce15b37c78d6629d"
+dependencies = [
+ "bitflags",
+ "errno",
+ "libc",
+ "linux-raw-sys",
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "rustls"
+version = "0.22.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432"
+dependencies = [
+ "log",
+ "ring",
+ "rustls-pki-types",
+ "rustls-webpki 0.102.8",
+ "subtle",
+ "zeroize",
+]
+
+[[package]]
+name = "rustls"
+version = "0.23.46"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf"
+dependencies = [
+ "once_cell",
+ "ring",
+ "rustls-pki-types",
+ "rustls-webpki 0.103.17",
+ "subtle",
+ "zeroize",
+]
+
+[[package]]
+name = "rustls-pki-types"
+version = "1.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "102f35f7de7b06d8c61f1cff6592f5253e0dea431c74867aad5dfd70f44663fb"
+dependencies = [
+ "web-time",
+ "zeroize",
+]
+
+[[package]]
+name = "rustls-webpki"
+version = "0.102.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9"
+dependencies = [
+ "ring",
+ "rustls-pki-types",
+ "untrusted",
+]
+
+[[package]]
+name = "rustls-webpki"
+version = "0.103.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3a0760a887c14823fca5a1c970b01d47c328c696c0c64829d1df50e8f853fd5"
+dependencies = [
+ "ring",
+ "rustls-pki-types",
+ "untrusted",
+]
+
+[[package]]
+name = "rustversion"
+version = "1.0.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"
+
+[[package]]
+name = "ryu"
+version = "1.0.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f"
+
+[[package]]
+name = "scopeguard"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
+
+[[package]]
+name = "secrecy"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e"
+dependencies = [
+ "serde",
+ "zeroize",
+]
+
+[[package]]
+name = "serde"
+version = "1.0.229"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
+dependencies = [
+ "serde_core",
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_core"
+version = "1.0.229"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_cow"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e7bbbec7196bfde255ab54b65e34087c0849629280028238e67ee25d6a4b7da"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.229"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.10",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.154"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6"
+dependencies = [
+ "itoa",
+ "memchr",
+ "serde",
+ "serde_core",
+ "zmij",
+]
+
+[[package]]
+name = "serde_urlencoded"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
+dependencies = [
+ "form_urlencoded",
+ "itoa",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "serenity"
+version = "0.12.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9bde37f42765dfdc34e2a039e0c84afbf79a3101c1941763b0beb816c2f17541"
+dependencies = [
+ "arrayvec",
+ "async-trait",
+ "base64 0.22.1",
+ "bitflags",
+ "bytes",
+ "dashmap",
+ "flate2",
+ "futures",
+ "mime_guess",
+ "parking_lot",
+ "percent-encoding",
+ "reqwest",
+ "rustc-hash",
+ "secrecy",
+ "serde",
+ "serde_cow",
+ "serde_json",
+ "time",
+ "tokio",
+ "tokio-tungstenite",
+ "tracing",
+ "typemap_rev",
+ "url",
+]
+
+[[package]]
+name = "sha1"
+version = "0.10.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a978451301f4db1d02937a4ab3ccce137717b81826e79b7d49ffe3244a13c3b8"
+dependencies = [
+ "cfg-if",
+ "cpufeatures 0.2.17",
+ "digest",
+]
+
+[[package]]
+name = "shlex"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba"
+
+[[package]]
+name = "signal-hook-registry"
+version = "1.4.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b"
+dependencies = [
+ "errno",
+ "libc",
+]
+
+[[package]]
+name = "simd-adler32"
+version = "0.3.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea"
+
+[[package]]
+name = "slab"
+version = "0.4.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
+
+[[package]]
+name = "smallvec"
+version = "1.16.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3244542535d5de959d90ec55d1b5ff0fd2bb7b1310223907d5f11932847f7b59"
+
+[[package]]
+name = "socket2"
+version = "0.6.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4"
+dependencies = [
+ "libc",
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "stable_deref_trait"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
+
+[[package]]
+name = "subtle"
+version = "2.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
+
+[[package]]
+name = "syn"
+version = "2.0.119"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "syn"
+version = "3.0.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ae9ccbea3a7b0b09443036490c8f34a8b1b760fd345e5c0dae0aac718faea79"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "sync_wrapper"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263"
+dependencies = [
+ "futures-core",
+]
+
+[[package]]
+name = "synstructure"
+version = "0.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "901704edd0dfe137f1987838ee4f259e4e063c31371bdb423f7ae38ec6f77f02"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.10",
+]
+
+[[package]]
+name = "tempfile"
+version = "3.27.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"
+dependencies = [
+ "fastrand",
+ "getrandom 0.4.3",
+ "once_cell",
+ "rustix",
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "thiserror"
+version = "1.0.69"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
+dependencies = [
+ "thiserror-impl 1.0.69",
+]
+
+[[package]]
+name = "thiserror"
+version = "2.0.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e"
+dependencies = [
+ "thiserror-impl 2.0.21",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "1.0.69"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "2.0.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.10",
+]
+
+[[package]]
+name = "time"
+version = "0.3.55"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134"
+dependencies = [
+ "deranged",
+ "num-conv",
+ "powerfmt",
+ "serde_core",
+ "time-core",
+ "time-macros",
+]
+
+[[package]]
+name = "time-core"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109"
+
+[[package]]
+name = "time-macros"
+version = "0.2.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85"
+dependencies = [
+ "num-conv",
+ "time-core",
+]
+
+[[package]]
+name = "tinystr"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "abc840c238154d58f9e86b2792261edfde565a17696e1cda1a449de27979801a"
+dependencies = [
+ "displaydoc",
+ "zerovec",
+]
+
+[[package]]
+name = "tinyvec"
+version = "1.13.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fd3ca314f692efd6c868f8408f53fe444634a845f96c028b97d35f6a1f79f0ee"
+
+[[package]]
+name = "tokio"
+version = "1.54.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b52fd3255258d26fac7264ab5a76b53c13367136dc011d3d6ad4f8ed070396a3"
+dependencies = [
+ "bytes",
+ "libc",
+ "mio",
+ "pin-project-lite",
+ "signal-hook-registry",
+ "socket2",
+ "tokio-macros",
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "tokio-macros"
+version = "2.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.10",
+]
+
+[[package]]
+name = "tokio-rustls"
+version = "0.25.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f"
+dependencies = [
+ "rustls 0.22.4",
+ "rustls-pki-types",
+ "tokio",
+]
+
+[[package]]
+name = "tokio-rustls"
+version = "0.26.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c9cc2678c2cdd569ef8215e2afd7954ada2ae20b4fdd2c5fe6139a3b02d105db"
+dependencies = [
+ "rustls 0.23.46",
+ "tokio",
+]
+
+[[package]]
+name = "tokio-tungstenite"
+version = "0.21.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38"
+dependencies = [
+ "futures-util",
+ "log",
+ "rustls 0.22.4",
+ "rustls-pki-types",
+ "tokio",
+ "tokio-rustls 0.25.0",
+ "tungstenite",
+ "webpki-roots 0.26.11",
+]
+
+[[package]]
+name = "tokio-util"
+version = "0.7.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e464cf451ba96ebfc6f9b6542f17ee8b8956e33f1e40d9690624e59d7a7f8a4b"
+dependencies = [
+ "bytes",
+ "futures-core",
+ "futures-sink",
+ "pin-project-lite",
+ "tokio",
+]
+
+[[package]]
+name = "tower"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4"
+dependencies = [
+ "futures-core",
+ "futures-util",
+ "pin-project-lite",
+ "sync_wrapper",
+ "tokio",
+ "tower-layer",
+ "tower-service",
+]
+
+[[package]]
+name = "tower-http"
+version = "0.6.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840"
+dependencies = [
+ "bitflags",
+ "bytes",
+ "futures-util",
+ "http",
+ "http-body",
+ "pin-project-lite",
+ "tower",
+ "tower-layer",
+ "tower-service",
+ "url",
+]
+
+[[package]]
+name = "tower-layer"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e"
+
+[[package]]
+name = "tower-service"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
+
+[[package]]
+name = "tracing"
+version = "0.1.44"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100"
+dependencies = [
+ "log",
+ "pin-project-lite",
+ "tracing-attributes",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-attributes"
+version = "0.1.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+]
+
+[[package]]
+name = "tracing-core"
+version = "0.1.36"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a"
+dependencies = [
+ "once_cell",
+]
+
+[[package]]
+name = "try-lock"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
+
+[[package]]
+name = "tungstenite"
+version = "0.21.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1"
+dependencies = [
+ "byteorder",
+ "bytes",
+ "data-encoding",
+ "http",
+ "httparse",
+ "log",
+ "rand 0.8.8",
+ "rustls 0.22.4",
+ "rustls-pki-types",
+ "sha1",
+ "thiserror 1.0.69",
+ "url",
+ "utf-8",
+]
+
+[[package]]
+name = "typemap_rev"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "74b08b0c1257381af16a5c3605254d529d3e7e109f3c62befc5d168968192998"
+
+[[package]]
+name = "typenum"
+version = "1.20.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
+
+[[package]]
+name = "unicase"
+version = "2.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "357cc3acc6a036009fd6c973ed009037c732d60d0b4f6c673e9041497482a28f"
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"
+
+[[package]]
+name = "untrusted"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
+
+[[package]]
+name = "url"
+version = "2.5.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f00cd2407bb42c0ef17be88d4cf020f5cceffd121665bac9b8b9493a369b3b1a"
+dependencies = [
+ "form_urlencoded",
+ "idna",
+ "percent-encoding",
+ "serde",
+ "serde_derive",
+]
+
+[[package]]
+name = "utf-8"
+version = "0.7.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
+
+[[package]]
+name = "utf8_iter"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af3bd9d3e571c26fcce9d033b87ea5ab061b8d2ffe9b7a5675d810d68f03edf0"
+dependencies = [
+ "utf_types",
+]
+
+[[package]]
+name = "utf_types"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3a3b425286980a367278453f3b6d28cdcb134b574e5a35824a6ff5eebad50bb6"
+
+[[package]]
+name = "version_check"
+version = "0.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
+
+[[package]]
+name = "want"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec4cdd0dd910afe868b7ef477227d8d538b46b3075031afee8a9f2acb0a2ed0b"
+dependencies = [
+ "try-lock",
+]
+
+[[package]]
+name = "wasi"
+version = "0.11.1+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.130"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a0181c14ddd6c7b8b0b0132a5f1ea2f32be0d893cd3ea97b6e3b28886b8a3d1c"
+dependencies = [
+ "cfg-if",
+ "rustversion",
+ "wasm-bindgen-macro",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-futures"
+version = "0.4.80"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5e14e0327cb5368ad60ccb22d04a9827a693c95a926d8d125e9fa39e0baec501"
+dependencies = [
+ "js-sys",
+ "tokio",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.130"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e931a02a39abdbf66966fc35902b5ed58344750a70885bed4ebb3d8eaf28ed9"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.130"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2ca4b54280e455bd831e33a6b8e734baf432fe63fbc35c42ac14ce67a043a53a"
+dependencies = [
+ "bumpalo",
+ "proc-macro2",
+ "quote",
+ "syn 3.0.10",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.130"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b1f9c3798725016c6ee5f2f57869ec0831e8bbc0ab0310a86e787e97f41389e"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "wasm-streams"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65"
+dependencies = [
+ "futures-util",
+ "js-sys",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+]
+
+[[package]]
+name = "web-sys"
+version = "0.3.107"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d7d179596ff5ec0f6de4db64d54011bde6289cc49603d3a6e4ce3f329207ab88"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "web-time"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "webpki-roots"
+version = "0.26.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9"
+dependencies = [
+ "webpki-roots 1.0.12",
+]
+
+[[package]]
+name = "webpki-roots"
+version = "1.0.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7265c9301c16a8711c992c2d8da90ee77ef54b1ed51482d6dfeb00dc756b1297"
+dependencies = [
+ "rustls-pki-types",
+]
+
+[[package]]
+name = "windows-core"
+version = "0.62.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb"
+dependencies = [
+ "windows-implement",
+ "windows-interface",
+ "windows-link",
+ "windows-result",
+ "windows-strings",
+]
+
+[[package]]
+name = "windows-implement"
+version = "0.60.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+]
+
+[[package]]
+name = "windows-interface"
+version = "0.59.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+]
+
+[[package]]
+name = "windows-link"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
+
+[[package]]
+name = "windows-result"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5"
+dependencies = [
+ "windows-link",
+]
+
+[[package]]
+name = "windows-strings"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091"
+dependencies = [
+ "windows-link",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
+dependencies = [
+ "windows-targets",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.61.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
+dependencies = [
+ "windows-link",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
+dependencies = [
+ "windows_aarch64_gnullvm",
+ "windows_aarch64_msvc",
+ "windows_i686_gnu",
+ "windows_i686_gnullvm",
+ "windows_i686_msvc",
+ "windows_x86_64_gnu",
+ "windows_x86_64_gnullvm",
+ "windows_x86_64_msvc",
+]
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
+
+[[package]]
+name = "windows_i686_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
+
+[[package]]
+name = "writeable"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc"
+
+[[package]]
+name = "yoke"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "417ef3fcf6c300b7dbd25c85531a746931c02ad536f3cf4786ed1e88223340b3"
+dependencies = [
+ "stable_deref_trait",
+ "yoke-derive",
+ "zerofrom",
+]
+
+[[package]]
+name = "yoke-derive"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec8ebde2db3681e8c9980cc27822030e68752690ddfa9473e739aeb4dbde6d71"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.10",
+ "synstructure",
+]
+
+[[package]]
+name = "zerocopy"
+version = "0.8.64"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed43f3060383c64b000f3c630550aebdfa9d3b76d48de32390483dd2cc7e0865"
+dependencies = [
+ "zerocopy-derive",
+]
+
+[[package]]
+name = "zerocopy-derive"
+version = "0.8.64"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a5cbd820fe3e35fb38c83b6dc7e6b1618bc46e0cd10073ae94e8d52dc468d8b9"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+]
+
+[[package]]
+name = "zerofrom"
+version = "0.1.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272"
+dependencies = [
+ "zerofrom-derive",
+]
+
+[[package]]
+name = "zerofrom-derive"
+version = "0.1.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f75b4683f6c7f45248d4d64056a24298c6281e0993356d7d1b4a1a962ef10d4a"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.10",
+ "synstructure",
+]
+
+[[package]]
+name = "zeroize"
+version = "1.9.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85ccff8a4805aba1eaa4cd4afcd49f7557dd2cf5fd79ffc37f8959466effc5aa"
+
+[[package]]
+name = "zerotrie"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f"
+dependencies = [
+ "displaydoc",
+ "yoke",
+ "zerofrom",
+]
+
+[[package]]
+name = "zerovec"
+version = "0.11.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f58a2799cfe9a1670c7ea8edbd52ef8edb93cb37a7f83bf31ba9e35d9dae6a40"
+dependencies = [
+ "yoke",
+ "zerofrom",
+ "zerovec-derive",
+]
+
+[[package]]
+name = "zerovec-derive"
+version = "0.11.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3743ddbf47738d929cd1ae2e199d40d0162979dfe31aef8ae646d2bf00bf97a"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.10",
+]
+
+[[package]]
+name = "zlib-rs"
+version = "0.6.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112"
+
+[[package]]
+name = "zmij"
+version = "1.0.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
diff --git a/Cargo.toml b/Cargo.toml
new file mode 100644
index 0000000..31b077e
--- /dev/null
+++ b/Cargo.toml
@@ -0,0 +1,29 @@
+# Cargo.toml
+[package]
+name = "proxybot"
+version = "2.0.0"
+edition = "2024"
+license-file = "LICENCE.md"
+
+[dependencies]
+anyhow = "1"
+chrono = "0.4"
+http-body-util = "0.1"
+hyper = { version = "1", features = ["http1", "server"] }
+hyper-util = { version = "0.1", features = ["tokio"] }
+mime_guess = "2"
+ring = "0.17"
+base64 = "0.22"
+dotenvy = "0.15"
+futures-util = "0.3"
+tempfile = "3"
+jpcl = "2.0.0"
+percent-encoding = "2"
+regex = "1"
+reqwest = { version = "0.12", default-features = false, features = ["json", "multipart", "rustls-tls"] }
+serde = { version = "1", features = ["derive"] }
+serde_json = "1"
+secrecy = "0.8"
+serenity = { version = "0.12.5", default-features = false, features = ["cache", "client", "gateway", "model", "rustls_backend"] }
+tokio = { version = "1", features = ["macros", "rt-multi-thread", "sync", "time", "process", "net", "fs"] }
+tokio-tungstenite = { version = "0.21", features = ["rustls-tls-webpki-roots"] }
diff --git a/LICENCE.md b/LICENCE.md
new file mode 100644
index 0000000..640ddfb
--- /dev/null
+++ b/LICENCE.md
@@ -0,0 +1,316 @@
+# Doughmination Authorised Source Licence
+
+**Version 1.2**
+
+This Licence may be referred to as the **Doughmination Authorised Source Licence (DASL)**. This version may be referred to as **DASL-1.2**.
+
+Copyright © 2026 Clove Nytrix Doughmination Twilight.
+
+---
+
+# 1. Definitions
+
+For the purposes of this Licence:
+
+**"Software"** means the source code, object code, documentation, configuration, assets, and any associated files distributed under this Licence.
+
+**"Authorisation"** means explicit written permission granted by Clove Nytrix Doughmination Twilight permitting specific use of the Software.
+
+**"Authorised Person"** means a person or organisation expressly identified as authorised in an official licensing record maintained by Clove Nytrix Doughmination Twilight, including the `PEOPLE.md` file of an Official Licensing Repository or, where applicable, the `README.md` file of the relevant Software project.
+
+**"Contributor"** means any person or organisation that has received Authorisation, or is otherwise expressly authorised under this Licence, to modify, contribute to, or submit changes to the Software.
+
+**"Contribution"** means any source code, object code, documentation, configuration, assets, or other material submitted, provided, or incorporated into the Software by a Contributor.
+
+**"Fork"** means a copy or repository of the Software created through a version-control forking mechanism or an equivalent process, including forks hosted on third-party platforms.
+
+**"Contribution Fork"** means a Fork created and used solely for the purpose of preparing, reviewing, testing, or submitting Contributions to the original Software.
+
+**"Official Licensing Repositories"** means the repositories maintained by Clove Nytrix Doughmination Twilight for the administration and publication of licensing information:
+
+* GitHub: https://github.com/doughmination/licencing
+* Codeberg: https://codeberg.org/clove/licencing
+* Backup Forge: https://backup.doughmination.gay/clove/licencing
+
+**"Official Licensing Records"** means licensing records published within an Official Licensing Repository, including `PEOPLE.md`, or other records expressly identified as authoritative by Clove Nytrix Doughmination Twilight.
+
+**"Artificial Intelligence System"** means any artificial intelligence, machine-learning, generative, automated code-generation, or substantially similar system capable of generating, modifying, analysing, or transforming Software or other material.
+
+**"Meaningful Human Contribution"** means substantive human involvement in the creation, review, understanding, testing, modification, or approval of a Contribution sufficient for the Contributor to reasonably understand and take responsibility for the resulting Contribution.
+
+**"Trademarked Components"** means any trademarks, trade names, service marks, logos, branding, identifiers, product names, system names, or other distinctive branding owned or claimed by Clove Nytrix Doughmination Twilight, whether registered or unregistered.
+
+---
+
+# 2. Grant of Rights
+
+Except where expressly permitted by this Licence, by an applicable Official Licensing Record, or by separate written Authorisation, no licence or permission is granted to use, copy, modify, merge, publish, distribute, sublicense, host, deploy, execute, sell, create derivative works from, or otherwise exploit the Software.
+
+The Software is made available solely for inspection and review of its source code, subject to the specific permissions expressly granted by this Licence.
+
+All rights not expressly granted are reserved.
+
+---
+
+# 3. Forking and Contribution Forks
+
+Forking of the Software is expressly permitted to **all persons and organisations**, without requiring prior written Authorisation.
+
+This permission to fork is granted **solely to facilitate contribution to the original Software**.
+
+An unauthorised Fork does **not** constitute an authorised copy of the Software and does not grant the person or organisation creating the Fork any general right to use, operate, deploy, distribute, publish, commercialise, or otherwise exploit the Software.
+
+An unauthorised Fork may be used only for activities directly connected with contributing to the original Software, including:
+
+* inspecting and studying the Software;
+* preparing proposed changes to the Software;
+* modifying the Software for the purpose of preparing a Contribution;
+* testing or validating proposed Contributions;
+* submitting pull requests, patches, merge requests, or equivalent proposals to the original Software; and
+* performing other activities reasonably necessary to prepare or submit Contributions to the original Software.
+
+Without separate Authorisation, an unauthorised Fork **must not** be:
+
+* operated as an independent instance of the Software;
+* deployed for personal, private, public, organisational, or production use;
+* used to provide services to the Fork creator or to third parties;
+* made available to third parties for use;
+* distributed as an independent application or product;
+* published as an independent project;
+* used as the basis of a competing or replacement service;
+* commercially exploited;
+* sublicensed;
+* used to create or distribute derivative works for purposes unrelated to contributing to the original Software; or
+* otherwise used in any manner that constitutes independent use of the Software.
+
+The fact that a version-control platform permits a person to create, access, host, or publish a Fork does not constitute Authorisation to use that Fork for any purpose beyond those expressly permitted by this Section.
+
+The person or organisation creating an unauthorised Fork is responsible for ensuring that the Fork remains within the scope of this Section.
+
+Where a person or organisation wishes to use a Fork for any purpose other than contributing to the original Software, they must first obtain separate Authorisation from Clove Nytrix Doughmination Twilight or hold an applicable Authorisation recorded in an Official Licensing Record.
+
+A Contribution Fork may contain modifications that are necessary to prepare or test a Contribution, provided that those modifications remain within the scope of this Section.
+
+The permission to create a Fork does **not** constitute general permission to use the Software and does not grant any rights beyond those expressly stated in this Section.
+
+---
+
+# 4. Authorised Use
+
+Any person or organisation wishing to use the Software for purposes other than the permitted inspection, review, or Contribution Fork activities described in this Licence must first obtain written Authorisation from Clove Nytrix Doughmination Twilight, unless an applicable Official Licensing Record expressly grants the required permission.
+
+Authorisation may:
+
+* permit commercial or non-commercial use;
+* permit modification or contribution to the Software;
+* permit use of a Fork beyond Contribution Fork activities;
+* impose conditions or limitations;
+* restrict fields of use, duration, territory, or distribution;
+* specify particular projects, repositories, components, or versions;
+* require attribution, reporting, licensing fees, revenue sharing, or other obligations; or
+* be refused entirely.
+
+Authorisation to contribute to the Software does not, by itself, grant permission to redistribute, publish, deploy, sublicense, commercially exploit, or otherwise use the Software outside the scope of the authorised contribution activity.
+
+Any Authorisation permitting contribution is subject to the Contributor and Human Authorship Requirements set out in Section 8 unless expressly stated otherwise in writing.
+
+No Authorisation shall be implied through publication of the Software, possession of the Software, creation of a Fork, prior communications, or previous permissions granted to other parties.
+
+---
+
+# 5. Trusted Persons and Allowlist
+
+Clove Nytrix Doughmination Twilight may maintain an allowlist of trusted persons or organisations who are authorised to perform specified activities relating to the Software.
+
+The allowlist may be published in:
+
+* `PEOPLE.md` within an Official Licensing Repository; or
+* the `README.md` of the relevant Software project where that file expressly identifies the applicable Authorisation and scope.
+
+The allowlist may specify, for each Authorised Person:
+
+* the identity or account of the Authorised Person;
+* the projects or repositories to which the Authorisation applies;
+* the activities they may perform;
+* whether they may modify or contribute to the Software;
+* whether they may create or maintain Contribution Forks;
+* whether they may operate or deploy the Software;
+* whether they may use a Fork for purposes beyond contributing to the original Software;
+* whether they may review or approve Contributions;
+* whether they may distribute or publish particular material;
+* whether they may exercise additional rights beyond those granted to ordinary Contributors;
+* any restrictions or conditions applicable to their Authorisation; and
+* the duration or status of the Authorisation.
+
+An Authorised Person is permitted only to the extent expressly specified by the applicable allowlist entry.
+
+Being listed as an Authorised Person does not grant unrestricted rights to the Software.
+
+Clove Nytrix Doughmination Twilight may add, modify, restrict, suspend, or remove an Authorised Person or their authorised scope at any time.
+
+Where an Authorised Person is listed in both `PEOPLE.md` and a project's `README.md`, the more specific project-level scope shall apply to that project unless the applicable record expressly states otherwise.
+
+Where multiple Official Licensing Records contain conflicting entries concerning the same person or project, the most recently published applicable record shall control, unless the applicable record specifies another precedence rule.
+
+An allowlist entry constitutes Authorisation for the scope expressly stated in that entry and does not require separate written permission for activities falling within that scope.
+
+---
+
+# 6. Requesting Authorisation
+
+Requests for Authorisation should be submitted to:
+
+**[[email protected]](mailto:[email protected])**
+
+Clove Nytrix Doughmination Twilight may maintain Official Licensing Records identifying authorised persons, organisations, and licensing conditions.
+
+The Official Licensing Repositories are:
+
+* GitHub: https://github.com/doughmination/licencing
+* Codeberg: https://codeberg.org/clove/licencing
+* Backup Forge: https://backup.doughmination.gay/clove/licencing
+
+Where an individual or organisation is expressly listed as authorised within an applicable Official Licensing Record, that listing constitutes evidence of an active Authorisation subject to any accompanying conditions.
+
+Absence from the Official Licensing Records shall not be interpreted as evidence that permission has been granted.
+
+---
+
+# 7. Attribution
+
+Where Authorisation permits redistribution of the Software, all copies or substantial portions of the Software must include:
+
+* this Licence;
+* the copyright notice; and
+* reasonable attribution to **Clove Nytrix Doughmination Twilight**.
+
+Modified versions must clearly indicate that they have been modified.
+
+---
+
+# 8. Contributor and Human Authorship Requirements
+
+Where Authorisation permits a Contributor to modify, contribute to, or submit changes to the Software, the Contributor must retain Meaningful Human Contribution and responsibility for each Contribution.
+
+Artificial Intelligence Systems may be used as development tools or aids. Permitted uses may include, but are not limited to:
+
+* explaining programming concepts or existing code;
+* assisting with research;
+* identifying potential bugs or errors;
+* suggesting implementations or approaches;
+* assisting with debugging;
+* suggesting refactoring;
+* generating or assisting with tests;
+* assisting with documentation; and
+* other development activities where the Contributor retains meaningful human involvement and responsibility.
+
+The use of an Artificial Intelligence System must not replace the Contributor's substantive development work, judgement, understanding, review, testing, or responsibility for a Contribution.
+
+A Contributor must not submit or incorporate a Contribution where the Contributor has not meaningfully reviewed, understood, and taken responsibility for the resulting Contribution.
+
+Submitting substantially AI-generated material with little or no Meaningful Human Contribution is prohibited.
+
+In particular, a Contributor must not delegate the substantive development of a Contribution to an Artificial Intelligence System and submit the resulting material with only superficial or cursory human review.
+
+The use of an Artificial Intelligence System does not transfer responsibility for a Contribution away from the Contributor. The Contributor remains responsible for ensuring that every Contribution complies with this Licence and any applicable Authorisation.
+
+A Contributor may be required, as a condition of Authorisation, to disclose material use of Artificial Intelligence Systems in a Contribution where reasonably requested by Clove Nytrix Doughmination Twilight.
+
+Nothing in this Section prohibits ordinary use of automated development tooling where such tooling does not materially replace the Contributor's Meaningful Human Contribution.
+
+Violation of this Section constitutes a breach of the applicable Authorisation.
+
+---
+
+# 9. Representation and Branding
+
+You must not:
+
+* misrepresent the origin of the Software;
+* claim authorship of the original Software;
+* imply endorsement, sponsorship, certification, or affiliation by Clove Nytrix Doughmination Twilight; or
+* represent modified versions as official releases without prior written Authorisation.
+
+---
+
+# 10. Trademarked Components
+
+This Licence grants no rights to use any Trademarked Components.
+
+Without prior written Authorisation, you may not use any Trademarked Components in a manner that suggests endorsement, official status, compatibility certification, partnership, or origin.
+
+Current trademarks include, but are not limited to:
+
+* **Doughmination System®** (United Kingdom, UK00004263144)
+
+This list is non-exhaustive.
+
+---
+
+# 11. No Implied Rights
+
+No rights, licences, permissions, waivers, or immunities shall arise by implication, estoppel, or otherwise.
+
+Publication of the Software does not constitute permission to use the Software beyond the rights expressly granted by this Licence.
+
+The creation of a Fork does not constitute permission to use the Software independently of the original Software.
+
+The ability to access, clone, fork, download, or host the Software through a version-control platform does not constitute additional Authorisation.
+
+---
+
+# 12. Source-Available Status
+
+The Software is source-available.
+
+It is **not** open-source software.
+
+This Licence is not an Open Source Initiative-approved licence and should not be interpreted as granting the freedoms commonly associated with open-source licences.
+
+---
+
+# 13. Revocation
+
+Unless otherwise agreed in writing, any Authorisation granted under this Licence may be revoked by Clove Nytrix Doughmination Twilight.
+
+An allowlist entry may likewise be modified, suspended, or removed.
+
+Upon revocation or removal of Authorisation, all use relying upon that Authorisation must cease immediately unless otherwise specified within the revocation notice, applicable Official Licensing Record, or written agreement.
+
+The general permission to create Contribution Forks under Section 3 is not an individual Authorisation and may only be restricted or withdrawn by a subsequent version of this Licence or another legally applicable notice issued by Clove Nytrix Doughmination Twilight.
+
+Revocation does not affect obligations that, by their nature, survive termination.
+
+---
+
+# 14. Disclaimer of Warranty
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, OR NON-INFRINGEMENT.
+
+TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE ENTIRE RISK ARISING OUT OF THE USE OF THE SOFTWARE REMAINS WITH THE USER.
+
+---
+
+# 15. Limitation of Liability
+
+TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL CLOVE NYTRIX DOUGHMINATION TWILIGHT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, CONSEQUENTIAL, OR PUNITIVE DAMAGES, OR FOR ANY LOSS OF PROFITS, REVENUE, DATA, GOODWILL, BUSINESS INTERRUPTION, OR OTHER COMMERCIAL LOSS ARISING FROM OR RELATING TO THE SOFTWARE OR ITS USE, WHETHER BASED IN CONTRACT, TORT, NEGLIGENCE, STRICT LIABILITY, OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+---
+
+# 16. Governing Law
+
+This Licence shall be governed by and construed in accordance with the laws of England and Wales.
+
+The courts of England and Wales shall have exclusive jurisdiction over disputes arising from or relating to this Licence unless otherwise required by applicable law.
+
+---
+
+# 17. Derivative Licences
+
+No person may publish, distribute, or present a licence derived from, based upon, or substantially similar to this Licence without prior written Authorisation from Clove Nytrix Doughmination Twilight.
+
+Where such permission is granted, the derivative licence must prominently state that it is derived from the Doughmination Authorised Source Licence (DASL) and must credit Clove Nytrix Doughmination Twilight as the original author.
+
+---
+
+**End of Licence**
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..cd621b2
--- /dev/null
+++ b/README.md
@@ -0,0 +1,94 @@
+# Plural System
+
+The System website, API, live WebSocket and Discord bot run in one Rust process.
+The default address is `http://127.0.0.1:3000`. Bun builds the Svelte frontend.
+At runtime, Rust serves the resulting files from `web/dist`.
+
+## Run locally
+
+Install Rust (with Cargo), Bun, and Bash. From the project directory:
+
+1. Run `./start`. On a fresh checkout it creates `.env` from the example.
+2. Set `ADMIN_PASSWORD` in `.env`. You can set `SYSTEM_NAME` before first
+   launch and change the default `ADMIN_USERNAME` of `admin`.
+3. Run `./start` again. It builds missing artifacts, then starts the app.
+   Open `http://127.0.0.1:3000/user/login` and sign in.
+
+Use `./start --build` after updating the source. Set `BIND_ADDR` for a different
+listen address. For a public instance, put an HTTPS reverse proxy in front of
+the app and forward WebSocket upgrades. Profiles, fronting history, and system
+status are public to anyone who can reach the site.
+
+### Discord bot
+
+Set `DISCORD_TOKEN` and `OWNER_ID` for your own Discord bot and Discord user.
+Enable the Message Content intent and give the bot appropriate permissions,
+including Manage Webhooks. Leave `DISCORD_TOKEN` empty for website-only mode.
+
+Use `p$help` in Discord to see the commands. Set `COMMAND_PREFIX` in `.env`
+and restart to change the prefix. For example, with `COMMAND_PREFIX='!'`, use
+`!help`. A prefix must be non-empty and contain no whitespace or backticks.
+
+Set `PUBLIC_URL` to your site's
+origin, such as `https://system.example`, to include profile links in Discord
+member cards. ImageMagick 7 (`magick` on PATH) enables merged avatars and
+locally uploaded webhook avatars. The bot profile and default webhook avatar
+use the site favicon. Member avatars still take precedence for proxied messages.
+
+The owner can set a local password for another account on the User Manager page.
+
+## Storage
+
+- `data/system.jp` holds the system, switch history, relationships, tags,
+  statuses, pride, users and local sessions.
+- `data/members/<MEMBER-ID>.jp` holds one member profile per JPCL file. The
+  filename and the profile's `id` must match.
+- `data/settings.jp` holds the bot's guild settings. An existing proxyBot JPCL
+  settings file can be copied into this path.
+- `data/media/` holds uploaded image files.
+
+Back up the whole `data/` directory. On first startup after upgrading, embedded
+member profiles are moved out of `system.jp`. Stop the app before editing files
+by hand, then restart to load your changes. Use one running instance per data
+directory.
+
+## Import an existing System
+
+Export the four source tables to a local JSON file using the existing System
+checkout. Set `D1_DATABASE` to the source database name. Select `--local` for
+the local D1 instance or `--remote` for the Cloudflare instance you intend
+to read.
+
+```sh
+bunx wrangler d1 execute "$D1_DATABASE" --local --json \
+  --command "SELECT * FROM systems; SELECT * FROM members; SELECT * FROM switches; SELECT * FROM kv WHERE key IN ('users', 'member_tags', 'member_pride', 'member_status', 'member_relationships', 'mental_state');" \
+  > /tmp/system-d1.json
+```
+
+From this repository, configure `.env` with your existing owner username and
+run the importer before first launch:
+
+```sh
+./start --build --import-d1 /tmp/system-d1.json
+```
+
+The importer creates `data/system.jp` and individual member files. It requires
+a new destination.
+It reads both legacy JSON and JPCL values. Imported accounts keep their owner and admin privileges
+and need local credentials. Media URL fields keep their existing values.
+Re-upload images from the owner interface to serve them from local storage.
+
+## API
+
+The API keeps its `/api/plural` prefix and supports JPCL, JSON and YAML reads.
+Use `Accept: application/jpcl` for JPCL responses and
+`Content-Type: application/jpcl` to submit a JPCL document. The WebSocket at
+`/api/plural/ws` accepts the `jpcl` subprotocol or sends JSON events by default.
+
+Sign in with `POST /api/plural/auth/login` using a `username` and `password`,
+then send the returned `access_token` in the `Authorization: Bearer` header.
+The API reference is available after sign-in at `/user/docs`.
+
+For runit, run the service under your chosen service account. Set
+`PROXY_APP_DIR` to the checkout when installing the launcher elsewhere and
+`PROXY_LOG_DIR` to choose the log directory.
diff --git a/build b/build
new file mode 100755
index 0000000..24682be
--- /dev/null
+++ b/build
@@ -0,0 +1,11 @@
+#!/bin/sh
+# build
+
+set -eu
+cd "$(dirname "$0")"
+(
+  cd web
+  bun install --frozen-lockfile
+  bun run build
+)
+cargo build --release --locked
diff --git a/deploy/log/run b/deploy/log/run
new file mode 100755
index 0000000..27a59fc
--- /dev/null
+++ b/deploy/log/run
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+LOG_DIR=${PROXY_LOG_DIR:-./logs}
+
+mkdir -p "$LOG_DIR"
+exec svlogd -tt "$LOG_DIR"
\ No newline at end of file
diff --git a/deploy/run b/deploy/run
new file mode 100755
index 0000000..e6c2527
--- /dev/null
+++ b/deploy/run
@@ -0,0 +1,8 @@
+#!/bin/sh
+# deploy/run
+
+exec 2>&1
+
+app_dir=${PROXY_APP_DIR:-$(dirname "$0")/..}
+cd "$app_dir" || exit 1
+exec ./start
diff --git a/src/avatars.rs b/src/avatars.rs
new file mode 100644
index 0000000..24a011e
--- /dev/null
+++ b/src/avatars.rs
@@ -0,0 +1,245 @@
+// src/avatars.rs
+
+use std::collections::HashMap;
+use std::sync::Arc;
+
+use base64::{Engine, engine::general_purpose::STANDARD};
+use secrecy::ExposeSecret;
+use serenity::all::{Context, CreateAttachment, CurrentUser, EditProfile, Webhook, WebhookId};
+use tokio::sync::{Mutex, OnceCell};
+
+use crate::{
+    Bot,
+    proxy::{MAX_NAMED, Member},
+};
+
+const FAVICON_PNG: &[u8] = include_bytes!("../web/static/favicon.png");
+
+pub fn favicon_attachment() -> CreateAttachment {
+    CreateAttachment::bytes(FAVICON_PNG, "favicon.png")
+}
+
+type Merge = (Vec<String>, Arc<OnceCell<Vec<u8>>>);
+
+#[derive(Default)]
+pub struct Avatars {
+    merged: Mutex<Option<Merge>>,
+    bot_avatar: OnceCell<String>,
+    installed: Mutex<HashMap<WebhookId, Vec<String>>>,
+}
+
+pub fn avatar_urls(speakers: &[Member]) -> Vec<String> {
+    speakers
+        .iter()
+        .filter_map(Member::webhook_avatar)
+        .map(str::to_owned)
+        .collect()
+}
+
+pub(crate) fn log_avatar(speakers: &[Member]) -> Option<&str> {
+    speakers.iter().find_map(|member| {
+        member
+            .avatar_url
+            .as_deref()
+            .or_else(|| member.webhook_avatar())
+    })
+}
+
+impl Avatars {
+    pub async fn png(&self, web: &reqwest::Client, urls: Vec<String>) -> anyhow::Result<Vec<u8>> {
+        if urls.is_empty() {
+            return Ok(Vec::new());
+        }
+
+        let cell = {
+            let mut cached = self.merged.lock().await;
+
+            match &*cached {
+                Some((key, cell)) if key == &urls => cell.clone(),
+                _ => {
+                    let cell = Arc::new(OnceCell::new());
+                    *cached = Some((urls.clone(), cell.clone()));
+                    cell
+                }
+            }
+        };
+        let png = cell.get_or_try_init(|| merge(web, &urls)).await?;
+        Ok(png.clone())
+    }
+}
+
+impl Bot {
+    pub async fn set_bot_avatar(&self, ctx: &Context, mut user: CurrentUser) {
+        let result = user
+            .edit(&ctx.http, EditProfile::new().avatar(&favicon_attachment()))
+            .await;
+        match result {
+            Ok(()) => {
+                let _ = self.avatars.bot_avatar.set(user.face());
+            }
+            Err(error) => eprintln!("Could not set the bot avatar: {error}"),
+        }
+    }
+
+    pub async fn remember_default_avatar(&self, webhook: &Webhook) {
+        self.avatars
+            .installed
+            .lock()
+            .await
+            .insert(webhook.id, Vec::new());
+    }
+
+    pub async fn set_webhook_avatar(
+        &self,
+        ctx: &Context,
+        webhook: &Webhook,
+        sources: Vec<String>,
+        png: &[u8],
+    ) -> anyhow::Result<()> {
+        if self.avatars.installed.lock().await.get(&webhook.id) == Some(&sources) {
+            return Ok(());
+        }
+        let token = webhook
+            .token
+            .as_ref()
+            .map(ExposeSecret::expose_secret)
+            .ok_or_else(|| anyhow::anyhow!("webhook had no token"))?;
+        let data = serde_json::json!({
+            "avatar": format!("data:image/png;base64,{}", STANDARD.encode(png)),
+        });
+        ctx.http
+            .edit_webhook_with_token(webhook.id, token, &data, None)
+            .await?;
+        self.avatars
+            .installed
+            .lock()
+            .await
+            .insert(webhook.id, sources);
+        Ok(())
+    }
+
+    pub async fn set_default_webhook_avatar(
+        &self,
+        ctx: &Context,
+        webhook: &Webhook,
+    ) -> anyhow::Result<()> {
+        self.set_webhook_avatar(ctx, webhook, Vec::new(), FAVICON_PNG)
+            .await
+    }
+
+    pub async fn avatar(
+        &self,
+        ctx: &Context,
+        webhook: &Webhook,
+        speakers: &[Member],
+    ) -> Option<String> {
+        if let [member] = speakers
+            && let Some(url) = member.webhook_avatar()
+            && !url.starts_with(&format!("{}/api/plural/media/", self.local_origin))
+        {
+            return Some(url.to_owned());
+        }
+
+        if speakers.len() <= MAX_NAMED {
+            let urls = avatar_urls(speakers);
+            if !urls.is_empty() {
+                if self.avatars.installed.lock().await.get(&webhook.id) == Some(&urls) {
+                    return None;
+                }
+                let result = async {
+                    let png = self.avatars.png(&self.web, urls.clone()).await?;
+                    self.set_webhook_avatar(ctx, webhook, urls, &png).await
+                }
+                .await;
+                match result {
+                    Ok(()) => return None,
+                    Err(error) => eprintln!("Could not install the member avatar: {error}"),
+                }
+            }
+        }
+
+        match self.set_default_webhook_avatar(ctx, webhook).await {
+            Ok(()) => None,
+            Err(error) => {
+                eprintln!("Could not restore the webhook avatar: {error}");
+                Some(
+                    self.avatars
+                        .bot_avatar
+                        .get()
+                        .cloned()
+                        .unwrap_or_else(|| ctx.cache.current_user().face()),
+                )
+            }
+        }
+    }
+}
+
+async fn merge(web: &reqwest::Client, urls: &[String]) -> anyhow::Result<Vec<u8>> {
+    let images = futures_util::future::try_join_all(urls.iter().map(|url| async move {
+        let mut response = web.get(url).send().await?.error_for_status()?;
+        let mut bytes = Vec::new();
+
+        while let Some(chunk) = response.chunk().await? {
+            anyhow::ensure!(
+                bytes.len() + chunk.len() <= 16 * 1024 * 1024,
+                "avatar exceeds 16 MiB"
+            );
+            bytes.extend_from_slice(&chunk);
+        }
+
+        Ok::<_, anyhow::Error>(bytes)
+    }))
+    .await?;
+
+    let directory = tempfile::tempdir()?;
+    let strip_width = 512 / images.len();
+    let mut command = tokio::process::Command::new("magick");
+    command.current_dir(directory.path()).kill_on_drop(true);
+    command.args([
+        "-limit", "thread", "2", "-limit", "memory", "128MiB", "-limit", "disk", "128MiB",
+    ]);
+
+    for (index, bytes) in images.iter().enumerate() {
+        let format = if bytes.starts_with(b"\x89PNG\r\n\x1a\n") {
+            "png"
+        } else if bytes.starts_with(b"\xff\xd8\xff") {
+            "jpeg"
+        } else if bytes.starts_with(b"GIF87a") || bytes.starts_with(b"GIF89a") {
+            "gif"
+        } else if bytes.starts_with(b"RIFF") && bytes.get(8..12) == Some(b"WEBP") {
+            "webp"
+        } else {
+            anyhow::bail!("unsupported avatar format");
+        };
+        let filename = format!("avatar-{index}");
+        std::fs::write(directory.path().join(&filename), bytes)?;
+        let width = if index + 1 == images.len() {
+            512 - strip_width * index
+        } else {
+            strip_width
+        };
+        let dimensions = format!("{width}x512");
+        command.args([
+            "(".to_owned(),
+            format!("{format}:{filename}[0]"),
+            "-resize".into(),
+            format!("{dimensions}^"),
+            "-gravity".into(),
+            "center".into(),
+            "-extent".into(),
+            dimensions,
+            "+repage".into(),
+            ")".into(),
+        ]);
+    }
+
+    command.args(["+append", "png:-"]);
+    let output =
+        tokio::time::timeout(std::time::Duration::from_secs(15), command.output()).await??;
+    anyhow::ensure!(
+        output.status.success(),
+        "ImageMagick failed: {}",
+        String::from_utf8_lossy(&output.stderr)
+    );
+    Ok(output.stdout)
+}
diff --git a/src/cards.rs b/src/cards.rs
new file mode 100644
index 0000000..2521d0b
--- /dev/null
+++ b/src/cards.rs
@@ -0,0 +1,212 @@
+// src/cards.rs
+
+use percent_encoding::{NON_ALPHANUMERIC, utf8_percent_encode};
+use serde_json::{Value, json};
+use serenity::all::{Message, UserId};
+
+use crate::proxy::{MAX_NAMED, Member, truncate, utf16_len};
+
+const ACCENT: u32 = 0xeb459e;
+pub const COMPONENTS_V2: u32 = 1 << 15;
+
+pub fn text(content: impl AsRef<str>) -> Value {
+    json!({
+        "type": 10,
+        "content": content.as_ref(),
+    })
+}
+
+pub fn link(label: &str, url: String) -> Value {
+    json!({
+        "type": 1,
+        "components": [{
+            "type": 2,
+            "style": 5,
+            "label": truncate(label, 80),
+            "url": url,
+        }],
+    })
+}
+
+pub(crate) fn header(content: String, avatar: Option<&str>) -> Value {
+    let Some(url) = avatar.filter(|url| !url.is_empty()) else {
+        return text(content);
+    };
+    json!({
+        "type": 9,
+        "components": [text(content)],
+        "accessory": {
+            "type": 11,
+            "media": { "url": url },
+        },
+    })
+}
+
+fn container(colour: u32, components: Vec<Value>) -> Value {
+    json!({
+        "type": 17,
+        "accent_color": colour,
+        "components": components,
+    })
+}
+
+fn shorten(content: &str) -> String {
+    if utf16_len(content) > 1000 {
+        return format!("{}…", truncate(content, 999));
+    }
+
+    content.into()
+}
+
+fn colour(input: Option<&str>) -> u32 {
+    let hex = input.unwrap_or_default().trim().trim_start_matches('#');
+    let full;
+    let hex = if hex.len() == 3 && hex.is_ascii() {
+        full = hex
+            .chars()
+            .flat_map(|digit| [digit, digit])
+            .collect::<String>();
+        &full
+    } else {
+        hex
+    };
+
+    if hex.len() == 6 && hex.bytes().all(|byte| byte.is_ascii_hexdigit()) {
+        return u32::from_str_radix(hex, 16).unwrap_or(ACCENT);
+    }
+
+    ACCENT
+}
+
+pub fn member_card(member: &Member, public_origin: Option<&str>) -> Value {
+    let name = member
+        .display_name
+        .as_deref()
+        .filter(|name| !name.is_empty())
+        .unwrap_or(&member.name);
+    let mut heading = format!("## {name}");
+
+    if let Some(pronouns) = member
+        .pronouns
+        .as_deref()
+        .filter(|pronouns| !pronouns.is_empty())
+    {
+        heading.push_str(&format!("\n{pronouns}"));
+    }
+
+    if let Some(status) = &member.status {
+        let status_line = format!(
+            "{} {}",
+            status.emoji.as_deref().unwrap_or_default(),
+            status.text
+        );
+        heading.push_str(&format!("\n{}", status_line.trim()));
+    }
+
+    let mut components = vec![header(heading, member.avatar_url.as_deref())];
+    let mut details = Vec::new();
+
+    if let Some(description) = member
+        .description
+        .as_deref()
+        .filter(|value| !value.is_empty())
+    {
+        details.push(format!("**About**\n{}", shorten(description)));
+    }
+
+    for (label, entries) in [("Tags", &member.tags), ("Pride", &member.pride)] {
+        if !entries.is_empty() {
+            details.push(format!("**{label}**\n{}", entries.join(", ")));
+        }
+    }
+
+    if !details.is_empty() {
+        components.push(json!({ "type": 14 }));
+        components.push(text(details.join("\n\n")));
+    }
+
+    if let Some(origin) = public_origin {
+        let id = utf8_percent_encode(&member.id, NON_ALPHANUMERIC);
+        components.push(link("Open page", format!("{origin}/{id}")));
+    }
+    container(colour(member.color.as_deref()), components)
+}
+
+pub fn info(
+    message: &Message,
+    members: Option<&[Member]>,
+    owner: UserId,
+    system: Option<&str>,
+    public_origin: Option<&str>,
+) -> Vec<Value> {
+    let mut footer = vec![format!("Sent by <@{owner}>")];
+
+    if let Some(name) = system.filter(|name| !name.is_empty()) {
+        footer.push(name.into());
+    }
+
+    let mut components = match members {
+        Some(members) => {
+            let hidden = members.len().saturating_sub(MAX_NAMED);
+
+            if hidden > 0 {
+                footer.insert(0, format!("& {hidden} more"));
+            }
+
+            members
+                .iter()
+                .take(MAX_NAMED)
+                .map(|member| member_card(member, public_origin))
+                .collect()
+        }
+        None => vec![container(
+            ACCENT,
+            vec![header(
+                format!("## {}", message.author.name),
+                Some(&message.author.face()),
+            )],
+        )],
+    };
+    components.push(text(format!("-# {}", footer.join(" · "))));
+    components.push(link("Jump to message", message.link()));
+    components
+}
+
+pub fn display_name(message: &Message) -> &str {
+    message
+        .member
+        .as_ref()
+        .and_then(|member| member.nick.as_deref())
+        .or(message.author.global_name.as_deref())
+        .unwrap_or(&message.author.name)
+}
+
+pub fn reply(message: &Message, target: &Message) -> Vec<Value> {
+    let body = if message.content.is_empty() {
+        "*Sent an attachment*".to_owned()
+    } else {
+        shorten(&message.content)
+            .split('\n')
+            .map(|line| format!("> {line}"))
+            .collect::<Vec<_>>()
+            .join("\n")
+    };
+    let heading = format!(
+        "### ↪ {} replied to {}\n{body}",
+        display_name(message),
+        target.author.name
+    );
+    let mut components = vec![container(
+        ACCENT,
+        vec![
+            header(heading, Some(&message.author.face())),
+            link("Jump to reply", message.link()),
+        ],
+    )];
+
+    if !message.content.is_empty() && !message.attachments.is_empty() {
+        components.push(text("-# Also sent an attachment"));
+    }
+
+    components
+}
diff --git a/src/commands/autoproxy/mod.rs b/src/commands/autoproxy/mod.rs
new file mode 100644
index 0000000..a7f0c36
--- /dev/null
+++ b/src/commands/autoproxy/mod.rs
@@ -0,0 +1,62 @@
+// src/commands/autoproxy/mod.rs
+
+use serenity::all::GuildId;
+
+use crate::Bot;
+
+impl Bot {
+    pub(super) async fn autoproxy(
+        &self,
+        guild: GuildId,
+        args: &[String],
+    ) -> anyhow::Result<String> {
+        let global = args.iter().any(|arg| arg == "-g");
+        let choice = args
+            .iter()
+            .find(|arg| arg.as_str() != "-g")
+            .map(String::as_str);
+        let mut settings = self.settings.lock().await;
+        let current = settings.guilds.get(&guild).copied().unwrap_or(false);
+        let current_name = if current { "on" } else { "off" };
+        let total = settings.guilds.len();
+
+        let enabled = match choice {
+            Some("on") => true,
+            Some("off") => false,
+            None if global => {
+                let enabled_count = settings.guilds.values().filter(|&&enabled| enabled).count();
+                return Ok(format!(
+                    "Autoproxy is **on** in {enabled_count} of {total} servers."
+                ));
+            }
+            None => return Ok(format!("Autoproxy in this server is **{current_name}**.")),
+            _ if global => {
+                return Ok(self
+                    .command_text("Use `{prefix}autoproxy -g on` or `{prefix}autoproxy -g off`."));
+            }
+            _ => {
+                return Ok(
+                    self.command_text("Use `{prefix}autoproxy on|off`, or `{prefix}autoproxy -g on|off` for every server."),
+                );
+            }
+        };
+
+        let choice = if enabled { "on" } else { "off" };
+        let mut updated = settings.clone();
+        let response = if global {
+            updated
+                .guilds
+                .values_mut()
+                .for_each(|value| *value = enabled);
+            format!("Autoproxy is now **{choice}** in all {total} servers.")
+        } else if current == enabled {
+            return Ok(format!("Autoproxy in this server is already **{choice}**."));
+        } else {
+            updated.guilds.insert(guild, enabled);
+            format!("Autoproxy in this server is now **{choice}**.")
+        };
+        updated.save()?;
+        *settings = updated;
+        Ok(response)
+    }
+}
diff --git a/src/commands/edit/mod.rs b/src/commands/edit/mod.rs
new file mode 100644
index 0000000..b866c8e
--- /dev/null
+++ b/src/commands/edit/mod.rs
@@ -0,0 +1,107 @@
+// src/commands/edit/mod.rs
+
+use secrecy::ExposeSecret;
+use serde_json::json;
+use serenity::all::{Context, Message};
+
+use crate::{
+    Bot,
+    discord::{
+        Destination, NO_TARGET, Target, attachment_links_with_spoilers, attachment_spoilers,
+        existing_media, message_text, proxy_payload, proxy_text,
+        split_attachment_links, user_mentions,
+    },
+    proxy_log::ProxyLog,
+};
+
+impl Bot {
+    pub(super) async fn edit(
+        &self,
+        ctx: &Context,
+        command: &Message,
+        content: &str,
+    ) -> anyhow::Result<Option<&'static str>> {
+        let Some(Target {
+            message: target,
+            components,
+            classic,
+            }) = self.target(ctx, command).await?
+        else {
+            return Ok(Some(NO_TARGET));
+        };
+
+        let links = if classic {
+            split_attachment_links(&target.content).1.to_owned()
+        } else {
+            proxy_text(&components).1
+        };
+
+        if content.is_empty() && links.is_empty() && target.attachments.is_empty() {
+            return Ok(Some(
+                "That would leave the message empty. Use ❌ to delete it instead.",
+                ));
+        }
+
+        let spoilers = attachment_spoilers(&target, &components);
+        let mut payload = if classic {
+            let replacement = proxy_payload(content, &links, Vec::new(), false);
+
+            if replacement["content"].is_null() {
+                return Ok(Some(
+                    "Message text and upload links exceed 2000 characters.",
+                    ));
+            }
+
+            json!({ "content": replacement["content"] })
+        } else {
+            let (components, attachments) = existing_media(&target, components, true);
+            let mut replacement = proxy_payload(content, &links, components, true);
+            replacement["attachments"] = json!(attachments);
+            replacement
+        };
+        payload["allowed_mentions"] = user_mentions();
+
+        let guild = command.guild_id.unwrap();
+        let Some(dest) = Destination::resolve(ctx, command.channel_id, guild).await? else {
+            return Ok(Some("Can't use webhooks in this channel."));
+        };
+        let id = target.webhook_id.unwrap();
+        let webhook = id.to_webhook(&ctx.http).await?;
+        let token = webhook
+        .token
+        .as_ref()
+        .map(ExposeSecret::expose_secret)
+        .ok_or_else(|| anyhow::anyhow!("webhook had no token"))?;
+        let edited = ctx.http
+        .edit_webhook_message(id, dest.thread, token, target.id, &payload, Vec::new())
+        .await
+        .map_err(|_| anyhow::anyhow!("Discord rejected webhook edit"))?;
+        let label = format!("Edited proxy by {}", target.author.name);
+        let avatar = self
+        .senders
+        .lock()
+        .await
+        .iter()
+        .rev()
+        .find(|(id, _)| *id == target.id)
+        .and_then(|(_, members)| crate::avatars::log_avatar(members))
+        .map(str::to_owned)
+        .or_else(|| target.author.avatar_url());
+        let links = message_text(&links, &attachment_links_with_spoilers(&edited.attachments, &spoilers));
+        self.log_proxy(
+            ctx,
+            guild,
+            ProxyLog {
+                source: &target,
+                sent: target.id,
+                label: &label,
+                content,
+                links: &links,
+                avatar: avatar.as_deref(),
+            },
+        )
+        .await;
+        command.delete(&ctx.http).await?;
+        Ok(None)
+    }
+}
diff --git a/src/commands/explain/explain.txt b/src/commands/explain/explain.txt
new file mode 100644
index 0000000..fbd0bab
--- /dev/null
+++ b/src/commands/explain/explain.txt
@@ -0,0 +1,7 @@
+This bot helps a plural system proxy messages in Discord.
+
+> How does it work?
+When a message matches a member's proxy tags, the bot reposts it through a Discord webhook using that member's name and avatar. Discord labels webhook messages as apps or bots.
+
+> What is plurality?
+Plurality is the experience of more than one person or identity sharing a body. [More Than One](<https://morethanone.info>) has an introduction.
diff --git a/src/commands/explain/mod.rs b/src/commands/explain/mod.rs
new file mode 100644
index 0000000..e6c9e21
--- /dev/null
+++ b/src/commands/explain/mod.rs
@@ -0,0 +1,9 @@
+// src/commands/explain/mod.rs
+
+use crate::Bot;
+
+impl Bot {
+    pub(super) fn explain(&self) -> String {
+        include_str!("explain.txt").trim_end().to_owned()
+    }
+}
diff --git a/src/commands/fban/mod.rs b/src/commands/fban/mod.rs
new file mode 100644
index 0000000..7db5dce
--- /dev/null
+++ b/src/commands/fban/mod.rs
@@ -0,0 +1,54 @@
+// src/commands/fban/mod.rs
+
+use serde_json::json;
+use serenity::all::{Context, Message};
+
+use crate::{Bot, discord};
+
+const USAGE: &str = "Use `{prefix}fban <@user or user ID> <reason>`.";
+
+impl Bot {
+    pub(super) async fn fake_ban(
+        &self,
+        ctx: &Context,
+        message: &Message,
+        input: &str,
+    ) -> anyhow::Result<Option<String>> {
+        let Some((target, reason)) = input.split_once(char::is_whitespace) else {
+            return Ok(Some(self.command_text(USAGE)));
+        };
+        let reason = reason.trim_start();
+
+        let user_id = target
+            .strip_prefix("<@")
+            .and_then(|mention| mention.strip_suffix('>'))
+            .map_or(target, |mention| {
+                mention.strip_prefix('!').unwrap_or(mention)
+            });
+
+        if !user_id.bytes().all(|byte| byte.is_ascii_digit())
+            || !user_id.parse::<u64>().is_ok_and(|id| id > 0)
+            || reason.is_empty()
+        {
+            return Ok(Some(self.command_text(USAGE)));
+        }
+
+        discord::reply(
+            ctx,
+            message,
+            json!({
+                "embeds": [{
+                    "title": "🔨 User fake-banned",
+                    "description": reason,
+                    "color": 0xED4245,
+                    "fields": [{
+                        "name": "User",
+                        "value": format!("<@{user_id}>"),
+                    }],
+                }],
+            }),
+        )
+        .await?;
+        Ok(None)
+    }
+}
diff --git a/src/commands/help/help.txt b/src/commands/help/help.txt
new file mode 100644
index 0000000..209f1a5
--- /dev/null
+++ b/src/commands/help/help.txt
@@ -0,0 +1,12 @@
+`{prefix}edit <text>` edits the message you reply to, or your latest proxied message. `{prefix}e` works too.
+`{prefix}explain` explains the bot, and plurality. `{prefix}ex` works too,
+`{prefix}autoproxy` shows the state for this server, `{prefix}autoproxy on|off` sets it. Add `-g` for every server, like `{prefix}autoproxy -g off`. `{prefix}ap` works too.
+`{prefix}reproxy <member>` resends the message you reply to, or your latest proxied message, as someone else, like `{prefix}reproxy c1`. `{prefix}rp` works too.
+`{prefix}switch <member>` sets who's fronting on the site, like `{prefix}switch c1 c2`. `{prefix}switch out` clears it. `{prefix}sw` works too.
+`{prefix}member <member>` shows a member's card, like `{prefix}member alex`. `{prefix}m` works too.
+`{prefix}ping` shows how fast Discord and the system API respond.
+`{prefix}version` shows the running proxyBot version.
+`{prefix}fban <@user or user ID> <reason>` posts a fake ban embed.
+-# The proxyBot owner can react ❌ to delete a proxied message or a message sent by proxyBot. React ❓ on a proxied message to see who sent it.
+`{prefix}log` shows the server's proxy logging settings. `{prefix}log channel #channel` sets the log channel, and `{prefix}log channel -clear` turns logging off.
+`{prefix}log cleanup on|off` controls duplicate deletion notices from supported logger bots. These settings require Manage Server or the proxyBot owner.
diff --git a/src/commands/help/mod.rs b/src/commands/help/mod.rs
new file mode 100644
index 0000000..58f750d
--- /dev/null
+++ b/src/commands/help/mod.rs
@@ -0,0 +1,5 @@
+// src/commands/help/mod.rs
+
+pub(super) fn text() -> &'static str {
+    include_str!("help.txt").trim_end()
+}
diff --git a/src/commands/log/mod.rs b/src/commands/log/mod.rs
new file mode 100644
index 0000000..4f16ea9
--- /dev/null
+++ b/src/commands/log/mod.rs
@@ -0,0 +1,119 @@
+// src/commands/log/mod.rs
+
+use serenity::all::{
+    Channel, ChannelId, ChannelType, Context, GuildId, Mentionable, Message, Permissions,
+};
+
+use crate::Bot;
+use crate::settings::ProxyLogging;
+
+impl Bot {
+    pub(super) async fn log_config(
+        &self,
+        ctx: &Context,
+        message: &Message,
+        guild_id: GuildId,
+        args: &[String],
+    ) -> anyhow::Result<String> {
+        let guild = guild_id.to_partial_guild(&ctx.http).await?;
+
+        if message.author.id != self.owner {
+            let member = guild_id.member(ctx, message.author.id).await?;
+
+            if !guild
+                .member_permissions(&member)
+                .contains(Permissions::MANAGE_GUILD)
+            {
+                return Ok("Only the proxyBot owner or someone with Manage Server can configure proxy logging.".into());
+            }
+        }
+
+        let update = match args
+        .iter()
+        .map(String::as_str)
+        .collect::<Vec<_>>()
+        .as_slice()
+        {
+            [] | ["channel"] | ["cleanup"] => {
+                let current = self
+                .settings
+                .lock()
+                .await
+                .proxy_logs
+                .get(&guild_id)
+                .copied()
+                .unwrap_or_default();
+                let channel = current
+                .channel
+                .map(|channel| channel.mention().to_string())
+                .unwrap_or_else(|| "off".into());
+                let cleanup = if current.cleanup { "on" } else { "off" };
+                return Ok(format!("Proxy logging: {channel}\nLog cleanup: {cleanup}"));
+            }
+            ["channel", "-clear" | "off"] => LogUpdate::Channel(None),
+            ["channel", channel] => {
+                let id = channel
+                .strip_prefix("<#")
+                .and_then(|mention| mention.strip_suffix('>'))
+                .unwrap_or(channel);
+                let Ok(channel_id) = id.parse::<ChannelId>() else {
+                    return Ok("Give me a text channel mention or ID.".into());
+                };
+
+                let Some(Channel::Guild(channel)) = channel_id.to_channel(ctx).await.ok() else {
+                    return Ok("I couldn't open that channel.".into());
+                };
+
+                if channel.guild_id != guild_id
+                || !matches!(channel.kind, ChannelType::Text | ChannelType::News)
+                {
+                    return Ok("Choose a text or announcement channel in this server.".into());
+                }
+
+                let bot_id = ctx.cache.current_user().id;
+                let bot = guild_id.member(ctx, bot_id).await?;
+                let required = Permissions::VIEW_CHANNEL | Permissions::SEND_MESSAGES;
+
+                if !guild.user_permissions_in(&channel, &bot).contains(required) {
+                    return Ok("I need View Channel and Send Messages in that channel.".into());
+                }
+
+                LogUpdate::Channel(Some(channel_id))
+            }
+            ["cleanup", "on"] => LogUpdate::Cleanup(true),
+            ["cleanup", "off"] => LogUpdate::Cleanup(false),
+            _ => return Ok(
+                self.command_text("Use `{prefix}log channel #channel`, `{prefix}log channel -clear`, or `{prefix}log cleanup on|off`."),
+            ),
+        };
+
+        self.update_settings(|settings| {
+            settings.guilds.entry(guild_id).or_default();
+            let config = settings.proxy_logs.entry(guild_id).or_default();
+
+            match update {
+                LogUpdate::Channel(channel) => config.channel = channel,
+                LogUpdate::Cleanup(enabled) => config.cleanup = enabled,
+            }
+
+            if *config == ProxyLogging::default() {
+                settings.proxy_logs.remove(&guild_id);
+            }
+        })
+        .await?;
+
+        Ok(match update {
+            LogUpdate::Channel(Some(channel)) => {
+                format!("Proxy logging is now set to {}.", channel.mention())
+            }
+            LogUpdate::Channel(None) => "Proxy logging is now off.".into(),
+            LogUpdate::Cleanup(true) => "Log cleanup is now on.".into(),
+            LogUpdate::Cleanup(false) => "Log cleanup is now off.".into(),
+        })
+    }
+}
+
+enum LogUpdate {
+    Channel(Option<ChannelId>),
+    Cleanup(bool),
+}
diff --git a/src/commands/member/mod.rs b/src/commands/member/mod.rs
new file mode 100644
index 0000000..72f7776
--- /dev/null
+++ b/src/commands/member/mod.rs
@@ -0,0 +1,44 @@
+// src/commands/member/mod.rs
+
+use serde_json::json;
+use serenity::all::{Context, Message};
+
+use crate::{Bot, cards, discord};
+
+impl Bot {
+    pub(super) async fn member(
+        &self,
+        ctx: &Context,
+        message: &Message,
+        args: &[String],
+    ) -> anyhow::Result<Option<String>> {
+        let [name] = args else {
+            return Ok(Some(self.command_text(
+                "Use `{prefix}member <member>`, like `{prefix}member alex`.",
+            )));
+        };
+
+        let state = self.system.read().await;
+        let match_card = state
+            .members
+            .iter()
+            .find(|member| member.name.to_lowercase() == *name)
+            .map(|member| cards::member_card(member, self.public_origin.as_deref()));
+        drop(state);
+
+        let Some(card) = match_card else {
+            return Ok(Some(format!("No member called `{name}`.")));
+        };
+
+        discord::reply(
+            ctx,
+            message,
+            json!({
+                "flags": cards::COMPONENTS_V2,
+                "components": [card],
+            }),
+        )
+        .await?;
+        Ok(None)
+    }
+}
diff --git a/src/commands/mod.rs b/src/commands/mod.rs
new file mode 100644
index 0000000..cdd8117
--- /dev/null
+++ b/src/commands/mod.rs
@@ -0,0 +1,107 @@
+// src/commands/mod.rs
+
+mod autoproxy;
+
+mod edit;
+
+mod explain;
+
+mod fban;
+
+mod help;
+
+mod log;
+
+mod member;
+
+mod ping;
+
+mod reproxy;
+
+mod switch;
+
+use serde_json::json;
+use serenity::all::{Context, GuildId, Message};
+
+use crate::{
+    Bot, discord,
+    proxy::{self, Member},
+};
+
+impl Bot {
+    pub async fn command(
+        &self,
+        ctx: &Context,
+        message: &Message,
+        guild: GuildId,
+    ) -> anyhow::Result<bool> {
+        let Some((name, args, rest)) = proxy::command(&message.content, &self.command_prefix)
+        else {
+            return Ok(false);
+        };
+
+        let reply = match name.as_str() {
+            "help" => Some(self.command_text(help::text())),
+            "version" => Some(format!("proxyBot v{}", env!("CARGO_PKG_VERSION"))),
+            "explain" | "ex" => Some(self.explain()),
+            "autoproxy" | "ap" => Some(self.autoproxy(guild, &args).await?),
+            "edit" | "e" => self.edit(ctx, message, rest).await?.map(str::to_owned),
+            "fban" => self.fake_ban(ctx, message, rest).await?,
+            "log" => Some(self.log_config(ctx, message, guild, &args).await?),
+            "logclean" => {
+                let args = ["cleanup".to_owned()]
+                    .into_iter()
+                    .chain(args)
+                    .collect::<Vec<_>>();
+                Some(self.log_config(ctx, message, guild, &args).await?)
+            }
+            "member" | "m" => self.member(ctx, message, &args).await?,
+            "ping" => {
+                self.ping(ctx, message).await?;
+                None
+            }
+            "reproxy" | "rp" => self.reproxy(ctx, message, &args).await?,
+            "switch" | "sw" => Some(self.switch(&args).await),
+            _ => Some(format!(
+                "Unknown command `{name}`. Try `{}help`.",
+                self.command_prefix
+            )),
+        };
+
+        if let Some(reply) = reply {
+            discord::reply(ctx, message, json!({ "content": reply })).await?;
+        }
+
+        Ok(true)
+    }
+
+    fn command_text(&self, template: &str) -> String {
+        template.replace("{prefix}", &self.command_prefix)
+    }
+
+    async fn command_members(&self, args: &[String]) -> Result<Vec<Member>, String> {
+        let state = self.system.read().await;
+        let mut found = Vec::new();
+        let mut missing = Vec::new();
+
+        for name in args {
+            match state
+                .members
+                .iter()
+                .find(|member| member.name.to_lowercase() == *name)
+            {
+                Some(member) => found.push(member.clone()),
+                None => missing.push(format!("`{name}`")),
+            }
+        }
+
+        if missing.is_empty() {
+            Ok(found)
+        } else {
+            Err(format!(
+                "No member called {}. Use their short name, like `c1`.",
+                missing.join(", ")
+            ))
+        }
+    }
+}
diff --git a/src/commands/ping/mod.rs b/src/commands/ping/mod.rs
new file mode 100644
index 0000000..ea21e9b
--- /dev/null
+++ b/src/commands/ping/mod.rs
@@ -0,0 +1,71 @@
+// src/commands/ping/mod.rs
+
+use std::time::Instant;
+
+use serde_json::json;
+use serenity::all::{Context, Message};
+
+use crate::{Bot, discord};
+
+impl Bot {
+    pub(super) async fn ping(&self, ctx: &Context, message: &Message) -> anyhow::Result<()> {
+        let manager = self.shards.get().expect("shard manager has been set");
+        let heartbeat = manager
+            .runners
+            .lock()
+            .await
+            .get(&ctx.shard_id)
+            .and_then(|runner| runner.latency)
+            .map_or_else(
+                || "not measured yet".into(),
+                |duration| format!("{} ms", duration.as_millis()),
+            );
+        let report = |discord: &str, api: &str| {
+            format!(
+                "🏓 Pong!\nDiscord heartbeat: {heartbeat}\nDiscord round trip: {discord}\nSystem API: {api}"
+            )
+        };
+
+        let api = async {
+            let started = Instant::now();
+            let response = self
+                .web
+                .get(format!("{}/api/plural/system", self.local_origin))
+                .send()
+                .await;
+            let elapsed = started.elapsed().as_millis();
+
+            match response {
+                Ok(response) if response.status().is_success() => format!("{elapsed} ms"),
+                Ok(response) => format!("HTTP {} after {elapsed} ms", response.status().as_u16()),
+                Err(error) => format!("failed ({error})"),
+            }
+        };
+        let discord = async {
+            let started = Instant::now();
+            let response = discord::reply(
+                ctx,
+                message,
+                json!({
+                    "content": report("measuring…", "measuring…"),
+                }),
+            )
+            .await?;
+            Ok::<_, anyhow::Error>((response, format!("{} ms", started.elapsed().as_millis())))
+        };
+        let (api, discord) = tokio::join!(api, discord);
+        let (response, elapsed) = discord?;
+        ctx.http
+            .edit_message(
+                message.channel_id,
+                response,
+                &json!({
+                    "content": report(&elapsed, &api),
+                    "allowed_mentions": discord::user_mentions(),
+                }),
+                Vec::new(),
+            )
+            .await?;
+        Ok(())
+    }
+}
diff --git a/src/commands/reproxy/mod.rs b/src/commands/reproxy/mod.rs
new file mode 100644
index 0000000..d3f62c3
--- /dev/null
+++ b/src/commands/reproxy/mod.rs
@@ -0,0 +1,107 @@
+// src/commands/reproxy/mod.rs
+
+use serenity::all::{Context, Message};
+
+use crate::{
+    Bot,
+    discord::{
+        Destination, NO_TARGET, Target, attachment_links, attachment_spoilers, message_text,
+        proxy_payload, proxy_text, split_attachment_links,
+    },
+    proxy,
+    proxy_log::ProxyLog,
+};
+
+impl Bot {
+    pub(super) async fn reproxy(
+        &self,
+        ctx: &Context,
+        command: &Message,
+        args: &[String],
+    ) -> anyhow::Result<Option<String>> {
+        if args.is_empty() {
+            return Ok(Some(
+                self.command_text("Use `{prefix}reproxy <member>`, like `{prefix}reproxy c1`. Several work too: `{prefix}rp c1 c2`."),
+                ));
+        }
+
+        let speakers = match self.command_members(args).await {
+            Ok(found) => found,
+            Err(problem) => return Ok(Some(problem)),
+        };
+
+        let Some(Target {
+            message: target,
+            components,
+            classic,
+        }) = self.target(ctx, command).await?
+        else {
+            return Ok(Some(NO_TARGET.into()));
+        };
+        let guild = command.guild_id.unwrap();
+        let Some(dest) = Destination::resolve(ctx, command.channel_id, guild).await? else {
+            return Ok(Some("Can't use webhooks in this channel.".into()));
+        };
+
+        let (body, linked_uploads) = if classic {
+            let (body, links) = split_attachment_links(&target.content);
+            (body.to_owned(), links.to_owned())
+        } else {
+            proxy_text(&components)
+        };
+        let spoilers = attachment_spoilers(&target, &components);
+        let mut uploads = target.attachments.clone();
+
+        for upload in &mut uploads {
+            if spoilers.contains(&upload.id) && !upload.filename.starts_with("SPOILER_") {
+                upload.filename.insert_str(0, "SPOILER_");
+            }
+        }
+
+        let buttons = components
+            .into_iter()
+            .filter(|component| component["type"] == 1)
+            .collect();
+        let payload = proxy_payload(&body, &linked_uploads, buttons, false);
+
+        let slot = self.channel_webhook(&dest).await;
+        let mut locked = slot.lock().await;
+        let webhook = self.ensure_webhook(ctx, &dest, &mut locked).await?;
+        let replacement = self
+            .replace_proxy(
+                ctx,
+                &dest,
+                &webhook,
+                &speakers,
+                payload,
+                &uploads,
+                (guild, &target),
+            )
+            .await?;
+        drop(locked);
+        let Some((sent, _, attachments)) = replacement else {
+            return Ok(Some("The original message was already deleted.".into()));
+        };
+
+        let speaker_refs = speakers.iter().collect::<Vec<_>>();
+        let label = format!("Reproxied as {}", proxy::webhook_name(&speaker_refs, None));
+        let avatar = crate::avatars::log_avatar(&speakers).map(str::to_owned);
+        let links = message_text(&linked_uploads, &attachment_links(&attachments));
+        self.remember(sent, speakers).await;
+        self.log_proxy(
+            ctx,
+            guild,
+            ProxyLog {
+                source: &target,
+                sent,
+                label: &label,
+                content: &body,
+                links: &links,
+                avatar: avatar.as_deref(),
+            },
+        )
+        .await;
+        command.delete(&ctx.http).await?;
+        Ok(None)
+    }
+}
diff --git a/src/commands/switch/mod.rs b/src/commands/switch/mod.rs
new file mode 100644
index 0000000..a1f5770
--- /dev/null
+++ b/src/commands/switch/mod.rs
@@ -0,0 +1,36 @@
+// src/commands/switch/mod.rs
+
+use crate::{Bot, proxy};
+
+impl Bot {
+    pub(super) async fn switch(&self, args: &[String]) -> String {
+        if args.is_empty() {
+            return self.command_text("Use `{prefix}switch <member>`, like `{prefix}switch c1`, several like `{prefix}sw c1 c2`, or `{prefix}sw out`.");
+        }
+
+        if args == ["out"] {
+            return match self.switch_front(&[]).await {
+                Ok(()) => "Switched out. Nobody is fronting.".into(),
+                Err(problem) => problem,
+            };
+        }
+
+        let found = match self.command_members(args).await {
+            Ok(found) => found,
+            Err(problem) => return problem,
+        };
+
+        let ids = found
+            .iter()
+            .map(|member| member.id.as_str())
+            .collect::<Vec<_>>();
+
+        match self.switch_front(&ids).await {
+            Ok(()) => {
+                let speakers = found.iter().collect::<Vec<_>>();
+                format!("Switched in **{}**.", proxy::webhook_name(&speakers, None))
+            }
+            Err(problem) => problem,
+        }
+    }
+}
diff --git a/src/discord.rs b/src/discord.rs
new file mode 100644
index 0000000..b6e81a1
--- /dev/null
+++ b/src/discord.rs
@@ -0,0 +1,927 @@
+// src/discord.rs
+
+use std::collections::HashSet;
+use std::sync::Arc;
+use std::time::Instant;
+
+use percent_encoding::percent_decode_str;
+use secrecy::ExposeSecret;
+use anyhow::Context as _;
+use serde_json::{Value, json};
+use serenity::all::*;
+use serenity::http::{LightMethod, Request, Route};
+use tokio::sync::Mutex;
+
+use crate::{
+    Bot,
+    proxy_log::ProxyLog,
+    avatars::favicon_attachment,
+    cards::{self, COMPONENTS_V2},
+    proxy::{self, Member},
+};
+
+pub const NO_TARGET: &str =
+"No proxied message found. Reply to one, or send one in the last 50 messages.";
+
+pub fn user_mentions() -> Value {
+    json!({ "parse": ["users"], "replied_user": false })
+}
+
+pub fn owned(ctx: &Context, message: &Message) -> bool {
+    message.webhook_id.is_some()
+    && ctx
+    .http
+    .application_id()
+    .is_some_and(|id| Some(id) == message.application_id)
+}
+
+pub(crate) fn attachment_links(attachments: &[Attachment]) -> String {
+    attachment_links_with_spoilers(attachments, &HashSet::new())
+}
+
+pub(crate) fn attachment_links_with_spoilers(
+    attachments: &[Attachment],
+    spoilers: &HashSet<AttachmentId>,
+) -> String {
+    attachments
+    .iter()
+    .map(|attachment| {
+        let url = reqwest::Url::parse(&attachment.url)
+        .ok()
+        .filter(is_attachment_url)
+        .map(|mut url| {
+            url.set_query(None);
+            url.to_string()
+            })
+        .unwrap_or_else(|| attachment.url.clone());
+
+        if attachment.filename.starts_with("SPOILER_") || spoilers.contains(&attachment.id) {
+            format!("||{url}||")
+        } else {
+            url
+        }
+        })
+    .collect::<Vec<_>>()
+    .join("\n")
+}
+
+fn is_attachment_url(url: &reqwest::Url) -> bool {
+    matches!(url.host_str(), Some("cdn.discordapp.com" | "media.discordapp.net"))
+    && url.path().starts_with("/attachments/")
+}
+
+pub(crate) fn split_attachment_links(content: &str) -> (&str, &str) {
+    let (body, tail) = content.rsplit_once("\n\n").unwrap_or(("", content));
+
+    if !tail.is_empty()
+    && tail.lines().all(|line| {
+        let url = line
+        .strip_prefix("||")
+        .and_then(|line| line.strip_suffix("||"))
+        .unwrap_or(line);
+        reqwest::Url::parse(url).is_ok_and(|parsed| {
+            !url.contains(char::is_whitespace)
+            && parsed.query().is_none()
+            && is_attachment_url(&parsed)
+            })
+        })
+    {
+        (body, tail)
+    } else {
+        (content, "")
+    }
+}
+
+pub(crate) fn proxy_payload(
+    body: &str,
+    links: &str,
+    mut buttons: Vec<Value>,
+    force_v2: bool,
+) -> Value {
+    let content = message_text(body, links);
+
+    if !force_v2 && proxy::utf16_len(&content) <= 2000 {
+        return json!({
+            "content": content,
+            "components": buttons,
+        });
+    }
+
+    let mut components = text_displays(body, links, &content);
+    components.append(&mut buttons);
+    json!({
+        "flags": COMPONENTS_V2,
+        "components": components,
+    })
+}
+
+pub(crate) fn message_text(body: &str, links: &str) -> String {
+    if body.is_empty() || links.is_empty() {
+        format!("{body}{links}")
+    } else {
+        format!("{body}\n\n{links}")
+    }
+}
+
+pub(crate) fn text_displays(body: &str, links: &str, content: &str) -> Vec<Value> {
+    // Use separate text displays for the body and links if they exceed one display.
+    let mut components = Vec::new();
+
+    if proxy::utf16_len(&content) <= 4000 {
+        components.extend((!content.is_empty()).then(|| cards::text(&content)));
+    } else {
+        let mut remaining = body;
+
+        while !remaining.is_empty() {
+            let chunk = proxy::truncate(remaining, 4000);
+            components.push(cards::text(chunk));
+            remaining = &remaining[chunk.len()..];
+        }
+
+        let mut link_group = String::new();
+
+        for link in links.lines() {
+            if proxy::utf16_len(&link_group) + 1 + proxy::utf16_len(link) > 4000
+            && !link_group.is_empty()
+            {
+                components.push(cards::text(std::mem::take(&mut link_group)));
+            }
+
+            if !link_group.is_empty() {
+                link_group.push('\n');
+            }
+
+            link_group.push_str(link);
+        }
+
+        components.extend((!link_group.is_empty()).then(|| cards::text(link_group)));
+    }
+
+    components
+}
+
+pub(crate) fn proxy_text(components: &[Value]) -> (String, String) {
+    let mut body = Vec::new();
+    let mut links = Vec::new();
+
+    for content in components.iter().filter_map(|component| {
+        (component["type"] == 10)
+        .then(|| component["content"].as_str())
+        .flatten()
+        }) {
+        let (text, attachment_urls) = split_attachment_links(content);
+        body.extend((!text.is_empty()).then_some(text));
+        links.extend((!attachment_urls.is_empty()).then_some(attachment_urls));
+    }
+
+    (body.join(""), links.join("\n"))
+}
+
+fn is_thread(kind: ChannelType) -> bool {
+    matches!(
+        kind,
+        ChannelType::NewsThread | ChannelType::PublicThread | ChannelType::PrivateThread
+    )
+}
+
+pub async fn reference(ctx: &Context, message: &Message) -> Option<Message> {
+    let reference = message.message_reference.as_ref()?;
+
+    if reference.kind != MessageReferenceKind::Default {
+        return None;
+    }
+
+    if let Some(original) = &message.referenced_message {
+        return Some((**original).clone());
+    }
+
+    let mut target = fetch_target(ctx, reference.channel_id, reference.message_id?)
+    .await?
+    .message;
+    target.guild_id = target.guild_id.or(reference.guild_id).or(message.guild_id);
+    Some(target)
+}
+
+pub async fn reply(
+    ctx: &Context,
+    message: &Message,
+    mut payload: Value,
+) -> anyhow::Result<MessageId> {
+    payload["message_reference"] = json!({
+        "message_id": message.id,
+        "fail_if_not_exists": true,
+    });
+    payload["allowed_mentions"] = user_mentions();
+    let sent = send_json(ctx, message.channel_id, &payload).await?;
+    Ok(serde_json::from_value(sent["id"].clone())?)
+}
+
+pub async fn dm(ctx: &Context, user: UserId, components: Vec<Value>) -> anyhow::Result<Value> {
+    let channel = user.create_dm_channel(&ctx.http).await?;
+    send_json(
+        ctx,
+        channel.id,
+        &json!({
+            "flags": COMPONENTS_V2,
+            "components": components,
+            "allowed_mentions": { "parse": [] },
+        }),
+    )
+    .await
+}
+
+pub(crate) async fn send_json(ctx: &Context, channel_id: ChannelId, payload: &Value) -> anyhow::Result<Value> {
+    Ok(ctx
+        .http
+        .fire(
+            Request::new(Route::ChannelMessages { channel_id }, LightMethod::Post)
+            .body(Some(serde_json::to_vec(payload)?)),
+        )
+        .await?)
+}
+
+pub(crate) struct Target {
+    pub(crate) message: Message,
+    pub(crate) components: Vec<Value>,
+    pub(crate) classic: bool,
+}
+
+impl Target {
+    fn from_json(mut raw: Value) -> serde_json::Result<Self> {
+        let classic = raw["flags"].as_u64().unwrap_or_default() & u64::from(COMPONENTS_V2) == 0;
+        let components = raw
+        .as_object_mut()
+        .and_then(|object| object.remove("components"))
+        .and_then(|components| components.as_array().cloned())
+        .unwrap_or_default();
+        raw.as_object_mut()
+        .map(|object| object.remove("referenced_message"));
+        Ok(Self {
+            message: serde_json::from_value(raw)?,
+            components,
+            classic,
+            })
+    }
+}
+
+async fn fetch_target(
+    ctx: &Context,
+    channel_id: ChannelId,
+    message_id: MessageId,
+) -> Option<Target> {
+    let raw = ctx
+    .http
+    .fire::<Value>(Request::new(
+        Route::ChannelMessage {
+            channel_id,
+            message_id,
+        },
+        LightMethod::Get,
+        ))
+    .await
+    .ok()?;
+    Target::from_json(raw).ok()
+}
+
+pub(crate) struct Destination {
+    parent: ChannelId,
+    pub(crate) thread: Option<ChannelId>,
+}
+
+impl Destination {
+    pub(crate) async fn resolve(
+        ctx: &Context,
+        channel: ChannelId,
+        guild_id: GuildId,
+    ) -> anyhow::Result<Option<Self>> {
+        let cached = ctx
+        .cache
+        .guild(guild_id)
+        .and_then(|guild| guild.channels.get(&channel).cloned());
+        let guild = match cached {
+            Some(guild) => guild,
+            None => match channel.to_channel(&ctx.http).await? {
+                Channel::Guild(guild) => guild,
+                _ => return Ok(None),
+            },
+        };
+
+        if is_thread(guild.kind) {
+            return Ok(guild.parent_id.map(|parent| Self {
+                parent,
+                thread: Some(channel),
+                }));
+        }
+
+        if !matches!(
+            guild.kind,
+            ChannelType::Text | ChannelType::News | ChannelType::Voice | ChannelType::Stage
+        ) {
+            return Ok(None);
+        }
+
+        Ok(Some(Self {
+            parent: channel,
+            thread: None,
+            }))
+    }
+}
+
+pub(crate) type LockedWebhook = Arc<Mutex<Option<Webhook>>>;
+
+impl Bot {
+    pub(crate) async fn channel_webhook(&self, dest: &Destination) -> LockedWebhook {
+        self.webhooks
+        .lock()
+        .await
+        .entry(dest.parent)
+        .or_default()
+        .clone()
+    }
+
+    pub(crate) async fn ensure_webhook(
+        &self,
+        ctx: &Context,
+        dest: &Destination,
+        slot: &mut Option<Webhook>,
+    ) -> anyhow::Result<Webhook> {
+        if let Some(webhook) = slot {
+            return Ok(webhook.clone());
+        }
+
+        let bot = ctx.cache.current_user().id;
+        let existing = dest
+        .parent
+        .webhooks(&ctx.http)
+        .await?
+        .into_iter()
+        .find(|hook| {
+            hook.user.as_ref().is_some_and(|user| user.id == bot) && hook.token.is_some()
+            });
+        let webhook = match existing {
+            Some(webhook) => {
+                if let Err(error) = self.set_default_webhook_avatar(ctx, &webhook).await {
+                    eprintln!("Could not set the existing webhook avatar: {error}");
+                }
+                webhook
+            }
+            None => {
+                let webhook = dest.parent.create_webhook(
+                    &ctx.http,
+                    CreateWebhook::new("proxyBot").avatar(&favicon_attachment()),
+                ).await?;
+                self.remember_default_avatar(&webhook).await;
+                webhook
+            }
+        };
+        *slot = Some(webhook.clone());
+        Ok(webhook)
+    }
+
+    pub async fn proxy_message(
+        &self,
+        ctx: &Context,
+        message: &Message,
+        guild: GuildId,
+    ) -> anyhow::Result<()> {
+        let started = Instant::now();
+        let enabled = self
+        .settings
+        .lock()
+        .await
+        .guilds
+        .get(&guild)
+        .copied()
+        .unwrap_or(false);
+        let (speakers, content) = {
+            let state = self.system.read().await;
+            let fronters = if enabled {
+                state.fronters.as_slice()
+            } else {
+                &[]
+            };
+            let Some((speakers, content)) = proxy::pick(&state.members, fronters, &message.content)
+            else {
+                return Ok(());
+            };
+            (
+                speakers.into_iter().cloned().collect::<Vec<_>>(),
+                content.to_owned(),
+            )
+        };
+
+        if content.is_empty() && message.attachments.is_empty() {
+            return Ok(());
+        }
+
+        let Some(dest) = Destination::resolve(ctx, message.channel_id, guild).await? else {
+            return Ok(());
+        };
+
+        let buttons = reference(ctx, message)
+        .await
+        .map(|original| {
+            cards::link(
+                &format!("↪ {}", cards::display_name(&original)),
+                original.link(),
+            )
+            })
+        .into_iter()
+        .collect();
+        let payload = proxy_payload(&content, "", buttons, false);
+        let slot = self.channel_webhook(&dest).await;
+        let mut locked = slot.lock().await;
+        let webhook = self.ensure_webhook(ctx, &dest, &mut locked).await?;
+        let replacement = self
+            .replace_proxy(
+                ctx,
+                &dest,
+                &webhook,
+                &speakers,
+                payload,
+                &message.attachments,
+                (guild, message),
+            )
+            .await?;
+        drop(locked);
+        let Some((sent, send_ms, attachments)) = replacement else {
+            return Ok(());
+        };
+
+        let speaker_refs = speakers.iter().collect::<Vec<_>>();
+        let label = format!("Proxied as {}", proxy::webhook_name(&speaker_refs, None));
+        let avatar = crate::avatars::log_avatar(&speakers).map(str::to_owned);
+        let links = attachment_links(&attachments);
+        self.remember(sent, speakers).await;
+        println!(
+            "Proxied in {}ms (send {send_ms}ms)",
+            started.elapsed().as_millis()
+        );
+        self.log_proxy(
+            ctx,
+            guild,
+            ProxyLog {
+                source: message,
+                sent,
+                label: &label,
+                content: &content,
+                links: &links,
+                avatar: avatar.as_deref(),
+            },
+        )
+        .await;
+        Ok(())
+    }
+
+    pub(crate) async fn replace_proxy(
+        &self,
+        ctx: &Context,
+        dest: &Destination,
+        webhook: &Webhook,
+        speakers: &[Member],
+        mut payload: Value,
+        attachments: &[Attachment],
+        (guild, source): (GuildId, &Message),
+    ) -> anyhow::Result<Option<(MessageId, u128, Vec<Attachment>)>> {
+        let filenames = upload_layout(&mut payload, attachments);
+        let files = futures_util::future::try_join_all(
+            attachments
+            .iter()
+            .zip(filenames)
+            .map(|(attachment, filename)| async move {
+                let bytes = self
+                .web
+                .get(&attachment.url)
+                .send()
+                .await?
+                .error_for_status()?
+                .bytes()
+                .await?;
+                Ok::<_, reqwest::Error>(CreateAttachment::bytes(bytes.to_vec(), filename))
+                }),
+        )
+        .await
+        .map_err(reqwest::Error::without_url)?;
+
+        let tag = self.system.read().await.info.tag.clone();
+        let speakers_ref = speakers.iter().collect::<Vec<_>>();
+        payload["username"] = json!(proxy::webhook_name(&speakers_ref, tag.as_deref()));
+
+        let avatar = self.avatar(ctx, webhook, speakers).await;
+
+        if let Some(url) = &avatar {
+            payload["avatar_url"] = json!(url);
+        }
+
+        payload["allowed_mentions"] = user_mentions();
+
+        let token = webhook
+        .token
+        .as_ref()
+        .map(ExposeSecret::expose_secret)
+        .ok_or_else(|| anyhow::anyhow!("webhook had no token"))?;
+        let mut params = vec![
+            ("wait", "true".into()),
+            ("with_components", "true".into()),
+        ];
+
+        if let Some(thread) = dest.thread {
+            params.push(("thread_id", thread.to_string()));
+        }
+
+        let body = serde_json::to_vec(&payload)?;
+        let deletion = match self.delete_proxy_source(ctx, guild, source).await {
+            Ok(confirmation) => confirmation,
+            Err(error) if crate::proxy_log::unknown_message(&error) => return Ok(None),
+            Err(error) => return Err(error.into()),
+        };
+
+        let started = Instant::now();
+        let result = if files.is_empty() {
+            ctx.http.fire::<Value>(
+                Request::new(
+                    Route::WebhookWithToken {
+                        webhook_id: webhook.id,
+                        token,
+                    },
+                    LightMethod::Post,
+                )
+                .body(Some(body))
+                .params(Some(params)),
+            )
+            .await
+            .map_err(anyhow::Error::from)
+        } else {
+            self.upload_webhook(webhook.id, token, dest.thread, &payload, &files)
+                .await
+        };
+
+        if let Some(confirmation) = deletion {
+            confirmation.send_replace(Some(result.is_ok()));
+        }
+        let mut sent = result.context("Could not proxy the message after deleting the original")?;
+        Ok(Some((
+            serde_json::from_value(sent["id"].take())?,
+            started.elapsed().as_millis(),
+            serde_json::from_value(sent["attachments"].take())?,
+        )))
+    }
+
+    async fn upload_webhook(
+        &self,
+        webhook: WebhookId,
+        token: &str,
+        thread: Option<ChannelId>,
+        payload: &Value,
+        files: &[CreateAttachment],
+    ) -> anyhow::Result<Value> {
+        let mut url = reqwest::Url::parse("https://discord.com/api/v10/webhooks/")?;
+        url.path_segments_mut()
+        .expect("Discord API URL has a path")
+        .pop_if_empty()
+        .push(&webhook.to_string())
+        .push(token);
+        url.query_pairs_mut()
+        .append_pair("wait", "true")
+        .append_pair("with_components", "true");
+
+        if let Some(thread) = thread {
+            url.query_pairs_mut()
+            .append_pair("thread_id", &thread.to_string());
+        }
+
+        let payload_json = serde_json::to_string(payload)?;
+
+        for attempt in 0..3 {
+            let mut form =
+            reqwest::multipart::Form::new().text("payload_json", payload_json.clone());
+
+            for (index, file) in files.iter().enumerate() {
+                let part = reqwest::multipart::Part::bytes(file.data.clone())
+                .file_name(file.filename.clone());
+                form = form.part(format!("files[{index}]"), part);
+            }
+
+            let response = self
+            .web
+            .post(url.clone())
+            .multipart(form)
+            .send()
+            .await
+            .map_err(reqwest::Error::without_url)?;
+            let status = response.status();
+
+            if status == reqwest::StatusCode::TOO_MANY_REQUESTS && attempt < 2 {
+                let rate_limit = response
+                .json::<Value>()
+                .await
+                .map_err(reqwest::Error::without_url)?;
+
+                if let Some(seconds) = rate_limit["retry_after"].as_f64()
+                && (0.0..=60.0).contains(&seconds)
+                {
+                    tokio::time::sleep(std::time::Duration::from_secs_f64(seconds)).await;
+                    continue;
+                }
+            } else if status.is_success() {
+                return response
+                .json()
+                .await
+                .map_err(|error| error.without_url().into());
+            }
+
+            anyhow::bail!("Discord rejected webhook upload (HTTP {status})");
+        }
+
+        anyhow::bail!("Discord webhook upload exceeded the retry limit")
+    }
+
+    pub(crate) async fn target(
+        &self,
+        ctx: &Context,
+        command: &Message,
+    ) -> anyhow::Result<Option<Target>> {
+        if let Some(reference) = command
+        .message_reference
+        .as_ref()
+        .filter(|reference| reference.kind == MessageReferenceKind::Default)
+        {
+            let Some(id) = reference.message_id else {
+                return Ok(None);
+            };
+            return Ok(fetch_target(ctx, reference.channel_id, id)
+                .await
+                .filter(|target| owned(ctx, &target.message)));
+        }
+
+        let cached = ctx
+        .cache
+        .channel_messages(command.channel_id)
+        .and_then(|messages| {
+            messages
+            .values()
+            .filter(|message| message.id < command.id && owned(ctx, message))
+            .map(|message| message.id)
+            .max()
+            });
+
+        if let Some(id) = cached
+        && let Some(target) = fetch_target(ctx, command.channel_id, id).await
+        && owned(ctx, &target.message)
+        {
+            return Ok(Some(target));
+        }
+
+        let request = Request::new(
+            Route::ChannelMessages {
+                channel_id: command.channel_id,
+            },
+            LightMethod::Get,
+        )
+        .params(Some(vec![
+            ("before", command.id.to_string()),
+            ("limit", "50".into()),
+        ]));
+        let recent = ctx.http.fire::<Vec<Value>>(request).await?;
+        Ok(recent
+            .into_iter()
+            .filter_map(|raw| Target::from_json(raw).ok())
+            .find(|target| owned(ctx, &target.message)))
+    }
+}
+
+fn upload_layout(payload: &mut Value, attachments: &[Attachment]) -> Vec<String> {
+    if attachments.is_empty() {
+        return Vec::new();
+    }
+
+    let is_v2 = payload["flags"] == COMPONENTS_V2;
+    let mut metadata = Vec::new();
+    let mut filenames = Vec::new();
+    let mut gallery = Vec::new();
+    let mut files = Vec::new();
+
+    for (index, attachment) in attachments.iter().enumerate() {
+        let spoiler = attachment.filename.starts_with("SPOILER_");
+        let mut filename = attachment.filename.clone();
+
+        if is_v2 {
+            filename = filename.replace(
+                |character: char| !character.is_ascii_alphanumeric() && !"-_.".contains(character),
+                "_",
+            );
+            let prefix = if spoiler { "SPOILER_" } else { "" };
+
+            while filenames.contains(&filename) {
+                let name = filename.strip_prefix(prefix).unwrap_or(&filename);
+                filename = format!("{prefix}{index}-{name}");
+            }
+        }
+
+        let mut entry = json!({
+            "id": index,
+            "filename": filename,
+        });
+
+        if let Some(description) = &attachment.description {
+            entry["description"] = json!(description);
+        }
+
+        if is_v2 {
+            let media = json!({ "url": format!("attachment://{filename}") });
+            let kind = attachment.content_type.as_deref().unwrap_or_default();
+
+            if attachment.width.is_some() || kind.starts_with("image/") || kind.starts_with("video/") {
+                gallery.push(json!({
+                    "media": media,
+                    "spoiler": spoiler,
+                }));
+            } else {
+                files.push(json!({
+                    "type": 13,
+                    "file": media,
+                    "spoiler": spoiler,
+                }));
+            }
+        }
+
+        metadata.push(entry);
+        filenames.push(filename);
+    }
+
+    payload["attachments"] = json!(metadata);
+
+    if is_v2 {
+        let components = payload["components"].as_array_mut().unwrap();
+
+        if !gallery.is_empty() {
+            components.push(json!({
+                "type": 12,
+                "items": gallery,
+            }));
+        }
+
+        components.extend(files);
+    }
+
+    filenames
+}
+
+pub(crate) fn attachment_spoilers(
+    message: &Message,
+    components: &[Value],
+) -> HashSet<AttachmentId> {
+    let media = components.iter().flat_map(|component| {
+        component["items"]
+        .as_array()
+        .map(Vec::as_slice)
+        .unwrap_or_else(|| std::slice::from_ref(component))
+        });
+    let spoiler_paths = media
+    .filter(|item| item["spoiler"] == true)
+    .filter_map(|item| item["media"]["url"].as_str().or(item["file"]["url"].as_str()))
+    .map(|url| url.split('?').next().unwrap_or(url))
+    .collect::<HashSet<_>>();
+
+    message.attachments.iter()
+    .filter(|attachment| {
+        let url = &attachment.url;
+        spoiler_paths.contains(url.split('?').next().unwrap_or(url))
+        })
+    .map(|attachment| attachment.id)
+    .collect()
+}
+
+pub(crate) fn existing_media(
+    message: &Message,
+    mut components: Vec<Value>,
+    remove_text: bool,
+) -> (Vec<Value>, Vec<Value>) {
+    if remove_text {
+        components.retain(|component| component["type"] != 10);
+    }
+
+    let attachment_uri = |media: &mut Value| {
+        let Some(url) = media["url"].as_str() else {
+            return;
+        };
+        let Ok(parsed) = reqwest::Url::parse(url) else {
+            return;
+        };
+        let Some(last) = parsed
+        .path_segments()
+        .and_then(|mut parts| parts.next_back())
+        else {
+            return;
+        };
+        let name = percent_decode_str(last).decode_utf8_lossy();
+
+        if message.attachments.iter().any(|file| file.filename == name) {
+            *media = json!({ "url": format!("attachment://{name}") });
+        }
+    };
+
+    for component in &mut components {
+        match component["type"].as_u64() {
+            Some(12) => {
+                if let Some(items) = component["items"].as_array_mut() {
+                    for item in items {
+                        attachment_uri(&mut item["media"]);
+                    }
+                }
+            }
+            Some(13) => attachment_uri(&mut component["file"]),
+            _ => {}
+        }
+    }
+
+    let attachments = message
+    .attachments
+    .iter()
+    .map(|file| json!({ "id": file.id, "filename": file.filename }))
+    .collect();
+    (components, attachments)
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    #[test]
+    fn native_uploads_keep_spoilers_and_bind_v2_media_to_the_uploaded_file() {
+        let mut image = crate::tests::attachment("SPOILER_cat video.gif");
+        image["content_type"] = json!("image/gif");
+        image["description"] = json!("A cat");
+        let message = crate::tests::message("speaker", "", vec![image]);
+
+        let mut classic = proxy_payload("", "", Vec::new(), false);
+        assert_eq!(
+            upload_layout(&mut classic, &message.attachments),
+            ["SPOILER_cat video.gif"],
+        );
+        assert_eq!(classic["attachments"][0]["id"], 0);
+        assert_eq!(classic["attachments"][0]["description"], "A cat");
+
+        let mut v2 = proxy_payload("", "", Vec::new(), true);
+        assert_eq!(
+            upload_layout(&mut v2, &message.attachments),
+            ["SPOILER_cat_video.gif"],
+        );
+        assert_eq!(
+            v2["components"][0],
+            json!({
+                "type": 12,
+                "items": [{
+                    "media": { "url": "attachment://SPOILER_cat_video.gif" },
+                    "spoiler": true,
+                }],
+            }),
+        );
+    }
+
+    #[test]
+    fn edits_and_reproxies_keep_raw_components_and_attachment_links() {
+        let message = crate::tests::message(
+            "speaker",
+            "",
+            vec![
+                crate::tests::attachment("cat.png"),
+                crate::tests::attachment("notes v2.txt"),
+            ],
+        );
+        let components = vec![
+            cards::text("old"),
+            cards::link("Jump to reply", "https://discord.com/channels/1/2/3".into()),
+            json!({
+                "type": 12,
+                "items": [{
+                    "media": { "url": "https://cdn.example/cat.png?ex=abc", "proxy_url": "x" },
+                    "spoiler": true,
+                }],
+            }),
+            json!({ "type": 13, "file": { "url": "https://cdn.example/notes%20v2.txt" } }),
+        ];
+        let mut raw = serde_json::to_value(message).unwrap();
+        raw["components"] = json!(components);
+        raw["flags"] = json!(COMPONENTS_V2);
+        let target = Target::from_json(raw).unwrap();
+        assert!(!target.classic);
+
+        let (edited, attachments) =
+        existing_media(&target.message, target.components.clone(), true);
+        assert_eq!(edited.len(), 3);
+        assert_eq!(edited[0]["type"], 1);
+        assert_eq!(
+            edited[1]["items"][0],
+            json!({
+                "media": { "url": "attachment://cat.png" },
+                "spoiler": true,
+            })
+        );
+        assert_eq!(edited[2]["file"]["url"], "attachment://notes v2.txt");
+        assert_eq!(attachments.len(), 2);
+
+        let (reproxied, _) = existing_media(&target.message, target.components, false);
+        assert_eq!(reproxied[0]["content"], "old");
+    }
+}
diff --git a/src/http.rs b/src/http.rs
new file mode 100644
index 0000000..c4d2148
--- /dev/null
+++ b/src/http.rs
@@ -0,0 +1,341 @@
+// src/http.rs
+
+use std::{
+    collections::HashMap,
+    path::{Component, Path, PathBuf},
+    sync::Arc,
+};
+
+use futures_util::{SinkExt, StreamExt};
+use http_body_util::{BodyExt, Full, Limited};
+use hyper::{
+    Method, Request, Response, StatusCode,
+    body::{Bytes, Incoming},
+    header,
+    server::conn::http1,
+    service::service_fn,
+};
+use hyper_util::rt::TokioIo;
+use serde_json::{Value, json};
+use tokio::{net::TcpListener, sync::broadcast};
+use tokio_tungstenite::{
+    WebSocketStream,
+    tungstenite::{Message, handshake::derive_accept_key, protocol::Role},
+};
+
+use crate::{
+    storage_event,
+    store::{self, Store},
+    web_api,
+};
+
+pub type Reply = Response<Full<Bytes>>;
+pub type Query = HashMap<String, String>;
+pub const JPCL: &str = "application/jpcl";
+
+#[derive(Debug)]
+pub struct Error(pub StatusCode, pub String);
+
+impl Error {
+    pub fn invalid(message: impl Into<String>) -> Self {
+        Self(StatusCode::UNPROCESSABLE_ENTITY, message.into())
+    }
+
+    pub fn missing(message: impl Into<String>) -> Self {
+        Self(StatusCode::NOT_FOUND, message.into())
+    }
+}
+
+impl From<anyhow::Error> for Error {
+    fn from(error: anyhow::Error) -> Self {
+        eprintln!("System request failed: {error:#}");
+        Self(
+            StatusCode::INTERNAL_SERVER_ERROR,
+            "Internal server error".into(),
+        )
+    }
+}
+
+pub fn reply(status: StatusCode, mime: &str, content: impl Into<Bytes>) -> Reply {
+    Response::builder()
+        .status(status)
+        .header(header::CONTENT_TYPE, mime)
+        .header(header::X_CONTENT_TYPE_OPTIONS, "nosniff")
+        .body(Full::new(content.into()))
+        .expect("valid response")
+}
+
+pub fn document(
+    status: StatusCode,
+    value: &Value,
+    format: &str,
+    wrapper: &str,
+) -> Result<Reply, Error> {
+    match format {
+        "json" => Ok(reply(status, "application/json", value.to_string())),
+        // JSON flow syntax is also valid YAML 1.2.
+        "yml" => Ok(reply(status, "application/yaml", value.to_string())),
+        "jpcl" | "plain" => {
+            let value = if value.is_array() {
+                json!({ wrapper: value })
+            } else {
+                value.clone()
+            };
+            let mime = if format == "jpcl" {
+                JPCL
+            } else {
+                "text/plain; charset=utf-8"
+            };
+            Ok(reply(status, mime, store::encode(&value)?))
+        }
+        _ => Err(Error::invalid("Unknown response format")),
+    }
+}
+
+pub fn bearer(request: &Request<Incoming>) -> Option<&str> {
+    let (scheme, token) = request
+        .headers()
+        .get(header::AUTHORIZATION)?
+        .to_str()
+        .ok()?
+        .split_once(' ')?;
+    scheme.eq_ignore_ascii_case("bearer").then_some(token)
+}
+
+pub async fn body(request: &mut Request<Incoming>) -> Result<Value, Error> {
+    let jpcl = request
+        .headers()
+        .get(header::CONTENT_TYPE)
+        .and_then(|value| value.to_str().ok())
+        .is_some_and(|value| value.split(';').next() == Some(JPCL));
+    let bytes = bytes(request, 1024 * 1024).await?;
+    let value = if jpcl {
+        std::str::from_utf8(&bytes)
+            .ok()
+            .and_then(|text| store::decode(text).ok())
+    } else {
+        serde_json::from_slice(&bytes).ok()
+    };
+    value.filter(Value::is_object).ok_or_else(|| {
+        Error(
+            StatusCode::BAD_REQUEST,
+            "Expected a JPCL or JSON object".into(),
+        )
+    })
+}
+
+pub async fn bytes(request: &mut Request<Incoming>, limit: usize) -> Result<Bytes, Error> {
+    Limited::new(request.body_mut(), limit)
+        .collect()
+        .await
+        .map(|body| body.to_bytes())
+        .map_err(|_| {
+            Error(
+                StatusCode::PAYLOAD_TOO_LARGE,
+                "Could not read request body".into(),
+            )
+        })
+}
+
+pub async fn serve(listener: TcpListener, state: Arc<web_api::Web>) -> anyhow::Result<()> {
+    loop {
+        let (stream, _) = listener.accept().await?;
+        let state = state.clone();
+        tokio::spawn(connection(stream, state));
+    }
+}
+
+pub(crate) async fn connection(
+    stream: impl tokio::io::AsyncRead + tokio::io::AsyncWrite + Send + Unpin + 'static,
+    state: Arc<web_api::Web>,
+) {
+    let service = service_fn(move |request| {
+        let state = state.clone();
+        async move { Ok::<_, std::convert::Infallible>(handle(request, state).await) }
+    });
+    let _ = http1::Builder::new()
+        .serve_connection(TokioIo::new(stream), service)
+        .with_upgrades()
+        .await;
+}
+
+async fn handle(mut request: Request<Incoming>, state: Arc<web_api::Web>) -> Reply {
+    let query: Query = reqwest::Url::parse("http://localhost/")
+        .map(|mut url| {
+            url.set_query(request.uri().query());
+            url.query_pairs().into_owned().collect()
+        })
+        .unwrap_or_default();
+    let request_path = request.uri().path().to_owned();
+    let path: Vec<_> = request_path
+        .trim_start_matches('/')
+        .split('/')
+        .map(|part| percent_encoding::percent_decode_str(part).decode_utf8())
+        .collect::<Result<_, _>>()
+        .unwrap_or_default();
+    let path: Vec<_> = path.iter().map(|part| part.as_ref()).collect();
+    let wants_jpcl = request
+        .headers()
+        .get(header::ACCEPT)
+        .and_then(|value| value.to_str().ok())
+        .is_some_and(|value| {
+            value
+                .split(',')
+                .any(|entry| entry.trim().eq_ignore_ascii_case(JPCL))
+        });
+    let error_format = if wants_jpcl { "jpcl" } else { "json" };
+
+    let result = match path.as_slice() {
+        ["api", "plural", "ws"] if request.method() == Method::GET => {
+            websocket(&mut request, &state.store)
+        }
+        ["api", "plural", rest @ ..] => {
+            web_api::route(&state, &mut request, rest, &query, wants_jpcl).await
+        }
+        ["api", "openapi.json" | "openapi.jp"] => web_api::openapi(&state, &request, path[1]).await,
+        ["api", ..] => Err(Error::missing("Unknown route")),
+        _ if *request.method() == Method::GET || *request.method() == Method::HEAD => {
+            static_file(&state.web_root, &path).await
+        }
+        _ => Err(Error::missing("Unknown route")),
+    };
+
+    let mut response = match result {
+        Ok(response) => response,
+        Err(Error(status, message)) => {
+            let mut response = document(status, &json!({ "detail": message }), error_format, "")
+                .unwrap_or_else(|_| {
+                    reply(
+                        StatusCode::INTERNAL_SERVER_ERROR,
+                        "text/plain",
+                        "Internal server error",
+                    )
+                });
+            if status == StatusCode::UNAUTHORIZED {
+                response.headers_mut().insert(
+                    header::WWW_AUTHENTICATE,
+                    header::HeaderValue::from_static("Bearer"),
+                );
+            }
+            response
+        }
+    };
+    if path.first() == Some(&"api") && response.status() != StatusCode::SWITCHING_PROTOCOLS {
+        response
+            .headers_mut()
+            .insert(header::VARY, header::HeaderValue::from_static("Accept"));
+        response.headers_mut().insert(
+            header::CACHE_CONTROL,
+            header::HeaderValue::from_static("no-store"),
+        );
+    }
+    if request.method() == Method::HEAD {
+        *response.body_mut() = Full::default();
+    }
+    response
+}
+
+async fn static_file(root: &Path, segments: &[&str]) -> Result<Reply, Error> {
+    let mut path = PathBuf::from(root);
+    for segment in segments.iter().filter(|segment| !segment.is_empty()) {
+        let mut components = Path::new(segment).components();
+        if !matches!(components.next(), Some(Component::Normal(_)))
+            || components.next().is_some()
+            || segment.starts_with('.')
+            || segment.contains(['/', '\\'])
+        {
+            return Err(Error::missing("File not found"));
+        }
+        path.push(segment);
+    }
+
+    if let Ok(content) = tokio::fs::read(&path).await {
+        return Ok(reply(
+            StatusCode::OK,
+            mime_guess::from_path(path)
+                .first_or_octet_stream()
+                .essence_str(),
+            content,
+        ));
+    }
+    if segments.first() == Some(&"_app")
+        || segments.last().is_some_and(|segment| segment.contains('.'))
+    {
+        return Err(Error::missing("File not found"));
+    }
+    let content = tokio::fs::read(root.join("index.html"))
+        .await
+        .map_err(|_| {
+            Error(
+                StatusCode::SERVICE_UNAVAILABLE,
+                "Build the website in web/ first".into(),
+            )
+        })?;
+    Ok(reply(StatusCode::OK, "text/html; charset=utf-8", content))
+}
+
+fn websocket(request: &mut Request<Incoming>, store: &Arc<Store>) -> Result<Reply, Error> {
+    let has_token = |name, token: &str| {
+        request
+            .headers()
+            .get(name)
+            .and_then(|value| value.to_str().ok())
+            .is_some_and(|value| {
+                value
+                    .split(',')
+                    .any(|entry| entry.trim().eq_ignore_ascii_case(token))
+            })
+    };
+    let key = request
+        .headers()
+        .get(header::SEC_WEBSOCKET_KEY)
+        .filter(|_| {
+            has_token(header::UPGRADE, "websocket")
+                && has_token(header::CONNECTION, "upgrade")
+                && has_token(header::SEC_WEBSOCKET_VERSION, "13")
+        })
+        .ok_or_else(|| Error(StatusCode::BAD_REQUEST, "WebSocket upgrade required".into()))?;
+    let accept = derive_accept_key(key.as_bytes());
+    let jpcl = has_token(header::SEC_WEBSOCKET_PROTOCOL, "jpcl");
+    let mut events = store.events.subscribe();
+    let upgrade = hyper::upgrade::on(request);
+
+    tokio::spawn(async move {
+        let Ok(stream) = upgrade.await else { return };
+        let mut socket =
+            WebSocketStream::from_raw_socket(TokioIo::new(stream), Role::Server, None).await;
+        loop {
+            let outgoing = tokio::select! {
+                frame = socket.next() => match frame {
+                    Some(Ok(Message::Text(text))) if text == "ping" => Message::Text("pong".into()),
+                    Some(Ok(Message::Ping(payload))) => Message::Pong(payload),
+                    Some(Ok(Message::Close(_)) | Err(_)) | None => break,
+                    _ => continue,
+                },
+                event = events.recv() => {
+                    let event = match event {
+                        Ok(event) => event,
+                        Err(broadcast::error::RecvError::Lagged(_)) => storage_event("force_refresh", Value::Null),
+                        Err(broadcast::error::RecvError::Closed) => break,
+                    };
+                    let text = if jpcl { store::encode(&event) } else { Ok(event.to_string()) };
+                    let Ok(text) = text else { continue };
+                    Message::Text(text)
+                }
+            };
+            if socket.send(outgoing).await.is_err() {
+                break;
+            }
+        }
+    });
+
+    let mut response = Response::builder()
+        .status(StatusCode::SWITCHING_PROTOCOLS)
+        .header(header::UPGRADE, "websocket")
+        .header(header::CONNECTION, "upgrade")
+        .header(header::SEC_WEBSOCKET_ACCEPT, accept);
+    if jpcl {
+        response = response.header(header::SEC_WEBSOCKET_PROTOCOL, "jpcl");
+    }
+    Ok(response.body(Full::default()).expect("valid handshake"))
+}
diff --git a/src/import.rs b/src/import.rs
new file mode 100644
index 0000000..8b1c5e7
--- /dev/null
+++ b/src/import.rs
@@ -0,0 +1,105 @@
+// src/import.rs
+
+use anyhow::{Context, Result};
+use serde_json::{Value, json};
+
+use crate::store::{self, Data};
+
+pub fn from_d1(source: &[u8]) -> Result<Data> {
+    let queries: Vec<Value> = serde_json::from_slice(source)?;
+    anyhow::ensure!(
+        queries.len() == 4,
+        "Expected D1 query results for systems, members, switches and kv"
+    );
+    let rows = |index: usize| {
+        queries[index]["results"]
+            .as_array()
+            .cloned()
+            .filter(|_| queries[index]["success"] != false)
+            .context("Missing D1 query results")
+    };
+
+    let mut systems = rows(0)?;
+    anyhow::ensure!(systems.len() == 1, "Expected a single system in the export");
+    let mut system = systems.remove(0);
+    decode_column(&mut system, "privacy", json!({}))?;
+
+    let mut members = rows(1)?;
+    for member in &mut members {
+        let system_id = member
+            .as_object_mut()
+            .context("Invalid D1 member")?
+            .remove("system_id")
+            .context("Missing member system_id")?;
+        member["system"] = system_id;
+        member["keep_proxy"] = json!(member["keep_proxy"] == 1 || member["keep_proxy"] == true);
+        if !member["autoproxy_enabled"].is_null() {
+            member["autoproxy_enabled"] =
+                json!(member["autoproxy_enabled"] == 1 || member["autoproxy_enabled"] == true);
+        }
+        decode_column(member, "privacy", json!({}))?;
+        decode_column(member, "proxy_tags", json!([]))?;
+    }
+
+    let mut switches = rows(2)?;
+    for entry in &mut switches {
+        entry
+            .as_object_mut()
+            .context("Invalid D1 switch")?
+            .remove("system_id");
+        decode_column(entry, "members", json!([]))?;
+    }
+
+    let mut data = Data {
+        system: Some(system),
+        members,
+        switches,
+        ..Data::default()
+    };
+    for entry in rows(3)? {
+        let Some(key) = entry["key"].as_str() else {
+            continue;
+        };
+        let value = || -> Result<Value> {
+            let text = entry["value"].as_str().context("Missing D1 value")?;
+            decode_value(text).with_context(|| format!("Invalid stored {key}"))
+        };
+        match key {
+            "member_tags" => data.member_tags = serde_json::from_value(value()?)?,
+            "member_pride" => data.member_pride = serde_json::from_value(value()?)?,
+            "member_status" => data.member_status = serde_json::from_value(value()?)?,
+            "member_relationships" => data.relationships = serde_json::from_value(value()?)?,
+            "mental_state" => data.mental_state = serde_json::from_value(value()?)?,
+            "users" => {
+                data.users = serde_json::from_value(value()?)?;
+                for user in &mut data.users {
+                    let user = user.as_object_mut().context("Invalid D1 user")?;
+                    for field in ["password_hash", "pocket_id", "sso_issuer", "is_pet"] {
+                        user.remove(field);
+                    }
+                }
+            }
+            _ => {}
+        }
+    }
+    Ok(data)
+}
+
+fn decode_column(row: &mut Value, name: &str, default: Value) -> Result<()> {
+    row[name] = match row[name].as_str() {
+        Some(text) => decode_value(text).with_context(|| format!("Invalid stored {name}"))?,
+        None if row[name].is_null() => default,
+        None => row[name].clone(),
+    };
+    Ok(())
+}
+
+fn decode_value(text: &str) -> Result<Value> {
+    if text.starts_with("jpcl: 1\n") {
+        return store::decode(text)?
+            .get("value")
+            .cloned()
+            .context("Missing JPCL value");
+    }
+    Ok(serde_json::from_str(text)?)
+}
diff --git a/src/main.rs b/src/main.rs
new file mode 100644
index 0000000..c896fbf
--- /dev/null
+++ b/src/main.rs
@@ -0,0 +1,448 @@
+// src/main.rs
+
+mod avatars;
+
+mod cards;
+
+mod commands;
+
+mod discord;
+
+mod proxy;
+
+mod proxy_log;
+
+mod settings;
+
+mod site;
+
+mod http;
+mod import;
+mod metrics;
+mod store;
+mod web_api;
+mod web_auth;
+mod web_media;
+
+#[cfg(test)]
+mod tests;
+
+#[cfg(test)]
+mod web_tests;
+
+use std::collections::{HashMap, VecDeque};
+use std::sync::Arc;
+use std::sync::atomic::{AtomicBool, Ordering};
+use std::time::{Duration, Instant};
+
+use anyhow::Context as _;
+use serenity::all::*;
+use tokio::sync::{Mutex, OnceCell, RwLock};
+
+use avatars::Avatars;
+use proxy::Member;
+use settings::Settings;
+use site::System;
+
+type WebhookCache = HashMap<ChannelId, Arc<Mutex<Option<Webhook>>>>;
+
+struct Bot {
+    owner: UserId,
+    command_prefix: String,
+    store: Arc<store::Store>,
+    local_origin: String,
+    public_origin: Option<String>,
+    web: reqwest::Client,
+    system: RwLock<System>,
+    settings: Mutex<Settings>,
+    webhooks: Mutex<WebhookCache>,
+    avatars: Arc<Avatars>,
+    activity: Mutex<HashMap<ChannelId, Instant>>,
+    senders: Mutex<VecDeque<(MessageId, Vec<Member>)>>,
+    proxy_deletions: Mutex<proxy_log::RecentDeletions>,
+    shards: OnceCell<Arc<ShardManager>>,
+    started: AtomicBool,
+}
+
+impl Bot {
+    async fn remember(&self, message: MessageId, members: Vec<Member>) {
+        let mut senders = self.senders.lock().await;
+
+        if senders.len() == 1000 {
+            senders.pop_front();
+        }
+
+        senders.push_back((message, members));
+    }
+
+    async fn mark_active(&self, channel: ChannelId) {
+        self.activity.lock().await.insert(channel, Instant::now());
+    }
+
+    async fn update_settings(&self, change: impl FnOnce(&mut Settings)) -> anyhow::Result<()> {
+        let mut settings = self.settings.lock().await;
+        let mut updated = settings.clone();
+        change(&mut updated);
+
+        if updated != *settings {
+            updated.save()?;
+            *settings = updated;
+        }
+
+        Ok(())
+    }
+
+    async fn on_message(&self, ctx: &Context, message: &Message) -> anyhow::Result<()> {
+        let Some(guild) = message.guild_id else {
+            return Ok(());
+        };
+
+        if message.webhook_id.is_some() || message.author.bot {
+            return self.clean_proxy_log(ctx, message, guild).await;
+        }
+
+        if message.author.id == self.owner {
+            self.mark_active(message.channel_id).await;
+
+            if !self.command(ctx, message, guild).await? {
+                self.proxy_message(ctx, message, guild).await?;
+            }
+        } else {
+            if proxy::command(&message.content, &self.command_prefix)
+                .is_some_and(|(name, _, _)| matches!(name.as_str(), "log" | "logclean"))
+            {
+                self.command(ctx, message, guild).await?;
+                return Ok(());
+            }
+
+            let active = self
+                .activity
+                .lock()
+                .await
+                .get(&message.channel_id)
+                .is_some_and(|seen| seen.elapsed() < Duration::from_secs(300));
+
+            if !active
+                && let Some(target) = discord::reference(ctx, message).await
+                && discord::owned(ctx, &target)
+            {
+                discord::dm(ctx, self.owner, cards::reply(message, &target)).await?;
+            }
+        }
+
+        Ok(())
+    }
+
+    async fn on_reaction(
+        &self,
+        ctx: &Context,
+        reaction: &Reaction,
+        user: UserId,
+    ) -> anyhow::Result<()> {
+        let ReactionType::Unicode(emoji) = &reaction.emoji else {
+            return Ok(());
+        };
+
+        if !matches!(emoji.as_str(), "❌" | "❓") || (emoji == "❌" && user != self.owner) {
+            return Ok(());
+        }
+
+        let bot = match &reaction.member {
+            Some(member) => member.user.bot,
+            None => user.to_user(ctx).await?.bot,
+        };
+
+        if bot {
+            return Ok(());
+        }
+
+        let message = reaction
+            .channel_id
+            .message(&ctx.http, reaction.message_id)
+            .await?;
+
+        let is_proxied = discord::owned(ctx, &message);
+
+        if emoji == "❌" {
+            let is_bot_message =
+                message.webhook_id.is_none() && message.author.id == ctx.cache.current_user().id;
+            if is_proxied || is_bot_message {
+                message.delete(&ctx.http).await?;
+            }
+            return Ok(());
+        }
+
+        if !is_proxied {
+            return Ok(());
+        }
+
+        let members = self
+            .senders
+            .lock()
+            .await
+            .iter()
+            .rev()
+            .find(|(id, _)| *id == message.id)
+            .map(|(_, members)| members.clone());
+        let system_name = self.system.read().await.info.name.clone();
+        let result = discord::dm(
+            ctx,
+            user,
+            cards::info(
+                &message,
+                members.as_deref(),
+                self.owner,
+                system_name.as_deref(),
+                self.public_origin.as_deref(),
+            ),
+        )
+        .await;
+
+        let _ = ctx
+            .http
+            .delete_reaction(reaction.channel_id, message.id, user, &reaction.emoji)
+            .await;
+
+        if let Err(error) = result
+            && !matches!(error.downcast_ref::<serenity::Error>(), Some(serenity::Error::Http(HttpError::UnsuccessfulRequest(response))) if response.error.code == 50007)
+        {
+            return Err(error);
+        }
+
+        Ok(())
+    }
+}
+
+struct Handler(Arc<Bot>);
+
+#[serenity::async_trait]
+impl EventHandler for Handler {
+    async fn ready(&self, ctx: Context, ready: Ready) {
+        ctx.http.set_application_id(ready.application.id);
+        ctx.set_activity(Some(ActivityData::custom(proxy::fronting_status(
+            &self.0.system.read().await.fronters,
+        ))));
+        println!("Logged in as {}", ready.user.name);
+
+        let ids: std::collections::HashSet<_> = ready.guilds.iter().map(|guild| guild.id).collect();
+
+        if let Err(error) = self
+            .0
+            .update_settings(|settings| {
+                settings.guilds.retain(|guild, _| ids.contains(guild));
+                settings.proxy_logs.retain(|guild, _| ids.contains(guild));
+
+                for guild in ids {
+                    settings.guilds.entry(guild).or_default();
+                }
+            })
+            .await
+        {
+            eprintln!("Guild sync failed: {error}");
+        }
+
+        if !self.0.started.swap(true, Ordering::Relaxed) {
+            tokio::spawn(self.0.clone().live(ctx.clone()));
+            let bot = self.0.clone();
+            tokio::spawn(async move {
+                bot.set_bot_avatar(&ctx, ready.user).await;
+            });
+        }
+    }
+
+    async fn guild_create(&self, _ctx: Context, guild: Guild, _is_new: Option<bool>) {
+        if let Err(error) = self
+            .0
+            .update_settings(|settings| {
+                settings.guilds.entry(guild.id).or_default();
+            })
+            .await
+        {
+            eprintln!("Guild add failed: {error}");
+        }
+    }
+
+    async fn guild_delete(&self, _ctx: Context, guild: UnavailableGuild, _full: Option<Guild>) {
+        if !guild.unavailable
+            && let Err(error) = self
+                .0
+                .update_settings(|settings| {
+                    settings.guilds.remove(&guild.id);
+                    settings.proxy_logs.remove(&guild.id);
+                })
+                .await
+        {
+            eprintln!("Guild remove failed: {error}");
+        }
+    }
+
+    async fn message(&self, ctx: Context, message: Message) {
+        if let Err(error) = self.0.on_message(&ctx, &message).await {
+            eprintln!("Message handling failed: {error}");
+        }
+    }
+
+    async fn reaction_add(&self, ctx: Context, reaction: Reaction) {
+        if let Some(user) = reaction.user_id {
+            if user == self.0.owner {
+                self.0.mark_active(reaction.channel_id).await;
+            }
+
+            if let Err(error) = self.0.on_reaction(&ctx, &reaction, user).await {
+                eprintln!("Reaction handling failed: {error}");
+            }
+        }
+    }
+
+    async fn typing_start(&self, _ctx: Context, event: TypingStartEvent) {
+        if event.user_id == self.0.owner {
+            self.0.mark_active(event.channel_id).await;
+        }
+    }
+}
+
+#[tokio::main]
+async fn main() -> anyhow::Result<()> {
+    match dotenvy::from_path(".env") {
+        Ok(()) => {}
+        Err(dotenvy::Error::Io(error)) if error.kind() == std::io::ErrorKind::NotFound => {}
+        Err(error) => return Err(error).context("could not load .env"),
+    }
+
+    let mut arguments = std::env::args_os().skip(1);
+    let data_path = std::path::PathBuf::from("data/system.jp");
+    if let Some(command) = arguments.next() {
+        anyhow::ensure!(
+            command == "--import-d1",
+            "usage: proxybot [--import-d1 <query-results.json>]"
+        );
+        let source = arguments
+            .next()
+            .context("--import-d1 requires a JSON export path")?;
+        anyhow::ensure!(
+            arguments.next().is_none(),
+            "--import-d1 takes one export path"
+        );
+        let data = import::from_d1(&std::fs::read(source)?)?;
+        store::Store::import(&data_path, data)?;
+        println!("Imported {}", data_path.display());
+        return Ok(());
+    }
+
+    let bind = std::env::var("BIND_ADDR").unwrap_or_else(|_| "127.0.0.1:3000".into());
+    let listener = tokio::net::TcpListener::bind(&bind)
+        .await
+        .context("could not bind the System HTTP server")?;
+    let address = listener.local_addr()?;
+    let local_address = match address.ip() {
+        std::net::IpAddr::V4(ip) if ip.is_unspecified() => {
+            std::net::SocketAddr::from((std::net::Ipv4Addr::LOCALHOST, address.port()))
+        }
+        std::net::IpAddr::V6(ip) if ip.is_unspecified() => {
+            std::net::SocketAddr::from((std::net::Ipv6Addr::LOCALHOST, address.port()))
+        }
+        _ => address,
+    };
+    let local_origin = format!("http://{local_address}");
+    let store = Arc::new(store::Store::open(data_path)?);
+    store.initialize_system().await?;
+    let auth = web_auth::Auth::from_env();
+    auth.seed_owner(&store).await?;
+    let web = Arc::new(web_api::Web {
+        store: store.clone(),
+        web_root: "web/dist".into(),
+        auth,
+    });
+    println!("System listening on http://{address}");
+
+    let Some(token) = web_auth::nonempty_env("DISCORD_TOKEN") else {
+        return http::serve(listener, web).await;
+    };
+
+    tokio::select! {
+        result = http::serve(listener, web) => result,
+        result = run_bot(token, store, local_origin) => result,
+    }
+}
+
+pub fn storage_event(kind: &str, data: serde_json::Value) -> serde_json::Value {
+    serde_json::json!({ "type": kind, "data": data })
+}
+
+async fn run_bot(
+    token: String,
+    store: Arc<store::Store>,
+    local_origin: String,
+) -> anyhow::Result<()> {
+    let owner = std::env::var("OWNER_ID")
+        .context("OWNER_ID is required")?
+        .parse::<UserId>()
+        .context("OWNER_ID must be a Discord user ID")?;
+    let public_origin = web_auth::nonempty_env("PUBLIC_URL")
+        .map(|value| {
+            let url = reqwest::Url::parse(&value).context("PUBLIC_URL must be an absolute URL")?;
+            anyhow::ensure!(
+                matches!(url.scheme(), "http" | "https")
+                    && url.host().is_some()
+                    && url.username().is_empty()
+                    && url.password().is_none()
+                    && url.path() == "/"
+                    && url.query().is_none()
+                    && url.fragment().is_none(),
+                "PUBLIC_URL must be an HTTP or HTTPS origin"
+            );
+            Ok::<_, anyhow::Error>(url.origin().ascii_serialization())
+        })
+        .transpose()?;
+    let settings = Settings::load(Settings::PATH).context("could not load data/settings.jp")?;
+
+    let command_prefix = match std::env::var("COMMAND_PREFIX") {
+        Ok(prefix) => prefix,
+        Err(std::env::VarError::NotPresent) => proxy::DEFAULT_COMMAND_PREFIX.to_owned(),
+        Err(error) => return Err(error).context("could not read COMMAND_PREFIX"),
+    };
+    anyhow::ensure!(
+        !command_prefix.is_empty()
+            && !command_prefix.chars().any(|character| {
+                character.is_whitespace() || character.is_control() || character == '`'
+            }),
+        "COMMAND_PREFIX must be non-empty and contain no whitespace, control characters, or backticks"
+    );
+
+    let bot = Arc::new(Bot {
+        owner,
+        command_prefix,
+        store,
+        local_origin,
+        public_origin,
+        web: reqwest::Client::builder()
+            .timeout(Duration::from_secs(15))
+            .build()?,
+        system: RwLock::default(),
+        settings: Mutex::new(settings),
+        webhooks: Mutex::default(),
+        avatars: Arc::default(),
+        activity: Mutex::default(),
+        senders: Mutex::default(),
+        proxy_deletions: Mutex::default(),
+        shards: OnceCell::new(),
+        started: AtomicBool::new(false),
+    });
+    bot.initial_refresh().await;
+
+    let intents = GatewayIntents::GUILDS
+        | GatewayIntents::GUILD_MESSAGES
+        | GatewayIntents::MESSAGE_CONTENT
+        | GatewayIntents::GUILD_MESSAGE_REACTIONS
+        | GatewayIntents::GUILD_MESSAGE_TYPING;
+    let mut cache = serenity::cache::Settings::default();
+    cache.max_messages = 200;
+    let mut client = Client::builder(token, intents)
+        .event_handler(Handler(bot.clone()))
+        .cache_settings(cache)
+        .await?;
+    // Set before the first gateway event can be processed.
+    let _ = bot.shards.set(client.shard_manager.clone());
+    client.start().await?;
+    Ok(())
+}
diff --git a/src/metrics.rs b/src/metrics.rs
new file mode 100644
index 0000000..0c2c2b1
--- /dev/null
+++ b/src/metrics.rs
@@ -0,0 +1,102 @@
+// src/metrics.rs
+
+use std::collections::BTreeMap;
+
+use chrono::{DateTime, Utc};
+use serde_json::{Value, json};
+
+use crate::store::Data;
+
+const WINDOWS: [(&str, i64); 5] = [
+    ("24h", 86_400),
+    ("48h", 172_800),
+    ("5d", 432_000),
+    ("7d", 604_800),
+    ("30d", 2_592_000),
+];
+
+pub fn calculate(data: &Data, kind: &str, days: usize) -> Value {
+    let now = Utc::now().timestamp_millis();
+    let cutoff = now - days as i64 * 86_400_000;
+    let mut switches: Vec<_> = data
+        .switches()
+        .into_iter()
+        .take(1000)
+        .filter_map(|entry| {
+            let timestamp = DateTime::parse_from_rfc3339(entry["timestamp"].as_str()?)
+                .ok()?
+                .timestamp_millis();
+            (cutoff <= timestamp && timestamp <= now).then_some((timestamp, entry))
+        })
+        .collect();
+
+    if kind == "switch-frequency" {
+        let mut timeframes = serde_json::Map::new();
+        for (name, seconds) in WINDOWS {
+            let count = if name == "30d" {
+                switches.len()
+            } else {
+                switches
+                    .iter()
+                    .filter(|(timestamp, _)| now - timestamp <= seconds * 1000)
+                    .count()
+            };
+            timeframes.insert(name.into(), json!(count));
+        }
+        return json!({
+            "total_switches": switches.len(),
+            "avg_switches_per_day": switches.len() as f64 / days as f64,
+            "timeframes": timeframes,
+        });
+    }
+
+    switches.reverse();
+    let mut total_time = 0.;
+    let mut totals = BTreeMap::<&str, [f64; 6]>::new();
+    for (index, (started, entry)) in switches.iter().enumerate() {
+        let ended = switches
+            .get(index + 1)
+            .map(|(timestamp, _)| *timestamp)
+            .unwrap_or(now);
+        let duration = (ended - started) as f64 / 1000.;
+        total_time += duration;
+        for id in entry["members"]
+            .as_array()
+            .into_iter()
+            .flatten()
+            .filter_map(Value::as_str)
+        {
+            let member_totals = totals.entry(id).or_default();
+            member_totals[0] += duration;
+            for (window, (_, seconds)) in WINDOWS.iter().enumerate() {
+                if now - started <= seconds * 1000 {
+                    member_totals[window + 1] += duration;
+                }
+            }
+        }
+    }
+
+    let mut timeframes = json!({ "24h": {}, "48h": {}, "5d": {}, "7d": {}, "30d": {} });
+    let mut members = serde_json::Map::new();
+    for (id, times) in totals {
+        let member = data
+            .member_index(id)
+            .map(|index| data.member(&data.members[index]))
+            .unwrap_or_default();
+        let name = member["name"].as_str().unwrap_or(id);
+        let mut entry = json!({
+            "id": id,
+            "name": name,
+            "display_name": member["display_name"].as_str().unwrap_or(name),
+            "avatar_url": member["avatar_url"],
+            "total_seconds": times[0],
+            "total_percent": if total_time > 0. { times[0] / total_time * 100. } else { 0. },
+        });
+        for (index, (window, _)) in WINDOWS.iter().enumerate() {
+            entry[*window] = json!(times[index + 1]);
+            timeframes[*window][id] = json!(times[index + 1]);
+        }
+        members.insert(id.into(), entry);
+    }
+    json!({ "total_time": total_time, "members": members, "timeframes": timeframes })
+}
diff --git a/src/proxy.rs b/src/proxy.rs
new file mode 100644
index 0000000..3040f9c
--- /dev/null
+++ b/src/proxy.rs
@@ -0,0 +1,193 @@
+// src/proxy.rs
+
+use regex::Regex;
+use serde::Deserialize;
+use std::sync::LazyLock;
+
+#[derive(Clone, Debug, Default, Deserialize)]
+pub struct Member {
+    pub id: String,
+    pub name: String,
+    pub display_name: Option<String>,
+    pub pronouns: Option<String>,
+    pub color: Option<String>,
+    pub description: Option<String>,
+    #[serde(default)]
+    pub tags: Vec<String>,
+    #[serde(default)]
+    pub pride: Vec<String>,
+    pub status: Option<MemberStatus>,
+    pub avatar_url: Option<String>,
+    pub webhook_avatar_url: Option<String>,
+    #[serde(default)]
+    pub proxy_tags: Vec<ProxyTag>,
+    #[serde(default)]
+    pub keep_proxy: bool,
+    pub autoproxy_enabled: Option<bool>,
+}
+
+#[derive(Clone, Debug, Deserialize)]
+pub struct MemberStatus {
+    pub text: String,
+    pub emoji: Option<String>,
+}
+
+#[derive(Clone, Debug, Deserialize)]
+pub struct ProxyTag {
+    pub prefix: Option<String>,
+    pub suffix: Option<String>,
+}
+
+impl Member {
+    pub fn display_name(&self) -> &str {
+        self.display_name.as_deref().unwrap_or(&self.name)
+    }
+
+    pub fn webhook_avatar(&self) -> Option<&str> {
+        self.webhook_avatar_url
+            .as_deref()
+            .or(self.avatar_url.as_deref())
+    }
+}
+
+pub fn utf16_len(text: &str) -> usize {
+    text.encode_utf16().count()
+}
+
+pub fn truncate(text: &str, limit: usize) -> &str {
+    let mut remaining = limit;
+
+    for (index, character) in text.char_indices() {
+        let Some(next) = remaining.checked_sub(character.len_utf16()) else {
+            return &text[..index];
+        };
+        remaining = next;
+    }
+
+    text
+}
+
+fn tag_pattern(tag: &str) -> String {
+    static WHITESPACE: LazyLock<Regex> = LazyLock::new(|| Regex::new(r"[\s\u{feff}]+").unwrap());
+    WHITESPACE
+        .replace_all(&regex::escape(tag), r"[\s\u{feff}]+")
+        .into_owned()
+}
+
+pub fn pick<'a>(
+    members: &'a [Member],
+    fronters: &'a [Member],
+    content: &'a str,
+) -> Option<(Vec<&'a Member>, &'a str)> {
+    if content.starts_with('$') {
+        return None;
+    }
+
+    let mut best_length = 0;
+    let mut best = None;
+
+    for member in members {
+        for tag in &member.proxy_tags {
+            let prefix = tag.prefix.as_deref().unwrap_or_default();
+            let suffix = tag.suffix.as_deref().unwrap_or_default();
+            let length = utf16_len(prefix) + utf16_len(suffix);
+
+            if length <= best_length {
+                continue;
+            }
+
+            let pattern = format!(
+                r"(?is)\A{}(.*?){}\z",
+                tag_pattern(prefix),
+                tag_pattern(suffix),
+            );
+            let Ok(regex) = Regex::new(&pattern) else {
+                continue;
+            };
+
+            if let Some(captures) = regex.captures(content) {
+                let text = if member.keep_proxy {
+                    content
+                } else {
+                    captures.get(1).unwrap().as_str().trim()
+                };
+                best = Some((vec![member], text));
+                best_length = length;
+            }
+        }
+    }
+
+    if best.is_some() || content.starts_with('\\') {
+        return best;
+    }
+
+    let speaking: Vec<_> = fronters
+        .iter()
+        .filter(|member| member.autoproxy_enabled != Some(false))
+        .collect();
+    (!speaking.is_empty()).then_some((speaking, content))
+}
+
+pub const MAX_NAMED: usize = 3;
+
+pub fn webhook_name(members: &[&Member], tag: Option<&str>) -> String {
+    static DISCORD: LazyLock<Regex> = LazyLock::new(|| Regex::new("(?i)discord").unwrap());
+    let mut names: Vec<_> = members
+        .iter()
+        .take(MAX_NAMED)
+        .map(|member| member.display_name())
+        .collect();
+    let hidden = members.len().saturating_sub(MAX_NAMED);
+    let extra = format!("{hidden} more");
+
+    if hidden > 0 {
+        names.push(&extra);
+    }
+
+    let last = names.pop().unwrap_or_default();
+    let names = if names.is_empty() {
+        last.to_owned()
+    } else {
+        format!("{} & {last}", names.join(", "))
+    };
+    let suffix = tag
+        .filter(|tag| !tag.is_empty())
+        .map(|tag| format!(" ~ {tag}"))
+        .unwrap_or_default();
+    let names = truncate(&names, 80_usize.saturating_sub(utf16_len(&suffix)));
+    let name = DISCORD
+        .replace_all(&format!("{names}{suffix}"), "dïscord")
+        .into_owned();
+    truncate(&name, 80).to_owned()
+}
+
+pub fn fronting_status(fronters: &[Member]) -> String {
+    if fronters.is_empty() {
+        return "Nobody fronting".into();
+    }
+
+    let names = fronters
+        .iter()
+        .map(Member::display_name)
+        .collect::<Vec<_>>()
+        .join(", ");
+    truncate(&format!("Fronting: {names}"), 128).to_owned()
+}
+
+pub const DEFAULT_COMMAND_PREFIX: &str = "p$";
+
+pub fn command<'message>(
+    content: &'message str,
+    prefix: &str,
+) -> Option<(String, Vec<String>, &'message str)> {
+    let candidate = content.get(..prefix.len())?;
+    if prefix.is_empty() || !candidate.eq_ignore_ascii_case(prefix) {
+        return None;
+    }
+
+    let body = content[prefix.len()..].trim_start();
+    let name = body.split_whitespace().next()?;
+    let rest = body[name.len()..].trim();
+    let args = rest.split_whitespace().map(str::to_lowercase).collect();
+    Some((name.to_lowercase(), args, rest))
+}
diff --git a/src/proxy_log.rs b/src/proxy_log.rs
new file mode 100644
index 0000000..76eb3ff
--- /dev/null
+++ b/src/proxy_log.rs
@@ -0,0 +1,351 @@
+// src/proxy_log.rs
+
+use std::collections::VecDeque;
+use std::sync::LazyLock;
+use std::time::{Duration, Instant};
+
+use regex::Regex;
+use serde_json::{Value, json};
+use serenity::all::{Context, GuildId, HttpError, Message, MessageId, UserId};
+use tokio::sync::watch;
+
+use crate::{Bot, cards, discord};
+
+const CLEANUP_WINDOW: Duration = Duration::from_secs(30 * 60);
+const MAX_RECENT_DELETIONS: usize = 4096;
+
+#[derive(Default)]
+pub(crate) struct RecentDeletions(VecDeque<ProxyDeletion>);
+
+struct ProxyDeletion {
+    guild: GuildId,
+    source: MessageId,
+    started: Instant,
+    confirmed: watch::Receiver<Option<bool>>,
+}
+
+pub(crate) struct ProxyLog<'a> {
+    pub source: &'a Message,
+    pub sent: MessageId,
+    pub label: &'a str,
+    pub content: &'a str,
+    pub links: &'a str,
+    pub avatar: Option<&'a str>,
+}
+
+impl ProxyLog<'_> {
+    fn payload(&self, guild: GuildId, account: UserId) -> Value {
+        let channel = self.source.channel_id;
+        let source = self.source.id;
+        let sent = self.sent;
+        let timestamp = sent.created_at().unix_timestamp();
+        let jump = cards::link(
+            "Jump to proxy",
+            format!("https://discord.com/channels/{guild}/{channel}/{sent}"),
+        );
+
+        let heading = format!("**{}**\n<#{channel}>", self.label);
+        let mut components = vec![jump, cards::header(heading, self.avatar)];
+        let text = discord::message_text(self.content, self.links);
+        components.extend(discord::text_displays(self.content, self.links, &text));
+        components.push(cards::text(format!(
+            "-# Sender <@{account}> · Proxy ID {sent} · Source ID {source} · <t:{timestamp}:f>",
+        )));
+
+        json!({
+            "flags": cards::COMPONENTS_V2,
+            "components": [{
+                "type": 17,
+                "components": components,
+            }],
+            "allowed_mentions": { "parse": [] },
+        })
+    }
+}
+
+impl Bot {
+    pub(crate) async fn delete_proxy_source(
+        &self,
+        ctx: &Context,
+        guild: GuildId,
+        source: &Message,
+    ) -> serenity::Result<Option<watch::Sender<Option<bool>>>> {
+        let cleanup = self
+        .settings
+        .lock()
+        .await
+        .proxy_logs
+        .get(&guild)
+        .is_some_and(|config| config.cleanup);
+
+        if !cleanup {
+            source.delete(&ctx.http).await?;
+            return Ok(None);
+        }
+
+        // A logger can receive the deletion before Discord returns the HTTP response.
+        let (result, confirmed) = watch::channel(None);
+
+        {
+            let mut recent = self.proxy_deletions.lock().await;
+
+            if recent.0.len() == MAX_RECENT_DELETIONS {
+                recent.0.pop_front();
+            }
+
+            recent.0.push_back(ProxyDeletion {
+                guild,
+                source: source.id,
+                started: Instant::now(),
+                confirmed,
+                });
+        }
+
+        if let Err(error) = source.delete(&ctx.http).await {
+            result.send_replace(Some(false));
+            return Err(error);
+        }
+
+        // Keep the logger entry until the webhook has accepted the replacement.
+        Ok(Some(result))
+    }
+
+    pub(crate) async fn clean_proxy_log(
+        &self,
+        ctx: &Context,
+        message: &Message,
+        guild: GuildId,
+    ) -> anyhow::Result<()> {
+        let Some(deleted) = deleted_message_id(message) else {
+            return Ok(());
+        };
+        let cleanup = self
+        .settings
+        .lock()
+        .await
+        .proxy_logs
+        .get(&guild)
+        .is_some_and(|config| config.cleanup);
+
+        if !cleanup {
+            return Ok(());
+        }
+
+        let confirmation = self
+        .proxy_deletions
+        .lock()
+        .await
+        .0
+        .iter()
+        .rev()
+        .find(|entry| {
+            entry.guild == guild
+            && entry.source == deleted
+            && entry.started.elapsed() < CLEANUP_WINDOW
+            })
+        .map(|entry| entry.confirmed.clone());
+
+        if let Some(mut result) = confirmation
+        && result
+        .wait_for(Option::is_some)
+        .await
+        .is_ok_and(|confirmed| *confirmed == Some(true))
+        {
+            message.delete(&ctx.http).await?;
+        }
+
+        Ok(())
+    }
+
+    pub(crate) async fn log_proxy(&self, ctx: &Context, guild: GuildId, entry: ProxyLog<'_>) {
+        let channel = self
+        .settings
+        .lock()
+        .await
+        .proxy_logs
+        .get(&guild)
+        .and_then(|config| config.channel);
+        let Some(channel) = channel else {
+            return;
+        };
+
+        let payload = entry.payload(guild, self.owner);
+
+        if let Err(error) = discord::send_json(ctx, channel, &payload).await {
+            eprintln!("Proxy logging failed in guild {guild}: {error}");
+        }
+    }
+}
+
+pub(crate) fn unknown_message(error: &serenity::Error) -> bool {
+    matches!(
+        error,
+        serenity::Error::Http(HttpError::UnsuccessfulRequest(response))
+            if response.error.code == 10008
+    )
+}
+
+fn deleted_message_id(message: &Message) -> Option<MessageId> {
+    static MESSAGE_ID: LazyLock<Regex> =
+    LazyLock::new(|| Regex::new(r"Message ID: ([0-9]{17,20})\b").unwrap());
+    static LOGGER_ID: LazyLock<Regex> =
+    LazyLock::new(|| Regex::new(r"Message = ([0-9]{17,20})\b").unwrap());
+    static SAPPHIRE_ID: LazyLock<Regex> =
+    LazyLock::new(|| Regex::new(r"\*\*Message ID:\*\* \[([0-9]{17,20})\]").unwrap());
+    static AUTTAJA_ID: LazyLock<Regex> =
+    LazyLock::new(|| Regex::new(r"(?m)^Message ([0-9]{17,20}) deleted\b").unwrap());
+
+    // Webhook names and avatars can be set by anyone with the webhook token.
+    let sender = if message.webhook_id.is_some() {
+        message.application_id?.get()
+    } else if message.author.bot {
+        message.author.id.get()
+    } else {
+        return None;
+    };
+    let embed = message.embeds.first();
+
+    let (pattern, text, use_last_match) = match sender {
+        235148962103951360 => {
+            let embed = embed?;
+
+            if !embed.title.as_deref()?.starts_with("Message deleted in")
+            || embed.timestamp.is_none()
+            || embed.footer.is_none()
+            {
+                return None;
+            }
+
+            (&*MESSAGE_ID, embed.description.as_deref()?, true)
+        }
+        155149108183695360 | 161660517914509312 | 168274214858653696 | 470722245824610306
+        | 470722416427925514 | 470722753218084866 | 470723667303727125 | 470724017205149701
+        | 470723870270160917 | 347378323418251264 => {
+            let embed = embed?;
+
+            if !embed.description.as_deref()?.contains("Deleted in") {
+                return None;
+            }
+
+            (&*MESSAGE_ID, embed.footer.as_ref()?.text.as_str(), false)
+        }
+        298822483060981760 | 579149474975449098 => {
+            let embed = embed?;
+
+            if !embed
+            .description
+            .as_deref()?
+            .starts_with("Message deleted in")
+            {
+                return None;
+            }
+
+            let field = embed.fields.iter().find(|field| field.name == "ID")?;
+            (&*LOGGER_ID, field.value.as_str(), false)
+        }
+        678344927997853742 => {
+            let embed = embed?;
+
+            if !embed.title.as_deref()?.starts_with("Message deleted") {
+                return None;
+            }
+
+            (&*SAPPHIRE_ID, embed.description.as_deref()?, false)
+        }
+        563434444321587202 | 292953664492929025 | 356950275044671499 => {
+            let embed = embed?;
+
+            if !embed.author.as_ref()?.name.starts_with("Message Deleted") {
+                return None;
+            }
+
+            (&*MESSAGE_ID, embed.footer.as_ref()?.text.as_str(), false)
+        }
+        242730576195354624 => {
+            let text = embed
+            .and_then(|embed| embed.description.as_deref())
+            .unwrap_or(&message.content);
+            (&*AUTTAJA_ID, text, false)
+        }
+        _ => return None,
+    };
+
+    let found = if use_last_match {
+        pattern.captures_iter(text).last()
+    } else {
+        pattern.captures(text)
+    }?;
+    found[1].parse().ok()
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    #[test]
+    fn short_proxy_logs_use_a_v2_card_and_jump_to_the_replacement() {
+        let source = crate::tests::message("speaker", "", vec![]);
+        let avatar = "https://cdn.example/avatar.gif";
+        let link = "https://cdn.example/upload.gif";
+        let payload = ProxyLog {
+            source: &source,
+            sent: MessageId::new(4),
+            label: "Proxied as Speaker",
+            content: "Hello",
+            links: link,
+            avatar: Some(avatar),
+        }
+        .payload(GuildId::new(1), UserId::new(42));
+
+        assert_eq!(payload["flags"], cards::COMPONENTS_V2);
+        assert!(payload.get("content").is_none());
+        assert_eq!(payload["allowed_mentions"]["parse"], json!([]));
+        assert_eq!(payload["components"].as_array().unwrap().len(), 1);
+        let card = &payload["components"][0];
+        assert_eq!(card["type"], 17);
+        let jump = &card["components"][0];
+        assert_eq!(jump["type"], 1);
+        assert_eq!(
+            jump["components"][0]["url"],
+            "https://discord.com/channels/1/2/4",
+        );
+        let header = &card["components"][1];
+        assert_eq!(header["accessory"]["media"]["url"], avatar);
+        assert_eq!(header["components"][0]["content"], "**Proxied as Speaker**\n<#2>");
+        assert_eq!(card["components"][2]["content"], format!("Hello\n\n{link}"));
+        let metadata = card["components"][3]["content"].as_str().unwrap();
+        assert!(metadata.contains("Sender <@42> · Proxy ID 4 · Source ID 3"));
+    }
+
+    #[test]
+    fn cleanup_matches_a_trusted_deletion_embed_and_uses_its_final_message_id() {
+        let mut raw = serde_json::to_value(crate::tests::message("Carl-bot", "", vec![])).unwrap();
+        raw["webhook_id"] = json!("1234");
+        raw["application_id"] = json!("235148962103951360");
+        raw["embeds"] = json!([{
+            "title": "Message deleted in #general",
+            "description": "Quoted Message ID: 111111111111111111\nMessage ID: 222222222222222222",
+            "timestamp": "2026-11-22T00:00:00Z",
+            "footer": { "text": "Carl-bot" },
+        }]);
+
+        let deletion = serde_json::from_value(raw.clone()).unwrap();
+        assert_eq!(
+            deleted_message_id(&deletion),
+            Some(MessageId::new(222222222222222222))
+        );
+
+        let mut spoof = raw.clone();
+        spoof["application_id"] = json!("9999");
+        assert_eq!(
+            deleted_message_id(&serde_json::from_value(spoof).unwrap()),
+            None
+        );
+
+        raw["embeds"][0]["title"] = json!("Message edited in #general");
+        assert_eq!(
+            deleted_message_id(&serde_json::from_value(raw).unwrap()),
+            None
+        );
+    }
+}
diff --git a/src/settings.rs b/src/settings.rs
new file mode 100644
index 0000000..6acab24
--- /dev/null
+++ b/src/settings.rs
@@ -0,0 +1,96 @@
+// src/settings.rs
+
+use std::collections::BTreeMap;
+use std::path::Path;
+
+use serenity::all::{ChannelId, GuildId};
+
+#[derive(Clone, Copy, Default, PartialEq, Eq)]
+pub struct ProxyLogging {
+    pub channel: Option<ChannelId>,
+    pub cleanup: bool,
+}
+
+#[derive(Clone, Default, PartialEq, Eq)]
+pub struct Settings {
+    pub guilds: BTreeMap<GuildId, bool>,
+    pub proxy_logs: BTreeMap<GuildId, ProxyLogging>,
+}
+
+impl Settings {
+    pub const PATH: &str = "data/settings.jp";
+
+    pub fn load(path: impl AsRef<Path>) -> anyhow::Result<Self> {
+        let root = match jpcl::load(path, &jpcl::ParseOptions::default()) {
+            Ok(root) => root,
+            Err(jpcl::Error::Io { source, .. })
+            if source.kind() == std::io::ErrorKind::NotFound =>
+            {
+                return Ok(Self::default());
+            }
+            Err(error) => return Err(error.into()),
+        };
+
+        let guilds = root
+        .iter()
+        .filter_map(|(key, _)| {
+            let guild = key.parse::<u64>().ok().filter(|id| *id > 0)?;
+            let path = format!("{key}.autoproxy.enabled");
+            let enabled = jpcl::get_path(&root, &path) == Some(&jpcl::Value::Bool(true));
+            Some((GuildId::new(guild), enabled))
+            })
+        .collect();
+
+        let mut settings = Self {
+            guilds,
+            ..Self::default()
+        };
+
+        for guild in settings.guilds.keys() {
+            let prefix = format!("{guild}.proxy_log");
+            let channel = match jpcl::get_path(&root, &format!("{prefix}.channel")) {
+                Some(jpcl::Value::String(channel)) => channel.parse::<ChannelId>().ok(),
+                _ => None,
+            };
+            let cleanup = jpcl::get_path(&root, &format!("{prefix}.cleanup"))
+            == Some(&jpcl::Value::Bool(true));
+
+            if channel.is_some() || cleanup {
+                settings.proxy_logs.insert(*guild, ProxyLogging { channel, cleanup });
+            }
+        }
+
+        Ok(settings)
+    }
+
+    pub fn save(&self) -> anyhow::Result<()> {
+        self.save_to(Self::PATH)
+    }
+
+    pub(crate) fn save_to(&self, path: impl AsRef<Path>) -> anyhow::Result<()> {
+        let mut root = jpcl::Object::new();
+
+        for (guild, enabled) in &self.guilds {
+            let mut autoproxy = jpcl::Object::new();
+            autoproxy.insert("enabled", jpcl::Value::Bool(*enabled));
+            let mut entry = jpcl::Object::new();
+            entry.insert("autoproxy", jpcl::Value::Object(autoproxy));
+
+            if let Some(settings) = self.proxy_logs.get(guild) {
+                let mut logging = jpcl::Object::new();
+
+                if let Some(channel) = settings.channel {
+                    logging.insert("channel", jpcl::Value::String(channel.to_string()));
+                }
+
+                logging.insert("cleanup", jpcl::Value::Bool(settings.cleanup));
+                entry.insert("proxy_log", jpcl::Value::Object(logging));
+            }
+
+            root.insert(guild.to_string(), jpcl::Value::Object(entry));
+        }
+
+        jpcl::dump(&root, path, &jpcl::StringifyOptions::default())?;
+        Ok(())
+    }
+}
diff --git a/src/site.rs b/src/site.rs
new file mode 100644
index 0000000..801e21d
--- /dev/null
+++ b/src/site.rs
@@ -0,0 +1,130 @@
+// src/site.rs
+
+use std::sync::Arc;
+
+use serde::Deserialize;
+use serde_json::json;
+use serenity::all::{ActivityData, Context};
+use tokio::sync::broadcast;
+
+use crate::{
+    Bot,
+    proxy::{Member, fronting_status},
+    storage_event,
+};
+
+#[derive(Default, Deserialize)]
+pub struct SystemInfo {
+    pub name: Option<String>,
+    pub tag: Option<String>,
+}
+
+#[derive(Default)]
+pub struct System {
+    pub info: SystemInfo,
+    pub members: Vec<Member>,
+    pub fronters: Vec<Member>,
+}
+
+impl Bot {
+    async fn snapshot(&self) -> anyhow::Result<System> {
+        self.store
+            .read(|data| {
+                let mut members: Vec<_> = data
+                    .members
+                    .iter()
+                    .map(|member| data.member(member))
+                    .collect();
+                members.sort_by_cached_key(|member| {
+                    member["name"].as_str().unwrap_or_default().to_lowercase()
+                });
+                let mut snapshot = System {
+                    info: data
+                        .system
+                        .as_ref()
+                        .map(|info| serde_json::from_value(info.clone()))
+                        .transpose()?
+                        .unwrap_or_default(),
+                    members: serde_json::from_value(json!(members))?,
+                    fronters: serde_json::from_value(data.fronters()["members"].clone())?,
+                };
+                for member in snapshot.members.iter_mut().chain(&mut snapshot.fronters) {
+                    for url in [&mut member.avatar_url, &mut member.webhook_avatar_url]
+                        .into_iter()
+                        .flatten()
+                    {
+                        if url.starts_with("/api/plural/media/") {
+                            *url = format!("{origin}{url}", origin = self.local_origin);
+                        }
+                    }
+                }
+                Ok(snapshot)
+            })
+            .await
+    }
+
+    pub async fn initial_refresh(&self) {
+        match self.snapshot().await {
+            Ok(snapshot) => *self.system.write().await = snapshot,
+            Err(error) => eprintln!("System refresh failed: {error}"),
+        }
+    }
+
+    pub async fn live(self: Arc<Self>, ctx: Context) {
+        let mut events = self.store.events.subscribe();
+        self.update_front_activity(&ctx).await;
+        loop {
+            match events.recv().await {
+                Ok(event) if event["type"] == "mental_state_update" => continue,
+                Ok(_) | Err(broadcast::error::RecvError::Lagged(_)) => {
+                    self.update_front_activity(&ctx).await
+                }
+                Err(broadcast::error::RecvError::Closed) => break,
+            }
+        }
+    }
+
+    async fn update_front_activity(&self, ctx: &Context) {
+        let Ok(snapshot) = self.snapshot().await else {
+            return;
+        };
+        let status = fronting_status(&snapshot.fronters);
+        let speakers: Vec<_> = snapshot
+            .fronters
+            .iter()
+            .filter(|member| member.autoproxy_enabled != Some(false))
+            .cloned()
+            .collect();
+        *self.system.write().await = snapshot;
+        ctx.set_activity(Some(ActivityData::custom(status)));
+
+        if (2..=crate::proxy::MAX_NAMED).contains(&speakers.len()) {
+            let avatars = self.avatars.clone();
+            let web = self.web.clone();
+            tokio::spawn(async move {
+                let urls = crate::avatars::avatar_urls(&speakers);
+                if let Err(error) = avatars.png(&web, urls).await {
+                    eprintln!("Avatar premerge failed: {error}");
+                }
+            });
+        }
+    }
+
+    pub async fn switch_front(&self, ids: &[&str]) -> Result<(), String> {
+        let members: Vec<_> = ids.iter().map(|id| json!(id)).collect();
+        self.store
+            .change::<_, crate::http::Error>(|data| {
+                if data.system.is_none() {
+                    return Err(crate::http::Error::missing(
+                        "No system yet. Import one first.",
+                    ));
+                }
+                let front = data.switch(&members).map_err(crate::http::Error::invalid)?;
+                Ok(((), vec![storage_event("fronters_update", front)]))
+            })
+            .await
+            .map_err(|error| error.1)?;
+        self.initial_refresh().await;
+        Ok(())
+    }
+}
diff --git a/src/store.rs b/src/store.rs
new file mode 100644
index 0000000..d7072f7
--- /dev/null
+++ b/src/store.rs
@@ -0,0 +1,418 @@
+// src/store.rs
+
+use std::collections::BTreeMap;
+use std::path::{Path, PathBuf};
+
+use anyhow::{Context, anyhow};
+use chrono::{SecondsFormat, Utc};
+use serde::{Deserialize, Serialize};
+use serde_json::{Value, json};
+use tokio::sync::{Mutex, broadcast};
+
+#[derive(Clone, Default, Deserialize, Serialize)]
+#[serde(default)]
+pub struct Data {
+    pub system: Option<Value>,
+    #[serde(skip_serializing)]
+    pub members: Vec<Value>,
+    pub switches: Vec<Value>,
+    pub relationships: Vec<Value>,
+    pub member_tags: serde_json::Map<String, Value>,
+    pub member_pride: serde_json::Map<String, Value>,
+    pub member_status: serde_json::Map<String, Value>,
+    pub mental_state: Option<Value>,
+    pub users: Vec<Value>,
+    pub sessions: serde_json::Map<String, Value>,
+}
+
+pub struct Store {
+    path: PathBuf,
+    data: Mutex<Data>,
+    pub events: broadcast::Sender<Value>,
+}
+
+pub fn encode(value: &Value) -> anyhow::Result<String> {
+    let jpcl::Value::Object(document) =
+        jpcl::from_json(&value.to_string()).map_err(|error| anyhow!(error))?
+    else {
+        anyhow::bail!("JPCL documents require an object");
+    };
+    Ok(jpcl::stringify(
+        &document,
+        &jpcl::StringifyOptions::default(),
+    ))
+}
+
+pub fn decode(text: &str) -> anyhow::Result<Value> {
+    let root = jpcl::parse(text, &jpcl::ParseOptions::default())?;
+    Ok(serde_json::from_str(&jpcl::to_json(
+        &jpcl::Value::Object(root),
+        0,
+    ))?)
+}
+
+pub fn now() -> String {
+    Utc::now().to_rfc3339_opts(SecondsFormat::Millis, true)
+}
+
+pub fn random_bytes<const LENGTH: usize>() -> [u8; LENGTH] {
+    use ring::rand::SecureRandom;
+    let mut bytes = [0; LENGTH];
+    ring::rand::SystemRandom::new()
+        .fill(&mut bytes)
+        .expect("operating system randomness");
+    bytes
+}
+
+pub fn uuid() -> String {
+    let mut bytes = random_bytes::<16>();
+    bytes[6] = (bytes[6] & 15) | 64;
+    bytes[8] = (bytes[8] & 63) | 128;
+    let hex: String = bytes.iter().map(|byte| format!("{byte:02x}")).collect();
+    format!(
+        "{}-{}-{}-{}-{}",
+        &hex[..8],
+        &hex[8..12],
+        &hex[12..16],
+        &hex[16..20],
+        &hex[20..]
+    )
+}
+
+impl Store {
+    pub async fn initialize_system(&self) -> anyhow::Result<()> {
+        if self.read(|data| data.system.is_some()).await {
+            return Ok(());
+        }
+        self.change(|data| {
+            data.system.get_or_insert_with(|| {
+                json!({
+                    "id": "system",
+                    "uuid": uuid(),
+                    "name": std::env::var("SYSTEM_NAME").unwrap_or_else(|_| "System".into()),
+                    "created": now(),
+                    "privacy": {},
+                })
+            });
+            Ok(((), vec![]))
+        })
+        .await
+    }
+
+    pub fn import(path: &Path, data: Data) -> anyhow::Result<()> {
+        data.validate()?;
+        anyhow::ensure!(
+            read_members(path)?.is_empty(),
+            "Import requires an empty members directory"
+        );
+        let mut document = serde_json::to_value(&data)?;
+        document["members"] = serde_json::to_value(data.members)?;
+        write_new(path, &encode(&document)?)?;
+        Self::open(path.to_owned())?;
+        Ok(())
+    }
+
+    pub fn open(path: PathBuf) -> anyhow::Result<Self> {
+        let document = match std::fs::read_to_string(&path) {
+            Ok(text) => decode(&text)
+                .with_context(|| format!("Invalid storage document {}", path.display()))?,
+            Err(error) if error.kind() == std::io::ErrorKind::NotFound => json!({}),
+            Err(error) => return Err(error.into()),
+        };
+        let legacy = document.get("members").is_some();
+        let mut data = serde_json::from_value::<Data>(document)
+            .with_context(|| format!("Invalid storage document {}", path.display()))?;
+        let members = read_members(&path)?;
+
+        if legacy {
+            data.validate()?;
+            let entries = member_map(&data.members)?;
+            // A previous attempt may have written some files before replacing system.jp.
+            for (id, member) in &members {
+                anyhow::ensure!(
+                    entries.get(id) == Some(&member),
+                    "Member file {id}.jp conflicts with the embedded member data"
+                );
+            }
+            for (id, member) in entries {
+                if !members.contains_key(&id) {
+                    write_new(&member_path(&path, &id), &encode(member)?)?;
+                }
+            }
+            write_atomic(&path, &encode(&serde_json::to_value(&data)?)?)?;
+        } else {
+            data.members = members.into_values().collect();
+        }
+        data.validate()?;
+        let (events, _) = broadcast::channel(64);
+        Ok(Self {
+            path,
+            data: Mutex::new(data),
+            events,
+        })
+    }
+
+    pub async fn read<T>(&self, read: impl FnOnce(&Data) -> T) -> T {
+        let data = self.data.lock().await;
+        read(&data)
+    }
+
+    pub async fn change<T, E: From<anyhow::Error>>(
+        &self,
+        change: impl FnOnce(&mut Data) -> Result<(T, Vec<Value>), E>,
+    ) -> Result<T, E> {
+        let mut data = self.data.lock().await;
+        let mut updated = data.clone();
+        let (result, events) = change(&mut updated)?;
+        updated.validate()?;
+        persist_change(&self.path, &data, &updated)?;
+        *data = updated;
+        for event in events {
+            let _ = self.events.send(event);
+        }
+        Ok(result)
+    }
+}
+
+fn safe_member_id(id: &str) -> bool {
+    !id.is_empty()
+        && id.len() <= 128
+        && id
+            .bytes()
+            .all(|byte| byte.is_ascii_alphanumeric() || matches!(byte, b'_' | b'-'))
+}
+
+fn member_map(members: &[Value]) -> anyhow::Result<BTreeMap<String, &Value>> {
+    let mut entries = BTreeMap::new();
+    for member in members {
+        let id = member["id"]
+            .as_str()
+            .filter(|id| safe_member_id(id))
+            .context("Member ID is invalid for a filename")?;
+        anyhow::ensure!(
+            entries.insert(id.to_owned(), member).is_none(),
+            "Duplicate member ID: {id}"
+        );
+    }
+    Ok(entries)
+}
+
+fn members_directory(path: &Path) -> PathBuf {
+    path.with_file_name("members")
+}
+
+fn member_path(path: &Path, id: &str) -> PathBuf {
+    members_directory(path).join(format!("{id}.jp"))
+}
+
+fn read_members(path: &Path) -> anyhow::Result<BTreeMap<String, Value>> {
+    let directory = members_directory(path);
+    let entries = match std::fs::read_dir(&directory) {
+        Ok(entries) => entries,
+        Err(error) if error.kind() == std::io::ErrorKind::NotFound => return Ok(BTreeMap::new()),
+        Err(error) => return Err(error.into()),
+    };
+    let mut members = BTreeMap::new();
+    for entry in entries {
+        let entry = entry?;
+        let path = entry.path();
+        if path.extension().and_then(|extension| extension.to_str()) != Some("jp") {
+            continue;
+        }
+        let id = path
+            .file_stem()
+            .and_then(|stem| stem.to_str())
+            .filter(|id| safe_member_id(id))
+            .with_context(|| format!("Invalid member filename {}", path.display()))?;
+        anyhow::ensure!(
+            entry.file_type()?.is_file(),
+            "{} must be a regular file",
+            path.display()
+        );
+        let member = decode(&std::fs::read_to_string(&path)?)
+            .with_context(|| format!("Invalid member document {}", path.display()))?;
+        anyhow::ensure!(
+            member["id"] == id,
+            "{} must contain member ID {id}",
+            path.display()
+        );
+        members.insert(id.to_owned(), member);
+    }
+    Ok(members)
+}
+
+fn persist_change(path: &Path, old: &Data, updated: &Data) -> anyhow::Result<()> {
+    let old_members = member_map(&old.members)?;
+    let new_members = member_map(&updated.members)?;
+    let member_updates = new_members
+        .iter()
+        .filter(|(id, value)| old_members.get(*id) != Some(*value))
+        .map(|(id, value)| (id, Some(*value)));
+    let member_removals = old_members
+        .keys()
+        .filter(|id| !new_members.contains_key(*id))
+        .map(|id| (id, None));
+    let mut changes = member_updates.chain(member_removals);
+    let system = serde_json::to_value(updated)?;
+    let system_changed = system != serde_json::to_value(old)?;
+    let member_change = changes.next();
+
+    // Each API operation writes one document, so a failed write cannot partially commit.
+    anyhow::ensure!(
+        changes.next().is_none() && !(system_changed && member_change.is_some()),
+        "Storage change must affect at most one document"
+    );
+    if system_changed {
+        write_atomic(path, &encode(&system)?)?;
+    }
+    if let Some((id, value)) = member_change {
+        let path = member_path(path, id);
+        match value {
+            Some(member) if old_members.contains_key(id) => write_atomic(&path, &encode(member)?)?,
+            Some(member) => write_new(&path, &encode(member)?)?,
+            None => std::fs::remove_file(path)?,
+        }
+    }
+    Ok(())
+}
+
+fn prepare_write(path: &Path, content: &str) -> anyhow::Result<tempfile::NamedTempFile> {
+    use std::io::Write;
+    let parent = path
+        .parent()
+        .filter(|parent| !parent.as_os_str().is_empty())
+        .unwrap_or(Path::new("."));
+    std::fs::create_dir_all(parent)?;
+    let mut temporary = tempfile::NamedTempFile::new_in(parent)?;
+    temporary.write_all(content.as_bytes())?;
+    temporary.as_file().sync_all()?;
+    Ok(temporary)
+}
+
+fn write_new(path: &Path, content: &str) -> anyhow::Result<()> {
+    prepare_write(path, content)?
+        .persist_noclobber(path)
+        .with_context(|| format!("Could not create {} without overwriting it", path.display()))?;
+    Ok(())
+}
+
+fn write_atomic(path: &Path, content: &str) -> anyhow::Result<()> {
+    prepare_write(path, content)?.persist(path)?;
+    Ok(())
+}
+
+impl Data {
+    fn validate(&self) -> anyhow::Result<()> {
+        anyhow::ensure!(
+            self.system.as_ref().is_none_or(Value::is_object),
+            "system must be an object"
+        );
+        for entry in self
+            .members
+            .iter()
+            .chain(&self.switches)
+            .chain(&self.users)
+            .chain(&self.relationships)
+        {
+            anyhow::ensure!(
+                entry["id"].is_string(),
+                "storage entries require a string id"
+            );
+        }
+        anyhow::ensure!(
+            self.members.iter().all(|member| member["name"].is_string()),
+            "members require a name"
+        );
+        anyhow::ensure!(
+            self.switches
+                .iter()
+                .all(|entry| entry["members"].is_array() && entry["timestamp"].is_string()),
+            "switches require members and a timestamp"
+        );
+        Ok(())
+    }
+
+    pub fn member_index(&self, identifier: &str) -> Option<usize> {
+        self.members
+            .iter()
+            .position(|member| member["id"] == identifier)
+            .or_else(|| {
+                self.members.iter().position(|member| {
+                    member["name"]
+                        .as_str()
+                        .is_some_and(|name| name.to_lowercase() == identifier.to_lowercase())
+                })
+            })
+    }
+
+    pub fn member(&self, raw: &Value) -> Value {
+        let mut member = raw.clone();
+        let id = raw["id"].as_str().unwrap_or_default();
+        let name = raw["name"].as_str().unwrap_or_default();
+        member["status"] = self
+            .member_status
+            .get(id)
+            .or_else(|| self.member_status.get(name))
+            .cloned()
+            .unwrap_or(Value::Null);
+        member["tags"] = self
+            .member_tags
+            .get(id)
+            .or_else(|| self.member_tags.get(name))
+            .cloned()
+            .unwrap_or(json!([]));
+        member["pride"] = self
+            .member_pride
+            .get(id)
+            .or_else(|| self.member_pride.get(name))
+            .cloned()
+            .unwrap_or(json!([]));
+        member
+    }
+
+    pub fn switches(&self) -> Vec<&Value> {
+        let mut switches: Vec<_> = self.switches.iter().rev().collect();
+        switches
+            .sort_by(|left, right| right["timestamp"].as_str().cmp(&left["timestamp"].as_str()));
+        switches
+    }
+
+    pub fn fronters(&self) -> Value {
+        let Some(latest) = self.switches().first().copied() else {
+            return json!({ "id": null, "timestamp": null, "members": [] });
+        };
+        let mut front = latest.clone();
+        front["members"] = Value::Array(
+            latest["members"]
+                .as_array()
+                .into_iter()
+                .flatten()
+                .filter_map(|id| self.members.iter().find(|member| member["id"] == *id))
+                .map(|member| self.member(member))
+                .collect(),
+        );
+        front
+    }
+
+    pub fn mental_state(&self) -> Value {
+        self.mental_state
+            .clone()
+            .unwrap_or_else(|| json!({ "level": "safe", "updated_at": now(), "notes": null }))
+    }
+
+    pub fn switch(&mut self, members: &[Value]) -> Result<Value, &'static str> {
+        let mut ids = std::collections::HashSet::new();
+        for member in members {
+            let id = member.as_str().ok_or("Member IDs must be strings")?;
+            if !ids.insert(id) {
+                return Err("Duplicate member IDs in switch");
+            }
+            if !self.members.iter().any(|member| member["id"] == id) {
+                return Err("Invalid member ID");
+            }
+        }
+        self.switches
+            .push(json!({ "id": uuid(), "timestamp": now(), "members": members }));
+        Ok(self.fronters())
+    }
+}
diff --git a/src/tests.rs b/src/tests.rs
new file mode 100644
index 0000000..1ad4499
--- /dev/null
+++ b/src/tests.rs
@@ -0,0 +1,302 @@
+// src/tests.rs
+
+use serde_json::{Value, json};
+use serenity::all::{GuildId, Message, UserId};
+
+use crate::{
+    cards, discord,
+    proxy::{self, Member, MemberStatus, ProxyTag},
+    settings::Settings,
+};
+
+fn member(name: &str, prefix: Option<&str>, suffix: Option<&str>) -> Member {
+    Member {
+        id: name.into(),
+        name: name.into(),
+        proxy_tags: vec![ProxyTag {
+            prefix: prefix.map(str::to_owned),
+            suffix: suffix.map(str::to_owned),
+        }],
+        ..Member::default()
+    }
+}
+
+#[test]
+fn tags_strip_prefixes_and_suffixes() {
+    let members = [
+        member("short", Some("C:"), None),
+        member("long", Some("C1:"), None),
+        member("brackets", Some("["), Some("]")),
+        member("spaced", Some("Ae "), None),
+    ];
+
+    for (input, name, expected) in [
+        ("C: hi", "short", "hi"),
+        ("C1: hi", "long", "hi"),
+        ("[hello]", "brackets", "hello"),
+        ("ae hi", "spaced", "hi"),
+        ("Ae\u{a0}hi", "spaced", "hi"),
+    ] {
+        let (speakers, content) = proxy::pick(&members, &[], input).unwrap();
+        assert_eq!(speakers[0].id, name);
+        assert_eq!(content, expected);
+    }
+
+    assert!(proxy::pick(&members, &[], "Aehi").is_none());
+    assert!(proxy::pick(&members, &[], "plain message").is_none());
+}
+
+#[test]
+fn longest_overlapping_tag_wins_and_keep_proxy_preserves_text() {
+    let mut keep = member("long", Some("C: "), None);
+    keep.keep_proxy = true;
+    let members = [member("short", Some("C:"), None), keep];
+    let (speakers, content) = proxy::pick(&members, &[], "C: hi").unwrap();
+    assert_eq!(speakers[0].name, "long");
+    assert_eq!(content, "C: hi");
+}
+
+#[test]
+fn autoproxy_preserves_front_order_and_respects_opt_outs() {
+    let members = [member("tagged", Some("T:"), None)];
+    let mut quiet = member("quiet", None, None);
+    quiet.autoproxy_enabled = Some(false);
+    let front = [member("host", None, None), quiet, member("co", None, None)];
+
+    let (tagged, _) = proxy::pick(&members, &front, "T: hi").unwrap();
+    assert_eq!(tagged[0].name, "tagged");
+    let (speakers, content) = proxy::pick(&members, &front, "hi").unwrap();
+    assert_eq!(
+        speakers
+            .iter()
+            .map(|member| member.name.as_str())
+            .collect::<Vec<_>>(),
+        ["host", "co"]
+    );
+    assert_eq!(content, "hi");
+    assert!(proxy::pick(&members, &front, "\\hi").is_none());
+    assert!(proxy::pick(&members, &front, "$hi").is_none());
+    assert!(proxy::pick(&members, &[], "hi").is_none());
+}
+
+#[test]
+fn names_use_display_names_and_cap_crowds() {
+    let mut host = member("first", None, None);
+    host.display_name = Some("Host".into());
+    let crowd = [
+        host,
+        member("b", None, None),
+        member("c", None, None),
+        member("d", None, None),
+        member("e", None, None),
+    ];
+    let speakers: Vec<_> = crowd.iter().collect();
+    assert_eq!(proxy::webhook_name(&speakers[..2], None), "Host & b");
+    assert_eq!(proxy::webhook_name(&speakers[..3], None), "Host, b & c");
+    assert_eq!(proxy::webhook_name(&speakers, None), "Host, b, c & 2 more");
+    assert_eq!(proxy::fronting_status(&crowd[..2]), "Fronting: Host, b");
+    assert_eq!(proxy::fronting_status(&[]), "Nobody fronting");
+}
+
+#[test]
+fn webhook_name_preserves_the_tag_and_uses_discords_length_units() {
+    let name = member(&format!("Discord {}", "🌙".repeat(80)), None, None);
+    let result = proxy::webhook_name(&[&name], Some("TAG"));
+    assert!(result.starts_with("dïscord "));
+    assert!(result.ends_with(" ~ TAG"));
+    assert!(proxy::utf16_len(&result) <= 80);
+}
+
+#[test]
+fn command_args_fold_case_without_losing_edit_text() {
+    assert_eq!(
+        proxy::command("P$AutoProxy  OFF", proxy::DEFAULT_COMMAND_PREFIX),
+        Some(("autoproxy".into(), vec!["off".into()], "OFF"))
+    );
+    assert_eq!(
+        proxy::command("p$edit  Hello  World", proxy::DEFAULT_COMMAND_PREFIX)
+            .unwrap()
+            .2,
+        "Hello  World"
+    );
+    assert!(
+        proxy::command("p$help", proxy::DEFAULT_COMMAND_PREFIX)
+            .unwrap()
+            .1
+            .is_empty()
+    );
+    assert!(proxy::command("hello p$autoproxy", proxy::DEFAULT_COMMAND_PREFIX).is_none());
+    assert!(proxy::command("p$   ", proxy::DEFAULT_COMMAND_PREFIX).is_none());
+    assert_eq!(proxy::command("🔧!Help", "🔧!").unwrap().0, "help");
+    assert_eq!(proxy::command("PK!log", "pk!").unwrap().0, "log");
+    assert!(proxy::command("p$help", "pk!").is_none());
+    assert!(proxy::command("🔧help", "!").is_none());
+}
+
+#[test]
+fn proxies_use_native_content_and_keep_the_reply_button() {
+    let upload = "https://cdn.discordapp.com/attachments/1/2/SPOILER_cat.png";
+    let mut file = attachment("SPOILER_cat.png");
+    file["url"] = json!(format!("{upload}?ex=123&is=456&hm=789"));
+    let original = message("speaker", "hello", vec![file]);
+    let links = discord::attachment_links(&original.attachments);
+    let button = cards::link("Jump to reply", "https://discord.com/channels/1/2/3".into());
+    let payload = discord::proxy_payload(&original.content, &links, vec![button.clone()], false);
+
+    assert_eq!(links, format!("||{upload}||"));
+    assert_eq!(payload["content"], format!("hello\n\n{links}"));
+    assert_eq!(payload["components"], json!([button]));
+    assert!(payload["flags"].is_null());
+    assert!(payload["attachments"].is_null());
+    assert_eq!(
+        discord::split_attachment_links(payload["content"].as_str().unwrap()),
+        ("hello", links.as_str()),
+    );
+}
+
+#[test]
+fn long_proxies_round_trip_text_and_upload_links() {
+    let body = "a".repeat(4000);
+    let links = "https://cdn.discordapp.com/attachments/1/2/cat.png";
+    let payload = discord::proxy_payload(&body, links, Vec::new(), false);
+
+    assert_eq!(payload["flags"], json!(cards::COMPONENTS_V2));
+    assert_eq!(
+        discord::proxy_text(payload["components"].as_array().unwrap()),
+        (body, links.to_owned()),
+    );
+}
+
+#[test]
+fn jpcl_v2_loads_old_settings_and_round_trips_guild_preferences() {
+    let directory = tempfile::tempdir().unwrap();
+    let path = directory.path().join("settings.jp");
+    assert!(Settings::load(&path).unwrap().guilds.is_empty());
+    std::fs::write(
+        &path,
+        "[123]\nautoproxy: { enabled: true }\n[456]\n[autoproxy]\nenabled: true\n",
+    )
+    .unwrap();
+
+    let mut settings = Settings::load(&path).unwrap();
+    assert_eq!(settings.guilds.len(), 2);
+    assert!(settings.guilds[&GuildId::new(123)]);
+    assert!(!settings.guilds[&GuildId::new(456)]);
+
+    settings.proxy_logs.insert(
+        GuildId::new(123),
+        crate::settings::ProxyLogging {
+            channel: Some(serenity::all::ChannelId::new(123456789012345678)),
+            cleanup: true,
+        },
+    );
+    settings.proxy_logs.insert(
+        GuildId::new(456),
+        crate::settings::ProxyLogging {
+            channel: None,
+            cleanup: true,
+        },
+    );
+
+    settings.save_to(&path).unwrap();
+    let reloaded = Settings::load(&path).unwrap();
+    assert_eq!(reloaded.guilds, settings.guilds);
+    assert!(reloaded.proxy_logs == settings.proxy_logs);
+}
+
+pub(crate) fn message(author: &str, content: &str, attachments: Vec<Value>) -> Message {
+    serde_json::from_value(json!({
+        "id": "3",
+        "channel_id": "2",
+        "guild_id": "1",
+        "author": { "id": "42", "username": author, "discriminator": "0" },
+        "content": content,
+        "timestamp": "2026-11-22T00:00:00Z",
+        "tts": false,
+        "mention_everyone": false,
+        "mentions": [],
+        "mention_roles": [],
+        "attachments": attachments,
+        "embeds": [],
+        "pinned": false,
+        "type": 0,
+    }))
+    .unwrap()
+}
+
+pub(crate) fn attachment(name: &str) -> Value {
+    json!({
+        "id": "8",
+        "filename": name,
+        "size": 1,
+        "url": format!("https://cdn.example/{name}"),
+        "proxy_url": format!("https://cdn.example/{name}"),
+    })
+}
+
+#[test]
+fn member_card_displays_profile_and_info_caps_crowds() {
+    let mut first = member("example", None, None);
+    first.display_name = Some("Example".into());
+    first.pronouns = Some("they/them".into());
+    first.color = Some("cba6f7".into());
+    first.avatar_url = Some("https://example.com/avatar.png".into());
+    first.pride = vec!["Transgender".into()];
+    first.status = Some(MemberStatus {
+        text: "Coding again...".into(),
+        emoji: Some("💻".into()),
+    });
+
+    let card = cards::member_card(&first, Some("https://system.example"));
+    assert_eq!(card["accent_color"], 0xcba6f7);
+    assert_eq!(card["components"][0]["type"], 9);
+    assert_eq!(
+        card["components"][0]["components"][0]["content"],
+        "## Example\nthey/them\n💻 Coding again..."
+    );
+    assert!(card.to_string().contains("**Pride**\\nTransgender"));
+    assert!(card.to_string().contains("https://system.example/example"));
+
+    let plain = cards::member_card(&member("plain", None, None), None);
+    assert_eq!(plain["accent_color"], 0xeb459e);
+    assert_eq!(plain["components"][0]["type"], 10);
+
+    let webhook = message("Webhook Name", "", vec![]);
+    let owner = UserId::new(42);
+    let unknown = cards::info(&webhook, None, owner, None, None);
+    assert!(unknown[0].to_string().contains("## Webhook Name"));
+
+    let crowd = vec![first; 10];
+    let shown = cards::info(&webhook, Some(&crowd), owner, None, None);
+
+    fn count(component: &Value) -> usize {
+        let children = component["components"]
+            .as_array()
+            .map_or(0, |items| items.iter().map(count).sum());
+        let accessory = component.get("accessory").map_or(0, count);
+        1 + children + accessory
+    }
+
+    assert!(shown.iter().map(count).sum::<usize>() <= 40);
+    assert!(shown[3]["content"].as_str().unwrap().contains("& 7 more"));
+}
+
+#[test]
+fn reply_card_quotes_every_line_and_marks_attachments() {
+    let target = message("Webhook", "", vec![]);
+    let normal = message("Replier", "hi\nthere", vec![]);
+    let reply = cards::reply(&normal, &target);
+    assert_eq!(
+        reply[0]["components"][0]["components"][0]["content"],
+        "### ↪ Replier replied to Webhook\n> hi\n> there"
+    );
+
+    let only_file = message("Replier", "", vec![attachment("cat.png")]);
+    let reply = cards::reply(&only_file, &target);
+    assert_eq!(reply.len(), 1);
+    assert!(reply[0].to_string().contains("*Sent an attachment*"));
+
+    let mixed = message("Replier", "look", vec![attachment("cat.png")]);
+    let reply = cards::reply(&mixed, &target);
+    assert_eq!(reply[1]["content"], "-# Also sent an attachment");
+}
diff --git a/src/web_api.rs b/src/web_api.rs
new file mode 100644
index 0000000..f919666
--- /dev/null
+++ b/src/web_api.rs
@@ -0,0 +1,544 @@
+// src/web_api.rs
+
+use std::{path::PathBuf, sync::Arc};
+
+use hyper::{Method, Request, StatusCode, body::Incoming};
+use serde_json::{Value, json};
+
+use crate::{
+    http::{self, Error, Query, Reply},
+    storage_event,
+    store::{self, Data, Store},
+};
+
+pub struct Web {
+    pub store: Arc<Store>,
+    pub web_root: PathBuf,
+    pub auth: crate::web_auth::Auth,
+}
+
+const MEMBER_FIELDS: &[&str] = &[
+    "name",
+    "display_name",
+    "color",
+    "birthday",
+    "pronouns",
+    "avatar_url",
+    "webhook_avatar_url",
+    "banner",
+    "description",
+    "proxy_tags",
+    "keep_proxy",
+    "autoproxy_enabled",
+    "privacy",
+];
+const SYSTEM_FIELDS: &[&str] = &[
+    "name",
+    "description",
+    "tag",
+    "pronouns",
+    "avatar_url",
+    "banner",
+    "color",
+    "timezone",
+    "privacy",
+];
+
+pub fn required<'a>(value: &'a Value, field: &str) -> Result<&'a str, Error> {
+    value[field]
+        .as_str()
+        .filter(|text| !text.is_empty())
+        .ok_or_else(|| Error::invalid(format!("{field} is required")))
+}
+
+fn patch(target: &mut Value, body: &Value, fields: &[&str]) -> Result<(), Error> {
+    for field in fields {
+        let Some(value) = body.get(field) else {
+            continue;
+        };
+        let valid = match *field {
+            "name" => value.is_string() || (fields == SYSTEM_FIELDS && value.is_null()),
+            "proxy_tags" => value.as_array().is_some_and(|tags| {
+                tags.iter().all(|tag| {
+                    tag.is_object()
+                        && ["prefix", "suffix"]
+                            .iter()
+                            .all(|key| tag[key].is_null() || tag[key].is_string())
+                })
+            }),
+            "keep_proxy" => value.is_boolean(),
+            "autoproxy_enabled" => value.is_null() || value.is_boolean(),
+            "privacy" => value.is_object(),
+            _ => value.is_string() || value.is_null(),
+        };
+        if !valid {
+            return Err(Error::invalid(format!("Invalid {field}")));
+        }
+        target[*field] = value.clone();
+    }
+    Ok(())
+}
+
+fn success(message: &str) -> Value {
+    json!({ "status": "success", "success": true, "message": message })
+}
+
+fn changed(kind: &str, value: Value) -> Vec<Value> {
+    vec![storage_event(kind, value)]
+}
+
+fn member_events(data: &Data) -> Vec<Value> {
+    vec![
+        storage_event("members_update", Value::Null),
+        storage_event("fronters_update", data.fronters()),
+    ]
+}
+
+fn validate_name(data: &Data, name: &str, except: Option<usize>) -> Result<(), Error> {
+    if name.trim().is_empty() {
+        return Err(Error::invalid("Name is required"));
+    }
+    if data.members.iter().enumerate().any(|(index, member)| {
+        Some(index) != except
+            && member["name"]
+                .as_str()
+                .is_some_and(|existing| existing.to_lowercase() == name.to_lowercase())
+    }) {
+        return Err(Error(
+            StatusCode::CONFLICT,
+            "A member with that name already exists".into(),
+        ));
+    }
+    Ok(())
+}
+
+pub async fn route(
+    web: &Web,
+    request: &mut Request<Incoming>,
+    path: &[&str],
+    query: &Query,
+    wants_jpcl: bool,
+) -> Result<Reply, Error> {
+    let method = request.method().clone();
+    let verb = method.as_str();
+    if path.first() == Some(&"auth") {
+        return web.auth.route(&web.store, request, path, query).await;
+    }
+    if let ["media", key] = path
+        && method == Method::GET
+    {
+        return crate::web_media::get(key).await;
+    }
+
+    let role = match (verb, path) {
+        (
+            "GET",
+            ["system" | "mental-state" | "members" | "fronters" | "switches" | "relationships"],
+        )
+        | ("GET", ["member", _] | ["members", _, "status"]) => None,
+        ("GET", ["user_info"])
+        | ("GET", ["metrics", "fronting-time" | "switch-frequency"])
+        | ("POST", ["switch" | "switch_front" | "multi_switch"])
+        | ("PUT", ["users", _]) => Some("user"),
+        ("GET" | "POST", ["users"])
+        | ("DELETE", ["users" | "switches", _])
+        | ("POST", ["mental-state"] | ["admin", "refresh"])
+        | ("POST" | "DELETE", ["members", _, "status"]) => Some("admin"),
+        ("PATCH", ["system"] | ["members", _])
+        | ("POST", ["members" | "relationships"] | ["members", _, "avatar" | "banner"])
+        | ("DELETE", ["members" | "relationships", _])
+        | ("GET", ["member-tags" | "member-pride"])
+        | ("POST", ["member-tags", _] | ["member-tags" | "member-pride", _, "add"])
+        | ("DELETE", ["member-tags" | "member-pride", _, _]) => Some("owner"),
+        _ => return Err(Error::missing("Unknown route")),
+    };
+    let user = match role {
+        Some("user") if path == ["switch"] && web.auth.is_bot(request) => Value::Null,
+        Some(role) => web.auth.authorize(&web.store, request, role).await?,
+        None => Value::Null,
+    };
+
+    let format = if method == Method::GET {
+        query
+            .get("format")
+            .map(String::as_str)
+            .unwrap_or(if wants_jpcl { "jpcl" } else { "plain" })
+    } else if wants_jpcl {
+        "jpcl"
+    } else {
+        "json"
+    };
+
+    if let ("POST", ["members", member, field @ ("avatar" | "banner")]) = (verb, path) {
+        let result = crate::web_media::upload(&web.store, request, member, field).await?;
+        return http::document(StatusCode::OK, &result, format, "");
+    }
+
+    let value = if method == Method::GET {
+        web.store
+            .read(|data| read(data, path, query, &user))
+            .await?
+    } else {
+        let mut body = if method == Method::DELETE || path == ["admin", "refresh"] {
+            json!({})
+        } else {
+            http::body(request).await?
+        };
+        if path.first() == Some(&"users") {
+            if let Some(body) = body.as_object_mut() {
+                body.remove("local_password");
+            }
+            crate::web_auth::hash_password(&mut body).await?;
+        }
+        web.store
+            .change(|data| write(data, verb, path, &body, &user))
+            .await?
+    };
+    let wrapper = path.first().copied().unwrap_or_default();
+    http::document(StatusCode::OK, &value, format, wrapper)
+}
+
+fn read(data: &Data, path: &[&str], query: &Query, user: &Value) -> Result<Value, Error> {
+    Ok(match path {
+        ["system"] => {
+            let mut system = data
+                .system
+                .clone()
+                .ok_or_else(|| Error::missing("No system yet. Import one first."))?;
+            system["mental_state"] = data.mental_state();
+            system
+        }
+        ["mental-state"] => data.mental_state(),
+        ["members"] => {
+            let mut members: Vec<_> = data
+                .members
+                .iter()
+                .map(|entry| data.member(entry))
+                .collect();
+            members.sort_by_cached_key(|entry| {
+                entry["name"].as_str().unwrap_or_default().to_lowercase()
+            });
+            json!(members)
+        }
+        ["member", identifier] => {
+            let index = data
+                .member_index(identifier)
+                .ok_or_else(|| Error::missing("Member not found"))?;
+            data.member(&data.members[index])
+        }
+        ["members", identifier, "status"] => json!({
+            "success": true,
+            "member_identifier": identifier,
+            "status": data.member_status.get(*identifier),
+        }),
+        ["fronters"] => data.fronters(),
+        ["switches"] => {
+            let limit = number(query, "limit", 100, 1000)?;
+            let before = query.get("before");
+            let entries: Vec<_> = data
+                .switches()
+                .into_iter()
+                .filter(|entry| {
+                    before.is_none_or(|before| {
+                        entry["timestamp"].as_str().unwrap_or_default() < before.as_str()
+                    })
+                })
+                .take(limit)
+                .collect();
+            json!(entries)
+        }
+        ["relationships"] => json!({ "status": "success", "relationships": data.relationships }),
+        ["member-tags"] => json!({ "status": "success", "member_tags": data.member_tags }),
+        ["member-pride"] => json!({ "status": "success", "member_pride": data.member_pride }),
+        ["users"] => json!(
+            data.users
+                .iter()
+                .map(crate::web_auth::public_user)
+                .collect::<Vec<_>>()
+        ),
+        ["user_info"] => crate::web_auth::public_user(user),
+        ["metrics", kind] => crate::metrics::calculate(data, kind, number(query, "days", 30, 365)?),
+        _ => return Err(Error::missing("Unknown route")),
+    })
+}
+
+fn number(query: &Query, key: &str, default: usize, max: usize) -> Result<usize, Error> {
+    match query.get(key) {
+        None => Ok(default),
+        Some(value) => value
+            .parse()
+            .ok()
+            .filter(|value| (1..=max).contains(value))
+            .ok_or_else(|| Error::invalid(format!("{key} must be between 1 and {max}"))),
+    }
+}
+
+fn write(
+    data: &mut Data,
+    verb: &str,
+    path: &[&str],
+    body: &Value,
+    user: &Value,
+) -> Result<(Value, Vec<Value>), Error> {
+    let result = match (verb, path) {
+        ("PATCH", ["system"]) => {
+            let system = data
+                .system
+                .as_mut()
+                .ok_or_else(|| Error::missing("No system yet. Import one first."))?;
+            patch(system, body, SYSTEM_FIELDS)?;
+            (system.clone(), changed("force_refresh", Value::Null))
+        }
+        ("POST", ["mental-state"]) => {
+            let level = required(body, "level")?;
+            if !(body["notes"].is_null() || body["notes"].is_string()) {
+                return Err(Error::invalid("Notes must be text"));
+            }
+            let state =
+                json!({ "level": level, "notes": body["notes"], "updated_at": store::now() });
+            data.mental_state = Some(state.clone());
+            (
+                success("Mental state updated"),
+                changed("mental_state_update", state),
+            )
+        }
+        ("POST", ["admin", "refresh"]) => (
+            success("Refresh sent"),
+            changed("force_refresh", Value::Null),
+        ),
+        ("POST", ["members"]) => {
+            let name = required(body, "name")?;
+            validate_name(data, name, None)?;
+            let system = data
+                .system
+                .as_ref()
+                .ok_or_else(|| Error::missing("No system yet. Import one first."))?;
+            let id = loop {
+                let id: String = store::random_bytes::<6>()
+                    .iter()
+                    .map(|seed| char::from(b'a' + seed % 26))
+                    .collect();
+                if data.member_index(&id).is_none() {
+                    break id;
+                }
+            };
+            let mut entry = json!({
+                "id": id,
+                "uuid": store::uuid(),
+                "system": system["id"],
+                "created": store::now(),
+                "name": name,
+                "keep_proxy": false,
+                "proxy_tags": [],
+                "privacy": {},
+                "message_count": 0,
+            });
+            patch(&mut entry, body, MEMBER_FIELDS)?;
+            let response = data.member(&entry);
+            data.members.push(entry);
+            (response, member_events(data))
+        }
+        ("PATCH", ["members", identifier]) => {
+            let index = data
+                .member_index(identifier)
+                .ok_or_else(|| Error::missing("Member not found"))?;
+            if let Some(name) = body["name"].as_str() {
+                validate_name(data, name, Some(index))?;
+            }
+            patch(&mut data.members[index], body, MEMBER_FIELDS)?;
+            (data.member(&data.members[index]), member_events(data))
+        }
+        ("DELETE", ["members", identifier]) => {
+            let index = data
+                .member_index(identifier)
+                .ok_or_else(|| Error::missing("Member not found"))?;
+            data.members.remove(index);
+            (success("Member deleted"), member_events(data))
+        }
+        ("POST", [kind @ ("switch" | "switch_front" | "multi_switch")]) => {
+            let single;
+            let empty = Vec::new();
+            let ids = match *kind {
+                "switch_front" => {
+                    single = vec![json!(required(body, "member_id")?)];
+                    &single
+                }
+                _ => {
+                    let key = if *kind == "switch" {
+                        "members"
+                    } else {
+                        "member_ids"
+                    };
+                    match body.get(key) {
+                        Some(value) => value
+                            .as_array()
+                            .ok_or_else(|| Error::invalid(format!("{key} must be an array")))?,
+                        None => &empty,
+                    }
+                }
+            };
+            if data.system.is_none() {
+                return Err(Error::missing("No system yet. Import one first."));
+            }
+            let front = data
+                .switch(ids)
+                .map_err(|message| Error(StatusCode::BAD_REQUEST, message.into()))?;
+            let response = match *kind {
+                "switch_front" => {
+                    json!({ "success": true, "message": "Front updated", "data": front })
+                }
+                "multi_switch" => json!({
+                    "status": "success",
+                    "message": "Fronters updated successfully",
+                    "fronters": front["members"],
+                    "count": ids.len(),
+                }),
+                _ => success("Front updated successfully"),
+            };
+            (response, changed("fronters_update", front))
+        }
+        ("DELETE", ["switches", id]) => {
+            remove(&mut data.switches, id, "Switch not found")?;
+            (
+                success("Switch deleted"),
+                changed("fronters_update", data.fronters()),
+            )
+        }
+        ("POST", ["members", identifier, "status"]) => {
+            let text = required(body, "text")?;
+            if text.chars().count() > 100 || !(body["emoji"].is_null() || body["emoji"].is_string())
+            {
+                return Err(Error::invalid("Invalid status"));
+            }
+            let value = json!({ "text": text, "emoji": body["emoji"], "updated_at": store::now() });
+            data.member_status
+                .insert((*identifier).into(), value.clone());
+            (
+                json!({ "success": true, "status": value }),
+                member_events(data),
+            )
+        }
+        ("DELETE", ["members", identifier, "status"]) => {
+            let removed = data.member_status.remove(*identifier).is_some();
+            (
+                json!({ "success": removed, "message": if removed { "Status cleared" } else { "No status found" } }),
+                member_events(data),
+            )
+        }
+        ("POST", ["relationships"]) => {
+            let left = required(body, "memberA")?;
+            let right = required(body, "memberB")?;
+            if left == right
+                || [left, right]
+                    .iter()
+                    .any(|id| !data.members.iter().any(|member| member["id"] == *id))
+            {
+                return Err(Error::invalid("Select two distinct members"));
+            }
+            if data.relationships.iter().any(|entry| {
+                entry["members"] == json!([left, right]) || entry["members"] == json!([right, left])
+            }) {
+                return Err(Error(
+                    StatusCode::CONFLICT,
+                    "These members are already linked".into(),
+                ));
+            }
+            let relationship = json!({
+                "id": store::uuid(),
+                "members": [left, right],
+                "type": body["type"].as_str().unwrap_or("partner"),
+                "since": body["since"],
+            });
+            data.relationships.push(relationship.clone());
+            (
+                json!({ "success": true, "relationship": relationship }),
+                vec![],
+            )
+        }
+        ("DELETE", ["relationships", id]) => {
+            remove(&mut data.relationships, id, "Relationship not found")?;
+            (success("Relationship deleted"), vec![])
+        }
+        (
+            _,
+            [
+                kind @ ("member-tags" | "member-pride"),
+                identifier,
+                rest @ ..,
+            ],
+        ) => {
+            let index = data
+                .member_index(identifier)
+                .ok_or_else(|| Error::missing("Member not found"))?;
+            let member = &data.members[index];
+            let id = required(member, "id")?.to_owned();
+            let name = required(member, "name")?;
+            let (map, field, singular) = if *kind == "member-tags" {
+                (&mut data.member_tags, "tags", "tag")
+            } else {
+                (&mut data.member_pride, "pride", "identity")
+            };
+            let mut values = map
+                .get(&id)
+                .or_else(|| map.get(name))
+                .and_then(Value::as_array)
+                .cloned()
+                .unwrap_or_default();
+            match (verb, rest) {
+                ("POST", []) => {
+                    values = body[field]
+                        .as_array()
+                        .filter(|items| items.iter().all(Value::is_string))
+                        .cloned()
+                        .ok_or_else(|| {
+                            Error::invalid(format!("{field} must be an array of strings"))
+                        })?;
+                }
+                ("POST", ["add"]) => {
+                    let value = json!(required(body, singular)?);
+                    if !values.contains(&value) {
+                        values.push(value);
+                    }
+                }
+                ("DELETE", [value]) => values.retain(|entry| entry != *value),
+                _ => return Err(Error::missing("Unknown route")),
+            }
+            map.insert(id, json!(values));
+            (
+                json!({ "success": true, "status": "success", field: values }),
+                member_events(data),
+            )
+        }
+        (_, ["users", rest @ ..]) => (
+            crate::web_auth::write_user(data, verb, rest, body, user)?,
+            vec![],
+        ),
+        _ => return Err(Error::missing("Unknown route")),
+    };
+    Ok(result)
+}
+
+fn remove(entries: &mut Vec<Value>, id: &str, message: &str) -> Result<(), Error> {
+    let index = entries
+        .iter()
+        .position(|entry| entry["id"] == id)
+        .ok_or_else(|| Error::missing(message))?;
+    entries.remove(index);
+    Ok(())
+}
+
+pub async fn openapi(web: &Web, request: &Request<Incoming>, name: &str) -> Result<Reply, Error> {
+    web.auth.authorize(&web.store, request, "user").await?;
+    let spec: Value =
+        serde_json::from_str(include_str!("../web/openapi.json")).map_err(anyhow::Error::from)?;
+    http::document(
+        StatusCode::OK,
+        &spec,
+        if name.ends_with(".jp") {
+            "jpcl"
+        } else {
+            "json"
+        },
+        "",
+    )
+}
diff --git a/src/web_auth.rs b/src/web_auth.rs
new file mode 100644
index 0000000..4de13fb
--- /dev/null
+++ b/src/web_auth.rs
@@ -0,0 +1,392 @@
+// src/web_auth.rs
+
+use std::num::NonZeroU32;
+
+use base64::{Engine, engine::general_purpose::URL_SAFE_NO_PAD};
+use chrono::Utc;
+use hyper::{Method, Request, StatusCode, body::Incoming, header};
+use ring::{digest, hmac, pbkdf2};
+use serde_json::{Value, json};
+
+use crate::{
+    http::{self, Error, Query, Reply},
+    store::{self, Data, Store},
+    web_api::required,
+};
+
+pub struct Auth {
+    owner_username: String,
+    owner_password: Option<String>,
+    bot_token: Option<String>,
+}
+
+const ROUNDS: NonZeroU32 = NonZeroU32::new(600_000).unwrap();
+
+fn unauthorized() -> Error {
+    Error(
+        StatusCode::UNAUTHORIZED,
+        "Invalid credentials or expired session".into(),
+    )
+}
+
+fn forbidden(message: &str) -> Error {
+    Error(StatusCode::FORBIDDEN, message.into())
+}
+
+fn token_key(token: &str) -> String {
+    URL_SAFE_NO_PAD.encode(digest::digest(&digest::SHA256, token.as_bytes()))
+}
+
+fn secrets_equal(secret: &str, candidate: &str) -> bool {
+    let key = hmac::Key::new(hmac::HMAC_SHA256, secret.as_bytes());
+    let expected = hmac::sign(&key, secret.as_bytes());
+    hmac::verify(&key, candidate.as_bytes(), expected.as_ref()).is_ok()
+}
+
+impl Auth {
+    #[cfg(test)]
+    pub fn for_tests() -> Self {
+        Self {
+            owner_username: "test-admin".into(),
+            owner_password: Some("test-password".into()),
+            bot_token: None,
+        }
+    }
+
+    pub fn from_env() -> Self {
+        Self {
+            owner_username: std::env::var("ADMIN_USERNAME").unwrap_or_else(|_| "admin".into()),
+            owner_password: nonempty_env("ADMIN_PASSWORD"),
+            bot_token: nonempty_env("BOT_TOKEN"),
+        }
+    }
+
+    pub async fn seed_owner(&self, store: &Store) -> anyhow::Result<()> {
+        if self.owner_password.is_none() {
+            return Ok(());
+        }
+        store.change(|data| {
+            if let Some(existing) = data.users.iter_mut().find(|user| user["username"].as_str()
+                .is_some_and(|username| username.eq_ignore_ascii_case(&self.owner_username))) {
+                existing["is_admin"] = json!(true);
+                existing["is_owner"] = json!(true);
+            } else {
+                data.users.push(json!({
+                    "id": store::uuid(),
+                    "username": self.owner_username,
+                    "display_name": std::env::var("ADMIN_DISPLAY_NAME").unwrap_or_else(|_| "Administrator".into()),
+                    "created_at": store::now(),
+                    "is_admin": true,
+                    "is_owner": true,
+                }));
+            }
+            Ok(((), vec![]))
+        }).await
+    }
+
+    pub fn is_bot(&self, request: &Request<Incoming>) -> bool {
+        self.bot_token
+            .as_deref()
+            .zip(http::bearer(request))
+            .is_some_and(|(expected, provided)| secrets_equal(expected, provided))
+    }
+
+    pub async fn authorize(
+        &self,
+        store: &Store,
+        request: &Request<Incoming>,
+        role: &str,
+    ) -> Result<Value, Error> {
+        let token = http::bearer(request).ok_or_else(unauthorized)?;
+        let user = store
+            .read(|data| {
+                let session = data.sessions.get(&token_key(token))?;
+                if session["expires"].as_i64()? <= Utc::now().timestamp() {
+                    return None;
+                }
+                data.users
+                    .iter()
+                    .find(|user| user["id"] == session["user_id"])
+                    .cloned()
+            })
+            .await
+            .ok_or_else(unauthorized)?;
+        match role {
+            "admin" if user["is_admin"] != true => Err(forbidden("Admin privileges required")),
+            "owner" if user["is_owner"] != true => Err(forbidden("Owner privileges required")),
+            _ => Ok(user),
+        }
+    }
+
+    pub async fn route(
+        &self,
+        store: &Store,
+        request: &mut Request<Incoming>,
+        path: &[&str],
+        query: &Query,
+    ) -> Result<Reply, Error> {
+        let jpcl = request
+            .headers()
+            .get(header::ACCEPT)
+            .and_then(|value| value.to_str().ok())
+            .is_some_and(|value| {
+                value
+                    .split(',')
+                    .any(|value| value.trim().eq_ignore_ascii_case(http::JPCL))
+            });
+        let format = if jpcl { "jpcl" } else { "json" };
+        let result = match (request.method().clone(), path) {
+            (Method::POST, ["auth", "login"]) => {
+                let body = http::body(request).await?;
+                let username = required(&body, "username")?;
+                let password = required(&body, "password")?;
+                if password.len() > 1024 {
+                    return Err(unauthorized());
+                }
+                let user = store
+                    .read(|data| {
+                        data.users
+                            .iter()
+                            .find(|user| {
+                                user["username"]
+                                    .as_str()
+                                    .is_some_and(|name| name.eq_ignore_ascii_case(username))
+                            })
+                            .cloned()
+                    })
+                    .await
+                    .ok_or_else(unauthorized)?;
+                let valid = if username.eq_ignore_ascii_case(&self.owner_username)
+                    && user["is_owner"] == true
+                {
+                    self.owner_password
+                        .as_deref()
+                        .is_some_and(|expected| secrets_equal(expected, password))
+                } else {
+                    let password = password.to_owned();
+                    let hash = user["local_password"].clone();
+                    tokio::task::spawn_blocking(move || verify_password(&hash, &password))
+                        .await
+                        .map_err(anyhow::Error::from)?
+                };
+                if !valid {
+                    return Err(unauthorized());
+                }
+
+                let token = URL_SAFE_NO_PAD.encode(store::random_bytes::<32>());
+                let now = Utc::now().timestamp();
+                store
+                    .change::<_, Error>(|data| {
+                        if !data.users.iter().any(|current| {
+                            current["id"] == user["id"]
+                                && current["local_password"] == user["local_password"]
+                        }) {
+                            return Err(unauthorized());
+                        }
+                        data.sessions.retain(|_, session| {
+                            session["expires"]
+                                .as_i64()
+                                .is_some_and(|expiry| expiry > now)
+                        });
+                        data.sessions.insert(
+                            token_key(&token),
+                            json!({ "user_id": user["id"], "expires": now + 86_400 }),
+                        );
+                        Ok(((), vec![]))
+                    })
+                    .await?;
+                json!({ "access_token": token, "token_type": "bearer" })
+            }
+            (Method::POST, ["auth", "logout"]) => {
+                if let Some(token) = http::bearer(request) {
+                    store
+                        .change::<_, Error>(|data| {
+                            data.sessions.remove(&token_key(token));
+                            Ok(((), vec![]))
+                        })
+                        .await?;
+                }
+                json!({ "ok": true, "end_session_url": null })
+            }
+            (Method::GET, ["auth", role @ ("is_admin" | "is_owner")]) => {
+                let user = self.authorize(store, request, "user").await?;
+                let key = if *role == "is_admin" {
+                    "isAdmin"
+                } else {
+                    "isOwner"
+                };
+                let format = query.get("format").map(String::as_str).unwrap_or(if jpcl {
+                    "jpcl"
+                } else {
+                    "plain"
+                });
+                return http::document(
+                    StatusCode::OK,
+                    &json!({ key: user[*role] == true }),
+                    format,
+                    "",
+                );
+            }
+            _ => return Err(Error::missing("Unknown route")),
+        };
+        http::document(StatusCode::OK, &result, format, "")
+    }
+}
+
+pub fn nonempty_env(name: &str) -> Option<String> {
+    std::env::var(name).ok().filter(|value| !value.is_empty())
+}
+
+pub fn public_user(user: &Value) -> Value {
+    json!({
+        "id": user["id"],
+        "username": user["username"],
+        "display_name": user["display_name"],
+        "email": user["email"],
+        "created_at": user["created_at"],
+        "is_admin": user["is_admin"] == true,
+        "is_owner": user["is_owner"] == true,
+        "avatar_url": user["avatar_url"],
+    })
+}
+
+fn verify_password(hash: &Value, password: &str) -> bool {
+    let Some(salt) = hash["salt"]
+        .as_str()
+        .and_then(|salt| URL_SAFE_NO_PAD.decode(salt).ok())
+    else {
+        return false;
+    };
+    let Some(hash) = hash["hash"]
+        .as_str()
+        .and_then(|hash| URL_SAFE_NO_PAD.decode(hash).ok())
+    else {
+        return false;
+    };
+    hash.len() == 32
+        && pbkdf2::verify(
+            pbkdf2::PBKDF2_HMAC_SHA256,
+            ROUNDS,
+            &salt,
+            password.as_bytes(),
+            &hash,
+        )
+        .is_ok()
+}
+
+pub async fn hash_password(body: &mut Value) -> Result<(), Error> {
+    let Some(value) = body
+        .as_object_mut()
+        .and_then(|body| body.remove("password"))
+    else {
+        return Ok(());
+    };
+    let password = value
+        .as_str()
+        .filter(|value| (8..=1024).contains(&value.len()))
+        .ok_or_else(|| Error::invalid("Password must be 8 to 1024 bytes"))?
+        .to_owned();
+    let hash = tokio::task::spawn_blocking(move || {
+        let salt = store::random_bytes::<16>();
+        let mut hash = [0; 32];
+        pbkdf2::derive(
+            pbkdf2::PBKDF2_HMAC_SHA256,
+            ROUNDS,
+            &salt,
+            password.as_bytes(),
+            &mut hash,
+        );
+        json!({ "salt": URL_SAFE_NO_PAD.encode(salt), "hash": URL_SAFE_NO_PAD.encode(hash) })
+    })
+    .await
+    .map_err(anyhow::Error::from)?;
+    body["local_password"] = hash;
+    Ok(())
+}
+
+pub fn write_user(
+    data: &mut Data,
+    method: &str,
+    path: &[&str],
+    body: &Value,
+    actor: &Value,
+) -> Result<Value, Error> {
+    let owner = actor["is_owner"] == true;
+    let admin = actor["is_admin"] == true;
+    if method == "POST" {
+        let username = required(body, "username")?.trim();
+        if username.is_empty()
+            || data.users.iter().any(|entry| {
+                entry["username"]
+                    .as_str()
+                    .is_some_and(|existing| existing.eq_ignore_ascii_case(username))
+            })
+        {
+            return Err(Error::invalid("Username is empty or already in use"));
+        }
+        let mut entry = json!({
+            "id": store::uuid(),
+            "username": username,
+            "created_at": store::now(),
+            "is_owner": false,
+            "is_admin": false,
+        });
+        update_fields(&mut entry, body, owner)?;
+        let response = public_user(&entry);
+        data.users.push(entry);
+        return Ok(response);
+    }
+
+    let id = path[0];
+    let index = data
+        .users
+        .iter()
+        .position(|entry| entry["id"] == id)
+        .ok_or_else(|| Error::missing("User not found"))?;
+    let user = &mut data.users[index];
+    let own_account = actor["id"] == id;
+    if !(own_account || admin) || (!own_account && user["is_admin"] == true && !owner) {
+        return Err(forbidden("You cannot modify this account"));
+    }
+    if method == "DELETE" {
+        if user["is_owner"] == true {
+            return Err(forbidden("The owner account cannot be deleted"));
+        }
+        data.users.remove(index);
+        data.sessions.retain(|_, session| session["user_id"] != id);
+        return Ok(json!({ "status": "success", "message": "User deleted" }));
+    }
+
+    update_fields(user, body, owner)?;
+    let response = public_user(user);
+    if body.get("local_password").is_some() {
+        data.sessions.retain(|_, session| session["user_id"] != id);
+    }
+    Ok(response)
+}
+
+fn update_fields(user: &mut Value, body: &Value, owner: bool) -> Result<(), Error> {
+    for field in ["display_name", "avatar_url", "email"] {
+        if let Some(value) = body.get(field) {
+            if !(value.is_null() || value.is_string()) {
+                return Err(Error::invalid(format!("Invalid {field}")));
+            }
+            user[field] = value.clone();
+        }
+    }
+    if let Some(value) = body.get("is_admin").and_then(Value::as_bool)
+        && user["is_admin"] != value
+    {
+        if !owner || (user["is_owner"] == true && !value) {
+            return Err(forbidden("Only the owner can assign admin privileges"));
+        }
+        user["is_admin"] = json!(value);
+    }
+    if let Some(hash) = body.get("local_password") {
+        if user["is_owner"] == true {
+            return Err(forbidden("Set the owner password with ADMIN_PASSWORD"));
+        }
+        user["local_password"] = hash.clone();
+    }
+    Ok(())
+}
diff --git a/src/web_media.rs b/src/web_media.rs
new file mode 100644
index 0000000..a0dfbb0
--- /dev/null
+++ b/src/web_media.rs
@@ -0,0 +1,98 @@
+// src/web_media.rs
+
+use std::path::Path;
+
+use hyper::{Request, StatusCode, body::Incoming, header};
+use serde_json::{Value, json};
+
+use crate::{
+    http::{self, Error, Reply},
+    storage_event,
+    store::{self, Store},
+};
+
+const MEDIA: &str = "data/media";
+
+fn media_type(content: &[u8]) -> Option<&'static str> {
+    if content.starts_with(b"\x89PNG\r\n\x1a\n") {
+        Some("image/png")
+    } else if content.starts_with(b"\xff\xd8\xff") {
+        Some("image/jpeg")
+    } else if content.starts_with(b"GIF87a") || content.starts_with(b"GIF89a") {
+        Some("image/gif")
+    } else if content.starts_with(b"RIFF") && content.get(8..12) == Some(b"WEBP") {
+        Some("image/webp")
+    } else {
+        None
+    }
+}
+
+pub async fn get(key: &str) -> Result<Reply, Error> {
+    if key.is_empty()
+        || !key
+            .bytes()
+            .all(|byte| byte.is_ascii_alphanumeric() || b"-_".contains(&byte))
+    {
+        return Err(Error::missing("Image not found"));
+    }
+    let content = tokio::fs::read(Path::new(MEDIA).join(key))
+        .await
+        .map_err(|_| Error::missing("Image not found"))?;
+    let mime = media_type(&content).ok_or_else(|| Error::missing("Image not found"))?;
+    Ok(http::reply(StatusCode::OK, mime, content))
+}
+
+pub async fn upload(
+    store: &Store,
+    request: &mut Request<Incoming>,
+    identifier: &str,
+    field: &str,
+) -> Result<Value, Error> {
+    let supplied_type = request
+        .headers()
+        .get(header::CONTENT_TYPE)
+        .and_then(|value| value.to_str().ok())
+        .unwrap_or_default()
+        .to_owned();
+    let bytes = http::bytes(request, 10 * 1024 * 1024).await?;
+    if media_type(&bytes) != Some(supplied_type.as_str()) {
+        return Err(Error(
+            StatusCode::UNSUPPORTED_MEDIA_TYPE,
+            "Use a PNG, JPEG, GIF or WebP image".into(),
+        ));
+    }
+    let key = format!("member-{field}-{}", store::uuid());
+    tokio::fs::create_dir_all(MEDIA)
+        .await
+        .map_err(anyhow::Error::from)?;
+    let path = Path::new(MEDIA).join(&key);
+    tokio::fs::write(&path, bytes)
+        .await
+        .map_err(anyhow::Error::from)?;
+    let result = store
+        .change(|data| {
+            let index = data
+                .member_index(identifier)
+                .ok_or_else(|| Error::missing("Member not found"))?;
+            let url = format!("/api/plural/media/{key}");
+            let member = &mut data.members[index];
+            if field == "avatar" {
+                member["avatar_url"] = json!(url);
+                member["webhook_avatar_url"] = Value::Null;
+            } else {
+                member["banner"] = json!(url);
+            }
+            Ok((
+                data.member(&data.members[index]),
+                vec![
+                    storage_event("members_update", Value::Null),
+                    storage_event("fronters_update", data.fronters()),
+                ],
+            ))
+        })
+        .await;
+    if result.is_err() {
+        let _ = tokio::fs::remove_file(path).await;
+    }
+    result
+}
diff --git a/src/web_tests.rs b/src/web_tests.rs
new file mode 100644
index 0000000..f35a708
--- /dev/null
+++ b/src/web_tests.rs
@@ -0,0 +1,250 @@
+// src/web_tests.rs
+
+use std::sync::Arc;
+
+use anyhow::Result;
+use futures_util::{SinkExt, StreamExt};
+use http_body_util::{BodyExt, Full};
+use hyper::{Request, StatusCode, body::Bytes, client::conn::http1};
+use hyper_util::rt::TokioIo;
+use serde_json::{Value, json};
+use tokio_tungstenite::tungstenite::{Message, client::IntoClientRequest};
+
+use crate::{
+    http, import,
+    store::{self, Store},
+    web_api::Web,
+    web_auth::Auth,
+};
+
+async fn request(
+    web: &Arc<Web>,
+    method: &str,
+    endpoint: &str,
+    token: Option<&str>,
+    body: Option<Value>,
+) -> Result<(StatusCode, Value)> {
+    let (server, client) = tokio::io::duplex(64 * 1024);
+    tokio::spawn(http::connection(server, web.clone()));
+    let (mut connection, driver) = http1::handshake(TokioIo::new(client)).await?;
+    tokio::spawn(driver);
+
+    let mut request = Request::builder()
+        .method(method)
+        .uri(endpoint)
+        .header("Accept", http::JPCL);
+    if let Some(token) = token {
+        request = request.header("Authorization", format!("Bearer {token}"));
+    }
+    let content = if let Some(body) = body {
+        request = request.header("Content-Type", http::JPCL);
+        store::encode(&body)?
+    } else {
+        String::new()
+    };
+    let response = connection
+        .send_request(request.body(Full::new(Bytes::from(content)))?)
+        .await?;
+    let status = response.status();
+    let text = response.into_body().collect().await?.to_bytes();
+    Ok((status, store::decode(std::str::from_utf8(&text)?)?))
+}
+
+#[tokio::test]
+async fn local_site_login_switch_events_and_restart() -> Result<()> {
+    let location = tempfile::tempdir()?;
+    let path = location.path().join("system.jp");
+    let store = Arc::new(Store::open(path.clone())?);
+    store.initialize_system().await?;
+    let auth = Auth::for_tests();
+    auth.seed_owner(&store).await?;
+    let web = Arc::new(Web {
+        store,
+        web_root: location.path().to_owned(),
+        auth,
+    });
+
+    let (status, _) = request(
+        &web,
+        "POST",
+        "/api/plural/members",
+        None,
+        Some(json!({ "name": "Example" })),
+    )
+    .await?;
+    assert_eq!(status, StatusCode::UNAUTHORIZED);
+
+    let (status, login) = request(
+        &web,
+        "POST",
+        "/api/plural/auth/login",
+        None,
+        Some(json!({
+            "username": "test-admin",
+            "password": "test-password",
+        })),
+    )
+    .await?;
+    assert_eq!(status, StatusCode::OK);
+    let token = login["access_token"].as_str().expect("session token");
+    let (status, profile) =
+        request(&web, "GET", "/api/plural/user_info", Some(token), None).await?;
+    assert_eq!(status, StatusCode::OK);
+    assert!(profile.get("is_pet").is_none());
+    let (status, _) = request(&web, "GET", "/api/plural/auth/is_pet", Some(token), None).await?;
+    assert_eq!(status, StatusCode::NOT_FOUND);
+
+    let (status, _) = request(&web, "GET", "/api/openapi.jp", Some(token), None).await?;
+    assert_eq!(status, StatusCode::OK);
+
+    let (status, member) = request(
+        &web,
+        "POST",
+        "/api/plural/members",
+        Some(token),
+        Some(json!({ "name": "Example" })),
+    )
+    .await?;
+    assert_eq!(status, StatusCode::OK);
+    let id = &member["id"];
+
+    let (server, client) = tokio::io::duplex(64 * 1024);
+    tokio::spawn(http::connection(server, web.clone()));
+    let mut handshake = "ws://127.0.0.1/api/plural/ws".into_client_request()?;
+    handshake
+        .headers_mut()
+        .insert("Sec-WebSocket-Protocol", "jpcl".parse()?);
+    let (mut socket, _) = tokio_tungstenite::client_async(handshake, client).await?;
+    socket.send(Message::Text("ping".into())).await?;
+    assert_eq!(
+        socket.next().await.transpose()?,
+        Some(Message::Text("pong".into()))
+    );
+
+    let (status, _) = request(
+        &web,
+        "POST",
+        "/api/plural/switch",
+        Some(token),
+        Some(json!({ "members": [id] })),
+    )
+    .await?;
+    assert_eq!(status, StatusCode::OK);
+    let event = tokio::time::timeout(std::time::Duration::from_secs(2), socket.next())
+        .await?
+        .transpose()?
+        .expect("switch event")
+        .into_text()?;
+    let event = store::decode(&event)?;
+    assert_eq!(event["type"], "fronters_update");
+    assert_eq!(event["data"]["members"][0]["id"], *id);
+
+    let restarted = Store::open(path)?;
+    let front = restarted.read(|data| data.fronters()).await;
+    assert_eq!(front["members"][0]["name"], "Example");
+
+    let (status, _) = request(&web, "POST", "/api/plural/auth/logout", Some(token), None).await?;
+    assert_eq!(status, StatusCode::OK);
+    let (status, _) = request(&web, "GET", "/api/plural/user_info", Some(token), None).await?;
+    assert_eq!(status, StatusCode::UNAUTHORIZED);
+    Ok(())
+}
+
+#[test]
+fn imports_d1_json_and_jpcl_without_overwriting_existing_data() -> Result<()> {
+    let source = json!([
+        { "success": true, "results": [{ "id": "sample", "privacy": "{}" }] },
+        { "success": true, "results": [{
+            "id": "test",
+            "name": "Example",
+            "system_id": "sample",
+            "proxy_tags": "jpcl: 1\nvalue: [{ prefix: \"x:\" }]",
+            "keep_proxy": 1,
+            "autoproxy_enabled": 0,
+        }] },
+        { "success": true, "results": [{
+            "id": "switch",
+            "system_id": "sample",
+            "timestamp": "2026-11-24T00:00:00.000Z",
+            "members": "[\"test\"]",
+        }] },
+        { "success": true, "results": [{
+            "key": "member_tags",
+            "value": "{\"test\":[\"example\"]}",
+        }] },
+    ]);
+    let data = import::from_d1(&serde_json::to_vec(&source)?)?;
+    let member = &data.fronters()["members"][0];
+    assert_eq!(member["system"], "sample");
+    assert_eq!(member["keep_proxy"], true);
+    assert_eq!(member["autoproxy_enabled"], false);
+    assert_eq!(member["proxy_tags"][0]["prefix"], "x:");
+    assert_eq!(member["tags"][0], "example");
+    let folder = tempfile::tempdir()?;
+    let file = folder.path().join("system.jp");
+    Store::import(&file, data.clone())?;
+    assert!(Store::import(&file, data).is_err());
+    Ok(())
+}
+
+#[tokio::test]
+async fn migrates_embedded_members_and_updates_only_their_files() -> Result<()> {
+    let directory = tempfile::tempdir()?;
+    let path = directory.path().join("system.jp");
+    let members = directory.path().join("members");
+    std::fs::create_dir(&members)?;
+
+    let first = json!({ "id": "first", "name": "First" });
+    let second = json!({ "id": "second", "name": "Second" });
+    let legacy = store::encode(&json!({
+        "system": { "id": "example" },
+        "members": [&first, &second],
+        "member_tags": { "first": ["Example"] },
+    }))?;
+    std::fs::write(&path, &legacy)?;
+
+    let first_path = members.join("first.jp");
+    let second_path = members.join("second.jp");
+    let conflict = store::encode(&json!({ "id": "first", "name": "Different" }))?;
+    std::fs::write(&first_path, &conflict)?;
+    assert!(Store::open(path.clone()).is_err());
+    assert_eq!(std::fs::read_to_string(&path)?, legacy);
+    assert_eq!(std::fs::read_to_string(&first_path)?, conflict);
+
+    std::fs::write(&first_path, store::encode(&first)?)?;
+    let store = Store::open(path.clone())?;
+    let system = std::fs::read_to_string(&path)?;
+    let second_document = std::fs::read_to_string(&second_path)?;
+    assert!(store::decode(&system)?.get("members").is_none());
+    assert_eq!(store::decode(&second_document)?, second);
+
+    store
+        .change::<_, anyhow::Error>(|data| {
+            let index = data.member_index("first").expect("first member");
+            data.members[index]["name"] = json!("Updated");
+            Ok(((), vec![]))
+        })
+        .await?;
+    assert_eq!(
+        store::decode(&std::fs::read_to_string(&first_path)?)?["name"],
+        "Updated"
+    );
+    assert_eq!(std::fs::read_to_string(&path)?, system);
+    assert_eq!(std::fs::read_to_string(&second_path)?, second_document);
+
+    store
+        .change::<_, anyhow::Error>(|data| {
+            data.members.retain(|member| member["id"] != "second");
+            Ok(((), vec![]))
+        })
+        .await?;
+    assert!(!second_path.exists());
+    let reloaded = Store::open(path)?;
+    assert_eq!(
+        reloaded
+            .read(|data| data.member(&data.members[0])["tags"].clone())
+            .await,
+        json!(["Example"])
+    );
+    Ok(())
+}
diff --git a/start b/start
new file mode 100755
index 0000000..cd891d9
--- /dev/null
+++ b/start
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+# start
+
+set -euo pipefail
+cd -- "$(dirname -- "${BASH_SOURCE[0]}")"
+
+if [[ ! -f .env && -z "${ADMIN_PASSWORD:-}" ]]; then
+  (umask 077; set -o noclobber; cat .env.example > .env) || test -f .env
+  printf 'Set ADMIN_PASSWORD in %s/.env, then run ./start again.\n' "$PWD" >&2
+  exit 1
+fi
+
+if [[ "${1:-}" == --build ]]; then
+  shift
+  ./build
+elif [[ ! -x target/release/proxybot || ! -f web/dist/index.html ]]; then
+  ./build
+fi
+
+exec ./target/release/proxybot "$@"
diff --git a/web/bun.lock b/web/bun.lock
new file mode 100644
index 0000000..8f4a5be
--- /dev/null
+++ b/web/bun.lock
@@ -0,0 +1,228 @@
+{
+  "lockfileVersion": 1,
+  "configVersion": 1,
+  "workspaces": {
+    "": {
+      "name": "doughmination-system",
+      "dependencies": {
+        "jpcl-lang": "^2.0.0",
+      },
+      "devDependencies": {
+        "@iconify-json/ic": "^1.2.4",
+        "@sveltejs/kit": "3.1.0",
+        "@sveltejs/vite-plugin-svelte": "7.3.1",
+        "@types/node": "26.6.6",
+        "svelte": "5.57.3",
+        "svelte-check": "4.7.7",
+        "typescript": "~6.0.3",
+        "unplugin-icons": "^24.0.0",
+        "vite": "8.3.5",
+      },
+    },
+  },
+  "packages": {
+    "@antfu/install-pkg": ["@antfu/[email protected]", "", { "dependencies": { "package-manager-detector": "^1.3.0", "tinyexec": "^1.0.1" } }, "sha512-MGQsmw10ZyI+EJo45CdSER4zEb+p31LpDAFp2Z3gkSd1yqVZGi0Ebx++YTEMonJy4oChEMLsxZ64j8FH6sSqtQ=="],
+
+    "@iconify-json/ic": ["@iconify-json/[email protected]", "", { "dependencies": { "@iconify/types": "*" } }, "sha512-pzPMmrZrBQuwT7nmtrYdkttun8KalRGgZPIL1Ny9KpF2zjRGIUPN+npTfuD3lrgO/OnSwAoJWuekQwBpt/Cqrw=="],
+
+    "@iconify/types": ["@iconify/[email protected]", "", {}, "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg=="],
+
+    "@iconify/utils": ["@iconify/[email protected]", "", { "dependencies": { "@antfu/install-pkg": "^2.0.1", "@iconify/types": "^2.0.0", "import-meta-resolve": "^4.2.0" } }, "sha512-JZHlwdID+dy+lTgbYC8NEC4zeugqeYsc6jewvzb4c58kHauJn+X7rNwQjxz5p2qSjqaEeQoLkCIQ9v/H4PK0/w=="],
+
+    "@jridgewell/gen-mapping": ["@jridgewell/[email protected]", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA=="],
+
+    "@jridgewell/remapping": ["@jridgewell/[email protected]", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ=="],
+
+    "@jridgewell/resolve-uri": ["@jridgewell/[email protected]", "", {}, "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw=="],
+
+    "@jridgewell/sourcemap-codec": ["@jridgewell/[email protected]", "", {}, "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw=="],
+
+    "@jridgewell/trace-mapping": ["@jridgewell/[email protected]", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw=="],
+
+    "@oxc-project/types": ["@oxc-project/[email protected]", "", {}, "sha512-SeE8JPwW1xs1tHeNycjUtUBdhorRa8o4jlvjwk49R7/Z291i+4DQa7JJIgOm/TaYQZx+QrPQbVJ/9c8dMIZN8Q=="],
+
+    "@polka/url": ["@polka/[email protected]", "", {}, "sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww=="],
+
+    "@rolldown/binding-android-arm-eabi": ["@rolldown/[email protected]", "", { "os": "android", "cpu": "arm" }, "sha512-aLcgK9gIJ3YRvrrtfSBbRa27F5WrpiTaPulnFpsHPxpUHgFlSgnU4854MHwoRGEBhfRJDWCS2WQ7lIjskE9Olw=="],
+
+    "@rolldown/binding-android-arm64": ["@rolldown/[email protected]", "", { "os": "android", "cpu": "arm64" }, "sha512-xD7DdZCrbThKuxNg7ooQmvp07ys4J/pnSEMTG3/OdOWl6daC67m/Q4fL78sRHMxTH/N4fGUbYhcPM0MF5WFHkg=="],
+
+    "@rolldown/binding-darwin-arm64": ["@rolldown/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-m2WuQ6r0B4OTYxyPpNLtXaMRbRDUbG8YQV2Q3KTdSSK8Th6KHCnC8jVCJt8bvYeSB5WivkkNbc85mKadaSdOxA=="],
+
+    "@rolldown/binding-darwin-x64": ["@rolldown/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-5RtnsHM36nodM9WbMy+zip0LGS/G+y5wro5RHrpOlr4ac24+1zSi9kiV2MP1myZeZ/ifEHfulQcWjnAXzc2C2A=="],
+
+    "@rolldown/binding-freebsd-x64": ["@rolldown/[email protected]", "", { "os": "freebsd", "cpu": "x64" }, "sha512-g3l09pyFqhu+135JKkbkwiKGQmwU5hUMUPJ4VdBADvuqR8d33L6H578rh8m7rtxbdp+VmX/+nzI7nvhSZlzpUQ=="],
+
+    "@rolldown/binding-linux-arm-gnueabihf": ["@rolldown/[email protected]", "", { "os": "linux", "cpu": "arm" }, "sha512-nIe3VugI97nGQtspPxDqA4sXMUpeiocKIP/CqpY/u/vgbT+alX+cVxu1C/oVBPKg4feNTmYovE91v4DgXvXNwQ=="],
+
+    "@rolldown/binding-linux-arm64-gnu": ["@rolldown/[email protected]", "", { "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-iTBjXx+B5QSvgI89lJfmqh4wTh8NabR1YZIIN3hNx4zSG0EVfVqkOvLulNpG4251pbd6/IAmZ/LefVk1Y4rPhw=="],
+
+    "@rolldown/binding-linux-arm64-musl": ["@rolldown/[email protected]", "", { "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-uN26XOnVR7rqQupG3V9oAG2EGGatWjcJHOeDOHUFCh4TBWmP2tHTFoVN13aYbwfm0aHqJAEmcwhAu6sooIjfqQ=="],
+
+    "@rolldown/binding-linux-ppc64-gnu": ["@rolldown/[email protected]", "", { "os": "linux", "cpu": "ppc64", "libc": "glibc" }, "sha512-9nWkcdd+H+XhaA3fQIwpHnKIrfx/PQ6rO0pivr78Og07tXlUlctBBJoEYLPfhTmCR/QxEVdn6uPjHV5SymPhdw=="],
+
+    "@rolldown/binding-linux-s390x-gnu": ["@rolldown/[email protected]", "", { "os": "linux", "cpu": "s390x", "libc": "glibc" }, "sha512-Ggh0ciFjLwIusLSLz7LZYEaGdxOAUJXI+Qu5JCbhPJJHEt8vP+IjRATTJheiJsdzzTYgUiHUiw3X1Ea3ZpMBdA=="],
+
+    "@rolldown/binding-linux-x64-gnu": ["@rolldown/[email protected]", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-FHg60rS6DBePAYZ9X9F67x+JObFdmgn6tupA1C/a3B+CufFmTD4mX+e8M75tCiAO3foR/6xwVBI0KQiI7sn/rw=="],
+
+    "@rolldown/binding-linux-x64-musl": ["@rolldown/[email protected]", "", { "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-/cvV/7v5VGz/moiz0XKRj2dE8DzsKyhIu1KpOvJGPjRywg3yscON889UGvAe8zfiJLHup7VLjBduoGWi3HusWQ=="],
+
+    "@rolldown/binding-openharmony-arm64": ["@rolldown/[email protected]", "", { "os": "none", "cpu": "arm64" }, "sha512-MyzC5Hrv/sm+Z7TSGKP/j8001RO2xQm1zOpCNVL4j0cY/VhBZviludA2YFQ7i4lH6ZAXxQm0lcMdBzM+99mE7w=="],
+
+    "@rolldown/binding-win32-arm64-msvc": ["@rolldown/[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-+PgYiS+AH5omy6L45ZLxybasauJaj3M8buoT83D+nzPmCayXlxUV9hydhciCKVyIg0B/v0BtXPDE1uGqNwCPpg=="],
+
+    "@rolldown/binding-win32-x64-msvc": ["@rolldown/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-HFZd2QNQYn1JbIi+Hpd7H+r/lkWxcfIu28nirZ6eCn2LafuvmExMlb/P96Sfx5tf7pPArw39IdhmCF8vmV+NhQ=="],
+
+    "@rolldown/pluginutils": ["@rolldown/[email protected]", "", {}, "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw=="],
+
+    "@standard-schema/spec": ["@standard-schema/[email protected]", "", {}, "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w=="],
+
+    "@sveltejs/acorn-typescript": ["@sveltejs/[email protected]", "", { "peerDependencies": { "acorn": "^8.9.0" } }, "sha512-wgKggnhZVL9Bfx1OaKKTrYY9BFRk6C8UAkQNUcIv1+llzYrIqy+RZm5HPKzn0NpEBvTVhTqB4kQyllZywsRBRQ=="],
+
+    "@sveltejs/kit": ["@sveltejs/[email protected]", "", { "dependencies": { "@rolldown/pluginutils": "^1.0.1", "@standard-schema/spec": "^1.1.0", "cookie": "^2.0.1", "devalue": "^5.9.4", "esm-env": "^1.2.2", "magic-string": "^1.2.3", "mrmime": "^2.0.1", "sirv": "^3.0.2" }, "peerDependencies": { "@opentelemetry/api": "^1.0.0", "@sveltejs/vite-plugin-svelte": "^7.0.0", "svelte": "^5.57.1", "typescript": "^6.0.0", "vite": "^8.0.12" }, "optionalPeers": ["@opentelemetry/api", "typescript"], "bin": { "svelte-kit": "svelte-kit.js" } }, "sha512-JTWlq2HQlkqx6vIoxhC0R6sc4WVqbQoRyEmr5YlqKmiYbzY1U3awtSWTmjMLlS056a49AmkQR6rnNANXIE8B0Q=="],
+
+    "@sveltejs/load-config": ["@sveltejs/[email protected]", "", {}, "sha512-VT3qmUb8pRV2QrZjd8iAmtg8lf4W0TIjZbvXtz5MKei/q96teWZgGJyyidJzOjzZzvdq616eSRVeMYIQChUTAQ=="],
+
+    "@sveltejs/vite-plugin-svelte": ["@sveltejs/[email protected]", "", { "dependencies": { "deepmerge": "^4.3.1", "magic-string": "^1.0.0", "obug": "^2.1.0", "vitefu": "^1.1.2" }, "peerDependencies": { "svelte": "^5.46.4", "vite": "^8.0.0-beta.7 || ^8.0.0" } }, "sha512-ZPsLN8B1e/En+Ak5s4V7srFDT532oS0qieLsQwu63NGKsS+iAjoO2Js1BochlHlglcU+Pt7WAO3C5Ee+4f6gVA=="],
+
+    "@types/estree": ["@types/[email protected]", "", {}, "sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g=="],
+
+    "@types/node": ["@types/[email protected]", "", { "dependencies": { "undici-types": "~8.9.0" } }, "sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog=="],
+
+    "acorn": ["[email protected]", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw=="],
+
+    "aria-query": ["[email protected]", "", {}, "sha512-Z/ZeOgVl7bcSYZ/u/rh0fOpvEpq//LZmdbkXyc7syVzjPAhfOa9ebsdTSjEBDU4vs5nC98Kfduj1uFo0qyET3g=="],
+
+    "axobject-query": ["[email protected]", "", {}, "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ=="],
+
+    "chokidar": ["[email protected]", "", { "dependencies": { "readdirp": "^4.0.1" } }, "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA=="],
+
+    "clsx": ["[email protected]", "", {}, "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA=="],
+
+    "confbox": ["[email protected]", "", {}, "sha512-ZUAKhKlkCOrIGKc8cj7zek9s9z1mveHif/25nUshI2BzCRzF7KH7KHa+Lnh2ubq+e1tIlaFuP763mzW4qVoehg=="],
+
+    "cookie": ["[email protected]", "", {}, "sha512-yuToqVvRrj6pfDXREyQAAv8SkAEk/8GS3jQRTiUMm66TVtBYmqQeoEjL2Lmq8Rpo6271vH76InTChTitEAm65w=="],
+
+    "deepmerge": ["[email protected]", "", {}, "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A=="],
+
+    "detect-libc": ["[email protected]", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="],
+
+    "devalue": ["[email protected]", "", {}, "sha512-sPAT4pztbu6586/hrhOnMKS17IJrvg12mXiSPSS3W5qDeN2RGgvZ0diZCm31dBbnevfVmujNO3IM2wrS4Y2Rhg=="],
+
+    "esm-env": ["[email protected]", "", {}, "sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA=="],
+
+    "esrap": ["[email protected]", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15" }, "peerDependencies": { "@typescript-eslint/types": "^8.2.0" }, "optionalPeers": ["@typescript-eslint/types"] }, "sha512-CQPcneEHw/czj32uwQC52nYnax8H4SXt25FCM+LIwGZ49cMIxpOj3bP8wmzcI+Z0HIy5KkClaPhRLfCySzwHPA=="],
+
+    "exsolve": ["[email protected]", "", {}, "sha512-h1pQPR9XoeSMdntRNCjyTznaume4UpfXrULBnlkZ2CUM/G5eSa+pBByGldO5uR8dxbPC+OuJXsPPNf+JZ81ADg=="],
+
+    "fdir": ["[email protected]", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="],
+
+    "fsevents": ["[email protected]", "", { "os": "darwin", "hasInstallScript": true }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="],
+
+    "import-meta-resolve": ["[email protected]", "", {}, "sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg=="],
+
+    "is-reference": ["[email protected]", "", { "dependencies": { "@types/estree": "^1.0.6" } }, "sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw=="],
+
+    "jpcl-lang": ["[email protected]", "", { "bin": { "jpcl": "dist/bin.js" } }, "sha512-n99Fj10ntxhu83lcnhgIZ/PAMwSgs4zpamOM73Uy5gtCQlvBYIkEnGFIxwTGGRo+zvh+oY4W7RNFErNxF9uuAQ=="],
+
+    "lightningcss": ["[email protected]", "", { "dependencies": { "detect-libc": "^2.0.3" }, "optionalDependencies": { "lightningcss-android-arm64": "1.33.0", "lightningcss-darwin-arm64": "1.33.0", "lightningcss-darwin-x64": "1.33.0", "lightningcss-freebsd-x64": "1.33.0", "lightningcss-linux-arm-gnueabihf": "1.33.0", "lightningcss-linux-arm64-gnu": "1.33.0", "lightningcss-linux-arm64-musl": "1.33.0", "lightningcss-linux-x64-gnu": "1.33.0", "lightningcss-linux-x64-musl": "1.33.0", "lightningcss-win32-arm64-msvc": "1.33.0", "lightningcss-win32-x64-msvc": "1.33.0" } }, "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA=="],
+
+    "lightningcss-android-arm64": ["[email protected]", "", { "os": "android", "cpu": "arm64" }, "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg=="],
+
+    "lightningcss-darwin-arm64": ["[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg=="],
+
+    "lightningcss-darwin-x64": ["[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ=="],
+
+    "lightningcss-freebsd-x64": ["[email protected]", "", { "os": "freebsd", "cpu": "x64" }, "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg=="],
+
+    "lightningcss-linux-arm-gnueabihf": ["[email protected]", "", { "os": "linux", "cpu": "arm" }, "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ=="],
+
+    "lightningcss-linux-arm64-gnu": ["[email protected]", "", { "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg=="],
+
+    "lightningcss-linux-arm64-musl": ["[email protected]", "", { "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ=="],
+
+    "lightningcss-linux-x64-gnu": ["[email protected]", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg=="],
+
+    "lightningcss-linux-x64-musl": ["[email protected]", "", { "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw=="],
+
+    "lightningcss-win32-arm64-msvc": ["[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA=="],
+
+    "lightningcss-win32-x64-msvc": ["[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA=="],
+
+    "local-pkg": ["[email protected]", "", { "dependencies": { "mlly": "^1.7.4", "pkg-types": "^2.3.0", "quansync": "^0.2.11" } }, "sha512-++gUqRDEvcnN6Zhqrr+y/CkVEHhlrR96vZn3nZZPYzMcBUyBtTKzB9NadClFIsIVSsu+3i9tfk/erqy9kAmt7Q=="],
+
+    "locate-character": ["[email protected]", "", {}, "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA=="],
+
+    "magic-string": ["[email protected]", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.6.0" } }, "sha512-oLLC2+YvQUfAa+vxoufE/yc1icb87M9iXIRqAoR/2EhE/8cb3SF/+Gi0c2By1B+5Vz2e2vQtUvHiu1+63Znh+w=="],
+
+    "mlly": ["[email protected]", "", { "dependencies": { "acorn": "^8.16.0", "pathe": "^2.0.3", "pkg-types": "^1.3.1", "ufo": "^1.6.3" } }, "sha512-d+ObxMQFmbt10sretNDytwt85VrbkhhUA/JBGm1MPaWJ65Cl4wOgLaB1NYvJSZ0Ef03MMEU/0xpPMXUIQ29UfA=="],
+
+    "mri": ["[email protected]", "", {}, "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA=="],
+
+    "mrmime": ["[email protected]", "", {}, "sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ=="],
+
+    "nanoid": ["[email protected]", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ=="],
+
+    "obug": ["[email protected]", "", {}, "sha512-XrsrhT5sybtKI6wakr2SPOlGZWWYbUXZ7a0jT8/QOeAPau+1X/bSegNe5YR75oJmEZQbKningirmGOEJCIk61Q=="],
+
+    "package-manager-detector": ["[email protected]", "", {}, "sha512-zAMfbta9nPA8AKkA4WdmNAT8R8s6Dk0/xwPsqNnRidMFcLo1YkLuPDTgs2f64XdzS8vbLNnoJ+uUIkgbz7oRHA=="],
+
+    "pathe": ["[email protected]", "", {}, "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w=="],
+
+    "picocolors": ["[email protected]", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="],
+
+    "picomatch": ["[email protected]", "", {}, "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA=="],
+
+    "pkg-types": ["[email protected]", "", { "dependencies": { "confbox": "^0.3.1", "exsolve": "^1.1.3", "pathe": "^2.0.3" } }, "sha512-07Fys7iVx0X6TcviMOgogM1Lk33ZyqOezMnU79S+kffWqwolG/5W9V8EgQSeYCIfFTYVgssRbnH630Oa2+soBA=="],
+
+    "postcss": ["[email protected]", "", { "dependencies": { "nanoid": "^3.3.20", "picocolors": "^1.1.1", "source-map-js": "^1.2.2" } }, "sha512-LJlKCCAUFKOuZxipUdYw1NzIITEsPcgyOG9LkvRJvuKj/bRzbuRY0ARXvL0pWGpsZvn8jku+LMep2eU0seHp8g=="],
+
+    "quansync": ["[email protected]", "", {}, "sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA=="],
+
+    "readdirp": ["[email protected]", "", {}, "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg=="],
+
+    "rolldown": ["[email protected]", "", { "dependencies": { "@oxc-project/types": "=0.155.0", "@rolldown/pluginutils": "^1.0.0" }, "optionalDependencies": { "@rolldown/binding-android-arm-eabi": "1.2.15", "@rolldown/binding-android-arm64": "1.2.15", "@rolldown/binding-darwin-arm64": "1.2.15", "@rolldown/binding-darwin-x64": "1.2.15", "@rolldown/binding-freebsd-x64": "1.2.15", "@rolldown/binding-linux-arm-gnueabihf": "1.2.15", "@rolldown/binding-linux-arm64-gnu": "1.2.15", "@rolldown/binding-linux-arm64-musl": "1.2.15", "@rolldown/binding-linux-ppc64-gnu": "1.2.15", "@rolldown/binding-linux-s390x-gnu": "1.2.15", "@rolldown/binding-linux-x64-gnu": "1.2.15", "@rolldown/binding-linux-x64-musl": "1.2.15", "@rolldown/binding-openharmony-arm64": "1.2.15", "@rolldown/binding-win32-arm64-msvc": "1.2.15", "@rolldown/binding-win32-x64-msvc": "1.2.15" }, "bin": { "rolldown": "./bin/cli.mjs" } }, "sha512-6odND+fel5zVw3I4Yc2e69gvguDnX0CAAGiNDZSq4ik5WUcaLrkD2GLuog0XcODbor31hZ5ayEMgVDno+KPV5g=="],
+
+    "sade": ["[email protected]", "", { "dependencies": { "mri": "^1.1.0" } }, "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A=="],
+
+    "sirv": ["[email protected]", "", { "dependencies": { "@polka/url": "^1.0.0-next.24", "mrmime": "^2.0.0", "totalist": "^3.0.0" } }, "sha512-2wcC/oGxHis/BoHkkPwldgiPSYcpZK3JU28WoMVv55yHJgcZ8rlXvuG9iZggz+sU1d4bRgIGASwyWqjxu3FM0g=="],
+
+    "source-map-js": ["[email protected]", "", {}, "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw=="],
+
+    "svelte": ["[email protected]", "", { "dependencies": { "@jridgewell/remapping": "^2.3.5", "@jridgewell/sourcemap-codec": "^1.6.0", "@sveltejs/acorn-typescript": "^1.0.13", "@types/estree": "^1.0.9", "acorn": "^8.18.0", "aria-query": "5.3.1", "axobject-query": "^4.1.0", "clsx": "^2.1.1", "devalue": "^5.9.2", "esm-env": "^1.2.1", "esrap": "^2.3.6", "is-reference": "^3.0.3", "locate-character": "^3.0.0", "magic-string": "^0.30.11", "zimmerframe": "^1.1.2" } }, "sha512-5mAftM3SoDV9X0zdF386F9p2pv8iKOwi/KfBS1XnBAkVCKFzVOLHUoa8iGWAt4buoicLmyWVRpuuD5wplXOQsg=="],
+
+    "svelte-check": ["[email protected]", "", { "dependencies": { "@jridgewell/trace-mapping": "^0.3.25", "@sveltejs/load-config": "^0.2.3", "chokidar": "^4.0.1", "fdir": "^6.2.0", "picocolors": "^1.0.0", "sade": "^1.7.4" }, "peerDependencies": { "svelte": "^4.0.0 || ^5.0.0-next.0", "typescript": "^5.0.0 || ^6.0.0" }, "bin": { "svelte-check": "bin/svelte-check" } }, "sha512-Ge2IMdeTpbJuzNFGRiiMg0RWgbScysKQu7xwcyFJ22+DU9F5nPX51+Q3gHmGqRxYQMx2knreVWt5oCtfe0vf2g=="],
+
+    "tinyexec": ["[email protected]", "", {}, "sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA=="],
+
+    "tinyglobby": ["[email protected]", "", { "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.4" } }, "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g=="],
+
+    "totalist": ["[email protected]", "", {}, "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ=="],
+
+    "typescript": ["[email protected]", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw=="],
+
+    "ufo": ["[email protected]", "", {}, "sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA=="],
+
+    "undici-types": ["[email protected]", "", {}, "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg=="],
+
+    "unplugin": ["[email protected]", "", { "dependencies": { "@jridgewell/remapping": "^2.3.5", "@rolldown/pluginutils": "^1.0.1", "picomatch": "^4.0.7", "webpack-virtual-modules": "^0.6.2" }, "peerDependencies": { "@farmfe/core": "*", "@rsbuild/core": "*", "@rspack/core": "*", "bun-types-no-globals": "*", "esbuild": "*", "rolldown": "*", "rollup": "*", "unloader": "*", "vite": "*", "webpack": "*" }, "optionalPeers": ["@farmfe/core", "@rsbuild/core", "@rspack/core", "bun-types-no-globals", "esbuild", "rolldown", "rollup", "unloader", "vite", "webpack"] }, "sha512-GrM2uq3DQo3hvLU2FjeYhooJ8BY9N6j1Fbzgx7Pta3VVJevsD3VP4dPjZkZOS0mLvN8w9zzr9OlP+31bSMyuLw=="],
+
+    "unplugin-icons": ["[email protected]", "", { "dependencies": { "@antfu/install-pkg": "^1.1.0", "@iconify/utils": "^3.1.7", "local-pkg": "^1.2.1", "obug": "^2.2.1", "unplugin": "^3.3.0" }, "peerDependencies": { "@svgr/core": ">=7.0.0", "@svgx/core": "^1.0.1", "@vue/compiler-sfc": "^3.0.2", "@vue/compiler-vapor": "^3.6.0-rc.5", "svelte": "^3.0.0 || ^4.0.0 || ^5.0.0" }, "optionalPeers": ["@svgr/core", "@svgx/core", "@vue/compiler-sfc", "@vue/compiler-vapor", "svelte"] }, "sha512-wV6c7I0PtiIP8KIU7Z1Ukyc2uzgY9ind3RXNu7j63L9qTWDn7CzLnW9FD57DKbfGpWKQv3qyV2PCtBG8Y5Llcg=="],
+
+    "vite": ["[email protected]", "", { "dependencies": { "lightningcss": "^1.33.0", "picomatch": "^4.0.7", "postcss": "^8.5.30", "rolldown": "~1.2.14", "tinyglobby": "^0.2.17" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "@vitejs/devtools": "^0.7.1 || ^0.8.0", "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "@vitejs/devtools", "esbuild", "jiti", "less", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-z1YpjieJ9g0ebTmQpLBv/oq9E3F9EIlOe+7LahW8SrE3LTiG3udBRUXQOlYXP9b+IC2q2phHeVxj9xGlw34OEQ=="],
+
+    "vitefu": ["[email protected]", "", { "peerDependencies": { "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0" }, "optionalPeers": ["vite"] }, "sha512-ub4okH7Z5KLjb6hDyjqrGXqWtWvoYdU3IGm/NorpgHncKoLTCfRIbvlhBm7r0YstIaQRYlp4yEbFqDcKSzXSSg=="],
+
+    "webpack-virtual-modules": ["[email protected]", "", {}, "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ=="],
+
+    "zimmerframe": ["[email protected]", "", {}, "sha512-msJxIvYDYcoNL+PJsu+7qmpDWsYmAxTY+2TNYXXF0hzBzBk0BMecOqDOG/EckUoKCuKwObfbugIl8QpqHDXeFA=="],
+
+    "@iconify/utils/@antfu/install-pkg": ["@antfu/[email protected]", "", { "dependencies": { "package-manager-detector": "^1.8.0", "tinyexec": "^1.3.1" } }, "sha512-sdg9NxU3zR4Mnawfbc/x6GB5Wf17WYud5qOuEuxXjaKpYpMkISSJEjItGebXJ2bQ4DIcly4NYH23mtkGJjvKUw=="],
+
+    "mlly/pkg-types": ["[email protected]", "", { "dependencies": { "confbox": "^0.1.8", "mlly": "^1.7.4", "pathe": "^2.0.1" } }, "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ=="],
+
+    "svelte/magic-string": ["[email protected]", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.5" } }, "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ=="],
+
+    "mlly/pkg-types/confbox": ["[email protected]", "", {}, "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w=="],
+  }
+}
diff --git a/web/openapi.json b/web/openapi.json
new file mode 100644
index 0000000..59046b2
--- /dev/null
+++ b/web/openapi.json
@@ -0,0 +1,6752 @@
+{
+  "openapi": "3.1.0",
+  "info": {
+    "title": "System API",
+    "version": "3.0.0"
+  },
+  "components": {
+    "securitySchemes": {
+      "bearerAuth": {
+        "type": "http",
+        "scheme": "bearer",
+        "description": "A 24-hour local session token issued by /api/plural/auth/login."
+      }
+    },
+    "schemas": {
+      "Error": {
+        "type": "object",
+        "properties": {
+          "detail": {
+            "anyOf": [
+              {
+                "type": "string"
+              },
+              {
+                "type": "array",
+                "items": {}
+              }
+            ]
+          }
+        },
+        "required": [
+          "detail"
+        ]
+      },
+      "User": {
+        "type": "object",
+        "properties": {
+          "id": {
+            "type": "string"
+          },
+          "username": {
+            "type": "string"
+          },
+          "display_name": {
+            "type": [
+              "string",
+              "null"
+            ]
+          },
+          "email": {
+            "type": [
+              "string",
+              "null"
+            ]
+          },
+          "created_at": {
+            "type": [
+              "string",
+              "null"
+            ]
+          },
+          "is_admin": {
+            "type": "boolean"
+          },
+          "is_owner": {
+            "type": "boolean"
+          },
+          "avatar_url": {
+            "type": [
+              "string",
+              "null"
+            ]
+          }
+        },
+        "required": [
+          "id",
+          "username",
+          "is_admin",
+          "is_owner"
+        ]
+      },
+      "System": {
+        "type": "object",
+        "properties": {
+          "id": {
+            "type": "string"
+          },
+          "uuid": {
+            "type": "string"
+          },
+          "name": {
+            "type": [
+              "string",
+              "null"
+            ]
+          },
+          "description": {
+            "type": [
+              "string",
+              "null"
+            ]
+          },
+          "tag": {
+            "type": [
+              "string",
+              "null"
+            ]
+          },
+          "pronouns": {
+            "type": [
+              "string",
+              "null"
+            ]
+          },
+          "avatar_url": {
+            "type": [
+              "string",
+              "null"
+            ]
+          },
+          "banner": {
+            "type": [
+              "string",
+              "null"
+            ]
+          },
+          "color": {
+            "type": [
+              "string",
+              "null"
+            ]
+          },
+          "timezone": {
+            "type": [
+              "string",
+              "null"
+            ]
+          },
+          "created": {
+            "type": "string"
+          },
+          "privacy": {
+            "type": "object",
+            "additionalProperties": {}
+          },
+          "mental_state": {
+            "$ref": "#/components/schemas/MentalState"
+          }
+        },
+        "required": [
+          "id",
+          "uuid",
+          "name",
+          "description",
+          "tag",
+          "pronouns",
+          "avatar_url",
+          "banner",
+          "color",
+          "timezone",
+          "created",
+          "privacy"
+        ],
+        "additionalProperties": {}
+      },
+      "MentalState": {
+        "type": "object",
+        "properties": {
+          "level": {
+            "type": "string"
+          },
+          "updated_at": {
+            "type": "string"
+          },
+          "notes": {
+            "type": [
+              "string",
+              "null"
+            ]
+          }
+        },
+        "required": [
+          "level",
+          "updated_at"
+        ]
+      },
+      "SystemUpdate": {
+        "type": "object",
+        "properties": {
+          "name": {
+            "type": [
+              "string",
+              "null"
+            ],
+            "maxLength": 100
+          },
+          "description": {
+            "type": [
+              "string",
+              "null"
+            ],
+            "maxLength": 1000
+          },
+          "tag": {
+            "type": [
+              "string",
+              "null"
+            ],
+            "maxLength": 79
+          },
+          "pronouns": {
+            "type": [
+              "string",
+              "null"
+            ],
+            "maxLength": 100
+          },
+          "avatar_url": {
+            "type": [
+              "string",
+              "null"
+            ],
+            "maxLength": 2048,
+            "format": "uri"
+          },
+          "banner": {
+            "type": [
+              "string",
+              "null"
+            ],
+            "maxLength": 2048,
+            "format": "uri"
+          },
+          "color": {
+            "type": [
+              "string",
+              "null"
+            ],
+            "pattern": "^[0-9a-fA-F]{6}$"
+          },
+          "timezone": {
+            "type": [
+              "string",
+              "null"
+            ],
+            "maxLength": 64
+          },
+          "privacy": {
+            "type": "object",
+            "additionalProperties": {
+              "type": "string",
+              "enum": [
+                "public",
+                "private"
+              ]
+            }
+          }
+        }
+      },
+      "Message": {
+        "type": "object",
+        "properties": {
+          "status": {
+            "type": "string"
+          },
+          "success": {
+            "type": "boolean"
+          },
+          "message": {
+            "type": "string"
+          }
+        },
+        "additionalProperties": {}
+      },
+      "Member": {
+        "type": "object",
+        "properties": {
+          "id": {
+            "type": "string",
+            "example": "abcdef"
+          },
+          "uuid": {
+            "type": "string"
+          },
+          "system": {
+            "type": "string"
+          },
+          "name": {
+            "type": "string"
+          },
+          "display_name": {
+            "type": [
+              "string",
+              "null"
+            ]
+          },
+          "color": {
+            "type": [
+              "string",
+              "null"
+            ]
+          },
+          "birthday": {
+            "type": [
+              "string",
+              "null"
+            ],
+            "description": "YYYY-MM-DD. Year 0004 means the year is hidden"
+          },
+          "pronouns": {
+            "type": [
+              "string",
+              "null"
+            ]
+          },
+          "avatar_url": {
+            "type": [
+              "string",
+              "null"
+            ]
+          },
+          "webhook_avatar_url": {
+            "type": [
+              "string",
+              "null"
+            ]
+          },
+          "banner": {
+            "type": [
+              "string",
+              "null"
+            ]
+          },
+          "description": {
+            "type": [
+              "string",
+              "null"
+            ]
+          },
+          "created": {
+            "type": "string"
+          },
+          "proxy_tags": {
+            "type": "array",
+            "items": {
+              "$ref": "#/components/schemas/ProxyTag"
+            }
+          },
+          "keep_proxy": {
+            "type": "boolean"
+          },
+          "autoproxy_enabled": {
+            "type": [
+              "boolean",
+              "null"
+            ]
+          },
+          "message_count": {
+            "type": "number"
+          },
+          "last_message_timestamp": {
+            "type": [
+              "string",
+              "null"
+            ]
+          },
+          "privacy": {
+            "type": "object",
+            "additionalProperties": {}
+          },
+          "tags": {
+            "type": "array",
+            "items": {
+              "type": "string"
+            }
+          },
+          "status": {
+            "$ref": "#/components/schemas/MemberStatus"
+          },
+          "pride": {
+            "type": "array",
+            "items": {
+              "type": "string"
+            }
+          }
+        },
+        "required": [
+          "id",
+          "uuid",
+          "system",
+          "name",
+          "display_name",
+          "color",
+          "birthday",
+          "pronouns",
+          "avatar_url",
+          "webhook_avatar_url",
+          "banner",
+          "description",
+          "created",
+          "proxy_tags",
+          "keep_proxy",
+          "autoproxy_enabled",
+          "message_count",
+          "last_message_timestamp",
+          "privacy"
+        ],
+        "additionalProperties": {}
+      },
+      "ProxyTag": {
+        "type": "object",
+        "properties": {
+          "prefix": {
+            "type": [
+              "string",
+              "null"
+            ],
+            "maxLength": 100
+          },
+          "suffix": {
+            "type": [
+              "string",
+              "null"
+            ],
+            "maxLength": 100
+          }
+        },
+        "required": [
+          "prefix",
+          "suffix"
+        ]
+      },
+      "MemberStatus": {
+        "type": [
+          "object",
+          "null"
+        ],
+        "properties": {
+          "text": {
+            "type": "string"
+          },
+          "emoji": {
+            "type": [
+              "string",
+              "null"
+            ]
+          },
+          "updated_at": {
+            "type": "string"
+          }
+        },
+        "required": [
+          "text",
+          "emoji",
+          "updated_at"
+        ]
+      },
+      "MemberCreate": {
+        "type": "object",
+        "properties": {
+          "name": {
+            "type": "string",
+            "minLength": 1,
+            "maxLength": 100
+          },
+          "display_name": {
+            "type": [
+              "string",
+              "null"
+            ],
+            "maxLength": 100
+          },
+          "color": {
+            "type": [
+              "string",
+              "null"
+            ],
+            "pattern": "^[0-9a-fA-F]{6}$"
+          },
+          "birthday": {
+            "type": [
+              "string",
+              "null"
+            ],
+            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
+          },
+          "pronouns": {
+            "type": [
+              "string",
+              "null"
+            ],
+            "maxLength": 100
+          },
+          "description": {
+            "type": [
+              "string",
+              "null"
+            ],
+            "maxLength": 1000
+          },
+          "proxy_tags": {
+            "type": "array",
+            "items": {
+              "$ref": "#/components/schemas/ProxyTag"
+            },
+            "maxItems": 100
+          },
+          "keep_proxy": {
+            "type": "boolean"
+          },
+          "autoproxy_enabled": {
+            "type": [
+              "boolean",
+              "null"
+            ]
+          },
+          "privacy": {
+            "type": "object",
+            "additionalProperties": {
+              "type": "string",
+              "enum": [
+                "public",
+                "private"
+              ]
+            }
+          }
+        },
+        "required": [
+          "name"
+        ]
+      },
+      "MemberUpdate": {
+        "type": "object",
+        "properties": {
+          "name": {
+            "type": "string",
+            "minLength": 1,
+            "maxLength": 100
+          },
+          "display_name": {
+            "type": [
+              "string",
+              "null"
+            ],
+            "maxLength": 100
+          },
+          "color": {
+            "type": [
+              "string",
+              "null"
+            ],
+            "pattern": "^[0-9a-fA-F]{6}$"
+          },
+          "birthday": {
+            "type": [
+              "string",
+              "null"
+            ],
+            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
+          },
+          "pronouns": {
+            "type": [
+              "string",
+              "null"
+            ],
+            "maxLength": 100
+          },
+          "description": {
+            "type": [
+              "string",
+              "null"
+            ],
+            "maxLength": 1000
+          },
+          "proxy_tags": {
+            "type": "array",
+            "items": {
+              "$ref": "#/components/schemas/ProxyTag"
+            },
+            "maxItems": 100
+          },
+          "keep_proxy": {
+            "type": "boolean"
+          },
+          "autoproxy_enabled": {
+            "type": [
+              "boolean",
+              "null"
+            ]
+          },
+          "privacy": {
+            "type": "object",
+            "additionalProperties": {
+              "type": "string",
+              "enum": [
+                "public",
+                "private"
+              ]
+            }
+          }
+        }
+      },
+      "Relationship": {
+        "type": "object",
+        "properties": {
+          "id": {
+            "type": "string"
+          },
+          "members": {
+            "type": "array",
+            "prefixItems": [
+              {
+                "type": "string"
+              },
+              {
+                "type": "string"
+              }
+            ]
+          },
+          "type": {
+            "type": "string"
+          },
+          "since": {
+            "type": [
+              "string",
+              "null"
+            ]
+          }
+        },
+        "required": [
+          "id",
+          "members",
+          "type",
+          "since"
+        ]
+      },
+      "Fronters": {
+        "type": "object",
+        "properties": {
+          "id": {
+            "type": [
+              "string",
+              "null"
+            ]
+          },
+          "timestamp": {
+            "type": [
+              "string",
+              "null"
+            ]
+          },
+          "members": {
+            "type": "array",
+            "items": {
+              "$ref": "#/components/schemas/Member"
+            }
+          }
+        },
+        "required": [
+          "id",
+          "timestamp",
+          "members"
+        ]
+      },
+      "Switch": {
+        "type": "object",
+        "properties": {
+          "id": {
+            "type": "string"
+          },
+          "timestamp": {
+            "type": "string"
+          },
+          "members": {
+            "type": "array",
+            "items": {
+              "type": "string"
+            }
+          }
+        },
+        "required": [
+          "id",
+          "timestamp",
+          "members"
+        ]
+      },
+      "UserCreate": {
+        "type": "object",
+        "properties": {
+          "username": {
+            "type": "string",
+            "minLength": 1
+          },
+          "email": {
+            "type": [
+              "string",
+              "null"
+            ],
+            "maxLength": 254,
+            "format": "email"
+          },
+          "display_name": {
+            "type": [
+              "string",
+              "null"
+            ]
+          },
+          "is_admin": {
+            "type": "boolean",
+            "default": false
+          },
+          "password": {
+            "type": "string",
+            "minLength": 8,
+            "maxLength": 1024
+          }
+        },
+        "required": [
+          "username"
+        ]
+      },
+      "UserUpdate": {
+        "type": "object",
+        "properties": {
+          "display_name": {
+            "type": [
+              "string",
+              "null"
+            ]
+          },
+          "avatar_url": {
+            "type": [
+              "string",
+              "null"
+            ]
+          },
+          "email": {
+            "type": [
+              "string",
+              "null"
+            ],
+            "maxLength": 254,
+            "format": "email"
+          },
+          "is_admin": {
+            "type": [
+              "boolean",
+              "null"
+            ]
+          },
+          "password": {
+            "type": "string",
+            "minLength": 8,
+            "maxLength": 1024
+          }
+        }
+      },
+      "FrontingTimeMetrics": {
+        "type": "object",
+        "properties": {
+          "total_time": {
+            "type": "number"
+          },
+          "members": {
+            "type": "object",
+            "additionalProperties": {}
+          },
+          "timeframes": {
+            "type": "object",
+            "additionalProperties": {
+              "type": "object",
+              "additionalProperties": {
+                "type": "number"
+              }
+            }
+          }
+        },
+        "required": [
+          "total_time",
+          "members",
+          "timeframes"
+        ],
+        "additionalProperties": {}
+      },
+      "SwitchFrequencyMetrics": {
+        "type": "object",
+        "properties": {
+          "total_switches": {
+            "type": "number"
+          },
+          "avg_switches_per_day": {
+            "type": "number"
+          },
+          "timeframes": {
+            "type": "object",
+            "additionalProperties": {
+              "type": "number"
+            }
+          }
+        },
+        "required": [
+          "total_switches",
+          "avg_switches_per_day",
+          "timeframes"
+        ]
+      }
+    },
+    "parameters": {}
+  },
+  "paths": {
+    "/api/plural/auth/logout": {
+      "post": {
+        "tags": [
+          "Auth"
+        ],
+        "summary": "End the local session",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "type": "object",
+                  "properties": {
+                    "ok": {
+                      "type": "boolean"
+                    },
+                    "end_session_url": {
+                      "type": [
+                        "string",
+                        "null"
+                      ]
+                    }
+                  },
+                  "required": [
+                    "ok",
+                    "end_session_url"
+                  ]
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/user_info": {
+      "get": {
+        "tags": [
+          "Auth"
+        ],
+        "summary": "The signed-in account",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "parameters": [
+          {
+            "schema": {
+              "type": "string",
+              "enum": [
+                "jpcl",
+                "json",
+                "yml"
+              ],
+              "default": "jpcl",
+              "description": "Response format. Defaults to JPCL."
+            },
+            "required": false,
+            "description": "Response format. Defaults to JPCL.",
+            "name": "format",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/User"
+                }
+              },
+              "application/yaml": {
+                "schema": {
+                  "type": "string",
+                  "description": "The response as YAML"
+                }
+              },
+              "text/plain": {
+                "schema": {
+                  "type": "string",
+                  "description": "The response as JPCL text"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/auth/is_admin": {
+      "get": {
+        "tags": [
+          "Auth"
+        ],
+        "summary": "Whether the signed-in account has is_admin",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "parameters": [
+          {
+            "schema": {
+              "type": "string",
+              "enum": [
+                "jpcl",
+                "json",
+                "yml"
+              ],
+              "default": "jpcl",
+              "description": "Response format. Defaults to JPCL."
+            },
+            "required": false,
+            "description": "Response format. Defaults to JPCL.",
+            "name": "format",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "type": "object",
+                  "additionalProperties": {
+                    "type": "boolean"
+                  }
+                }
+              },
+              "application/yaml": {
+                "schema": {
+                  "type": "string",
+                  "description": "The response as YAML"
+                }
+              },
+              "text/plain": {
+                "schema": {
+                  "type": "string",
+                  "description": "The response as JPCL text"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/auth/is_owner": {
+      "get": {
+        "tags": [
+          "Auth"
+        ],
+        "summary": "Whether the signed-in account has is_owner",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "parameters": [
+          {
+            "schema": {
+              "type": "string",
+              "enum": [
+                "jpcl",
+                "json",
+                "yml"
+              ],
+              "default": "jpcl",
+              "description": "Response format. Defaults to JPCL."
+            },
+            "required": false,
+            "description": "Response format. Defaults to JPCL.",
+            "name": "format",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "type": "object",
+                  "additionalProperties": {
+                    "type": "boolean"
+                  }
+                }
+              },
+              "application/yaml": {
+                "schema": {
+                  "type": "string",
+                  "description": "The response as YAML"
+                }
+              },
+              "text/plain": {
+                "schema": {
+                  "type": "string",
+                  "description": "The response as JPCL text"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/system": {
+      "get": {
+        "tags": [
+          "System"
+        ],
+        "summary": "The system, with its current mental state",
+        "parameters": [
+          {
+            "schema": {
+              "type": "string",
+              "enum": [
+                "jpcl",
+                "json",
+                "yml"
+              ],
+              "default": "jpcl",
+              "description": "Response format. Defaults to JPCL."
+            },
+            "required": false,
+            "description": "Response format. Defaults to JPCL.",
+            "name": "format",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/System"
+                }
+              },
+              "application/yaml": {
+                "schema": {
+                  "type": "string",
+                  "description": "The response as YAML"
+                }
+              },
+              "text/plain": {
+                "schema": {
+                  "type": "string",
+                  "description": "The response as JPCL text"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      },
+      "patch": {
+        "tags": [
+          "System"
+        ],
+        "summary": "Edit the system (owner)",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "requestBody": {
+          "required": true,
+          "content": {
+            "application/jpcl": {
+              "schema": {
+                "$ref": "#/components/schemas/SystemUpdate"
+              }
+            },
+            "application/json": {
+              "schema": {
+                "$ref": "#/components/schemas/SystemUpdate"
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/System"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/mental-state": {
+      "get": {
+        "tags": [
+          "System"
+        ],
+        "summary": "Current mental state",
+        "parameters": [
+          {
+            "schema": {
+              "type": "string",
+              "enum": [
+                "jpcl",
+                "json",
+                "yml"
+              ],
+              "default": "jpcl",
+              "description": "Response format. Defaults to JPCL."
+            },
+            "required": false,
+            "description": "Response format. Defaults to JPCL.",
+            "name": "format",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/MentalState"
+                }
+              },
+              "application/yaml": {
+                "schema": {
+                  "type": "string",
+                  "description": "The response as YAML"
+                }
+              },
+              "text/plain": {
+                "schema": {
+                  "type": "string",
+                  "description": "The response as JPCL text"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      },
+      "post": {
+        "tags": [
+          "System"
+        ],
+        "summary": "Set the mental state (admin)",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "requestBody": {
+          "required": true,
+          "content": {
+            "application/jpcl": {
+              "schema": {
+                "type": "object",
+                "properties": {
+                  "level": {
+                    "type": "string",
+                    "minLength": 1
+                  },
+                  "notes": {
+                    "type": [
+                      "string",
+                      "null"
+                    ]
+                  }
+                },
+                "required": [
+                  "level"
+                ]
+              }
+            },
+            "application/json": {
+              "schema": {
+                "type": "object",
+                "properties": {
+                  "level": {
+                    "type": "string",
+                    "minLength": 1
+                  },
+                  "notes": {
+                    "type": [
+                      "string",
+                      "null"
+                    ]
+                  }
+                },
+                "required": [
+                  "level"
+                ]
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Message"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/members": {
+      "get": {
+        "tags": [
+          "Members"
+        ],
+        "summary": "Every member, with tags, status and pride",
+        "parameters": [
+          {
+            "schema": {
+              "type": "string",
+              "enum": [
+                "jpcl",
+                "json",
+                "yml"
+              ],
+              "default": "jpcl",
+              "description": "Response format. Defaults to JPCL."
+            },
+            "required": false,
+            "description": "Response format. Defaults to JPCL.",
+            "name": "format",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "type": "array",
+                  "items": {
+                    "$ref": "#/components/schemas/Member"
+                  }
+                }
+              },
+              "application/yaml": {
+                "schema": {
+                  "type": "string",
+                  "description": "The response as YAML"
+                }
+              },
+              "text/plain": {
+                "schema": {
+                  "type": "string",
+                  "description": "JPCL text with a top-level members array"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      },
+      "post": {
+        "tags": [
+          "Members"
+        ],
+        "summary": "Create a member (owner)",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "requestBody": {
+          "required": true,
+          "content": {
+            "application/jpcl": {
+              "schema": {
+                "$ref": "#/components/schemas/MemberCreate"
+              }
+            },
+            "application/json": {
+              "schema": {
+                "$ref": "#/components/schemas/MemberCreate"
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "The new member",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Member"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/member/{member_identifier}": {
+      "get": {
+        "tags": [
+          "Members"
+        ],
+        "summary": "One member by id or name",
+        "parameters": [
+          {
+            "schema": {
+              "type": "string",
+              "description": "Member id, or member name (case-insensitive)",
+              "example": "abcdef"
+            },
+            "required": true,
+            "description": "Member id, or member name (case-insensitive)",
+            "name": "member_identifier",
+            "in": "path"
+          },
+          {
+            "schema": {
+              "type": "string",
+              "enum": [
+                "jpcl",
+                "json",
+                "yml"
+              ],
+              "default": "jpcl",
+              "description": "Response format. Defaults to JPCL."
+            },
+            "required": false,
+            "description": "Response format. Defaults to JPCL.",
+            "name": "format",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Member"
+                }
+              },
+              "application/yaml": {
+                "schema": {
+                  "type": "string",
+                  "description": "The response as YAML"
+                }
+              },
+              "text/plain": {
+                "schema": {
+                  "type": "string",
+                  "description": "The response as JPCL text"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/members/{member_identifier}": {
+      "patch": {
+        "tags": [
+          "Members"
+        ],
+        "summary": "Edit a member (owner). Send only the fields to change; null clears one",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "parameters": [
+          {
+            "schema": {
+              "type": "string",
+              "description": "Member id, or member name (case-insensitive)",
+              "example": "abcdef"
+            },
+            "required": true,
+            "description": "Member id, or member name (case-insensitive)",
+            "name": "member_identifier",
+            "in": "path"
+          }
+        ],
+        "requestBody": {
+          "required": true,
+          "content": {
+            "application/jpcl": {
+              "schema": {
+                "$ref": "#/components/schemas/MemberUpdate"
+              }
+            },
+            "application/json": {
+              "schema": {
+                "$ref": "#/components/schemas/MemberUpdate"
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "The updated member",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Member"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      },
+      "delete": {
+        "tags": [
+          "Members"
+        ],
+        "summary": "Delete a member (owner). Their past switches are kept",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "parameters": [
+          {
+            "schema": {
+              "type": "string",
+              "description": "Member id, or member name (case-insensitive)",
+              "example": "abcdef"
+            },
+            "required": true,
+            "description": "Member id, or member name (case-insensitive)",
+            "name": "member_identifier",
+            "in": "path"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Message"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/members/{member_identifier}/avatar": {
+      "post": {
+        "tags": [
+          "Members"
+        ],
+        "summary": "Upload a member's avatar (owner). Replaces the old one, including the proxy avatar",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "parameters": [
+          {
+            "schema": {
+              "type": "string",
+              "description": "Member id, or member name (case-insensitive)",
+              "example": "abcdef"
+            },
+            "required": true,
+            "description": "Member id, or member name (case-insensitive)",
+            "name": "member_identifier",
+            "in": "path"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "The updated member",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Member"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/members/{member_identifier}/banner": {
+      "post": {
+        "tags": [
+          "Members"
+        ],
+        "summary": "Upload a member's banner (owner). Replaces the old one",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "parameters": [
+          {
+            "schema": {
+              "type": "string",
+              "description": "Member id, or member name (case-insensitive)",
+              "example": "abcdef"
+            },
+            "required": true,
+            "description": "Member id, or member name (case-insensitive)",
+            "name": "member_identifier",
+            "in": "path"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "The updated member",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Member"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/member-tags": {
+      "get": {
+        "tags": [
+          "Tags"
+        ],
+        "summary": "Every member's tags (owner)",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "parameters": [
+          {
+            "schema": {
+              "type": "string",
+              "enum": [
+                "jpcl",
+                "json",
+                "yml"
+              ],
+              "default": "jpcl",
+              "description": "Response format. Defaults to JPCL."
+            },
+            "required": false,
+            "description": "Response format. Defaults to JPCL.",
+            "name": "format",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "type": "object",
+                  "properties": {
+                    "status": {
+                      "type": "string"
+                    },
+                    "member_tags": {
+                      "type": "object",
+                      "additionalProperties": {
+                        "type": "array",
+                        "items": {
+                          "type": "string"
+                        }
+                      }
+                    }
+                  },
+                  "required": [
+                    "status",
+                    "member_tags"
+                  ]
+                }
+              },
+              "application/yaml": {
+                "schema": {
+                  "type": "string",
+                  "description": "The response as YAML"
+                }
+              },
+              "text/plain": {
+                "schema": {
+                  "type": "string",
+                  "description": "The response as JPCL text"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/member-tags/{member_identifier}": {
+      "post": {
+        "tags": [
+          "Tags"
+        ],
+        "summary": "Replace a member's tags (owner)",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "parameters": [
+          {
+            "schema": {
+              "type": "string",
+              "description": "Member id, or member name (case-insensitive)",
+              "example": "abcdef"
+            },
+            "required": true,
+            "description": "Member id, or member name (case-insensitive)",
+            "name": "member_identifier",
+            "in": "path"
+          }
+        ],
+        "requestBody": {
+          "required": true,
+          "content": {
+            "application/jpcl": {
+              "schema": {
+                "anyOf": [
+                  {
+                    "type": "array",
+                    "items": {
+                      "type": "string"
+                    }
+                  },
+                  {
+                    "type": "object",
+                    "properties": {
+                      "tags": {
+                        "type": "array",
+                        "items": {
+                          "type": "string"
+                        }
+                      }
+                    },
+                    "required": [
+                      "tags"
+                    ]
+                  }
+                ]
+              }
+            },
+            "application/json": {
+              "schema": {
+                "anyOf": [
+                  {
+                    "type": "array",
+                    "items": {
+                      "type": "string"
+                    }
+                  },
+                  {
+                    "type": "object",
+                    "properties": {
+                      "tags": {
+                        "type": "array",
+                        "items": {
+                          "type": "string"
+                        }
+                      }
+                    },
+                    "required": [
+                      "tags"
+                    ]
+                  }
+                ]
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Message"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/member-tags/{member_identifier}/add": {
+      "post": {
+        "tags": [
+          "Tags"
+        ],
+        "summary": "Add one tag to a member (owner)",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "parameters": [
+          {
+            "schema": {
+              "type": "string",
+              "description": "Member id, or member name (case-insensitive)",
+              "example": "abcdef"
+            },
+            "required": true,
+            "description": "Member id, or member name (case-insensitive)",
+            "name": "member_identifier",
+            "in": "path"
+          }
+        ],
+        "requestBody": {
+          "required": true,
+          "content": {
+            "application/jpcl": {
+              "schema": {
+                "type": "object",
+                "properties": {
+                  "tag": {
+                    "type": "string",
+                    "minLength": 1
+                  }
+                },
+                "required": [
+                  "tag"
+                ]
+              }
+            },
+            "application/json": {
+              "schema": {
+                "type": "object",
+                "properties": {
+                  "tag": {
+                    "type": "string",
+                    "minLength": 1
+                  }
+                },
+                "required": [
+                  "tag"
+                ]
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Message"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/member-tags/{member_identifier}/{tag}": {
+      "delete": {
+        "tags": [
+          "Tags"
+        ],
+        "summary": "Remove one tag from a member (owner)",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "parameters": [
+          {
+            "schema": {
+              "type": "string",
+              "description": "Member id, or member name (case-insensitive)",
+              "example": "abcdef"
+            },
+            "required": true,
+            "description": "Member id, or member name (case-insensitive)",
+            "name": "member_identifier",
+            "in": "path"
+          },
+          {
+            "schema": {
+              "type": "string"
+            },
+            "required": true,
+            "name": "tag",
+            "in": "path"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Message"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/member-pride": {
+      "get": {
+        "tags": [
+          "Pride"
+        ],
+        "summary": "Every member's pride identities (owner)",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "parameters": [
+          {
+            "schema": {
+              "type": "string",
+              "enum": [
+                "jpcl",
+                "json",
+                "yml"
+              ],
+              "default": "jpcl",
+              "description": "Response format. Defaults to JPCL."
+            },
+            "required": false,
+            "description": "Response format. Defaults to JPCL.",
+            "name": "format",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "type": "object",
+                  "properties": {
+                    "status": {
+                      "type": "string"
+                    },
+                    "member_pride": {
+                      "type": "object",
+                      "additionalProperties": {
+                        "type": "array",
+                        "items": {
+                          "type": "string"
+                        }
+                      }
+                    }
+                  },
+                  "required": [
+                    "status",
+                    "member_pride"
+                  ]
+                }
+              },
+              "application/yaml": {
+                "schema": {
+                  "type": "string",
+                  "description": "The response as YAML"
+                }
+              },
+              "text/plain": {
+                "schema": {
+                  "type": "string",
+                  "description": "The response as JPCL text"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/member-pride/{member_identifier}/add": {
+      "post": {
+        "tags": [
+          "Pride"
+        ],
+        "summary": "Add a pride identity to a member (owner)",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "parameters": [
+          {
+            "schema": {
+              "type": "string",
+              "description": "Member id, or member name (case-insensitive)",
+              "example": "abcdef"
+            },
+            "required": true,
+            "description": "Member id, or member name (case-insensitive)",
+            "name": "member_identifier",
+            "in": "path"
+          }
+        ],
+        "requestBody": {
+          "required": true,
+          "content": {
+            "application/jpcl": {
+              "schema": {
+                "type": "object",
+                "properties": {
+                  "identity": {
+                    "type": "string",
+                    "minLength": 1
+                  }
+                },
+                "required": [
+                  "identity"
+                ]
+              }
+            },
+            "application/json": {
+              "schema": {
+                "type": "object",
+                "properties": {
+                  "identity": {
+                    "type": "string",
+                    "minLength": 1
+                  }
+                },
+                "required": [
+                  "identity"
+                ]
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Message"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/member-pride/{member_identifier}/{identity}": {
+      "delete": {
+        "tags": [
+          "Pride"
+        ],
+        "summary": "Remove a pride identity from a member (owner)",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "parameters": [
+          {
+            "schema": {
+              "type": "string",
+              "description": "Member id, or member name (case-insensitive)",
+              "example": "abcdef"
+            },
+            "required": true,
+            "description": "Member id, or member name (case-insensitive)",
+            "name": "member_identifier",
+            "in": "path"
+          },
+          {
+            "schema": {
+              "type": "string"
+            },
+            "required": true,
+            "name": "identity",
+            "in": "path"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Message"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/members/{member_identifier}/status": {
+      "get": {
+        "tags": [
+          "Status"
+        ],
+        "summary": "A member's status note",
+        "parameters": [
+          {
+            "schema": {
+              "type": "string",
+              "description": "Member id, or member name (case-insensitive)",
+              "example": "abcdef"
+            },
+            "required": true,
+            "description": "Member id, or member name (case-insensitive)",
+            "name": "member_identifier",
+            "in": "path"
+          },
+          {
+            "schema": {
+              "type": "string",
+              "enum": [
+                "jpcl",
+                "json",
+                "yml"
+              ],
+              "default": "jpcl",
+              "description": "Response format. Defaults to JPCL."
+            },
+            "required": false,
+            "description": "Response format. Defaults to JPCL.",
+            "name": "format",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "type": "object",
+                  "properties": {
+                    "success": {
+                      "type": "boolean"
+                    },
+                    "member_identifier": {
+                      "type": "string"
+                    },
+                    "message": {
+                      "type": "string"
+                    },
+                    "status": {
+                      "$ref": "#/components/schemas/MemberStatus"
+                    }
+                  },
+                  "required": [
+                    "success"
+                  ]
+                }
+              },
+              "application/yaml": {
+                "schema": {
+                  "type": "string",
+                  "description": "The response as YAML"
+                }
+              },
+              "text/plain": {
+                "schema": {
+                  "type": "string",
+                  "description": "The response as JPCL text"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      },
+      "post": {
+        "tags": [
+          "Status"
+        ],
+        "summary": "Set a member's status note (admin)",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "parameters": [
+          {
+            "schema": {
+              "type": "string",
+              "description": "Member id, or member name (case-insensitive)",
+              "example": "abcdef"
+            },
+            "required": true,
+            "description": "Member id, or member name (case-insensitive)",
+            "name": "member_identifier",
+            "in": "path"
+          }
+        ],
+        "requestBody": {
+          "required": true,
+          "content": {
+            "application/jpcl": {
+              "schema": {
+                "type": "object",
+                "properties": {
+                  "text": {
+                    "type": "string",
+                    "minLength": 1,
+                    "maxLength": 100
+                  },
+                  "emoji": {
+                    "type": [
+                      "string",
+                      "null"
+                    ]
+                  }
+                },
+                "required": [
+                  "text"
+                ]
+              }
+            },
+            "application/json": {
+              "schema": {
+                "type": "object",
+                "properties": {
+                  "text": {
+                    "type": "string",
+                    "minLength": 1,
+                    "maxLength": 100
+                  },
+                  "emoji": {
+                    "type": [
+                      "string",
+                      "null"
+                    ]
+                  }
+                },
+                "required": [
+                  "text"
+                ]
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "type": "object",
+                  "properties": {
+                    "success": {
+                      "type": "boolean"
+                    },
+                    "member_identifier": {
+                      "type": "string"
+                    },
+                    "message": {
+                      "type": "string"
+                    },
+                    "status": {
+                      "$ref": "#/components/schemas/MemberStatus"
+                    }
+                  },
+                  "required": [
+                    "success"
+                  ]
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      },
+      "delete": {
+        "tags": [
+          "Status"
+        ],
+        "summary": "Clear a member's status note (admin)",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "parameters": [
+          {
+            "schema": {
+              "type": "string",
+              "description": "Member id, or member name (case-insensitive)",
+              "example": "abcdef"
+            },
+            "required": true,
+            "description": "Member id, or member name (case-insensitive)",
+            "name": "member_identifier",
+            "in": "path"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "type": "object",
+                  "properties": {
+                    "success": {
+                      "type": "boolean"
+                    },
+                    "member_identifier": {
+                      "type": "string"
+                    },
+                    "message": {
+                      "type": "string"
+                    },
+                    "status": {
+                      "$ref": "#/components/schemas/MemberStatus"
+                    }
+                  },
+                  "required": [
+                    "success"
+                  ]
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/relationships": {
+      "get": {
+        "tags": [
+          "Relationships"
+        ],
+        "summary": "The whole relationship map",
+        "parameters": [
+          {
+            "schema": {
+              "type": "string",
+              "enum": [
+                "jpcl",
+                "json",
+                "yml"
+              ],
+              "default": "jpcl",
+              "description": "Response format. Defaults to JPCL."
+            },
+            "required": false,
+            "description": "Response format. Defaults to JPCL.",
+            "name": "format",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "type": "object",
+                  "properties": {
+                    "status": {
+                      "type": "string"
+                    },
+                    "relationships": {
+                      "type": "array",
+                      "items": {
+                        "$ref": "#/components/schemas/Relationship"
+                      }
+                    }
+                  },
+                  "required": [
+                    "status",
+                    "relationships"
+                  ]
+                }
+              },
+              "application/yaml": {
+                "schema": {
+                  "type": "string",
+                  "description": "The response as YAML"
+                }
+              },
+              "text/plain": {
+                "schema": {
+                  "type": "string",
+                  "description": "The response as JPCL text"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      },
+      "post": {
+        "tags": [
+          "Relationships"
+        ],
+        "summary": "Link two members (owner)",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "requestBody": {
+          "required": true,
+          "content": {
+            "application/jpcl": {
+              "schema": {
+                "type": "object",
+                "properties": {
+                  "memberA": {
+                    "type": "string",
+                    "minLength": 1
+                  },
+                  "memberB": {
+                    "type": "string",
+                    "minLength": 1
+                  },
+                  "type": {
+                    "type": "string",
+                    "minLength": 1,
+                    "description": "Defaults to 'partner'. 'crush' is one-way, A to B"
+                  },
+                  "since": {
+                    "type": [
+                      "string",
+                      "null"
+                    ]
+                  }
+                },
+                "required": [
+                  "memberA",
+                  "memberB"
+                ]
+              }
+            },
+            "application/json": {
+              "schema": {
+                "type": "object",
+                "properties": {
+                  "memberA": {
+                    "type": "string",
+                    "minLength": 1
+                  },
+                  "memberB": {
+                    "type": "string",
+                    "minLength": 1
+                  },
+                  "type": {
+                    "type": "string",
+                    "minLength": 1,
+                    "description": "Defaults to 'partner'. 'crush' is one-way, A to B"
+                  },
+                  "since": {
+                    "type": [
+                      "string",
+                      "null"
+                    ]
+                  }
+                },
+                "required": [
+                  "memberA",
+                  "memberB"
+                ]
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "type": "object",
+                  "properties": {
+                    "status": {
+                      "type": "string"
+                    },
+                    "relationship": {
+                      "$ref": "#/components/schemas/Relationship"
+                    }
+                  },
+                  "required": [
+                    "status",
+                    "relationship"
+                  ]
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/relationships/{id}": {
+      "delete": {
+        "tags": [
+          "Relationships"
+        ],
+        "summary": "Remove a link (owner)",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "parameters": [
+          {
+            "schema": {
+              "type": "string"
+            },
+            "required": true,
+            "name": "id",
+            "in": "path"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Message"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/fronters": {
+      "get": {
+        "tags": [
+          "Fronting"
+        ],
+        "summary": "Who is fronting now",
+        "parameters": [
+          {
+            "schema": {
+              "type": "string",
+              "enum": [
+                "jpcl",
+                "json",
+                "yml"
+              ],
+              "default": "jpcl",
+              "description": "Response format. Defaults to JPCL."
+            },
+            "required": false,
+            "description": "Response format. Defaults to JPCL.",
+            "name": "format",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Fronters"
+                }
+              },
+              "application/yaml": {
+                "schema": {
+                  "type": "string",
+                  "description": "The response as YAML"
+                }
+              },
+              "text/plain": {
+                "schema": {
+                  "type": "string",
+                  "description": "The response as JPCL text"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/switches": {
+      "get": {
+        "tags": [
+          "Fronting"
+        ],
+        "summary": "Switch history, newest first",
+        "parameters": [
+          {
+            "schema": {
+              "type": "string",
+              "enum": [
+                "jpcl",
+                "json",
+                "yml"
+              ],
+              "default": "jpcl",
+              "description": "Response format. Defaults to JPCL."
+            },
+            "required": false,
+            "description": "Response format. Defaults to JPCL.",
+            "name": "format",
+            "in": "query"
+          },
+          {
+            "schema": {
+              "type": "integer",
+              "minimum": 1,
+              "maximum": 1000,
+              "default": 100
+            },
+            "required": false,
+            "name": "limit",
+            "in": "query"
+          },
+          {
+            "schema": {
+              "type": "string",
+              "description": "Only switches before this ISO timestamp, for paging"
+            },
+            "required": false,
+            "description": "Only switches before this ISO timestamp, for paging",
+            "name": "before",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "type": "array",
+                  "items": {
+                    "$ref": "#/components/schemas/Switch"
+                  }
+                }
+              },
+              "application/yaml": {
+                "schema": {
+                  "type": "string",
+                  "description": "The response as YAML"
+                }
+              },
+              "text/plain": {
+                "schema": {
+                  "type": "string",
+                  "description": "JPCL text with a top-level switches array"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/switches/{id}": {
+      "delete": {
+        "tags": [
+          "Fronting"
+        ],
+        "summary": "Delete a mistaken switch (admin)",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "parameters": [
+          {
+            "schema": {
+              "type": "string"
+            },
+            "required": true,
+            "name": "id",
+            "in": "path"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Message"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/switch": {
+      "post": {
+        "tags": [
+          "Fronting"
+        ],
+        "summary": "Set the front. An empty list means switch-out. proxyBot's token works here too",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "requestBody": {
+          "required": true,
+          "content": {
+            "application/jpcl": {
+              "schema": {
+                "type": "object",
+                "properties": {
+                  "members": {
+                    "type": "array",
+                    "items": {
+                      "type": "string"
+                    },
+                    "default": []
+                  }
+                }
+              }
+            },
+            "application/json": {
+              "schema": {
+                "type": "object",
+                "properties": {
+                  "members": {
+                    "type": "array",
+                    "items": {
+                      "type": "string"
+                    },
+                    "default": []
+                  }
+                }
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Message"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/switch_front": {
+      "post": {
+        "tags": [
+          "Fronting"
+        ],
+        "summary": "Switch to a single member",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "requestBody": {
+          "required": true,
+          "content": {
+            "application/jpcl": {
+              "schema": {
+                "type": "object",
+                "properties": {
+                  "member_id": {
+                    "type": "string",
+                    "minLength": 1
+                  }
+                },
+                "required": [
+                  "member_id"
+                ]
+              }
+            },
+            "application/json": {
+              "schema": {
+                "type": "object",
+                "properties": {
+                  "member_id": {
+                    "type": "string",
+                    "minLength": 1
+                  }
+                },
+                "required": [
+                  "member_id"
+                ]
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Message"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/multi_switch": {
+      "post": {
+        "tags": [
+          "Fronting"
+        ],
+        "summary": "Switch to several members, echoing their names back",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "requestBody": {
+          "required": true,
+          "content": {
+            "application/jpcl": {
+              "schema": {
+                "type": "object",
+                "properties": {
+                  "member_ids": {
+                    "type": "array",
+                    "items": {
+                      "type": "string"
+                    },
+                    "default": []
+                  }
+                }
+              }
+            },
+            "application/json": {
+              "schema": {
+                "type": "object",
+                "properties": {
+                  "member_ids": {
+                    "type": "array",
+                    "items": {
+                      "type": "string"
+                    },
+                    "default": []
+                  }
+                }
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Message"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/users": {
+      "get": {
+        "tags": [
+          "Users"
+        ],
+        "summary": "Every site account (admin)",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "parameters": [
+          {
+            "schema": {
+              "type": "string",
+              "enum": [
+                "jpcl",
+                "json",
+                "yml"
+              ],
+              "default": "jpcl",
+              "description": "Response format. Defaults to JPCL."
+            },
+            "required": false,
+            "description": "Response format. Defaults to JPCL.",
+            "name": "format",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "type": "array",
+                  "items": {
+                    "$ref": "#/components/schemas/User"
+                  }
+                }
+              },
+              "application/yaml": {
+                "schema": {
+                  "type": "string",
+                  "description": "The response as YAML"
+                }
+              },
+              "text/plain": {
+                "schema": {
+                  "type": "string",
+                  "description": "JPCL text with a top-level users array"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      },
+      "post": {
+        "tags": [
+          "Users"
+        ],
+        "summary": "Create a local account (admin)",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "requestBody": {
+          "required": true,
+          "content": {
+            "application/jpcl": {
+              "schema": {
+                "$ref": "#/components/schemas/UserCreate"
+              }
+            },
+            "application/json": {
+              "schema": {
+                "$ref": "#/components/schemas/UserCreate",
+                "properties": {
+                  "password": {
+                    "type": "string",
+                    "minLength": 8,
+                    "maxLength": 1024
+                  }
+                }
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/User"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/users/{user_id}": {
+      "put": {
+        "tags": [
+          "Users"
+        ],
+        "summary": "Edit an account. Your own, or anyone's as an admin",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "parameters": [
+          {
+            "schema": {
+              "type": "string"
+            },
+            "required": true,
+            "name": "user_id",
+            "in": "path"
+          }
+        ],
+        "requestBody": {
+          "required": true,
+          "content": {
+            "application/jpcl": {
+              "schema": {
+                "$ref": "#/components/schemas/UserUpdate"
+              }
+            },
+            "application/json": {
+              "schema": {
+                "$ref": "#/components/schemas/UserUpdate",
+                "properties": {
+                  "password": {
+                    "type": "string",
+                    "minLength": 8,
+                    "maxLength": 1024
+                  }
+                }
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/User"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      },
+      "delete": {
+        "tags": [
+          "Users"
+        ],
+        "summary": "Delete an account (admin)",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "parameters": [
+          {
+            "schema": {
+              "type": "string"
+            },
+            "required": true,
+            "name": "user_id",
+            "in": "path"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Message"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/metrics/fronting-time": {
+      "get": {
+        "tags": [
+          "Metrics"
+        ],
+        "summary": "Time each member spent fronting",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "parameters": [
+          {
+            "schema": {
+              "type": "number",
+              "minimum": 1,
+              "maximum": 365,
+              "default": 30
+            },
+            "required": false,
+            "name": "days",
+            "in": "query"
+          },
+          {
+            "schema": {
+              "type": "string",
+              "enum": [
+                "jpcl",
+                "json",
+                "yml"
+              ],
+              "default": "jpcl",
+              "description": "Response format. Defaults to JPCL."
+            },
+            "required": false,
+            "description": "Response format. Defaults to JPCL.",
+            "name": "format",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/FrontingTimeMetrics"
+                }
+              },
+              "application/yaml": {
+                "schema": {
+                  "type": "string",
+                  "description": "The response as YAML"
+                }
+              },
+              "text/plain": {
+                "schema": {
+                  "type": "string",
+                  "description": "The response as JPCL text"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/metrics/switch-frequency": {
+      "get": {
+        "tags": [
+          "Metrics"
+        ],
+        "summary": "How often the system switched",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "parameters": [
+          {
+            "schema": {
+              "type": "number",
+              "minimum": 1,
+              "maximum": 365,
+              "default": 30
+            },
+            "required": false,
+            "name": "days",
+            "in": "query"
+          },
+          {
+            "schema": {
+              "type": "string",
+              "enum": [
+                "jpcl",
+                "json",
+                "yml"
+              ],
+              "default": "jpcl",
+              "description": "Response format. Defaults to JPCL."
+            },
+            "required": false,
+            "description": "Response format. Defaults to JPCL.",
+            "name": "format",
+            "in": "query"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/SwitchFrequencyMetrics"
+                }
+              },
+              "application/yaml": {
+                "schema": {
+                  "type": "string",
+                  "description": "The response as YAML"
+                }
+              },
+              "text/plain": {
+                "schema": {
+                  "type": "string",
+                  "description": "The response as JPCL text"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/admin/refresh": {
+      "post": {
+        "tags": [
+          "Admin"
+        ],
+        "summary": "Reload every open page (admin)",
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Message"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Bad request",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Not signed in, or the token is invalid",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Signed in, but missing the required role",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          },
+          "422": {
+            "description": "The body or query failed validation",
+            "content": {
+              "application/jpcl": {
+                "schema": {
+                  "type": "string",
+                  "description": "A JPCL document"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/media/{key}": {
+      "get": {
+        "tags": [
+          "Media"
+        ],
+        "summary": "A stored avatar or banner",
+        "parameters": [
+          {
+            "schema": {
+              "type": "string",
+              "pattern": "^[a-z0-9_-]+$",
+              "example": "member-abcdef-avatar_url"
+            },
+            "required": true,
+            "name": "key",
+            "in": "path"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "The image",
+            "content": {
+              "image/*": {
+                "schema": {
+                  "type": "string",
+                  "format": "binary"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/api/plural/auth/login": {
+      "post": {
+        "summary": "Sign in locally",
+        "requestBody": {
+          "required": true,
+          "content": {
+            "application/json": {
+              "schema": {
+                "type": "object",
+                "required": [
+                  "username",
+                  "password"
+                ],
+                "properties": {
+                  "username": {
+                    "type": "string"
+                  },
+                  "password": {
+                    "type": "string"
+                  }
+                }
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "Session token",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "type": "object",
+                  "required": [
+                    "access_token",
+                    "token_type"
+                  ],
+                  "properties": {
+                    "access_token": {
+                      "type": "string"
+                    },
+                    "token_type": {
+                      "const": "bearer"
+                    }
+                  }
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Invalid credentials"
+          }
+        },
+        "tags": [
+          "Auth"
+        ]
+      }
+    }
+  },
+  "webhooks": {}
+}
diff --git a/web/package.json b/web/package.json
new file mode 100644
index 0000000..fbb8be4
--- /dev/null
+++ b/web/package.json
@@ -0,0 +1,29 @@
+{
+  "name": "plural-system",
+  "version": "1.0.0",
+  "private": true,
+  "type": "module",
+  "scripts": {
+    "dev": "vite dev",
+    "build": "vite build",
+    "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json"
+  },
+  "imports": {
+    "#lib": "./src/lib/index.ts",
+    "#lib/*": "./src/lib/*"
+  },
+  "dependencies": {
+    "jpcl-lang": "^2.0.0"
+  },
+  "devDependencies": {
+    "@iconify-json/ic": "^1.2.4",
+    "@sveltejs/kit": "3.1.0",
+    "@sveltejs/vite-plugin-svelte": "7.3.1",
+    "@types/node": "26.6.6",
+    "svelte": "5.57.3",
+    "svelte-check": "4.7.7",
+    "typescript": "~6.0.3",
+    "unplugin-icons": "^24.0.0",
+    "vite": "8.3.5"
+  }
+}
diff --git a/web/src/app.d.ts b/web/src/app.d.ts
new file mode 100644
index 0000000..8e674e4
--- /dev/null
+++ b/web/src/app.d.ts
@@ -0,0 +1,20 @@
+/* src/app.d.ts
+ * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+ * Licensed under the DASL-1.0 Licence.
+ * See LICENCE.md in the project root for full licence information.
+ */
+
+/// <reference types="unplugin-icons/types/svelte5" />
+
+declare global {
+  namespace App {
+    interface Error {
+      message: string;
+      title?: string;
+    }
+
+  }
+
+}
+
+export {};
diff --git a/web/src/app.html b/web/src/app.html
new file mode 100644
index 0000000..5fe3981
--- /dev/null
+++ b/web/src/app.html
@@ -0,0 +1,19 @@
+<!-- src/app.html
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<!doctype html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5" />
+    <meta name="color-scheme" content="dark" />
+    <link rel="icon" href="/favicon.svg" type="image/svg+xml" />
+    %sveltekit.head%
+  </head>
+  <body data-sveltekit-preload-data="hover">
+    <div class="app">%sveltekit.body%</div>
+  </body>
+</html>
diff --git a/web/src/lib/api.ts b/web/src/lib/api.ts
new file mode 100644
index 0000000..a541414
--- /dev/null
+++ b/web/src/lib/api.ts
@@ -0,0 +1,297 @@
+/* src/lib/api.ts
+ * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+ * Licensed under the DASL-1.0 Licence.
+ * See LICENCE.md in the project root for full licence information.
+ */
+
+import { dumps } from "jpcl-lang/core";
+import { JPCL_MEDIA_TYPE, readJpcl } from "./jpcl.ts";
+import type {
+  FrontersResponse,
+  MemberStatusResponse,
+  MentalState,
+  PluralMember,
+  PluralSystem,
+  RelationshipsResponse,
+  SwitchResponse,
+  UserResponse,
+} from "./types.ts";
+import { siteUrl } from "./index.ts";
+
+const TOKEN_KEY = "token";
+
+/** The current local API session token */
+export function readToken(): string | null {
+  if (typeof localStorage === "undefined") return null;
+  try {
+    return localStorage.getItem(TOKEN_KEY);
+  } catch {
+    return null;
+  }
+}
+
+export function writeToken(token: string | null) {
+  try {
+    if (token) localStorage.setItem(TOKEN_KEY, token);
+    else localStorage.removeItem(TOKEN_KEY);
+  } catch {
+    // Storage blocked; the session simply won't persist
+  }
+}
+
+// The API lives on this site, at /api
+export function apiBase(origin: string): string {
+  return `${origin}/api`;
+}
+
+// Live updates come from this site's own hub
+export function socketUrl(): string {
+  const protocol = location.protocol === "https:" ? "wss:" : "ws:";
+  return `${protocol}//${location.host}/api/plural/ws`;
+}
+
+/** A client for load functions: SvelteKit's fetch, no token */
+export function publicClient(fetcher: typeof fetch, origin: string): SiteClient {
+  return new SiteClient({
+    fetch: fetcher,
+    baseUrl: apiBase(origin),
+  });
+}
+
+function apiErrorMessage(body: unknown, fallback: string): string {
+  if (body && typeof body === "object") {
+    const b = body as {
+      error?: string | { message?: string };
+      detail?: string | { message?: string }[];
+      message?: string;
+    };
+    if (typeof b.error === "string") return b.error;
+    // Validation errors arrive as a list of issues
+    if (Array.isArray(b.detail)) return b.detail.map((issue) => issue.message).join("; ");
+    return b.error?.message || b.detail || b.message || fallback;
+  }
+  return fallback;
+}
+
+export async function readApiResponse<T>(response: Response): Promise<T> {
+  const text = await response.text();
+  const contentType = response.headers.get("Content-Type")?.split(";", 1)[0];
+  if (contentType === JPCL_MEDIA_TYPE || (response.ok && contentType === "text/plain")) {
+    return readJpcl(text) as T;
+  }
+
+  try {
+    return (text ? JSON.parse(text) : null) as T;
+  } catch {
+    return text as T;
+  }
+}
+
+interface ClientOptions {
+  baseUrl: string;
+  fetch?: typeof fetch;
+  token?: () => string | null;
+}
+
+interface RequestOptions {
+  method?: "GET" | "POST" | "DELETE";
+  body?: object;
+  signedIn?: boolean;
+}
+
+// This site's API, with only the calls the pages use
+export class SiteClient {
+  readonly baseUrl: string;
+  private readonly doFetch: typeof fetch;
+  private readonly token: () => string | null;
+
+  constructor(options: ClientOptions) {
+    this.baseUrl = options.baseUrl.replace(/\/+$/, "");
+    this.doFetch = (options.fetch ?? fetch).bind(globalThis);
+    this.token = options.token ?? (() => null);
+  }
+
+  private async request<T>(path: string, options: RequestOptions = {}): Promise<T> {
+    const headers = new Headers();
+    headers.set("Accept", JPCL_MEDIA_TYPE);
+    if (options.body !== undefined) headers.set("Content-Type", JPCL_MEDIA_TYPE);
+
+    if (options.signedIn) {
+      const token = this.token();
+      if (!token) throw new Error("Sign in first");
+      headers.set("Authorization", `Bearer ${token}`);
+    }
+
+    const response = await this.doFetch(`${this.baseUrl}${path}`, {
+      method: options.method ?? "GET",
+      headers,
+      body: options.body === undefined ? undefined : dumps(options.body),
+    });
+    const parsed = await readApiResponse<unknown>(response);
+
+    if (!response.ok) {
+      const fallback = typeof parsed === "string" && parsed ? parsed : `Request failed with ${response.status}`;
+      throw new Error(apiErrorMessage(parsed, fallback));
+    }
+    return parsed as T;
+  }
+
+  getFronters() {
+    return this.request<FrontersResponse>("/plural/fronters");
+  }
+
+  async getMembers() {
+    const document = await this.request<{ members: PluralMember[] }>("/plural/members");
+    return document.members;
+  }
+
+  getMember(memberId: string) {
+    return this.request<PluralMember>(`/plural/member/${encodeURIComponent(memberId)}`);
+  }
+
+  getSystem() {
+    return this.request<PluralSystem>("/plural/system");
+  }
+
+  getMentalState() {
+    return this.request<MentalState>("/plural/mental-state");
+  }
+
+  getMemberStatus(identifier: string) {
+    return this.request<MemberStatusResponse>(`/plural/members/${encodeURIComponent(identifier)}/status`);
+  }
+
+  getRelationships() {
+    return this.request<RelationshipsResponse>("/plural/relationships");
+  }
+
+  async localSignIn(username: string, password: string): Promise<string> {
+    const response = await fetch(`${this.baseUrl}/plural/auth/login`, {
+      method: "POST",
+      headers: {
+        "Content-Type": "application/json",
+        Accept: JPCL_MEDIA_TYPE,
+      },
+      body: JSON.stringify({
+        username,
+        password,
+      }),
+    });
+    const data = await readApiResponse<{ access_token: string }>(response);
+    if (!response.ok || !data?.access_token) {
+      throw new Error(apiErrorMessage(data, "Sign-in failed."));
+    }
+    return data.access_token;
+  }
+
+  getUserInfo() {
+    return this.request<UserResponse>("/plural/user_info", {
+      signedIn: true,
+    });
+  }
+
+  multiSwitch(memberIds: string[]) {
+    return this.request<SwitchResponse>("/plural/multi_switch", {
+      method: "POST",
+      signedIn: true,
+      body: {
+        member_ids: memberIds,
+      },
+    });
+  }
+
+  setMentalState(input: { level: string; notes?: string }) {
+    return this.request<unknown>("/plural/mental-state", {
+      method: "POST",
+      signedIn: true,
+      body: {
+        level: input.level,
+        notes: input.notes ?? null,
+      },
+    });
+  }
+
+  setMemberStatus(identifier: string, input: { text: string; emoji?: string }) {
+    return this.request<unknown>(`/plural/members/${encodeURIComponent(identifier)}/status`, {
+      method: "POST",
+      signedIn: true,
+      body: {
+        text: input.text,
+        emoji: input.emoji ?? null,
+      },
+    });
+  }
+
+  forceRefresh() {
+    return this.request<unknown>("/plural/admin/refresh", {
+      method: "POST",
+      signedIn: true,
+    });
+  }
+
+  addMemberPride(identifier: string, identity: string) {
+    return this.request<unknown>(`/plural/member-pride/${encodeURIComponent(identifier)}/add`, {
+      method: "POST",
+      signedIn: true,
+      body: {
+        identity,
+      },
+    });
+  }
+
+  removeMemberPride(identifier: string, identity: string) {
+    const path = `/plural/member-pride/${encodeURIComponent(identifier)}/${encodeURIComponent(identity)}`;
+    return this.request<unknown>(path, {
+      method: "DELETE",
+      signedIn: true,
+    });
+  }
+
+  addRelationship(input: { memberA: string; memberB: string; type?: string; since?: string | null }) {
+    return this.request<unknown>("/plural/relationships", {
+      method: "POST",
+      signedIn: true,
+      body: {
+        memberA: input.memberA,
+        memberB: input.memberB,
+        ...(input.type ? { type: input.type } : {}),
+        ...(input.since !== undefined ? { since: input.since } : {}),
+      },
+    });
+  }
+
+  removeRelationship(id: string) {
+    return this.request<unknown>(`/plural/relationships/${encodeURIComponent(id)}`, {
+      method: "DELETE",
+      signedIn: true,
+    });
+  }
+}
+
+/** The browser's client: every request carries the current token */
+export const client = new SiteClient({
+  baseUrl: apiBase(typeof location === "undefined" ? siteUrl : location.origin),
+  token: () => readToken(),
+});
+
+/** For the endpoints the client has no method for. Throws with the API's own message */
+export async function authFetch<T = unknown>(
+  path: string,
+  { document, ...init }: RequestInit & { document?: object } = {},
+  fallback = "Request failed",
+): Promise<T> {
+  const token = readToken();
+  const headers = new Headers(init.headers);
+  headers.set("Accept", JPCL_MEDIA_TYPE);
+  if (token) headers.set("Authorization", `Bearer ${token}`);
+  if (document !== undefined) headers.set("Content-Type", JPCL_MEDIA_TYPE);
+
+  const response = await fetch(`${client.baseUrl}${path}`, {
+    ...init,
+    headers,
+    body: document === undefined ? init.body : dumps(document),
+  });
+  const body = await readApiResponse<unknown>(response);
+  if (!response.ok) throw new Error(apiErrorMessage(body, fallback));
+  return body as T;
+}
diff --git a/web/src/lib/auth.svelte.ts b/web/src/lib/auth.svelte.ts
new file mode 100644
index 0000000..684f60c
--- /dev/null
+++ b/web/src/lib/auth.svelte.ts
@@ -0,0 +1,70 @@
+/* src/lib/auth.svelte.ts
+ * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+ * Licensed under the DASL-1.0 Licence.
+ * See LICENCE.md in the project root for full licence information.
+ */
+
+import type { UserResponse } from "#lib/types.ts";
+import { client, readApiResponse, readToken, writeToken } from "./api.ts";
+import { JPCL_MEDIA_TYPE } from "./jpcl.ts";
+
+// Who is signed in, shared by every page. Filled on the client only: the token lives in localStorage
+class Auth {
+  token = $state<string | null>(null);
+  user = $state<UserResponse | null>(null);
+  ready = $state(false);
+
+  // mock-* tokens are for local development, as before
+  isMock = $derived(this.token?.startsWith("mock-") ?? false);
+  signedIn = $derived(this.isMock ? true : this.user !== null);
+  isOwner = $derived(this.isMock ? this.token === "mock-owner" : Boolean(this.user?.is_owner));
+  isAdmin = $derived(this.isMock ? this.token === "mock-admin" : Boolean(this.user?.is_admin));
+  displayName = $derived(this.isMock ? "Mock User" : this.user?.display_name || this.user?.username || "");
+
+  async load() {
+    this.token = readToken();
+    if (this.token && !this.isMock) await this.refresh();
+    this.ready = true;
+  }
+
+  async refresh() {
+    try {
+      this.user = await client.getUserInfo();
+    } catch {
+      this.user = null;
+    }
+  }
+
+  signIn(token: string) {
+    writeToken(token);
+    this.token = token;
+    this.ready = false;
+    void this.load();
+  }
+
+  /** Ends the local API session. */
+  async signOut(): Promise<string | null> {
+    const current = this.token;
+    writeToken(null);
+    this.token = null;
+    this.user = null;
+    if (!current || this.isMock) return null;
+
+    try {
+      const response = await fetch(`${client.baseUrl}/plural/auth/logout`, {
+        method: "POST",
+        headers: {
+          Authorization: `Bearer ${current}`,
+          Accept: JPCL_MEDIA_TYPE,
+        },
+      });
+      const data = await readApiResponse<{ end_session_url?: string | null }>(response);
+      return data.end_session_url ?? null;
+    } catch {
+      // Offline or the API is down; the local sign-out still stands
+      return null;
+    }
+  }
+}
+
+export const auth = new Auth();
diff --git a/web/src/lib/colour.ts b/web/src/lib/colour.ts
new file mode 100644
index 0000000..13a28cb
--- /dev/null
+++ b/web/src/lib/colour.ts
@@ -0,0 +1,112 @@
+/* src/lib/colour.ts
+ * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+ * Licensed under the DASL-1.0 Licence.
+ * See LICENCE.md in the project root for full licence information.
+ */
+
+/* ============================================================================
+   MEMBER COLOURS
+   ============================================================================ */
+
+/** PluralKit returns hex colours without the leading `#`. Normalise to a
+ *  usable CSS colour, or null when unset. */
+export function normalizeColor(color: string | null | undefined): string | null {
+  if (!color) return null;
+  const trimmed = color.trim();
+  if (!trimmed) return null;
+  return trimmed.startsWith("#") ? trimmed : `#${trimmed}`;
+}
+
+function hexToRgb(hex: string): [number, number, number] | null {
+  let h = hex.replace("#", "").trim();
+  if (h.length === 3) h = h.split("").map((c) => c + c).join("");
+  if (h.length !== 6 || !/^[0-9a-fA-F]{6}$/.test(h)) return null;
+  return [
+    parseInt(h.slice(0, 2), 16),
+    parseInt(h.slice(2, 4), 16),
+    parseInt(h.slice(4, 6), 16),
+  ];
+}
+
+/** WCAG relative luminance, 0 (black) to 1 (white). */
+function relativeLuminance([r, g, b]: [number, number, number]): number {
+  const chan = (v: number) => {
+    const c = v / 255;
+    return c <= 0.03928 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4);
+  };
+  return 0.2126 * chan(r) + 0.7152 * chan(g) + 0.0722 * chan(b);
+}
+
+function rgbToHsl([r, g, b]: [number, number, number]): [number, number, number] {
+  const rn = r / 255, gn = g / 255, bn = b / 255;
+  const max = Math.max(rn, gn, bn), min = Math.min(rn, gn, bn);
+  const l = (max + min) / 2;
+  if (max === min) return [0, 0, l];
+  const d = max - min;
+  const s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
+  let h: number;
+  if (max === rn) h = ((gn - bn) / d + (gn < bn ? 6 : 0)) / 6;
+  else if (max === gn) h = ((bn - rn) / d + 2) / 6;
+  else h = ((rn - gn) / d + 4) / 6;
+  return [h, s, l];
+}
+
+function hslToRgb([h, s, l]: [number, number, number]): [number, number, number] {
+  if (s === 0) {
+    const v = Math.round(l * 255);
+    return [v, v, v];
+  }
+  const hue = (p: number, q: number, t: number) => {
+    let tt = t;
+    if (tt < 0) tt += 1;
+    if (tt > 1) tt -= 1;
+    if (tt < 1 / 6) return p + (q - p) * 6 * tt;
+    if (tt < 1 / 2) return q;
+    if (tt < 2 / 3) return p + (q - p) * (2 / 3 - tt) * 6;
+    return p;
+  };
+  const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
+  const p = 2 * l - q;
+  return [
+    Math.round(hue(p, q, h + 1 / 3) * 255),
+    Math.round(hue(p, q, h) * 255),
+    Math.round(hue(p, q, h - 1 / 3) * 255),
+  ];
+}
+
+/** Luminance floor that reads comfortably against the dark theme backgrounds
+ *  (all flavours sit below ~0.02 luminance). */
+const MIN_LUMINANCE = 0.18;
+
+/**
+ * Keep a member's chosen colour, but raise its lightness when it is too dark
+ * to read against the dark background. Hue and saturation are preserved, so
+ * the colour still reads as "theirs" — it just stops disappearing.
+ * Returns `fallback` when there is no usable colour.
+ */
+export function readableOnDark(
+  color: string | null | undefined,
+  fallback = "var(--text)",
+): string {
+  const normalized = normalizeColor(color);
+  if (!normalized) return fallback;
+
+  const rgb = hexToRgb(normalized);
+  // Non-hex (named colours, rgb()) pass through untouched.
+  if (!rgb) return normalized;
+
+  if (relativeLuminance(rgb) >= MIN_LUMINANCE) return normalized;
+
+  const [h, s] = rgbToHsl(rgb);
+  let [, , l] = rgbToHsl(rgb);
+  let out = rgb;
+  // Walk lightness up until the colour clears the floor, capping well short
+  // of white so strongly-coloured names keep their identity.
+  while (l < 0.85 && relativeLuminance(out) < MIN_LUMINANCE) {
+    l = Math.min(0.85, l + 0.04);
+    out = hslToRgb([h, s, l]);
+  }
+
+  const toHex = (v: number) => v.toString(16).padStart(2, "0");
+  return `#${toHex(out[0])}${toHex(out[1])}${toHex(out[2])}`;
+}
diff --git a/web/src/lib/components/DiscordEmbed.svelte b/web/src/lib/components/DiscordEmbed.svelte
new file mode 100644
index 0000000..41b61b5
--- /dev/null
+++ b/web/src/lib/components/DiscordEmbed.svelte
@@ -0,0 +1,104 @@
+<!-- src/lib/components/DiscordEmbed.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import { page } from "$app/state";
+  import { fallbackAvatar, siteName, siteUrl } from "#lib";
+  import { normalizeColor } from "#lib/colour.ts";
+
+  let {
+    title,
+    description,
+    image = fallbackAvatar,
+    colour = null,
+  }: {
+    title: string;
+    description: string;
+    image?: string;
+    colour?: string | null;
+  } = $props();
+
+  // Matches --accent in theme.css
+  const accentColour = 0xeb459e;
+
+  // Discord wants an integer; fall back to the accent for unset or non-hex colours
+  const embedColour = $derived.by(() => {
+    const hex = normalizeColor(colour)?.slice(1) ?? "";
+    const full = hex.length === 3 ? hex.split("").map((c) => c + c).join("") : hex;
+    return /^[0-9a-fA-F]{6}$/.test(full) ? parseInt(full, 16) : accentColour;
+  });
+
+  // Keeps the whole embed well under Discord's 3,000 byte cap
+  const maxDescription = 1000;
+
+  const pageUrl = $derived(siteUrl + page.url.pathname);
+
+  // Discord drops the whole embed if the thumbnail URL isn't absolute
+  const imageUrl = $derived(new URL(image, siteUrl).href);
+
+  const shortDescription = $derived(
+    description.length > maxDescription
+      ? description.slice(0, maxDescription - 1) + "…"
+      : description,
+  );
+
+  // Discord component embed: one Container, Open Graph tags are the fallback
+  const componentEmbed = $derived({
+    component: {
+      type: 17,
+      accent_color: embedColour,
+      components: [
+        {
+          type: 9,
+          components: [
+            {
+              type: 10,
+              content: `## ${title}`,
+            },
+            {
+              type: 10,
+              content: shortDescription,
+            },
+          ],
+          accessory: {
+            type: 11,
+            media: { url: imageUrl },
+          },
+        },
+        { type: 14 },
+        {
+          type: 1,
+          components: [
+            {
+              type: 2,
+              style: 5,
+              label: "Open page",
+              url: pageUrl,
+            },
+          ],
+        },
+        {
+          type: 10,
+          content: `-# ${siteName}`,
+        },
+      ],
+    },
+  });
+
+  // Escape '<' so the JSON can't close the script tag early
+  const toJson = (data: unknown) => JSON.stringify(data).replace(/</g, "\\u003c");
+
+  // Split closing tag so it doesn't end this script block
+  const closingTag = "</" + "script>";
+  const embedTag = $derived(
+    `<script id='discord:component-embed' type='application/json'>${toJson(componentEmbed)}${closingTag}`,
+  );
+</script>
+
+<svelte:head>
+  <!-- Built from page props, '<' escaped -->
+  {@html embedTag}
+</svelte:head>
diff --git a/web/src/lib/components/Footer.svelte b/web/src/lib/components/Footer.svelte
new file mode 100644
index 0000000..b83fe6d
--- /dev/null
+++ b/web/src/lib/components/Footer.svelte
@@ -0,0 +1,12 @@
+<!-- src/lib/components/Footer.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import { siteName } from "#lib";
+  import "#lib/styles/footer.css";
+</script>
+
+<footer>{siteName}</footer>
diff --git a/web/src/lib/components/Header.svelte b/web/src/lib/components/Header.svelte
new file mode 100644
index 0000000..e84eada
--- /dev/null
+++ b/web/src/lib/components/Header.svelte
@@ -0,0 +1,77 @@
+<!-- src/lib/components/Header.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import IcLogin from "~icons/ic/outline-login";
+  import IcLogout from "~icons/ic/outline-logout";
+  import IcPerson from "~icons/ic/outline-person";
+  import IcPublic from "~icons/ic/outline-public";
+  import IcSettings from "~icons/ic/outline-settings";
+  import IcWorkspacePremium from "~icons/ic/outline-workspace-premium";
+  import "#lib/styles/header.css";
+  import { goto } from "$app/navigation";
+  import { page } from "$app/state";
+  import { fallbackAvatar } from "#lib";
+  import { auth } from "#lib/auth.svelte.ts";
+
+  const dashboardPaths = ["/user/docs", "/user/metrics"];
+
+  function currentSection(landing: string, section?: string) {
+    const currentPath = page.url.pathname;
+    if (currentPath === landing) return "page";
+    if (section && currentPath.startsWith(section)) return "location";
+    if (landing === "/user/dash" && dashboardPaths.includes(currentPath)) return "location";
+    return undefined;
+  }
+
+  async function signOut() {
+    const endSession = await auth.signOut();
+    if (endSession) location.href = endSession;
+    else await goto("/");
+  }
+</script>
+
+<!-- Fixed-height page backdrop, so every page gets the same amount of background -->
+<div class="backdrop" aria-hidden="true"></div>
+
+<header class="site-header">
+  <a class="brand" href="/">
+    <img src={fallbackAvatar} alt="" width="32" height="32" />
+    <span>Plural System</span>
+  </a>
+
+  <nav aria-label="Account and dashboards">
+    {#if auth.signedIn}
+      <a href="/user/dash" aria-current={currentSection("/user/dash")}>
+        <IcPublic width="24" height="24" class="nav-icon" />Dashboard
+      </a>
+      {#if auth.isAdmin || auth.isOwner}
+        <a href="/admin/dash" aria-current={currentSection("/admin/dash", "/admin/")}>
+          <IcSettings width="24" height="24" class="nav-icon" />Admin
+        </a>
+      {/if}
+      {#if auth.isOwner}
+        <a href="/owner/dash" aria-current={currentSection("/owner/dash", "/owner/")}>
+          <IcWorkspacePremium width="24" height="24" class="nav-icon" />Owner
+        </a>
+      {/if}
+      <a
+        href="/user/profile"
+        aria-current={currentSection("/user/profile", "/user/profile/")}
+        title={auth.displayName}
+      >
+        <IcPerson width="24" height="24" class="nav-icon" />Profile
+      </a>
+      <button type="button" class="nav-button" onclick={signOut}>
+        <IcLogout width="24" height="24" class="nav-icon" />Sign out
+      </button>
+    {:else if auth.ready}
+      <a href="/user/login">
+        <IcLogin width="24" height="24" class="nav-icon" />Sign in
+      </a>
+    {/if}
+  </nav>
+</header>
diff --git a/web/src/lib/components/Home.svelte b/web/src/lib/components/Home.svelte
new file mode 100644
index 0000000..32c3a77
--- /dev/null
+++ b/web/src/lib/components/Home.svelte
@@ -0,0 +1,524 @@
+<!-- src/lib/components/Home.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import type { Component } from "svelte";
+  import IcCheckCircle from "~icons/ic/outline-check-circle";
+  import IcFilterList from "~icons/ic/outline-filter-list";
+  import IcGppBad from "~icons/ic/outline-gpp-bad";
+  import IcInfo from "~icons/ic/outline-info";
+  import IcReportProblem from "~icons/ic/outline-report-problem";
+  import IcSearch from "~icons/ic/outline-search";
+  import IcWarningAmber from "~icons/ic/outline-warning-amber";
+  import type { FrontersResponse, PluralMember, PluralSystem } from "#lib/types.ts";
+  import { replaceState } from "$app/navigation";
+  import { page } from "$app/state";
+  import { avatarFallback, fallbackAvatar, memberName, sortMembers, siteUrl } from "#lib";
+  import { normalizeColor, readableOnDark } from "#lib/colour.ts";
+  import { live } from "#lib/live.svelte.ts";
+  import PrideSwatch from "#lib/components/PrideSwatch.svelte";
+  import DiscordEmbed from "#lib/components/DiscordEmbed.svelte";
+
+  let {
+    members: rawMembers,
+    fronters,
+    system,
+  }: {
+    members: PluralMember[];
+    fronters: FrontersResponse | null;
+    system: PluralSystem | null;
+  } = $props();
+
+  const MENTAL_LABELS: Record<string, string> = {
+    safe: "Safe",
+    unstable: "Unstable",
+    idealizing: "Idealizing",
+    "self-harming": "Self-Harming",
+    "highly at risk": "Highly At Risk",
+  };
+
+  const MENTAL_ICONS: Record<string, Component> = {
+    safe: IcCheckCircle,
+    unstable: IcReportProblem,
+    idealizing: IcInfo,
+    "self-harming": IcWarningAmber,
+    "highly at risk": IcGppBad,
+  };
+
+  let search = $state("");
+  let filtersOpen = $state(false);
+  let filtersBox = $state<HTMLDivElement>();
+
+  // Filters live in the URL, so /?tag=Example&identity=Transgender opens already filtered
+  let tagFilter = $state(page.url.searchParams.get("tag"));
+  let identityFilter = $state(page.url.searchParams.get("identity"));
+  const activeFilters = $derived((tagFilter ? 1 : 0) + (identityFilter ? 1 : 0));
+
+  const members = $derived(sortMembers(rawMembers));
+  const frontingNow = $derived(fronters?.members ?? []);
+  const mental = $derived(system?.mental_state ?? null);
+
+  const tags = $derived([...new Set(members.flatMap((m) => m.tags ?? []))].sort((a, b) => a.localeCompare(b)));
+  const identities = $derived(
+    [...new Set(members.flatMap((m) => m.pride ?? []))].sort((a, b) => a.localeCompare(b)),
+  );
+
+  const shown = $derived.by(() => {
+    const query = search.toLowerCase();
+    return members.filter((member) => {
+      if (query) {
+        const named = memberName(member).toLowerCase().includes(query);
+        const tagged = member.tags?.some((tag) => tag.toLowerCase().includes(query));
+        if (!named && !tagged) return false;
+      }
+      if (tagFilter === "untagged" && member.tags?.length) return false;
+      if (tagFilter && tagFilter !== "untagged" && !member.tags?.includes(tagFilter)) return false;
+      if (identityFilter && !member.pride?.includes(identityFilter)) return false;
+      return true;
+    });
+  });
+
+  function isFronting(member: PluralMember): boolean {
+    return frontingNow.some((m) => m.id === member.id || m.name === member.name);
+  }
+
+  // Keeps the address bar in step without navigating, so the page never scrolls
+  function syncUrl() {
+    const url = new URL(page.url.href);
+    url.search = "";
+    if (tagFilter) url.searchParams.set("tag", tagFilter);
+    if (identityFilter) url.searchParams.set("identity", identityFilter);
+    replaceState(url, {});
+  }
+
+  function applyFilter(kind: "tag" | "identity", value: string | null) {
+    if (kind === "tag") tagFilter = value;
+    else identityFilter = value;
+    syncUrl();
+  }
+
+  function toggleTag(tag: string) {
+    applyFilter("tag", tagFilter === tag ? null : tag);
+  }
+
+  function clearFilters() {
+    tagFilter = null;
+    identityFilter = null;
+    syncUrl();
+  }
+
+  function sortedTags(member: PluralMember): string[] {
+    return [...(member.tags ?? [])].sort((a, b) => a.localeCompare(b));
+  }
+
+  // Close the filters popover on an outside click or Escape
+  function onWindowClick(event: MouseEvent) {
+    if (filtersOpen && filtersBox && !filtersBox.contains(event.target as Node)) filtersOpen = false;
+  }
+
+  function onWindowKey(event: KeyboardEvent) {
+    if (event.key === "Escape") filtersOpen = false;
+  }
+</script>
+
+<svelte:window onmousedown={onWindowClick} onkeydown={onWindowKey} />
+
+<svelte:head>
+  <title>Plural System | Plural System Member Tracker & Fronting Manager</title>
+  <meta
+    name="description"
+    content="View system members, current fronters, and switching patterns."
+  />
+  <meta name="robots" content="index, follow, max-image-preview:large" />
+  <link rel="canonical" href="{siteUrl}/" />
+  <meta property="og:type" content="website" />
+  <meta property="og:title" content="Plural System | Plural System Tracker" />
+  <meta property="og:description" content="View current fronters and system members." />
+  <meta property="og:url" content="{siteUrl}/" />
+  <meta property="og:image" content={new URL(fallbackAvatar, siteUrl).href} />
+  <meta name="twitter:card" content="summary" />
+</svelte:head>
+
+<DiscordEmbed
+  title="Plural System"
+  description="View current fronters and system members."
+/>
+
+<div class="page">
+  {#if live.status === "reconnecting"}
+    <p class="notice error" role="status">Live updates disconnected. Reconnecting…</p>
+  {/if}
+
+  <div class="page-head">
+    <p class="eyebrow">// system.members</p>
+    <h1>{system?.name || "System Members"}</h1>
+  </div>
+
+  {#if mental}
+    {@const MentalIcon = MENTAL_ICONS[mental.level] ?? IcInfo}
+    <div class="mental mental-{mental.level.replaceAll(' ', '-')}">
+      <MentalIcon width="32" height="32" />
+      <div>
+        <p><span class="muted">status:</span> <span class="mental-label">[ {MENTAL_LABELS[mental.level] ?? mental.level} ]</span></p>
+        {#if mental.notes}
+          <p>{mental.notes}</p>
+        {/if}
+        <small class="muted">last_updated: {new Date(mental.updated_at).toLocaleString()}</small>
+      </div>
+    </div>
+  {/if}
+
+  {#if frontingNow.length > 0}
+    <section class="panel">
+      <h2>Currently {frontingNow.length > 1 ? "Co-fronting" : "Fronting"}</h2>
+      <div class="fronting">
+        {#each frontingNow as member, index (member.id || `${member.name}-${index}`)}
+          <div class="fronter" style:--member-color={normalizeColor(member.color) ?? "var(--accent)"}>
+            <a href="/{encodeURIComponent(member.id)}">
+              <img
+                class="member-avatar fronter-avatar"
+                src={member.avatar_url || fallbackAvatar}
+                alt={memberName(member)}
+                loading="lazy"
+                onerror={avatarFallback}
+              />
+            </a>
+            <div class="fronter-body">
+              <a class="member-name" href="/{encodeURIComponent(member.id)}" style:color={readableOnDark(member.color, "var(--accent)")}>
+                {memberName(member) || "Unknown"}
+              </a>
+              {#if member.tags?.length}
+                <div class="chips">
+                  {#each sortedTags(member) as tag (tag)}
+                    <button type="button" class="chip" class:active={tagFilter === tag} onclick={() => toggleTag(tag)}>
+                      {tag}
+                    </button>
+                  {/each}
+                </div>
+              {/if}
+              {#if member.status}
+                <div class="status-tag">
+                  {#if member.status.emoji}<span>{member.status.emoji}</span>{/if}
+                  <span>{member.status.text}</span>
+                </div>
+              {/if}
+            </div>
+          </div>
+        {/each}
+      </div>
+    </section>
+  {/if}
+
+  <div class="controls">
+    <div class="filters" bind:this={filtersBox}>
+      <button type="button" class:primary={filtersOpen} aria-expanded={filtersOpen} onclick={() => (filtersOpen = !filtersOpen)}>
+        <IcFilterList width="16" height="16" />Filters
+        {#if activeFilters > 0}<span class="badge accent">{activeFilters}</span>{/if}
+      </button>
+
+      {#if filtersOpen}
+        <div class="filters-panel panel">
+          <p class="field-label">Tag</p>
+          <div class="chips">
+            <button type="button" class="chip" class:active={tagFilter === null} onclick={() => applyFilter("tag", null)}>All</button>
+            {#each tags as tag (tag)}
+              <button type="button" class="chip" class:active={tagFilter === tag} onclick={() => toggleTag(tag)}>{tag}</button>
+            {/each}
+            <button type="button" class="chip" class:active={tagFilter === "untagged"} onclick={() => toggleTag("untagged")}>
+              Untagged
+            </button>
+          </div>
+
+          {#if identities.length > 0}
+            <p class="field-label">Identity</p>
+            <div class="chips">
+              <button type="button" class="chip" class:active={identityFilter === null} onclick={() => applyFilter("identity", null)}>
+                All
+              </button>
+              {#each identities as identity (identity)}
+                <button
+                  type="button"
+                  class="chip"
+                  class:active={identityFilter === identity}
+                  onclick={() => applyFilter("identity", identityFilter === identity ? null : identity)}
+                >
+                  <PrideSwatch label={identity} />{identity}
+                </button>
+              {/each}
+            </div>
+          {/if}
+        </div>
+      {/if}
+    </div>
+
+    {#if tagFilter}
+      <span class="chip active">
+        tag: {tagFilter}
+        <button type="button" class="chip-x" aria-label="Clear tag filter" onclick={() => applyFilter("tag", null)}>✕</button>
+      </span>
+    {/if}
+    {#if identityFilter}
+      <span class="chip active">
+        identity: {identityFilter}
+        <button type="button" class="chip-x" aria-label="Clear identity filter" onclick={() => applyFilter("identity", null)}>✕</button>
+      </span>
+    {/if}
+
+    <label class="search">
+      <IcSearch width="18" height="18" />
+      <input id="member-search" type="text" placeholder="Search members..." bind:value={search} />
+      {#if search}
+        <button type="button" class="chip-x" aria-label="Clear search" onclick={() => (search = "")}>✕</button>
+      {/if}
+    </label>
+  </div>
+
+  {#if shown.length > 0}
+    <div class="grid">
+      {#each shown as member (member.id)}
+        <a
+          class="member-card"
+          class:fronting-now={isFronting(member)}
+          href="/{encodeURIComponent(member.id)}"
+          style:--member-color={normalizeColor(member.color) ?? "var(--accent)"}
+        >
+          <img class="member-avatar card-avatar" src={member.avatar_url || fallbackAvatar} alt={memberName(member)} loading="lazy" onerror={avatarFallback} />
+          <h3 style:color={readableOnDark(member.color, "var(--text)")}>{memberName(member)}</h3>
+          {#if member.pronouns}
+            <p class="muted small">{member.pronouns}</p>
+          {/if}
+          {#if member.tags?.length}
+            <div class="chips centred">
+              {#each sortedTags(member).slice(0, 2) as tag (tag)}
+                <!-- Inside the card's link, so a span acting as a button -->
+                <span
+                  role="button"
+                  tabindex="0"
+                  class="chip"
+                  class:active={tagFilter === tag}
+                  onclick={(event) => {
+                    event.preventDefault();
+                    event.stopPropagation();
+                    toggleTag(tag);
+                  }}
+                  onkeydown={(event) => {
+                    if (event.key !== "Enter" && event.key !== " ") return;
+                    event.preventDefault();
+                    event.stopPropagation();
+                    toggleTag(tag);
+                  }}
+                >
+                  {tag}
+                </span>
+              {/each}
+              {#if member.tags.length > 2}
+                <span class="muted small">+{member.tags.length - 2}</span>
+              {/if}
+            </div>
+          {/if}
+          {#if member.status}
+            <div class="status-tag">
+              {#if member.status.emoji}<span>{member.status.emoji}</span>{/if}
+              <span>{member.status.text}</span>
+            </div>
+          {/if}
+        </a>
+      {/each}
+    </div>
+  {:else}
+    <section class="panel empty">
+      <p class="muted">
+        {search || activeFilters > 0 ? "No members found matching your criteria." : "No members available."}
+      </p>
+      <div class="buttons">
+        {#if search}
+          <button type="button" class="small" onclick={() => (search = "")}>Clear search</button>
+        {/if}
+        {#if activeFilters > 0}
+          <button type="button" class="small" onclick={clearFilters}>Clear filters</button>
+        {/if}
+      </div>
+    </section>
+  {/if}
+
+</div>
+
+<style>
+  h2 {
+    margin: 0;
+    font-size: 1.15rem;
+  }
+
+  .fronting {
+    display: flex;
+    flex-wrap: wrap;
+    gap: 1.5rem;
+  }
+
+  .fronter {
+    display: flex;
+    gap: 1rem;
+    align-items: center;
+  }
+
+  .fronter-avatar {
+    width: 5.5rem;
+    height: 5.5rem;
+  }
+
+  .fronter-body {
+    display: flex;
+    flex-direction: column;
+    gap: 0.4rem;
+  }
+
+  .member-name {
+    font-size: 1.15rem;
+    font-weight: 600;
+    text-decoration: none;
+  }
+
+  .controls {
+    display: flex;
+    flex-wrap: wrap;
+    gap: 0.6rem;
+    align-items: center;
+  }
+
+  .filters {
+    position: relative;
+  }
+
+  .filters-panel {
+    position: absolute;
+    top: calc(100% + 0.5rem);
+    left: 0;
+    z-index: 10;
+    width: min(30rem, 90vw);
+    background: #151319;
+  }
+
+  .field-label {
+    margin: 0;
+    color: var(--accent);
+    font-size: 0.7rem;
+    font-weight: 600;
+    letter-spacing: 0.14em;
+    text-transform: uppercase;
+  }
+
+  .chip-x {
+    padding: 0;
+    border: 0;
+    background: none;
+    color: inherit;
+    font-size: 0.75rem;
+  }
+
+  .search {
+    display: flex;
+    flex: 1 1 16rem;
+    gap: 0.5rem;
+    align-items: center;
+    padding: 0 0.75rem;
+    border: 1px solid var(--line);
+    border-radius: 0.75rem;
+    background: rgb(0 0 0 / 25%);
+    color: var(--muted);
+  }
+
+  .search input {
+    padding-inline: 0;
+    border: 0;
+    background: none;
+  }
+
+  .search input:focus-visible {
+    outline: none;
+  }
+
+  .search:focus-within {
+    border-color: var(--accent-line);
+  }
+
+  .grid {
+    display: grid;
+    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
+    gap: 1rem;
+  }
+
+  .member-card {
+    display: flex;
+    flex-direction: column;
+    gap: 0.5rem;
+    align-items: center;
+    padding: 1.25rem 1rem;
+    border: 1px solid var(--line);
+    border-radius: 1rem;
+    background: var(--raised);
+    text-align: center;
+    text-decoration: none;
+    transition:
+      border-color 0.2s ease,
+      box-shadow 0.2s ease,
+      transform 0.2s ease;
+  }
+
+  .member-card:hover,
+  .member-card:focus-visible {
+    border-color: color-mix(in srgb, var(--member-color) 55%, transparent);
+    box-shadow: 0 0 0 4px color-mix(in srgb, var(--member-color) 15%, transparent);
+    transform: translateY(-2px);
+  }
+
+  /* Fronting right now: the member's colour glows */
+  .fronting-now {
+    border-color: var(--member-color);
+    box-shadow: 0 0 0 4px color-mix(in srgb, var(--member-color) 25%, transparent);
+  }
+
+  .card-avatar {
+    width: 6rem;
+    height: 6rem;
+  }
+
+  .member-card h3,
+  .member-card p {
+    margin: 0;
+  }
+
+  .member-card h3 {
+    font-size: 1rem;
+  }
+
+  .centred {
+    justify-content: center;
+  }
+
+  .member-card .status-tag {
+    max-width: 10rem;
+  }
+
+  .empty {
+    align-items: center;
+    text-align: center;
+  }
+
+  .empty p {
+    margin: 0;
+  }
+
+  @media (prefers-reduced-motion: reduce) {
+    .member-card {
+      transition: none;
+    }
+
+    .member-card:hover,
+    .member-card:focus-visible {
+      transform: none;
+    }
+  }
+</style>
diff --git a/web/src/lib/components/MemberSelect.svelte b/web/src/lib/components/MemberSelect.svelte
new file mode 100644
index 0000000..97c05ac
--- /dev/null
+++ b/web/src/lib/components/MemberSelect.svelte
@@ -0,0 +1,39 @@
+<!-- src/lib/components/MemberSelect.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import type { PluralMember } from "#lib/types.ts";
+  import { memberName } from "#lib";
+
+  // A native picker keyed by member name, the identifier the admin endpoints take
+  let {
+    id,
+    label,
+    members,
+    value = $bindable(""),
+    by = "name",
+    note,
+  }: {
+    id: string;
+    label: string;
+    members: PluralMember[];
+    value?: string;
+    by?: "name" | "id";
+    note?: (member: PluralMember) => string;
+  } = $props();
+</script>
+
+<label class="field" for={id}>
+  <span>{label}</span>
+  <select {id} bind:value>
+    <option value="">Choose a member...</option>
+    {#each members as member (member.id)}
+      <option value={by === "id" ? member.id : (member.name ?? "")}>
+        {memberName(member)}{note ? note(member) : ""}
+      </option>
+    {/each}
+  </select>
+</label>
diff --git a/web/src/lib/components/Message.svelte b/web/src/lib/components/Message.svelte
new file mode 100644
index 0000000..77190d9
--- /dev/null
+++ b/web/src/lib/components/Message.svelte
@@ -0,0 +1,17 @@
+<!-- src/lib/components/Message.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import type { Message } from "#lib";
+
+  let { message }: { message: Message } = $props();
+</script>
+
+{#if message}
+  <p class="notice" class:ok={message.type === "success"} class:error={message.type === "error"} role="status">
+    {message.content}
+  </p>
+{/if}
diff --git a/web/src/lib/components/PageHead.svelte b/web/src/lib/components/PageHead.svelte
new file mode 100644
index 0000000..da6014d
--- /dev/null
+++ b/web/src/lib/components/PageHead.svelte
@@ -0,0 +1,66 @@
+<!-- src/lib/components/PageHead.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import IcArrowBack from "~icons/ic/outline-arrow-back";
+  let {
+    eyebrow = "",
+    title,
+    subtitle = "",
+    back,
+  }: {
+    eyebrow?: string;
+    title: string;
+    subtitle?: string;
+    back?: {
+      href: string;
+      label: string;
+    };
+  } = $props();
+</script>
+
+<div class="head">
+  <div class="page-head">
+    {#if eyebrow}
+      <p class="eyebrow">{eyebrow}</p>
+    {/if}
+    <h1>{title}</h1>
+    {#if subtitle}
+      <p class="muted">{subtitle}</p>
+    {/if}
+  </div>
+  {#if back}
+    <a class="back-link" href={back.href}>
+      <IcArrowBack width="16" height="16" />{back.label}
+    </a>
+  {/if}
+</div>
+
+<style>
+  .head {
+    display: flex;
+    flex-wrap: wrap;
+    gap: 1rem;
+    align-items: flex-start;
+    justify-content: space-between;
+    padding-block-end: 1rem;
+    border-bottom: 1px solid var(--line);
+  }
+
+  .back-link {
+    display: inline-flex;
+    align-items: center;
+    gap: 0.5rem;
+    padding-block: 0.3rem;
+    color: var(--muted);
+    font-size: 0.875rem;
+    text-decoration: none;
+  }
+
+  .back-link:hover {
+    color: var(--text);
+  }
+</style>
diff --git a/web/src/lib/components/PrideSwatch.svelte b/web/src/lib/components/PrideSwatch.svelte
new file mode 100644
index 0000000..3f9b2c8
--- /dev/null
+++ b/web/src/lib/components/PrideSwatch.svelte
@@ -0,0 +1,28 @@
+<!-- src/lib/components/PrideSwatch.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import { findPrideFlag, prideSwatchGradient } from "#lib/pride.ts";
+
+  let { label }: { label: string } = $props();
+
+  const flag = $derived(findPrideFlag(label));
+  const background = $derived(flag ? prideSwatchGradient(flag.stripes) : "var(--accent)");
+</script>
+
+<span class="swatch" style:background aria-hidden="true"></span>
+
+<style>
+  .swatch {
+    display: inline-block;
+    flex-shrink: 0;
+    width: 0.85rem;
+    height: 0.85rem;
+    border: 1px solid rgb(0 0 0 / 35%);
+    border-radius: 0.25rem;
+    vertical-align: -0.1em;
+  }
+</style>
diff --git a/web/src/lib/components/Protected.svelte b/web/src/lib/components/Protected.svelte
new file mode 100644
index 0000000..644e22f
--- /dev/null
+++ b/web/src/lib/components/Protected.svelte
@@ -0,0 +1,62 @@
+<!-- src/lib/components/Protected.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import IcArrowBack from "~icons/ic/outline-arrow-back";
+  import type { Snippet } from "svelte";
+  import { goto } from "$app/navigation";
+  import { page } from "$app/state";
+  import { auth } from "#lib/auth.svelte.ts";
+
+  // Owner passes every check, as before
+  let {
+    admin = false,
+    owner = false,
+    children,
+  }: {
+    admin?: boolean;
+    owner?: boolean;
+    children: Snippet;
+  } = $props();
+
+  const denied = $derived.by(() => {
+    if (owner && !auth.isOwner) return "Owner";
+    if (admin && !auth.isAdmin && !auth.isOwner) return "Admin";
+    return null;
+  });
+
+  $effect(() => {
+    if (auth.ready && !auth.signedIn) {
+      void goto(`/user/login?from=${encodeURIComponent(page.url.pathname)}`, { replace: true });
+    }
+  });
+</script>
+
+{#if !auth.ready}
+  <div class="page narrow"><p class="muted">Verifying access…</p></div>
+{:else if auth.signedIn && denied}
+  <div class="page narrow">
+    <section class="panel">
+      <p class="eyebrow">Restricted</p>
+      <h1>{denied} access required</h1>
+      <p class="muted">This area is restricted to {denied === "Owner" ? "system owners" : `${denied.toLowerCase()}s`} only.</p>
+      <div>
+        <button type="button" onclick={() => history.back()}>
+          <IcArrowBack width="16" height="16" />Go back
+        </button>
+      </div>
+    </section>
+  </div>
+{:else if auth.signedIn}
+  {@render children()}
+{/if}
+
+<style>
+  h1,
+  p {
+    margin: 0;
+  }
+</style>
diff --git a/web/src/lib/components/RelationshipGraph.svelte b/web/src/lib/components/RelationshipGraph.svelte
new file mode 100644
index 0000000..34be16c
--- /dev/null
+++ b/web/src/lib/components/RelationshipGraph.svelte
@@ -0,0 +1,383 @@
+<!-- src/lib/components/RelationshipGraph.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import { onMount } from "svelte";
+  import type { PluralMember, Relationship } from "#lib/types.ts";
+  import { fallbackAvatar, memberName } from "#lib";
+  import { normalizeColor } from "#lib/colour.ts";
+  import { layout, project } from "#lib/graph.ts";
+
+  let {
+    members,
+    relationships,
+  }: {
+    members: PluralMember[];
+    relationships: Relationship[];
+  } = $props();
+
+  const SIZE = 720;
+  const CENTER = SIZE / 2;
+  const RADIUS = 285;
+  const NODE_RADIUS = 26;
+  const SPIN_PER_FRAME = 0.0025;
+  const DRAG_SPEED = 0.008;
+  const DRAG_THRESHOLD = 4;
+
+  // Everyone in a relationship, once each, plus the links between them by index
+  const graph = $derived.by(() => {
+    const find = (identifier: string) =>
+      members.find((member) => member.id === identifier || member.name === identifier);
+
+    const nodes: PluralMember[] = [];
+    const indexOf = (identifier: string): number | null => {
+      const member = find(identifier);
+      if (!member) return null;
+      let index = nodes.findIndex((node) => node.id === member.id);
+      if (index === -1) index = nodes.push(member) - 1;
+      return index;
+    };
+
+    // Two crushes on each other fold into one mutual line, arrowed both ends
+    const links: { edge: Relationship; a: number; b: number; mutual: boolean }[] = [];
+    for (const edge of relationships) {
+      const a = indexOf(edge.members[0]);
+      const b = indexOf(edge.members[1]);
+      if (a === null || b === null || a === b) continue;
+      const reverse =
+        edge.type === "crush" &&
+        links.find((link) => link.edge.type === "crush" && link.a === b && link.b === a);
+      if (reverse) reverse.mutual = true;
+      else links.push({ edge, a, b, mutual: false });
+    }
+
+    return {
+      nodes,
+      links,
+      points: layout(
+        nodes.length,
+        links.map((link) => [link.a, link.b] as [number, number]),
+        RADIUS,
+      ),
+    };
+  });
+
+  // A slight tilt from the start, so it reads as 3D before anything moves
+  let yaw = $state(0.6);
+  let pitch = $state(-0.35);
+  let hovered = $state<number | null>(null);
+  let activePointer = $state<number | null>(null);
+  let dragging = $state(false);
+  let reduceMotion = $state(false);
+
+  const projected = $derived(graph.points.map((point) => project(point, yaw, pitch, RADIUS)));
+
+  // Painted back to front, so nearer things cover further ones
+  const nodeOrder = $derived(
+    graph.nodes.map((_, index) => index).sort((a, b) => projected[a]!.depth - projected[b]!.depth),
+  );
+  const linkOrder = $derived(
+    [...graph.links].sort(
+      (one, two) =>
+        projected[one.a]!.depth + projected[one.b]!.depth - (projected[two.a]!.depth + projected[two.b]!.depth),
+    ),
+  );
+
+  function linked(index: number): boolean {
+    if (hovered === null) return true;
+    if (index === hovered) return true;
+    return graph.links.some(
+      (link) => (link.a === hovered && link.b === index) || (link.b === hovered && link.a === index),
+    );
+  }
+
+  function screen(index: number) {
+    const point = projected[index]!;
+    return {
+      x: CENTER + point.x,
+      y: CENTER + point.y,
+      r: NODE_RADIUS * point.scale,
+      // Further away is dimmer, but never invisible
+      fade: 0.45 + 0.55 * Math.min(1, Math.max(0, point.depth)),
+    };
+  }
+
+  // Keep the original click target until the pointer starts a drag.
+  let last: { x: number; y: number } | null = null;
+  let didDrag = false;
+
+  function pointerDown(event: PointerEvent) {
+    if (event.button !== 0 || !event.isPrimary || activePointer !== null) return;
+
+    activePointer = event.pointerId;
+    last = {
+      x: event.clientX,
+      y: event.clientY,
+    };
+    didDrag = false;
+  }
+
+  function pointerMove(event: PointerEvent) {
+    if (!last || event.pointerId !== activePointer) return;
+
+    const dx = event.clientX - last.x;
+    const dy = event.clientY - last.y;
+
+    if (!dragging) {
+      if (Math.hypot(dx, dy) < DRAG_THRESHOLD) return;
+
+      (event.currentTarget as SVGSVGElement).setPointerCapture(event.pointerId);
+      dragging = true;
+      didDrag = true;
+    }
+
+    yaw += dx * DRAG_SPEED;
+    pitch = Math.max(-1.3, Math.min(1.3, pitch + dy * DRAG_SPEED));
+    last = {
+      x: event.clientX,
+      y: event.clientY,
+    };
+  }
+
+  function endPointer(event: PointerEvent) {
+    if (event.pointerId !== activePointer) return;
+
+    activePointer = null;
+    last = null;
+    dragging = false;
+  }
+
+  function lostCapture(event: PointerEvent) {
+    if (event.target === event.currentTarget) endPointer(event);
+  }
+
+  function swallowDragClick(event: MouseEvent) {
+    if (didDrag && event.detail > 0) event.preventDefault();
+  }
+
+  // Arrow keys spin it too
+  function keydown(event: KeyboardEvent) {
+    const step = 0.15;
+    if (event.key === "ArrowLeft") yaw -= step;
+    else if (event.key === "ArrowRight") yaw += step;
+    else if (event.key === "ArrowUp") pitch = Math.max(-1.3, pitch - step);
+    else if (event.key === "ArrowDown") pitch = Math.min(1.3, pitch + step);
+    else return;
+    event.preventDefault();
+  }
+
+  // A slow turn while nobody is interacting
+  onMount(() => {
+    const motion = matchMedia("(prefers-reduced-motion: reduce)");
+    reduceMotion = motion.matches;
+
+    let frame = 0;
+    const tick = () => {
+      if (!reduceMotion && activePointer === null && hovered === null) yaw += SPIN_PER_FRAME;
+      frame = requestAnimationFrame(tick);
+    };
+    frame = requestAnimationFrame(tick);
+    return () => cancelAnimationFrame(frame);
+  });
+</script>
+
+<svelte:window onpointerup={endPointer} onpointercancel={endPointer} />
+
+<!-- Interactive: drag and the arrow keys turn it -->
+<!-- svelte-ignore a11y_no_noninteractive_tabindex, a11y_no_noninteractive_element_interactions -->
+<svg
+  viewBox="0 0 {SIZE} {SIZE}"
+  class="graph"
+  class:dragging
+  role="application"
+  aria-roledescription="rotatable map"
+  aria-label="Relationship map. Drag or use the arrow keys to turn it."
+  tabindex="0"
+  onpointerdown={pointerDown}
+  onpointermove={pointerMove}
+  onlostpointercapture={lostCapture}
+  ondragstart={(event) => event.preventDefault()}
+  onkeydown={keydown}
+>
+  <defs>
+    <radialGradient id="graph-glow">
+      <stop offset="0%" stop-color="var(--accent)" stop-opacity="0.12" />
+      <stop offset="100%" stop-color="var(--accent)" stop-opacity="0" />
+    </radialGradient>
+    <!-- Crushes are one way, so their lines end in an arrow -->
+    <marker id="crush-arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="5" markerHeight="5" orient="auto-start-reverse">
+      <path d="M0 0 L10 5 L0 10 z" fill="var(--warn)" />
+    </marker>
+    {#each graph.nodes as node, index (node.id)}
+      {@const at = screen(index)}
+      <clipPath id="avatar-{node.id}">
+        <circle cx={at.x} cy={at.y} r={at.r} />
+      </clipPath>
+    {/each}
+  </defs>
+
+  <!-- A soft floor of light, so the cluster has something to sit in -->
+  <ellipse cx={CENTER} cy={CENTER} rx={RADIUS + 60} ry={RADIUS + 60} fill="url(#graph-glow)" />
+
+  {#each linkOrder as link (link.edge.id)}
+    {@const from = screen(link.a)}
+    {@const to = screen(link.b)}
+    {@const lit = hovered !== null && (link.a === hovered || link.b === hovered)}
+    {@const crush = link.edge.type === "crush"}
+    <!-- Stop a crush short of the avatar, so its arrow isn't hidden under it -->
+    {@const length = Math.max(Math.hypot(to.x - from.x, to.y - from.y), 1)}
+    {@const gapEnd = crush ? (to.r + 5) / length : 0}
+    {@const gapStart = link.mutual ? (from.r + 5) / length : 0}
+    <line
+      x1={from.x + (to.x - from.x) * gapStart}
+      y1={from.y + (to.y - from.y) * gapStart}
+      x2={to.x - (to.x - from.x) * gapEnd}
+      y2={to.y - (to.y - from.y) * gapEnd}
+      marker-start={link.mutual ? "url(#crush-arrow)" : undefined}
+      marker-end={crush ? "url(#crush-arrow)" : undefined}
+      class="link"
+      class:crush
+      class:lit
+      class:dim={hovered !== null && !lit}
+      stroke-opacity={(from.fade + to.fade) / 2}
+    >
+      <title>
+        {link.mutual
+          ? `${memberName(graph.nodes[link.a]!)} & ${memberName(graph.nodes[link.b]!)}: mutual crush`
+          : crush
+          ? `${memberName(graph.nodes[link.a]!)} has a crush on ${memberName(graph.nodes[link.b]!)}`
+          : `${memberName(graph.nodes[link.a]!)} & ${memberName(graph.nodes[link.b]!)}: ${link.edge.type}`}
+      </title>
+    </line>
+  {/each}
+
+  {#each nodeOrder as index (graph.nodes[index]!.id)}
+    {@const node = graph.nodes[index]!}
+    {@const at = screen(index)}
+    <a
+      href="/{node.name ?? node.id}"
+      class="node"
+      class:dim={!linked(index)}
+      onclick={swallowDragClick}
+      onpointerenter={() => (hovered = index)}
+      onpointerleave={() => (hovered = null)}
+      onfocus={() => (hovered = index)}
+      onblur={() => (hovered = null)}
+    >
+      <g opacity={at.fade}>
+      <circle cx={at.x} cy={at.y} r={at.r + 3} fill="var(--bg)" stroke={normalizeColor(node.color) ?? "var(--accent)"} stroke-width="2.5" />
+      <image
+        href={node.avatar_url || fallbackAvatar}
+        x={at.x - at.r}
+        y={at.y - at.r}
+        width={at.r * 2}
+        height={at.r * 2}
+        clip-path="url(#avatar-{node.id})"
+        preserveAspectRatio="xMidYMid slice"
+      />
+      <text x={at.x} y={at.y + at.r + 16} text-anchor="middle" font-size={12 * projected[index]!.scale + 1}>
+        {memberName(node)}
+      </text>
+      </g>
+    </a>
+  {/each}
+</svg>
+
+<p class="legend muted small">
+  <span><svg width="28" height="8" aria-hidden="true"><line x1="0" y1="4" x2="28" y2="4" class="link" /></svg> partner</span>
+  <span><svg width="28" height="8" aria-hidden="true"><line x1="0" y1="4" x2="28" y2="4" class="link crush" /></svg> crush (one way)</span>
+  <span>Drag to turn · hover someone to see their links</span>
+</p>
+
+<style>
+  .graph {
+    display: block;
+    width: 100%;
+    max-width: 720px;
+    margin: 0 auto;
+    cursor: grab;
+    touch-action: none;
+    user-select: none;
+  }
+
+  .graph:focus-visible {
+    border-radius: 1rem;
+    outline: 2px solid var(--accent);
+  }
+
+  .dragging {
+    cursor: grabbing;
+  }
+
+  .node {
+    cursor: pointer;
+  }
+
+  .dragging .node {
+    cursor: grabbing;
+  }
+
+  .link {
+    stroke: var(--accent);
+    stroke-width: 2;
+    stroke-linecap: round;
+    transition: stroke-width 0.15s ease;
+  }
+
+  .crush {
+    stroke: var(--warn);
+    stroke-dasharray: 5 6;
+  }
+
+  .lit {
+    stroke-width: 3.5;
+  }
+
+  .dim {
+    opacity: 0.15;
+  }
+
+  .link.dim {
+    stroke-opacity: 0.12;
+  }
+
+  .node text {
+    fill: var(--text);
+    paint-order: stroke;
+    stroke: var(--bg);
+    stroke-width: 4px;
+    stroke-linejoin: round;
+  }
+
+  .node:focus-visible {
+    outline: none;
+  }
+
+  .node:focus-visible circle {
+    stroke: var(--text);
+    stroke-width: 4;
+  }
+
+  .legend {
+    display: flex;
+    flex-wrap: wrap;
+    gap: 0.5rem 1.25rem;
+    justify-content: center;
+    margin: 0;
+  }
+
+  .legend span {
+    display: inline-flex;
+    gap: 0.4rem;
+    align-items: center;
+  }
+
+  @media (prefers-reduced-motion: reduce) {
+    .link {
+      transition: none;
+    }
+  }
+</style>
diff --git a/web/src/lib/fonts/IBMPlexSans-Bold.woff2 b/web/src/lib/fonts/IBMPlexSans-Bold.woff2
new file mode 100644
index 0000000..486c376
Binary files /dev/null and b/web/src/lib/fonts/IBMPlexSans-Bold.woff2 differ
diff --git a/web/src/lib/fonts/IBMPlexSans-Medium.woff2 b/web/src/lib/fonts/IBMPlexSans-Medium.woff2
new file mode 100644
index 0000000..ce72c05
Binary files /dev/null and b/web/src/lib/fonts/IBMPlexSans-Medium.woff2 differ
diff --git a/web/src/lib/fonts/IBMPlexSans-Regular.woff2 b/web/src/lib/fonts/IBMPlexSans-Regular.woff2
new file mode 100644
index 0000000..136597e
Binary files /dev/null and b/web/src/lib/fonts/IBMPlexSans-Regular.woff2 differ
diff --git a/web/src/lib/fonts/IBMPlexSans-SemiBold.woff2 b/web/src/lib/fonts/IBMPlexSans-SemiBold.woff2
new file mode 100644
index 0000000..78cbe9a
Binary files /dev/null and b/web/src/lib/fonts/IBMPlexSans-SemiBold.woff2 differ
diff --git a/web/src/lib/graph.ts b/web/src/lib/graph.ts
new file mode 100644
index 0000000..06edfd5
--- /dev/null
+++ b/web/src/lib/graph.ts
@@ -0,0 +1,139 @@
+/* src/lib/graph.ts
+ * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+ * Licensed under the DASL-1.0 Licence.
+ * See LICENCE.md in the project root for full licence information.
+ */
+
+// A small 3D force layout for the relationship map. Deterministic: no
+// randomness, so the server render and the browser start from the same picture
+
+export interface Point3 {
+  x: number;
+  y: number;
+  z: number;
+}
+
+export interface Projected {
+  x: number;
+  y: number;
+  // 0 is the back of the scene, 1 the front
+  depth: number;
+  scale: number;
+}
+
+const ITERATIONS = 400;
+const REST_LENGTH = 120;
+const SPRING = 0.04;
+const REPULSION = 60000;
+const GRAVITY = 0.06;
+const START_RADIUS = 220;
+const CAMERA = 900;
+
+/** Spreads the starting points evenly over a sphere (a Fibonacci lattice) */
+function sphere(count: number): Point3[] {
+  const golden = Math.PI * (3 - Math.sqrt(5));
+  return Array.from({ length: count }, (_, index) => {
+    const y = count === 1 ? 0 : 1 - (index / (count - 1)) * 2;
+    const ring = Math.sqrt(1 - y * y);
+    const angle = golden * index;
+    return {
+      x: Math.cos(angle) * ring * START_RADIUS,
+      y: y * START_RADIUS,
+      z: Math.sin(angle) * ring * START_RADIUS,
+    };
+  });
+}
+
+/**
+ * Linked nodes pull together, every node pushes every other away, and a weak
+ * pull to the centre keeps separate couples from drifting off. Returns points
+ * centred on the origin and scaled to fit `radius`.
+ */
+export function layout(count: number, links: [number, number][], radius: number): Point3[] {
+  const points = sphere(count);
+
+  for (let step = 0; step < ITERATIONS; step++) {
+    // Big moves early, settling later
+    const cooling = 1 - step / ITERATIONS;
+    const force = points.map(() => ({ x: 0, y: 0, z: 0 }));
+
+    for (let a = 0; a < count; a++) {
+      for (let b = a + 1; b < count; b++) {
+        const dx = points[a]!.x - points[b]!.x;
+        const dy = points[a]!.y - points[b]!.y;
+        const dz = points[a]!.z - points[b]!.z;
+        const distanceSq = Math.max(dx * dx + dy * dy + dz * dz, 1);
+        const push = REPULSION / distanceSq / Math.sqrt(distanceSq);
+        force[a]!.x += dx * push;
+        force[a]!.y += dy * push;
+        force[a]!.z += dz * push;
+        force[b]!.x -= dx * push;
+        force[b]!.y -= dy * push;
+        force[b]!.z -= dz * push;
+      }
+    }
+
+    for (const [a, b] of links) {
+      const dx = points[b]!.x - points[a]!.x;
+      const dy = points[b]!.y - points[a]!.y;
+      const dz = points[b]!.z - points[a]!.z;
+      const distance = Math.max(Math.hypot(dx, dy, dz), 1);
+      const pull = (SPRING * (distance - REST_LENGTH)) / distance;
+      force[a]!.x += dx * pull;
+      force[a]!.y += dy * pull;
+      force[a]!.z += dz * pull;
+      force[b]!.x -= dx * pull;
+      force[b]!.y -= dy * pull;
+      force[b]!.z -= dz * pull;
+    }
+
+    points.forEach((point, index) => {
+      const f = force[index]!;
+      point.x += (f.x - point.x * GRAVITY) * cooling;
+      point.y += (f.y - point.y * GRAVITY) * cooling;
+      point.z += (f.z - point.z * GRAVITY) * cooling;
+    });
+  }
+
+  // Centre, then scale so the furthest node sits on `radius`
+  const centre = points.reduce(
+    (sum, point) => ({
+      x: sum.x + point.x / count,
+      y: sum.y + point.y / count,
+      z: sum.z + point.z / count,
+    }),
+    { x: 0, y: 0, z: 0 },
+  );
+  const furthest = Math.max(
+    1,
+    ...points.map((p) => Math.hypot(p.x - centre.x, p.y - centre.y, p.z - centre.z)),
+  );
+  const fit = radius / furthest;
+
+  return points.map((point) => ({
+    x: (point.x - centre.x) * fit,
+    y: (point.y - centre.y) * fit,
+    z: (point.z - centre.z) * fit,
+  }));
+}
+
+/** Rotates by yaw (round the vertical axis) then pitch, and projects with perspective */
+export function project(point: Point3, yaw: number, pitch: number, radius: number): Projected {
+  const cosYaw = Math.cos(yaw);
+  const sinYaw = Math.sin(yaw);
+  const x1 = point.x * cosYaw - point.z * sinYaw;
+  const z1 = point.x * sinYaw + point.z * cosYaw;
+
+  const cosPitch = Math.cos(pitch);
+  const sinPitch = Math.sin(pitch);
+  const y2 = point.y * cosPitch - z1 * sinPitch;
+  const z2 = point.y * sinPitch + z1 * cosPitch;
+
+  const scale = CAMERA / (CAMERA + z2);
+  return {
+    x: x1 * scale,
+    y: y2 * scale,
+    depth: 1 - (z2 + radius) / (2 * radius),
+    scale,
+  };
+}
diff --git a/web/src/lib/index.ts b/web/src/lib/index.ts
new file mode 100644
index 0000000..71a3888
--- /dev/null
+++ b/web/src/lib/index.ts
@@ -0,0 +1,37 @@
+/* src/lib/index.ts
+ * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+ * Licensed under the DASL-1.0 Licence.
+ * See LICENCE.md in the project root for full licence information.
+ */
+
+import type { PluralMember } from "#lib/types.ts";
+
+export const siteName = "Plural System";
+
+export const siteUrl = typeof location === "undefined" ? "http://127.0.0.1:3000" : location.origin;
+
+export const fallbackAvatar = "/favicon.svg";
+
+export function memberName(member: Pick<PluralMember, "display_name" | "name" | "id">): string {
+  return member.display_name || member.name || member.id;
+}
+
+/** A–Z by the name people see */
+export function sortMembers(members: PluralMember[]): PluralMember[] {
+  return [...members].sort((a, b) => memberName(a).toLowerCase().localeCompare(memberName(b).toLowerCase()));
+}
+
+/** Swaps a broken avatar for the site icon */
+export function avatarFallback(event: Event) {
+  const image = event.currentTarget as HTMLImageElement;
+  if (image.getAttribute("src") !== fallbackAvatar) image.src = fallbackAvatar;
+}
+
+export type Message = {
+  type: "success" | "error";
+  content: string;
+} | null;
+
+export function errorText(err: unknown, fallback: string): string {
+  return err instanceof Error && err.message ? err.message : fallback;
+}
diff --git a/web/src/lib/jpcl.ts b/web/src/lib/jpcl.ts
new file mode 100644
index 0000000..4122af6
--- /dev/null
+++ b/web/src/lib/jpcl.ts
@@ -0,0 +1,14 @@
+/* src/lib/jpcl.ts
+ * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+ * Licensed under the DASL-1.2 Licence.
+ * See LICENCE.md in the project root for full licence information.
+ */
+
+import { loads } from "jpcl-lang/core";
+
+export const JPCL_MEDIA_TYPE = "application/jpcl";
+export const JPCL_SOCKET_PROTOCOL = "jpcl";
+
+export function readJpcl(text: string) {
+  return loads(text, { integers: "number" });
+}
diff --git a/web/src/lib/live.svelte.ts b/web/src/lib/live.svelte.ts
new file mode 100644
index 0000000..4c577aa
--- /dev/null
+++ b/web/src/lib/live.svelte.ts
@@ -0,0 +1,91 @@
+/* src/lib/live.svelte.ts
+ * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+ * Licensed under the DASL-1.0 Licence.
+ * See LICENCE.md in the project root for full licence information.
+ */
+
+import { invalidate } from "$app/navigation";
+import { socketUrl } from "./api.ts";
+import { JPCL_SOCKET_PROTOCOL, readJpcl } from "./jpcl.ts";
+
+// This site's own socket (/api/plural/ws): fronters, mental state and admin "reload everyone"
+const PING_MS = 30_000;
+const PONG_TIMEOUT_MS = 10_000;
+const MAX_BACKOFF_MS = 30_000;
+
+class Live {
+  status = $state<"connecting" | "open" | "reconnecting" | "closed">("connecting");
+
+  private socket: WebSocket | null = null;
+  private attempts = 0;
+  private pingTimer: ReturnType<typeof setInterval> | null = null;
+  private pongTimer: ReturnType<typeof setTimeout> | null = null;
+
+  connect() {
+    if (this.socket || typeof WebSocket === "undefined") return;
+
+    const socket = new WebSocket(socketUrl(), JPCL_SOCKET_PROTOCOL);
+    this.socket = socket;
+    this.status = this.attempts > 0 ? "reconnecting" : "connecting";
+
+    socket.onopen = () => {
+      this.attempts = 0;
+      this.status = "open";
+      this.keepAlive();
+    };
+    socket.onmessage = (event) => this.receive(event.data);
+    socket.onclose = () => {
+      this.stopKeepAlive();
+      this.socket = null;
+      this.retry();
+    };
+  }
+
+  private receive(raw: unknown) {
+    if (typeof raw !== "string") return;
+    if (raw === "pong") {
+      if (this.pongTimer) clearTimeout(this.pongTimer);
+      this.pongTimer = null;
+      return;
+    }
+
+    let type: unknown;
+    try {
+      type = readJpcl(raw).type;
+    } catch {
+      return;
+    }
+
+    if (type === "force_refresh") location.reload();
+    if (type === "fronters_update" || type === "mental_state_update" || type === "members_update") {
+      // Pages that show public data depend on this key
+      void invalidate("api:public");
+    }
+  }
+
+  private keepAlive() {
+    this.stopKeepAlive();
+    this.pingTimer = setInterval(() => {
+      if (this.socket?.readyState !== WebSocket.OPEN) return;
+      this.socket.send("ping");
+      this.pongTimer ??= setTimeout(() => this.socket?.close(), PONG_TIMEOUT_MS);
+    }, PING_MS);
+  }
+
+  private stopKeepAlive() {
+    if (this.pingTimer) clearInterval(this.pingTimer);
+    if (this.pongTimer) clearTimeout(this.pongTimer);
+    this.pingTimer = null;
+    this.pongTimer = null;
+  }
+
+  // Jittered exponential backoff, as the package's own socket does
+  private retry() {
+    this.status = "reconnecting";
+    const ceiling = Math.min(1000 * 2 ** this.attempts, MAX_BACKOFF_MS);
+    this.attempts += 1;
+    setTimeout(() => this.connect(), Math.random() * ceiling);
+  }
+}
+
+export const live = new Live();
diff --git a/web/src/lib/pride.ts b/web/src/lib/pride.ts
new file mode 100644
index 0000000..98f2cf4
--- /dev/null
+++ b/web/src/lib/pride.ts
@@ -0,0 +1,93 @@
+/* src/lib/pride.ts
+ * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+ * Licensed under the DASL-1.0 Licence.
+ * See LICENCE.md in the project root for full licence information.
+ */
+
+export interface PrideFlag {
+  label: string;
+  stripes: string[];
+}
+
+// Curated catalogue. `label` is what the API stores per member; `stripes` are
+// the flag's horizontal bands, top to bottom, rendered as a small swatch.
+export const PRIDE_FLAGS: PrideFlag[] = [
+  {
+    label: "Lesbian",
+    stripes: ["#d52d00", "#ff9a56", "#ffffff", "#d362a4", "#a30262"],
+  },
+  {
+    label: "Gay",
+    stripes: ["#078d70", "#98e8c1", "#ffffff", "#7bade2", "#3d1a78"],
+  },
+  {
+    label: "Bisexual",
+    stripes: ["#d60270", "#9b4f96", "#0038a8"],
+  },
+  {
+    label: "Pansexual",
+    stripes: ["#ff218c", "#ffd800", "#21b1ff"],
+  },
+  {
+    label: "Asexual",
+    stripes: ["#000000", "#a3a3a3", "#ffffff", "#800080"],
+  },
+  {
+    label: "Aromantic",
+    stripes: ["#3da542", "#a7d379", "#ffffff", "#a9a9a9", "#000000"],
+  },
+  {
+    label: "Transgender",
+    stripes: ["#5bcefa", "#f5a9b8", "#ffffff", "#f5a9b8", "#5bcefa"],
+  },
+  {
+    label: "Nonbinary",
+    stripes: ["#fcf434", "#ffffff", "#9c59d1", "#2c2c2c"],
+  },
+  {
+    label: "Genderfluid",
+    stripes: ["#ff75a2", "#ffffff", "#be18d6", "#000000", "#333ebd"],
+  },
+  {
+    label: "Genderqueer",
+    stripes: ["#b57edc", "#ffffff", "#4a8123"],
+  },
+  {
+    label: "Agender",
+    stripes: ["#000000", "#bcc4c7", "#ffffff", "#b7f684", "#ffffff", "#bcc4c7", "#000000"],
+  },
+  {
+    label: "Intersex",
+    stripes: ["#ffd800", "#7a00ac"],
+  },
+  {
+    label: "Demisexual",
+    stripes: ["#000000", "#ffffff", "#6e0070", "#d3d3d3"],
+  },
+  {
+    label: "Polyamory",
+    stripes: ["#0000ff", "#ff0000", "#000000"],
+  },
+  {
+    label: "Queer",
+    stripes: ["#b57edc", "#ffffff", "#4a8123"],
+  },
+  {
+    label: "Rainbow",
+    stripes: ["#e40303", "#ff8c00", "#ffed00", "#008026", "#004dff", "#750787"],
+  },
+];
+
+export function findPrideFlag(label: string): PrideFlag | undefined {
+  return PRIDE_FLAGS.find((flag) => flag.label.toLowerCase() === label.toLowerCase());
+}
+
+export function prideSwatchGradient(stripes: string[]): string {
+  const bandSize = 100 / stripes.length;
+  const bands = stripes.map((color, index) => {
+    const from = (bandSize * index).toFixed(2);
+    const to = (bandSize * (index + 1)).toFixed(2);
+    return `${color} ${from}%, ${color} ${to}%`;
+  });
+  return `linear-gradient(180deg, ${bands.join(", ")})`;
+}
diff --git a/web/src/lib/styles/fonts.css b/web/src/lib/styles/fonts.css
new file mode 100644
index 0000000..e536127
--- /dev/null
+++ b/web/src/lib/styles/fonts.css
@@ -0,0 +1,33 @@
+/* src/lib/styles/fonts.css
+ * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+ * Licensed under the DASL-1.0 Licence.
+ * See LICENCE.md in the project root for full licence information.
+ */
+
+@font-face {
+  font-family: "IBM Plex Sans";
+  src: url("../fonts/IBMPlexSans-Regular.woff2") format("woff2");
+  font-weight: 400;
+  font-display: swap;
+}
+
+@font-face {
+  font-family: "IBM Plex Sans";
+  src: url("../fonts/IBMPlexSans-Medium.woff2") format("woff2");
+  font-weight: 500;
+  font-display: swap;
+}
+
+@font-face {
+  font-family: "IBM Plex Sans";
+  src: url("../fonts/IBMPlexSans-SemiBold.woff2") format("woff2");
+  font-weight: 600;
+  font-display: swap;
+}
+
+@font-face {
+  font-family: "IBM Plex Sans";
+  src: url("../fonts/IBMPlexSans-Bold.woff2") format("woff2");
+  font-weight: 700;
+  font-display: swap;
+}
diff --git a/web/src/lib/styles/footer.css b/web/src/lib/styles/footer.css
new file mode 100644
index 0000000..0f15a3b
--- /dev/null
+++ b/web/src/lib/styles/footer.css
@@ -0,0 +1,27 @@
+/* src/lib/styles/footer.css
+ * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+ * Licensed under the DASL-1.0 Licence.
+ * See LICENCE.md in the project root for full licence information.
+ */
+
+/* Sits in the page flow; margin-top: auto pins it to the bottom of short pages */
+footer {
+  display: flex;
+  flex-wrap: wrap;
+  gap: 1rem 1.5rem;
+  align-items: center;
+  justify-content: space-between;
+  width: 100%;
+  max-width: 62rem;
+  margin: auto auto 0;
+  padding: 1.25rem 1.5rem;
+  border-top: 1px solid var(--line);
+  color: var(--muted);
+  font-size: 0.85rem;
+}
+
+@media print {
+  footer {
+    display: none;
+  }
+}
diff --git a/web/src/lib/styles/global.css b/web/src/lib/styles/global.css
new file mode 100644
index 0000000..9bb9d75
--- /dev/null
+++ b/web/src/lib/styles/global.css
@@ -0,0 +1,125 @@
+/* src/lib/styles/global.css
+ * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+ * Licensed under the DASL-1.0 Licence.
+ * See LICENCE.md in the project root for full licence information.
+ */
+
+* {
+  box-sizing: border-box;
+}
+
+/* Inline Material icons never shrink beside text */
+a > svg,
+button > svg,
+.tile-icon > svg,
+.mental > svg {
+  flex-shrink: 0;
+}
+
+html {
+  height: 100%;
+}
+
+body {
+  display: flex;
+  position: relative;
+  flex-direction: column;
+  min-height: 100%;
+  margin: 0;
+  font-size: 1rem;
+  line-height: 1.6;
+}
+
+/* Keeps page sections laid out as before they were wrapped in <main> */
+main {
+  display: flex;
+  flex-direction: column;
+}
+
+a {
+  color: var(--text);
+  text-decoration-color: rgb(235 69 158 / 55%);
+  text-underline-offset: 0.2em;
+}
+
+a:hover {
+  color: #fff;
+  text-decoration-color: var(--accent);
+}
+
+h1 {
+  line-height: 1.25;
+  text-wrap: balance;
+}
+
+br {
+  display: block;
+  content: "";
+  margin-bottom: 1em;
+}
+
+/* Hero */
+
+/* The background image lives in the header"s .backdrop */
+.hero {
+  padding-block: 4rem 2rem;
+}
+
+.eyebrow {
+  margin: 0 0 0.5rem;
+  color: var(--accent);
+  font-size: 0.75rem;
+  font-weight: 600;
+  letter-spacing: 0.14em;
+  text-transform: uppercase;
+}
+
+.hero h1 {
+  margin: 0 0 0.25rem;
+  font-size: clamp(2.75rem, 9vw, 4.5rem);
+  font-weight: 700;
+  letter-spacing: -0.03em;
+}
+
+.subtitle {
+  margin: 0 0 1.25rem;
+  color: var(--muted);
+  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
+}
+
+.lede {
+  max-width: 36rem;
+  margin: 0 0 2rem;
+  color: #cfc9d6;
+}
+
+.intro {
+  display: flex;
+  flex-wrap: wrap;
+  gap: 1.5rem 2.5rem;
+  align-items: flex-start;
+}
+
+.intro .lede {
+  flex: 1 1 20rem;
+  margin: 0;
+}
+
+.wrap {
+  width: 100%;
+  max-width: 62rem;
+  margin: 0 auto;
+  padding-inline: 1.5rem;
+}
+
+@media print {
+  .hero {
+    display: none;
+  }
+  .lede {
+    display: none;
+  }
+  .wrap {
+    display: none;
+  }
+}
\ No newline at end of file
diff --git a/web/src/lib/styles/header.css b/web/src/lib/styles/header.css
new file mode 100644
index 0000000..efb1ff0
--- /dev/null
+++ b/web/src/lib/styles/header.css
@@ -0,0 +1,104 @@
+/* src/lib/styles/header.css
+ * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+ * Licensed under the DASL-1.0 Licence.
+ * See LICENCE.md in the project root for full licence information.
+ */
+
+/* Backdrop */
+
+.backdrop {
+  position: absolute;
+  top: 0;
+  right: 0;
+  left: 0;
+  z-index: -1;
+  height: 30rem;
+  overflow: hidden;
+  pointer-events: none;
+}
+
+.backdrop::after {
+  content: "";
+  position: absolute;
+  inset: 0;
+  background:
+    linear-gradient(rgb(11 10 13 / 55%), rgb(11 10 13 / 80%) 55%, var(--bg)),
+    radial-gradient(70% 60% at 20% 30%, rgb(235 69 158 / 12%), transparent 70%);
+}
+
+/* Top bar */
+
+.site-header {
+  position: relative;
+  z-index: 2;
+  display: flex;
+  flex-wrap: wrap;
+  gap: 1rem 1.5rem;
+  align-items: center;
+  justify-content: space-between;
+  width: 100%;
+  max-width: 62rem;
+  margin: 0 auto;
+  padding: 1.25rem 1.5rem;
+}
+
+.site-header nav {
+  display: flex;
+  flex-wrap: wrap;
+  gap: 0.3rem;
+  align-items: center;
+  font-size: 0.9rem;
+}
+
+.site-header nav a,
+.site-header .nav-button {
+  display: inline-flex;
+  gap: 0.45em;
+  align-items: center;
+  min-height: 2.5rem;
+  padding: 0.35rem 0.65rem;
+  border: 1px solid transparent;
+  border-radius: 0.55rem;
+  background: transparent;
+  color: var(--muted);
+  font: inherit;
+  text-decoration: none;
+}
+
+.site-header nav a:hover,
+.site-header .nav-button:hover {
+  background: var(--raised);
+  color: var(--text);
+}
+
+.site-header nav [aria-current] {
+  border-color: var(--accent-line);
+  background: var(--accent-dim);
+  color: var(--text);
+}
+
+.brand {
+  display: inline-flex;
+  gap: 0.6rem;
+  align-items: center;
+  font-weight: 600;
+  letter-spacing: 0.01em;
+  text-decoration: none;
+}
+
+.brand img {
+  border-radius: 50%;
+  outline: 1px solid var(--line);
+}
+
+.nav-icon {
+  width: 1.2em;
+  height: 1.2em;
+  flex-shrink: 0;
+}
+
+@media print {
+  .site-header {
+    display: none;
+  }
+}
\ No newline at end of file
diff --git a/web/src/lib/styles/system.css b/web/src/lib/styles/system.css
new file mode 100644
index 0000000..cec4cb7
--- /dev/null
+++ b/web/src/lib/styles/system.css
@@ -0,0 +1,242 @@
+/* src/lib/styles/system.css
+ * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+ * Licensed under the DASL-1.0 Licence.
+ * See LICENCE.md in the project root for full licence information.
+ */
+
+
+.with-icon {
+  display: inline-flex;
+  gap: 0.4em;
+  align-items: center;
+}
+
+.sr-only {
+  position: absolute;
+  width: 1px;
+  height: 1px;
+  overflow: hidden;
+  clip-path: inset(50%);
+  white-space: nowrap;
+}
+
+.page-head h1,
+.panel h1 {
+  margin: 0;
+}
+
+/* Member avatars: a square photo with the member's own colour as its ring */
+
+.member-avatar {
+  display: block;
+  object-fit: cover;
+  border: 2px solid var(--member-color, var(--accent));
+  border-radius: 1rem;
+  background: var(--raised);
+  box-shadow: 0 0 0 4px color-mix(in srgb, var(--member-color, var(--accent)) 18%, transparent);
+}
+
+.avatar-sm {
+  width: 2.25rem;
+  height: 2.25rem;
+  border-width: 1px;
+  border-radius: 0.6rem;
+  box-shadow: none;
+}
+
+/* Chips: tags, identities, filters */
+
+.chip {
+  display: inline-flex;
+  gap: 0.35rem;
+  align-items: center;
+  padding: 0.15rem 0.65rem;
+  border: 1px solid var(--line);
+  border-radius: 999px;
+  background: var(--raised);
+  color: var(--muted);
+  font: inherit;
+  font-size: 0.78rem;
+  line-height: 1.5;
+  text-decoration: none;
+  cursor: pointer;
+}
+
+.chip:hover {
+  border-color: var(--accent-line);
+  color: var(--text);
+}
+
+.chip.active {
+  border-color: var(--accent);
+  background: var(--accent-dim);
+  color: var(--accent);
+}
+
+.chips {
+  display: flex;
+  flex-wrap: wrap;
+  gap: 0.4rem;
+}
+
+/* Member status: an emoji and a line of text */
+
+.status-tag {
+  display: inline-flex;
+  gap: 0.35rem;
+  align-items: center;
+  max-width: 100%;
+  padding: 0.25rem 0.6rem;
+  border: 1px solid var(--line);
+  border-radius: 0.6rem;
+  background: rgb(0 0 0 / 25%);
+  color: var(--muted);
+  font-size: 0.8rem;
+}
+
+.status-tag span:last-child {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+/* Mental state */
+
+.mental {
+  --state: var(--ok);
+  display: flex;
+  gap: 1rem;
+  align-items: flex-start;
+  padding: 1rem 1.25rem;
+  border: 1px solid color-mix(in srgb, var(--state) 45%, transparent);
+  border-radius: 1rem;
+  background: color-mix(in srgb, var(--state) 8%, var(--raised));
+}
+
+.mental-unstable,
+.mental-idealizing {
+  --state: var(--warn);
+}
+
+.mental-self-harming,
+.mental-highly-at-risk {
+  --state: var(--bad);
+}
+
+.mental svg {
+  color: var(--state);
+}
+
+.mental p {
+  margin: 0;
+}
+
+.mental-label {
+  color: var(--state);
+  font-weight: 600;
+}
+
+/* Lists of members to pick from */
+
+.pick-list {
+  display: flex;
+  flex-direction: column;
+  gap: 0.4rem;
+  max-height: 32rem;
+  overflow-y: auto;
+}
+
+.pick {
+  display: flex;
+  gap: 0.75rem;
+  align-items: center;
+  width: 100%;
+  padding: 0.5rem 0.75rem;
+  border: 1px solid var(--line);
+  border-radius: 0.75rem;
+  background: var(--raised);
+  color: inherit;
+  font: inherit;
+  text-align: left;
+  cursor: pointer;
+}
+
+.pick:hover {
+  border-color: var(--accent-line);
+}
+
+.pick.selected {
+  border-color: var(--accent);
+  box-shadow: 0 0 0 4px var(--accent-dim);
+}
+
+.pick p {
+  margin: 0;
+}
+
+/* Dashboard tiles */
+
+.tiles {
+  display: grid;
+  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
+  gap: 0.875rem;
+}
+
+.tile {
+  display: grid;
+  grid-template-columns: auto minmax(0, 1fr);
+  grid-template-rows: auto 1fr;
+  gap: 0.2rem 0.875rem;
+  align-content: start;
+  padding: 1rem;
+  border: 1px solid var(--line);
+  border-radius: 0.75rem;
+  background: var(--surface);
+  text-decoration: none;
+}
+
+.tile:hover,
+.tile:focus-visible {
+  border-color: var(--accent-line);
+  background: var(--surface-hover);
+}
+
+.tile-icon {
+  display: grid;
+  grid-row: span 2;
+  place-items: center;
+  width: 2.5rem;
+  height: 2.5rem;
+  border-radius: 0.55rem;
+  background: var(--accent-dim);
+  color: var(--accent);
+}
+
+.tile h2,
+.tile p {
+  margin: 0;
+}
+
+.tile h2 {
+  font-size: 1rem;
+  line-height: 1.4;
+}
+
+.tile p {
+  color: var(--muted);
+  font-size: 0.875rem;
+  line-height: 1.45;
+}
+
+.two-col {
+  display: grid;
+  grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr);
+  gap: 1.25rem;
+  align-items: start;
+}
+
+@media (max-width: 52rem) {
+  .two-col {
+    grid-template-columns: 1fr;
+  }
+}
diff --git a/web/src/lib/styles/theme.css b/web/src/lib/styles/theme.css
new file mode 100644
index 0000000..76b954d
--- /dev/null
+++ b/web/src/lib/styles/theme.css
@@ -0,0 +1,30 @@
+/* src/lib/styles/theme.css
+ * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+ * Licensed under the DASL-1.0 Licence.
+ * See LICENCE.md in the project root for full licence information.
+ */
+
+:root {
+  --bg: #0b0a0d;
+  --surface: #17141c;
+  --surface-hover: #211923;
+  --raised: rgb(255 255 255 / 3.5%);
+  --line: rgb(255 255 255 / 9%);
+  --text: #ece9ef;
+  --muted: #a49eab;
+  --accent: #eb459e;
+  --accent-dim: rgb(235 69 158 / 14%);
+  --accent-line: rgb(235 69 158 / 40%);
+
+  --ok: #7fd98b;
+  --warn: #f2c46d;
+  --bad: #ff8a9a;
+  --on-accent: #1a0611;
+
+  --mono: ui-monospace, "Cascadia Code", Menlo, monospace;
+
+  color-scheme: dark;
+  font-family: "IBM Plex Sans", system-ui, sans-serif;
+  background: var(--bg);
+  color: var(--text);
+}
diff --git a/web/src/lib/styles/ui.css b/web/src/lib/styles/ui.css
new file mode 100644
index 0000000..b66e3e2
--- /dev/null
+++ b/web/src/lib/styles/ui.css
@@ -0,0 +1,345 @@
+/* src/lib/styles/ui.css
+ * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+ * Licensed under the DASL-1.0 Licence.
+ * See LICENCE.md in the project root for full licence information.
+ */
+
+
+/* app.html's wrapper; a class, since the CSP allows no style attributes */
+.app {
+  display: contents;
+}
+
+/* Monospace */
+
+code,
+kbd,
+pre,
+samp {
+  font-family: var(--mono);
+  font-size: 0.9em;
+}
+
+::selection {
+  background: var(--accent);
+  color: var(--on-accent);
+}
+
+/* Page width, same as the header and footer */
+
+.page {
+  display: flex;
+  flex-direction: column;
+  gap: 1.25rem;
+  width: 100%;
+  max-width: 62rem;
+  margin: 0 auto;
+  padding: clamp(1.25rem, 4vw, 2.5rem) clamp(1rem, 3vw, 1.5rem) 3rem;
+}
+
+.page.narrow {
+  max-width: 34rem;
+}
+
+.page-head h1 {
+  margin: 0;
+  font-size: clamp(1.75rem, 5vw, 2.5rem);
+  font-weight: 700;
+  letter-spacing: -0.02em;
+}
+
+.page-head p {
+  margin: 0.25rem 0 0;
+}
+
+/* Panels: web's .card without the hover lift, for things you work in */
+
+.panel {
+  display: flex;
+  flex-direction: column;
+  gap: 1rem;
+  padding: clamp(1rem, 3vw, 1.5rem);
+  border: 1px solid var(--line);
+  border-radius: 1rem;
+  background: var(--surface);
+}
+
+.panel h2 {
+  margin: 0;
+  font-size: 1.15rem;
+  font-weight: 600;
+}
+
+/* Buttons */
+
+button,
+.btn {
+  display: inline-flex;
+  gap: 0.4em;
+  align-items: center;
+  justify-content: center;
+  padding: 0.4rem 0.9rem;
+  border: 1px solid var(--line);
+  /* Soft corners: a full pill curve clips text once a button wraps */
+  border-radius: 0.75rem;
+  background: var(--raised);
+  color: inherit;
+  font: inherit;
+  font-size: 0.9rem;
+  line-height: 1.35;
+  text-decoration: none;
+  cursor: pointer;
+  transition:
+    border-color 0.15s ease,
+    background 0.15s ease,
+    color 0.15s ease,
+    filter 0.15s ease;
+}
+
+button:hover:not(:disabled),
+.btn:hover:not([aria-disabled="true"]) {
+  border-color: var(--accent-line);
+  color: var(--text);
+}
+
+button:disabled,
+.btn[aria-disabled="true"] {
+  opacity: 0.4;
+  cursor: default;
+}
+
+button.primary,
+.btn.primary {
+  border-color: var(--accent);
+  background: var(--accent);
+  color: var(--on-accent);
+  font-weight: 600;
+}
+
+button.primary:hover:not(:disabled),
+.btn.primary:hover {
+  color: var(--on-accent);
+  filter: brightness(1.12);
+}
+
+button.danger,
+.btn.danger {
+  color: var(--bad);
+}
+
+button.danger:hover:not(:disabled) {
+  border-color: var(--bad);
+}
+
+button.small,
+.btn.small {
+  padding: 0.25rem 0.7rem;
+  font-size: 0.82rem;
+}
+
+button svg,
+.btn svg {
+  width: 1.1em;
+  height: 1.1em;
+}
+
+.buttons {
+  display: flex;
+  flex-wrap: wrap;
+  gap: 0.5rem;
+  align-items: center;
+}
+
+form.inline {
+  display: inline;
+}
+
+/* Fields */
+
+input,
+select,
+textarea {
+  width: 100%;
+  padding: 0.5rem 0.75rem;
+  border: 1px solid var(--line);
+  border-radius: 0.75rem;
+  background: rgb(0 0 0 / 25%);
+  color: var(--text);
+  font: inherit;
+}
+
+textarea {
+  min-height: 12rem;
+  font-family: var(--mono);
+  font-size: 0.875rem;
+  line-height: 1.55;
+  tab-size: 2;
+  resize: vertical;
+}
+
+input[type="checkbox"],
+input[type="radio"] {
+  width: auto;
+  accent-color: var(--accent);
+}
+
+input[readonly],
+input:disabled {
+  color: var(--muted);
+}
+
+:focus-visible {
+  outline: 2px solid var(--accent);
+  outline-offset: 2px;
+}
+
+input:focus-visible,
+select:focus-visible,
+textarea:focus-visible {
+  outline-offset: 0;
+  border-color: var(--accent-line);
+}
+
+.field {
+  display: flex;
+  flex-direction: column;
+  gap: 0.35rem;
+}
+
+.field > span,
+.field > legend {
+  color: var(--muted);
+  font-size: 0.75rem;
+  font-weight: 600;
+  letter-spacing: 0.1em;
+  text-transform: uppercase;
+}
+
+fieldset {
+  margin: 0;
+  padding: 0;
+  border: 0;
+}
+
+legend {
+  padding: 0;
+}
+
+.check {
+  display: flex;
+  gap: 0.6rem;
+  align-items: flex-start;
+}
+
+.check input {
+  margin-top: 0.35rem;
+}
+
+.stack {
+  display: flex;
+  flex-direction: column;
+  gap: 1rem;
+}
+
+.grid2 {
+  display: grid;
+  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
+  gap: 1rem;
+}
+
+/* Notices and badges */
+
+.notice {
+  margin: 0;
+  padding: 0.65rem 1rem;
+  border: 1px solid var(--line);
+  border-radius: 0.75rem;
+  background: var(--raised);
+}
+
+.notice.ok {
+  border-color: rgb(127 217 139 / 40%);
+  background: rgb(127 217 139 / 8%);
+}
+
+.notice.error {
+  border-color: rgb(255 138 154 / 45%);
+  background: rgb(255 138 154 / 8%);
+}
+
+.badge {
+  display: inline-block;
+  padding: 0.05rem 0.55rem;
+  border: 1px solid var(--line);
+  border-radius: 999px;
+  color: var(--muted);
+  font-size: 0.75rem;
+  white-space: nowrap;
+}
+
+.badge.accent {
+  border-color: var(--accent-line);
+  background: var(--accent-dim);
+  color: var(--accent);
+}
+
+.badge.danger {
+  border-color: rgb(255 138 154 / 45%);
+  color: var(--bad);
+}
+
+/* Lists of rows */
+
+.rows {
+  margin: 0;
+  padding: 0;
+  list-style: none;
+}
+
+.rows > li {
+  display: flex;
+  gap: 0.75rem;
+  align-items: center;
+  padding: 0.7rem 0;
+  border-bottom: 1px solid var(--line);
+}
+
+.rows > li:last-child {
+  border-bottom: 0;
+}
+
+.meta {
+  display: flex;
+  flex-wrap: wrap;
+  gap: 0.4rem;
+  align-items: center;
+  margin: 0.15rem 0 0;
+}
+
+.pager {
+  display: flex;
+  gap: 0.75rem;
+  align-items: center;
+}
+
+/* Text helpers */
+
+.muted {
+  color: var(--muted);
+}
+
+.small {
+  font-size: 0.85rem;
+}
+
+.grow {
+  flex: 1;
+  min-width: 0;
+}
+
+@media (prefers-reduced-motion: reduce) {
+  button,
+  .btn {
+    transition: none;
+  }
+}
diff --git a/web/src/lib/types.ts b/web/src/lib/types.ts
new file mode 100644
index 0000000..5fc5c2f
--- /dev/null
+++ b/web/src/lib/types.ts
@@ -0,0 +1,109 @@
+/* src/lib/types.ts
+ * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+ * Licensed under the DASL-1.2 Licence.
+ * See LICENCE.md in the project root for full licence information.
+ */
+
+// The shapes this site's own /api/plural sends back
+
+export interface PluralProxyTag {
+  prefix: string | null;
+  suffix: string | null;
+}
+
+export interface PluralMemberStatus {
+  text: string;
+  emoji: string | null;
+  updated_at: string;
+}
+
+export interface PluralMember {
+  id: string;
+  uuid?: string;
+  name?: string;
+  display_name?: string | null;
+  // Hex without the "#"
+  color?: string | null;
+  // "YYYY-MM-DD"; year 0004 means the year is hidden
+  birthday?: string | null;
+  pronouns?: string | null;
+  avatar_url?: string | null;
+  webhook_avatar_url?: string | null;
+  banner?: string | null;
+  description?: string | null;
+  created?: string | null;
+  proxy_tags?: PluralProxyTag[];
+  keep_proxy?: boolean;
+  autoproxy_enabled?: boolean | null;
+  tags?: string[];
+  pride?: string[];
+  status?: PluralMemberStatus | null;
+  [key: string]: unknown;
+}
+
+// `members` is missing, not empty, when nobody is fronting
+export interface FrontersResponse {
+  timestamp?: string;
+  members?: PluralMember[];
+  [key: string]: unknown;
+}
+
+export interface MentalState {
+  level: string;
+  updated_at: string;
+  notes?: string | null;
+}
+
+export interface PluralSystem {
+  id?: string;
+  uuid?: string;
+  name?: string | null;
+  description?: string | null;
+  tag?: string | null;
+  avatar_url?: string | null;
+  banner?: string | null;
+  color?: string | null;
+  created?: string | null;
+  timezone?: string | null;
+  mental_state?: MentalState;
+  [key: string]: unknown;
+}
+
+export interface MemberStatusResponse {
+  success: boolean;
+  member_identifier: string;
+  status: PluralMemberStatus | null;
+}
+
+export interface UserResponse {
+  id: string;
+  username: string;
+  display_name?: string | null;
+  email?: string | null;
+  email_verified?: boolean;
+  pending_email?: string | null;
+  created_at?: string | null;
+  is_admin: boolean;
+  is_owner: boolean;
+  avatar_url?: string | null;
+}
+
+export interface Relationship {
+  id: string;
+  members: [string, string];
+  type: string;
+  since: string | null;
+}
+
+export interface RelationshipsResponse {
+  status: string;
+  relationships: Relationship[];
+}
+
+export interface SwitchResponse {
+  status?: string;
+  success?: boolean;
+  message?: string;
+  count?: number;
+  [key: string]: unknown;
+}
diff --git a/web/src/routes/+error.svelte b/web/src/routes/+error.svelte
new file mode 100644
index 0000000..cd9df6b
--- /dev/null
+++ b/web/src/routes/+error.svelte
@@ -0,0 +1,34 @@
+<!-- src/routes/+error.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import IcArrowBack from "~icons/ic/outline-arrow-back";
+  import { page } from "$app/state";
+
+  const notFound = $derived(page.status === 404);
+</script>
+
+<svelte:head>
+  <title>{notFound ? "Not found" : "Something went wrong"} · Plural System</title>
+  <meta name="robots" content="noindex" />
+</svelte:head>
+
+<div class="page narrow">
+  <section class="panel">
+    <p class="eyebrow">Error {page.status}</p>
+    <h1>{notFound ? "Page not found" : (page.error?.title ?? "Something went wrong")}</h1>
+    <p class="muted">{notFound ? "There's nothing at that address." : page.error?.message}</p>
+    <p>
+      <a class="btn" href="/"><IcArrowBack width="16" height="16" />Return to home</a>
+    </p>
+  </section>
+</div>
+
+<style>
+  p {
+    margin: 0;
+  }
+</style>
diff --git a/web/src/routes/+layout.svelte b/web/src/routes/+layout.svelte
new file mode 100644
index 0000000..3056a4a
--- /dev/null
+++ b/web/src/routes/+layout.svelte
@@ -0,0 +1,37 @@
+<!-- src/routes/+layout.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import "#lib/styles/fonts.css";
+  import "#lib/styles/theme.css";
+  import "#lib/styles/global.css";
+  import "#lib/styles/ui.css";
+  import "#lib/styles/system.css";
+  import { onMount } from "svelte";
+  import { auth } from "#lib/auth.svelte.ts";
+  import { live } from "#lib/live.svelte.ts";
+  import Header from "#lib/components/Header.svelte";
+  import Footer from "#lib/components/Footer.svelte";
+
+  let { children } = $props();
+
+  onMount(() => {
+    void auth.load();
+    live.connect();
+  });
+</script>
+
+<svelte:head>
+  <meta name="theme-color" content="#eb459e" />
+  <meta property="og:site_name" content="Plural System" />
+  <meta property="og:locale" content="en_GB" />
+</svelte:head>
+
+<Header />
+<main>
+  {@render children()}
+</main>
+<Footer />
diff --git a/web/src/routes/+layout.ts b/web/src/routes/+layout.ts
new file mode 100644
index 0000000..6bd802c
--- /dev/null
+++ b/web/src/routes/+layout.ts
@@ -0,0 +1,3 @@
+/* src/routes/+layout.ts */
+
+export const ssr = false;
diff --git a/web/src/routes/+page.svelte b/web/src/routes/+page.svelte
new file mode 100644
index 0000000..499d32f
--- /dev/null
+++ b/web/src/routes/+page.svelte
@@ -0,0 +1,13 @@
+<!-- src/routes/+page.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import Home from "#lib/components/Home.svelte";
+
+  let { data } = $props();
+</script>
+
+<Home members={data.members} fronters={data.fronters} system={data.system} />
diff --git a/web/src/routes/+page.ts b/web/src/routes/+page.ts
new file mode 100644
index 0000000..7e16b7c
--- /dev/null
+++ b/web/src/routes/+page.ts
@@ -0,0 +1,25 @@
+/* src/routes/+page.ts
+ * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+ * Licensed under the DASL-1.0 Licence.
+ * See LICENCE.md in the project root for full licence information.
+ */
+
+import type { PageLoad } from "./$types";
+import { publicClient } from "#lib/api.ts";
+
+export const load: PageLoad = async ({ fetch, depends, url }) => {
+  depends("api:public");
+  const api = publicClient(fetch, url.origin);
+
+  const [members, fronters, system] = await Promise.all([
+    api.getMembers().catch(() => []),
+    api.getFronters().catch(() => null),
+    api.getSystem().catch(() => null),
+  ]);
+
+  return {
+    members,
+    fronters,
+    system,
+  };
+};
diff --git a/web/src/routes/[member_id]/+page.svelte b/web/src/routes/[member_id]/+page.svelte
new file mode 100644
index 0000000..d85881b
--- /dev/null
+++ b/web/src/routes/[member_id]/+page.svelte
@@ -0,0 +1,189 @@
+<!-- src/routes/[member_id]/+page.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import IcArrowBack from "~icons/ic/outline-arrow-back";
+  import { avatarFallback, fallbackAvatar, memberName, siteName, siteUrl } from "#lib";
+  import { normalizeColor, readableOnDark } from "#lib/colour.ts";
+  import PrideSwatch from "#lib/components/PrideSwatch.svelte";
+  import DiscordEmbed from "#lib/components/DiscordEmbed.svelte";
+
+  let { data } = $props();
+
+  const member = $derived(data.member);
+  const name = $derived(memberName(member));
+  const colour = $derived(normalizeColor(member.color));
+  const nameColour = $derived(readableOnDark(member.color, "var(--text)"));
+  const avatar = $derived(member.avatar_url || fallbackAvatar);
+  const pageUrl = $derived(`${siteUrl}/${encodeURIComponent(data.id)}`);
+
+  const description = $derived.by(() => {
+    if (member.description) return member.description;
+    const parts: string[] = [];
+    if (member.pronouns) parts.push(member.pronouns);
+    if (member.tags?.length) parts.push(member.tags.join(", "));
+    if (member.pride?.length) parts.push(member.pride.join(", "));
+    return parts.length ? `${parts.join(" · ")} — member of the ${siteName}.` : `A member of the ${siteName}.`;
+  });
+</script>
+
+<svelte:head>
+  <title>{name} · {siteName}</title>
+  <meta name="description" content={description} />
+  <meta name="theme-color" content={colour ?? "#0a0b10"} />
+  <link rel="canonical" href={pageUrl} />
+  <meta property="og:type" content="profile" />
+  <meta property="og:title" content="{name} · {siteName}" />
+  <meta property="og:description" content={description} />
+  <meta property="og:url" content={pageUrl} />
+  <meta property="og:image" content={new URL(avatar, siteUrl).href} />
+  <meta property="og:image:alt" content={name} />
+  <meta name="twitter:card" content="summary" />
+</svelte:head>
+
+<DiscordEmbed
+  title={name}
+  {description}
+  image={avatar}
+  colour={member.color}
+/>
+
+<div class="page narrow">
+  <article class="panel member" style:--member-color={colour ?? "var(--accent)"}>
+    <img class="member-avatar big" src={avatar} alt={name} onerror={avatarFallback} />
+    <h1 style:color={nameColour}>{name}</h1>
+    {#if member.pronouns}
+      <p class="muted">{member.pronouns}</p>
+    {/if}
+    {#if member.status}
+      <div class="status-tag">
+        {#if member.status.emoji}<span>{member.status.emoji}</span>{/if}
+        <span>{member.status.text}</span>
+      </div>
+    {/if}
+
+    {#if member.description}
+      <section>
+        <h2 style:color={nameColour}>About</h2>
+        <p class="about">{member.description}</p>
+      </section>
+    {/if}
+
+    {#if member.tags?.length}
+      <section>
+        <h2 style:color={nameColour}>Tags</h2>
+        <div class="chips">
+          {#each member.tags as tag (tag)}
+            <a class="chip tinted" href="/?tag={encodeURIComponent(tag)}">{tag}</a>
+          {/each}
+        </div>
+      </section>
+    {/if}
+
+    {#if member.pride?.length}
+      <section>
+        <h2 style:color={nameColour}>Pride</h2>
+        <div class="chips">
+          {#each member.pride as identity (identity)}
+            <a class="chip" href="/?identity={encodeURIComponent(identity)}"><PrideSwatch label={identity} />{identity}</a>
+          {/each}
+        </div>
+      </section>
+    {/if}
+
+    {#if data.partners.length}
+      <section>
+        <h2 style:color={nameColour}>Partners</h2>
+        <div class="chips">
+          {#each data.partners as partner (partner.id)}
+            <a class="chip partner" href="/{partner.name ?? partner.id}">
+              <img src={partner.avatar_url || fallbackAvatar} alt="" onerror={avatarFallback} />
+              {memberName(partner)}
+            </a>
+          {/each}
+        </div>
+      </section>
+    {/if}
+
+    {#if data.crushes.length}
+      <section>
+        <h2 style:color={nameColour}>Crushes</h2>
+        <div class="chips">
+          {#each data.crushes as crush (crush.id)}
+            <a class="chip partner" href="/{crush.name ?? crush.id}">
+              <img src={crush.avatar_url || fallbackAvatar} alt="" onerror={avatarFallback} />
+              {memberName(crush)}
+              {#if crush.mutual}<span class="badge accent">mutual</span>{/if}
+            </a>
+          {/each}
+        </div>
+      </section>
+    {/if}
+
+    <div>
+      <a class="btn" href="/"><IcArrowBack width="16" height="16" />Back to members</a>
+    </div>
+  </article>
+</div>
+
+<style>
+  .member {
+    align-items: center;
+    text-align: center;
+  }
+
+  .big {
+    width: 9rem;
+    height: 9rem;
+  }
+
+  h1 {
+    margin: 0;
+  }
+
+  .member > p {
+    margin: 0;
+  }
+
+  section {
+    display: flex;
+    flex-direction: column;
+    gap: 0.5rem;
+    align-items: center;
+    width: 100%;
+    padding-top: 0.75rem;
+    border-top: 1px solid var(--line);
+  }
+
+  h2 {
+    margin: 0;
+    font-size: 0.75rem;
+    letter-spacing: 0.14em;
+    text-transform: uppercase;
+  }
+
+  .about {
+    margin: 0;
+    white-space: pre-line;
+  }
+
+  .chips {
+    justify-content: center;
+  }
+
+  .tinted {
+    border-color: color-mix(in srgb, var(--member-color) 60%, transparent);
+    background: color-mix(in srgb, var(--member-color) 12%, transparent);
+    color: var(--text);
+  }
+
+  .partner img {
+    width: 1.25rem;
+    height: 1.25rem;
+    object-fit: cover;
+    border-radius: 0.3rem;
+  }
+</style>
diff --git a/web/src/routes/[member_id]/+page.ts b/web/src/routes/[member_id]/+page.ts
new file mode 100644
index 0000000..2f770bc
--- /dev/null
+++ b/web/src/routes/[member_id]/+page.ts
@@ -0,0 +1,62 @@
+/* src/routes/[member_id]/+page.ts
+ * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+ * Licensed under the DASL-1.0 Licence.
+ * See LICENCE.md in the project root for full licence information.
+ */
+
+import { error } from "@sveltejs/kit";
+import type { PluralMember } from "#lib/types.ts";
+import type { PageLoad } from "./$types";
+import { publicClient } from "#lib/api.ts";
+
+export const load: PageLoad = async ({ fetch, params, depends, url }) => {
+  depends("api:public");
+  const api = publicClient(fetch, url.origin);
+  const id = params.member_id;
+
+  const [member, status, members, relationships] = await Promise.all([
+    api.getMember(id).catch(() => null),
+    api.getMemberStatus(id).catch(() => null),
+    api.getMembers().catch(() => [] as PluralMember[]),
+    api.getRelationships().catch(() => null),
+  ]);
+
+  if (!member) {
+    error(404, {
+      title: "Member not found",
+      message: "This member could not be found.",
+    });
+  }
+
+  const isThis = (identifier: string) => identifier === member.id || identifier === member.name;
+  // Crushes aren't partners, so they get their own section. They only go one
+  // way: the first member has a crush on the second, so they only show there
+  const partnerIds: string[] = [];
+  const crushIds: string[] = [];
+  const crushedByIds: string[] = [];
+  for (const edge of relationships?.relationships ?? []) {
+    if (edge.type === "crush") {
+      if (isThis(edge.members[0])) crushIds.push(edge.members[1]);
+      else if (isThis(edge.members[1])) crushedByIds.push(edge.members[0]);
+    } else if (isThis(edge.members[0])) partnerIds.push(edge.members[1]);
+    else if (isThis(edge.members[1])) partnerIds.push(edge.members[0]);
+  }
+  const toMembers = (ids: string[]) =>
+    ids
+      .map((identifier) => members.find((m) => m.id === identifier || m.name === identifier))
+      .filter((m): m is PluralMember => Boolean(m));
+
+  return {
+    id,
+    member: {
+      ...member,
+      status: status?.status ?? member.status ?? null,
+    },
+    partners: toMembers(partnerIds),
+    // A crush that goes both ways is mutual
+    crushes: toMembers(crushIds).map((crush) => ({
+      ...crush,
+      mutual: toMembers(crushedByIds).some((m) => m.id === crush.id),
+    })),
+  };
+};
diff --git a/web/src/routes/admin/+layout.svelte b/web/src/routes/admin/+layout.svelte
new file mode 100644
index 0000000..775de75
--- /dev/null
+++ b/web/src/routes/admin/+layout.svelte
@@ -0,0 +1,16 @@
+<!-- src/routes/admin/+layout.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import type { LayoutProps } from "./$types";
+  import Protected from "#lib/components/Protected.svelte";
+
+  let { children }: LayoutProps = $props();
+</script>
+
+<Protected admin>
+  {@render children()}
+</Protected>
diff --git a/web/src/routes/admin/+layout.ts b/web/src/routes/admin/+layout.ts
new file mode 100644
index 0000000..e0cd627
--- /dev/null
+++ b/web/src/routes/admin/+layout.ts
@@ -0,0 +1,8 @@
+/* src/routes/admin/+layout.ts
+ * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+ * Licensed under the DASL-1.0 Licence.
+ * See LICENCE.md in the project root for full licence information.
+ */
+
+// Signed-in pages: the token lives in localStorage, so they render in the browser
+export const ssr = false;
diff --git a/web/src/routes/admin/dash/+page.svelte b/web/src/routes/admin/dash/+page.svelte
new file mode 100644
index 0000000..ca2817b
--- /dev/null
+++ b/web/src/routes/admin/dash/+page.svelte
@@ -0,0 +1,121 @@
+<!-- src/routes/admin/dash/+page.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import IcChat from "~icons/ic/outline-chat";
+  import IcMonitorHeart from "~icons/ic/outline-monitor-heart";
+  import IcRefresh from "~icons/ic/outline-refresh";
+  import IcSwapHoriz from "~icons/ic/outline-swap-horiz";
+  import { errorText, type Message as MessageType } from "#lib";
+  import { client } from "#lib/api.ts";
+  import PageHead from "#lib/components/PageHead.svelte";
+  import Message from "#lib/components/Message.svelte";
+
+  const PAGES = [
+    {
+      href: "/admin/switch",
+      label: "Switch manager",
+      icon: IcSwapHoriz,
+      desc: "Manage fronting members",
+    },
+    {
+      href: "/admin/mental",
+      label: "Mental health",
+      icon: IcMonitorHeart,
+      desc: "Update mental state",
+    },
+    {
+      href: "/admin/status",
+      label: "Status manager",
+      icon: IcChat,
+      desc: "Set member statuses",
+    },
+  ];
+
+  let refreshing = $state(false);
+  let message = $state<MessageType>(null);
+
+  async function forceRefresh() {
+    if (!confirm("This will reload the website for ALL connected users. Are you sure?")) return;
+
+    refreshing = true;
+    message = null;
+    try {
+      await client.forceRefresh();
+      message = {
+        type: "success",
+        content: "Refresh command sent to all connected clients! The page will reload in 3 seconds...",
+      };
+      setTimeout(() => location.reload(), 3000);
+    } catch (err) {
+      message = {
+        type: "error",
+        content: errorText(err, "Failed to send refresh command"),
+      };
+      refreshing = false;
+    }
+  }
+</script>
+
+<svelte:head>
+  <title>Admin dashboard · Plural System</title>
+</svelte:head>
+
+<div class="page">
+  <PageHead
+    eyebrow="Admin"
+    title="Admin dashboard"
+    back={{
+      href: "/",
+      label: "Back to home",
+    }}
+  />
+
+  <div class="tiles">
+    {#each PAGES as page (page.href)}
+      <a class="tile" href={page.href}>
+        <span class="tile-icon"><page.icon width="22" height="22" /></span>
+        <h2>{page.label}</h2>
+        <p>{page.desc}</p>
+      </a>
+    {/each}
+  </div>
+
+  <Message {message} />
+
+  <section class="panel danger-zone">
+    <div class="grow">
+      <h2>Reload all open pages</h2>
+      <p class="muted">
+        Immediately reload the site for everyone viewing it.
+      </p>
+    </div>
+    <div>
+      <button type="button" class="danger" disabled={refreshing} onclick={forceRefresh}>
+        <IcRefresh width="16" height="16" />{refreshing ? "Sending..." : "Refresh all"}
+      </button>
+    </div>
+  </section>
+</div>
+
+<style>
+  .danger-zone {
+    flex-direction: row;
+    flex-wrap: wrap;
+    align-items: center;
+    border-color: rgb(255 138 154 / 35%);
+  }
+
+  .danger-zone h2,
+  .danger-zone p {
+    margin: 0;
+  }
+
+  .danger-zone h2 {
+    color: var(--bad);
+    font-size: 1rem;
+  }
+</style>
diff --git a/web/src/routes/admin/members/+page.ts b/web/src/routes/admin/members/+page.ts
new file mode 100644
index 0000000..f97cae9
--- /dev/null
+++ b/web/src/routes/admin/members/+page.ts
@@ -0,0 +1,13 @@
+/* src/routes/admin/members/+page.server.ts
+ * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+ * Licensed under the DASL-1.2 Licence.
+ * See LICENCE.md in the project root for full licence information.
+ */
+
+import { redirect } from "@sveltejs/kit";
+import type { PageLoad } from "./$types";
+
+
+export const load: PageLoad = ({ url }) => {
+  redirect(308, `/owner/members${url.search}`);
+};
diff --git a/web/src/routes/admin/mental/+page.svelte b/web/src/routes/admin/mental/+page.svelte
new file mode 100644
index 0000000..8991b78
--- /dev/null
+++ b/web/src/routes/admin/mental/+page.svelte
@@ -0,0 +1,154 @@
+<!-- src/routes/admin/mental/+page.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import IcCheckCircle from "~icons/ic/outline-check-circle";
+  import IcGppBad from "~icons/ic/outline-gpp-bad";
+  import IcInfo from "~icons/ic/outline-info";
+  import IcReportProblem from "~icons/ic/outline-report-problem";
+  import IcWarningAmber from "~icons/ic/outline-warning-amber";
+  import { onMount } from "svelte";
+  import type { MentalState } from "#lib/types.ts";
+  import { errorText, type Message as MessageType } from "#lib";
+  import { client } from "#lib/api.ts";
+  import PageHead from "#lib/components/PageHead.svelte";
+  import Message from "#lib/components/Message.svelte";
+
+  const OPTIONS = [
+    {
+      value: "safe",
+      label: "Safe",
+      icon: IcCheckCircle,
+    },
+    {
+      value: "unstable",
+      label: "Unstable",
+      icon: IcReportProblem,
+    },
+    {
+      value: "idealizing",
+      label: "Idealizing",
+      icon: IcInfo,
+    },
+    {
+      value: "self-harming",
+      label: "Self-Harming",
+      icon: IcWarningAmber,
+    },
+    {
+      value: "highly at risk",
+      label: "Highly At Risk",
+      icon: IcGppBad,
+    },
+  ];
+
+  let current = $state<MentalState | null>(null);
+  let level = $state("");
+  let notes = $state("");
+  let loading = $state(true);
+  let saving = $state(false);
+  let message = $state<MessageType>(null);
+
+  const currentOption = $derived(OPTIONS.find((o) => o.value === current?.level));
+
+  onMount(async () => {
+    try {
+      current = await client.getMentalState();
+      level = current.level;
+      notes = current.notes || "";
+    } catch {
+      // No state yet; the form still works
+    } finally {
+      loading = false;
+    }
+  });
+
+  async function update() {
+    saving = true;
+    message = null;
+    try {
+      await client.setMentalState({
+        level,
+        notes: notes.trim() || undefined,
+      });
+      current = await client.getMentalState();
+      message = {
+        type: "success",
+        content: "Mental state updated successfully.",
+      };
+    } catch (err) {
+      message = {
+        type: "error",
+        content: errorText(err, "An unknown error occurred"),
+      };
+    } finally {
+      saving = false;
+    }
+  }
+</script>
+
+<svelte:head>
+  <title>Mental health · Plural System</title>
+</svelte:head>
+
+<div class="page narrow">
+  <PageHead
+    eyebrow="Admin"
+    title="Mental health"
+    subtitle="Update system mental state"
+    back={{
+      href: "/admin/dash",
+      label: "Back to dashboard",
+    }}
+  />
+
+  <Message {message} />
+
+  {#if loading}
+    <p class="muted">Loading…</p>
+  {:else}
+    {#if current && currentOption}
+      <div class="mental mental-{current.level.replaceAll(' ', '-')}">
+        <currentOption.icon width="32" height="32" />
+        <div>
+          <p class="mental-label">{currentOption.label}</p>
+          {#if current.notes}<p>{current.notes}</p>{/if}
+          <small class="muted">Last updated: {new Date(current.updated_at).toLocaleString()}</small>
+        </div>
+      </div>
+    {/if}
+
+    <section class="panel stack">
+      <label class="field">
+        <span>Mental state level</span>
+        <select bind:value={level}>
+          <option value="">-- Select mental state --</option>
+          {#each OPTIONS as option (option.value)}
+            <option value={option.value}>{option.label}</option>
+          {/each}
+        </select>
+      </label>
+      <label class="field">
+        <span>Notes (optional)</span>
+        <textarea class="notes" rows="3" bind:value={notes} placeholder="Add any additional notes about the current mental state..."></textarea>
+      </label>
+      <div>
+        <button type="button" class="primary" disabled={saving || !level} onclick={update}>
+          {saving ? "Updating..." : "Update mental state"}
+        </button>
+      </div>
+    </section>
+  {/if}
+</div>
+
+<style>
+  /* Prose, not code: the shared textarea style is monospace */
+  .notes {
+    min-height: 6rem;
+    font-family: inherit;
+    font-size: 1rem;
+  }
+</style>
diff --git a/web/src/routes/admin/pride/+page.ts b/web/src/routes/admin/pride/+page.ts
new file mode 100644
index 0000000..f754243
--- /dev/null
+++ b/web/src/routes/admin/pride/+page.ts
@@ -0,0 +1,13 @@
+/* src/routes/admin/pride/+page.server.ts
+ * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+ * Licensed under the DASL-1.0 Licence.
+ * See LICENCE.md in the project root for full licence information.
+ */
+
+import { redirect } from "@sveltejs/kit";
+import type { PageLoad } from "./$types";
+
+
+export const load: PageLoad = ({ url }) => {
+  redirect(308, `/owner/pride${url.search}`);
+};
diff --git a/web/src/routes/admin/relationships/+page.ts b/web/src/routes/admin/relationships/+page.ts
new file mode 100644
index 0000000..5fab821
--- /dev/null
+++ b/web/src/routes/admin/relationships/+page.ts
@@ -0,0 +1,13 @@
+/* src/routes/admin/relationships/+page.server.ts
+ * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+ * Licensed under the DASL-1.0 Licence.
+ * See LICENCE.md in the project root for full licence information.
+ */
+
+import { redirect } from "@sveltejs/kit";
+import type { PageLoad } from "./$types";
+
+
+export const load: PageLoad = ({ url }) => {
+  redirect(308, `/owner/relationships${url.search}`);
+};
diff --git a/web/src/routes/admin/status/+page.svelte b/web/src/routes/admin/status/+page.svelte
new file mode 100644
index 0000000..517443d
--- /dev/null
+++ b/web/src/routes/admin/status/+page.svelte
@@ -0,0 +1,201 @@
+<!-- src/routes/admin/status/+page.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import { onMount } from "svelte";
+  import type { PluralMember } from "#lib/types.ts";
+  import { avatarFallback, errorText, fallbackAvatar, memberName, sortMembers, type Message as MessageType } from "#lib";
+  import { authFetch, client } from "#lib/api.ts";
+  import PageHead from "#lib/components/PageHead.svelte";
+  import Message from "#lib/components/Message.svelte";
+  import MemberSelect from "#lib/components/MemberSelect.svelte";
+
+  const EMOJI = ["💤", "🎮", "📚", "🎨", "🎵", "💻", "🌙", "☀️", "🍕", "☕", "🎬", "✨", "💭", "😴", "🏃", "🧘"];
+
+  let members = $state<PluralMember[]>([]);
+  let chosen = $state("");
+  let text = $state("");
+  let emoji = $state("");
+  let loading = $state(true);
+  let saving = $state(false);
+  let message = $state<MessageType>(null);
+
+  const current = $derived(members.find((m) => m.name === chosen)?.status ?? null);
+  const withStatus = $derived(members.filter((m) => m.status));
+
+  async function reload() {
+    members = sortMembers(await client.getMembers());
+  }
+
+  onMount(() => {
+    void reload().finally(() => (loading = false));
+  });
+
+  // Picking a member fills the form with their current status
+  $effect(() => {
+    const status = members.find((m) => m.name === chosen)?.status;
+    text = status?.text ?? "";
+    emoji = status?.emoji ?? "";
+  });
+
+  async function save(event: SubmitEvent) {
+    event.preventDefault();
+    if (!chosen || !text.trim()) return;
+    if (text.length > 100) {
+      message = {
+        type: "error",
+        content: "Status must be ≤ 100 chars",
+      };
+      return;
+    }
+
+    saving = true;
+    message = null;
+    try {
+      await client.setMemberStatus(chosen, {
+        text: text.trim(),
+        emoji: emoji || undefined,
+      });
+      message = {
+        type: "success",
+        content: "Status updated!",
+      };
+      await reload();
+    } catch (err) {
+      message = {
+        type: "error",
+        content: errorText(err, "Failed to update status"),
+      };
+    } finally {
+      saving = false;
+    }
+  }
+
+  async function clear() {
+    if (!chosen || !confirm(`Clear status for ${chosen}?`)) return;
+
+    saving = true;
+    message = null;
+    try {
+      await authFetch(`/plural/members/${encodeURIComponent(chosen)}/status`, { method: "DELETE" }, "Failed to clear status");
+      message = {
+        type: "success",
+        content: "Status cleared!",
+      };
+      await reload();
+    } catch (err) {
+      message = {
+        type: "error",
+        content: errorText(err, "Failed to clear status"),
+      };
+    } finally {
+      saving = false;
+    }
+  }
+</script>
+
+<svelte:head>
+  <title>Status manager · Plural System</title>
+</svelte:head>
+
+<div class="page">
+  <PageHead
+    eyebrow="Admin"
+    title="Status manager"
+    subtitle="Update member status messages"
+    back={{
+      href: "/admin/dash",
+      label: "Back to dashboard",
+    }}
+  />
+
+  <Message {message} />
+
+  {#if loading}
+    <p class="muted">Loading…</p>
+  {:else}
+    <div class="two-col">
+      <form class="panel stack" onsubmit={save}>
+        <MemberSelect id="member-select" label="Select member" {members} bind:value={chosen} note={(m) => (m.status ? " (has status)" : "")} />
+
+        {#if chosen}
+          <div class="field">
+            <span>Emoji (optional)</span>
+            <div class="row">
+              <input class="emoji-input" type="text" bind:value={emoji} maxlength="2" placeholder="😊" />
+              <div class="chips">
+                {#each EMOJI as suggestion (suggestion)}
+                  <button type="button" class="chip" aria-label="Select emoji {suggestion}" onclick={() => (emoji = suggestion)}>{suggestion}</button>
+                {/each}
+              </div>
+            </div>
+          </div>
+
+          <label class="field">
+            <span>Status text</span>
+            <input type="text" bind:value={text} placeholder="What's happening?" maxlength="100" />
+            <small class="muted">{text.length}/100 characters</small>
+          </label>
+
+          <div class="buttons">
+            <button type="submit" class="primary" disabled={saving || !text.trim()}>{saving ? "Updating..." : "Update status"}</button>
+            {#if current}
+              <button type="button" class="danger" disabled={saving} onclick={clear}>Clear</button>
+            {/if}
+          </div>
+
+          {#if current}
+            <p class="notice">
+              Current: {current.emoji ?? ""} {current.text}
+              <br /><small class="muted">Updated {new Date(current.updated_at).toLocaleString()}</small>
+            </p>
+          {/if}
+        {/if}
+      </form>
+
+      <section class="panel">
+        <h2>Members with a status</h2>
+        <p class="muted small">{withStatus.length} member(s) have status set</p>
+        <div class="pick-list">
+          {#each withStatus as member (member.id)}
+            <button type="button" class="pick" class:selected={member.name === chosen} onclick={() => (chosen = member.name ?? "")}>
+              <img class="member-avatar avatar-sm" src={member.avatar_url || fallbackAvatar} alt="" onerror={avatarFallback} />
+              <span class="grow">
+                <p>{memberName(member)}</p>
+                <p class="muted small">{member.status?.emoji ?? ""} {member.status?.text}</p>
+              </span>
+            </button>
+          {:else}
+            <p class="muted">No members have status set</p>
+          {/each}
+        </div>
+      </section>
+    </div>
+  {/if}
+</div>
+
+<style>
+  h2,
+  p {
+    margin: 0;
+  }
+
+  h2 {
+    font-size: 1.05rem;
+  }
+
+  .row {
+    display: flex;
+    flex-wrap: wrap;
+    gap: 0.6rem;
+    align-items: center;
+  }
+
+  .emoji-input {
+    width: 4rem;
+    text-align: center;
+  }
+</style>
diff --git a/web/src/routes/admin/switch/+page.svelte b/web/src/routes/admin/switch/+page.svelte
new file mode 100644
index 0000000..5c34c31
--- /dev/null
+++ b/web/src/routes/admin/switch/+page.svelte
@@ -0,0 +1,176 @@
+<!-- src/routes/admin/switch/+page.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import { onMount } from "svelte";
+  import type { PluralMember } from "#lib/types.ts";
+  import { avatarFallback, errorText, fallbackAvatar, memberName, sortMembers, type Message as MessageType } from "#lib";
+  import { client } from "#lib/api.ts";
+  import PageHead from "#lib/components/PageHead.svelte";
+  import Message from "#lib/components/Message.svelte";
+
+  let members = $state<PluralMember[]>([]);
+  let fronters = $state<PluralMember[]>([]);
+  let selected = $state(new Set<string>());
+  let search = $state("");
+  let loading = $state(true);
+  let saving = $state(false);
+  let message = $state<MessageType>(null);
+
+  const shown = $derived(
+    members.filter((m) => {
+      const query = search.toLowerCase();
+      return memberName(m).toLowerCase().includes(query) || m.tags?.some((tag) => tag.toLowerCase().includes(query));
+    }),
+  );
+
+  const changed = $derived.by(() => {
+    const current = new Set(fronters.map((m) => m.id));
+    if (current.size !== selected.size) return true;
+    return [...selected].some((id) => !current.has(id));
+  });
+
+  async function loadFronters() {
+    fronters = (await client.getFronters()).members ?? [];
+  }
+
+  onMount(async () => {
+    try {
+      members = sortMembers(await client.getMembers());
+      await loadFronters();
+      selected = new Set(fronters.map((m) => m.id));
+    } finally {
+      loading = false;
+    }
+  });
+
+  function toggle(id: string) {
+    const next = new Set(selected);
+    if (next.has(id)) next.delete(id);
+    else next.add(id);
+    selected = next;
+  }
+
+  async function apply() {
+    if (selected.size === 0) {
+      message = {
+        type: "error",
+        content: "Please select at least one member",
+      };
+      return;
+    }
+    saving = true;
+    message = null;
+    try {
+      const result = await client.multiSwitch([...selected]);
+      const count = result.count ?? selected.size;
+      message = {
+        type: "success",
+        content: `Successfully switched to ${count} member${count !== 1 ? "s" : ""}!`,
+      };
+      await loadFronters();
+    } catch (err) {
+      message = {
+        type: "error",
+        content: errorText(err, "Failed to switch fronters"),
+      };
+    } finally {
+      saving = false;
+    }
+  }
+</script>
+
+<svelte:head>
+  <title>Switch manager · Plural System</title>
+</svelte:head>
+
+<div class="page">
+  <PageHead
+    eyebrow="Admin"
+    title="Switch manager"
+    subtitle="Manage fronting members"
+    back={{
+      href: "/admin/dash",
+      label: "Back to dashboard",
+    }}
+  />
+
+  <Message {message} />
+
+  {#if loading}
+    <p class="muted">Loading…</p>
+  {:else}
+    <div class="two-col">
+      <section class="panel">
+        <input type="text" placeholder="Search members..." bind:value={search} />
+        <div class="buttons">
+          <button type="button" class="small" disabled={shown.length === 0} onclick={() => (selected = new Set(shown.map((m) => m.id)))}>Select all</button>
+          <button type="button" class="small" disabled={selected.size === 0} onclick={() => (selected = new Set())}>Clear all</button>
+          <span class="muted small">{selected.size} selected</span>
+        </div>
+        <div class="pick-list">
+          {#each shown as member (member.id)}
+            <button type="button" class="pick" class:selected={selected.has(member.id)} onclick={() => toggle(member.id)}>
+              <input type="checkbox" checked={selected.has(member.id)} tabindex="-1" />
+              <img class="member-avatar avatar-sm" src={member.avatar_url || fallbackAvatar} alt="" onerror={avatarFallback} />
+              <span class="grow">
+                <p>
+                  {memberName(member)}
+                  {#if fronters.some((f) => f.id === member.id)}<span class="badge accent">fronting</span>{/if}
+                </p>
+                {#if member.pronouns}<p class="muted small">{member.pronouns}</p>{/if}
+              </span>
+            </button>
+          {:else}
+            <p class="muted">{search ? "No members found matching your search" : "No members available"}</p>
+          {/each}
+        </div>
+      </section>
+
+      <div class="stack">
+        <section class="panel">
+          <h2>Currently fronting</h2>
+          {#each fronters as member (member.id)}
+            <div class="with-icon"><img class="member-avatar avatar-sm" src={member.avatar_url || fallbackAvatar} alt="" onerror={avatarFallback} />{memberName(member)}</div>
+          {:else}
+            <p class="muted">No one currently fronting</p>
+          {/each}
+        </section>
+
+        <section class="panel">
+          <h2>Selected</h2>
+          <p class="muted small">{selected.size} member{selected.size !== 1 ? "s" : ""} selected</p>
+          {#each members.filter((m) => selected.has(m.id)) as member (member.id)}
+            <div class="with-icon">
+              <img class="member-avatar avatar-sm" src={member.avatar_url || fallbackAvatar} alt="" onerror={avatarFallback} />
+              <span class="grow">{memberName(member)}</span>
+              <button type="button" class="small" title="Remove" onclick={() => toggle(member.id)}>×</button>
+            </div>
+          {/each}
+        </section>
+
+        <button type="button" class="primary" disabled={saving || selected.size === 0 || !changed} onclick={apply}>
+          {saving ? "Switching..." : changed ? "Apply switch" : "No changes"}
+        </button>
+      </div>
+    </div>
+  {/if}
+</div>
+
+<style>
+  h2,
+  p {
+    margin: 0;
+  }
+
+  h2 {
+    font-size: 1.05rem;
+  }
+
+  .pick input {
+    pointer-events: none;
+  }
+</style>
diff --git a/web/src/routes/admin/tags/+page.ts b/web/src/routes/admin/tags/+page.ts
new file mode 100644
index 0000000..0ac373e
--- /dev/null
+++ b/web/src/routes/admin/tags/+page.ts
@@ -0,0 +1,13 @@
+/* src/routes/admin/tags/+page.server.ts
+ * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+ * Licensed under the DASL-1.0 Licence.
+ * See LICENCE.md in the project root for full licence information.
+ */
+
+import { redirect } from "@sveltejs/kit";
+import type { PageLoad } from "./$types";
+
+
+export const load: PageLoad = ({ url }) => {
+  redirect(308, `/owner/tags${url.search}`);
+};
diff --git a/web/src/routes/fronting/+page.svelte b/web/src/routes/fronting/+page.svelte
new file mode 100644
index 0000000..57773be
--- /dev/null
+++ b/web/src/routes/fronting/+page.svelte
@@ -0,0 +1,13 @@
+<!-- src/routes/fronting/+page.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import Home from "#lib/components/Home.svelte";
+
+  let { data } = $props();
+</script>
+
+<Home members={data.members} fronters={data.fronters} system={data.system} />
diff --git a/web/src/routes/fronting/+page.ts b/web/src/routes/fronting/+page.ts
new file mode 100644
index 0000000..82144bd
--- /dev/null
+++ b/web/src/routes/fronting/+page.ts
@@ -0,0 +1,7 @@
+/* src/routes/fronting/+page.ts
+ * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+ * Licensed under the DASL-1.0 Licence.
+ * See LICENCE.md in the project root for full licence information.
+ */
+
+export { load } from "../+page.ts";
diff --git a/web/src/routes/owner/+layout.svelte b/web/src/routes/owner/+layout.svelte
new file mode 100644
index 0000000..f5254f3
--- /dev/null
+++ b/web/src/routes/owner/+layout.svelte
@@ -0,0 +1,16 @@
+<!-- src/routes/owner/+layout.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import type { LayoutProps } from "./$types";
+  import Protected from "#lib/components/Protected.svelte";
+
+  let { children }: LayoutProps = $props();
+</script>
+
+<Protected owner>
+  {@render children()}
+</Protected>
diff --git a/web/src/routes/owner/+layout.ts b/web/src/routes/owner/+layout.ts
new file mode 100644
index 0000000..6dd9407
--- /dev/null
+++ b/web/src/routes/owner/+layout.ts
@@ -0,0 +1,8 @@
+/* src/routes/owner/+layout.ts
+ * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+ * Licensed under the DASL-1.0 Licence.
+ * See LICENCE.md in the project root for full licence information.
+ */
+
+// Signed-in pages: the token lives in localStorage, so they render in the browser
+export const ssr = false;
diff --git a/web/src/routes/owner/dash/+page.svelte b/web/src/routes/owner/dash/+page.svelte
new file mode 100644
index 0000000..3539282
--- /dev/null
+++ b/web/src/routes/owner/dash/+page.svelte
@@ -0,0 +1,72 @@
+<!-- src/routes/owner/dash/+page.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import IcFavorite from "~icons/ic/outline-favorite";
+  import IcFlag from "~icons/ic/outline-flag";
+  import IcLabel from "~icons/ic/outline-label";
+  import IcManageAccounts from "~icons/ic/outline-manage-accounts";
+  import IcPeople from "~icons/ic/outline-people";
+  import PageHead from "#lib/components/PageHead.svelte";
+
+  const PAGES = [
+    {
+      href: "/owner/users",
+      label: "User management",
+      icon: IcPeople,
+      desc: "Manage all users",
+    },
+    {
+      href: "/owner/members",
+      label: "Member manager",
+      icon: IcManageAccounts,
+      desc: "Create and edit members, import data",
+    },
+    {
+      href: "/owner/tags",
+      label: "Tag manager",
+      icon: IcLabel,
+      desc: "Manage member tags",
+    },
+    {
+      href: "/owner/pride",
+      label: "Pride manager",
+      icon: IcFlag,
+      desc: "Set member pride identities",
+    },
+    {
+      href: "/owner/relationships",
+      label: "Relationships",
+      icon: IcFavorite,
+      desc: "Map who is dating who",
+    },
+  ];
+</script>
+
+<svelte:head>
+  <title>Owner dashboard · Plural System</title>
+</svelte:head>
+
+<div class="page">
+  <PageHead
+    eyebrow="Owner"
+    title="Owner dashboard"
+    back={{
+      href: "/",
+      label: "Back to home",
+    }}
+  />
+
+  <div class="tiles">
+    {#each PAGES as page (page.href)}
+      <a class="tile" href={page.href}>
+        <span class="tile-icon"><page.icon width="22" height="22" /></span>
+        <h2>{page.label}</h2>
+        <p>{page.desc}</p>
+      </a>
+    {/each}
+  </div>
+</div>
diff --git a/web/src/routes/owner/members/+page.svelte b/web/src/routes/owner/members/+page.svelte
new file mode 100644
index 0000000..abb39c7
--- /dev/null
+++ b/web/src/routes/owner/members/+page.svelte
@@ -0,0 +1,318 @@
+<!-- src/routes/owner/members/+page.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.2 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import { onMount } from "svelte";
+  import type { PluralMember, PluralProxyTag } from "#lib/types.ts";
+  import { avatarFallback, errorText, fallbackAvatar, memberName, sortMembers, type Message as MessageType } from "#lib";
+  import { authFetch, client } from "#lib/api.ts";
+  import { auth } from "#lib/auth.svelte.ts";
+  import PageHead from "#lib/components/PageHead.svelte";
+  import Message from "#lib/components/Message.svelte";
+
+  // Text fields, in form order. Empty input is saved as null
+  const FIELDS = [
+    {
+      key: "name",
+      label: "Name",
+      placeholder: "Used in links and switching",
+    },
+    {
+      key: "display_name",
+      label: "Display name",
+      placeholder: "Shown on the site",
+    },
+    {
+      key: "pronouns",
+      label: "Pronouns",
+      placeholder: "e.g. they/them",
+    },
+    {
+      key: "color",
+      label: "Colour",
+      placeholder: "ff99cc (no #)",
+    },
+    {
+      key: "birthday",
+      label: "Birthday",
+      placeholder: "YYYY-MM-DD, year 0004 hides it",
+    },
+  ] as const;
+
+  type FieldKey = (typeof FIELDS)[number]["key"];
+
+  let members = $state<PluralMember[]>([]);
+  let chosenId = $state<string | null>(null);
+  let form = $state<Record<FieldKey | "description" | "proxy_tags", string>>(emptyForm());
+  let loading = $state(true);
+  let saving = $state(false);
+  let message = $state<MessageType>(null);
+
+  let avatarFile = $state<FileList | null>(null);
+  let bannerFile = $state<FileList | null>(null);
+
+  const chosen = $derived(members.find((member) => member.id === chosenId) ?? null);
+
+  function emptyForm() {
+    return {
+      name: "",
+      display_name: "",
+      pronouns: "",
+      color: "",
+      birthday: "",
+      description: "",
+      proxy_tags: "",
+    };
+  }
+
+  // One tag per line, written like PluralKit: "c:text" or "[text]"
+  function tagsToText(tags: PluralProxyTag[] | undefined): string {
+    return (tags ?? []).map((tag) => `${tag.prefix ?? ""}text${tag.suffix ?? ""}`).join("\n");
+  }
+
+  function textToTags(text: string): PluralProxyTag[] {
+    return text
+      .split("\n")
+      .map((line) => line.trim())
+      .filter((line) => line.includes("text"))
+      .map((line) => {
+        const at = line.indexOf("text");
+        return {
+          prefix: line.slice(0, at) || null,
+          suffix: line.slice(at + 4) || null,
+        };
+      });
+  }
+
+  function pick(member: PluralMember | null) {
+    chosenId = member?.id ?? null;
+    // Picked images belong to the member they were picked for
+    avatarFile = new DataTransfer().files;
+    bannerFile = new DataTransfer().files;
+    message = null;
+    if (!member) {
+      form = emptyForm();
+      return;
+    }
+    form = {
+      name: member.name ?? "",
+      display_name: member.display_name ?? "",
+      pronouns: member.pronouns ?? "",
+      color: member.color ?? "",
+      birthday: member.birthday ?? "",
+      description: member.description ?? "",
+      proxy_tags: tagsToText(member.proxy_tags),
+    };
+  }
+
+  function body() {
+    const result: Record<string, unknown> = {
+      description: form.description.trim() || null,
+      proxy_tags: textToTags(form.proxy_tags),
+    };
+    for (const field of FIELDS) result[field.key] = form[field.key].trim() || null;
+    return result;
+  }
+
+  async function reload() {
+    members = sortMembers(await client.getMembers());
+  }
+
+  onMount(() => {
+    void reload()
+      .catch((err) => {
+        message = {
+          type: "error",
+          content: errorText(err, "Failed to load members"),
+        };
+      })
+      .finally(() => (loading = false));
+  });
+
+  async function run(action: () => Promise<string>, fallback: string) {
+    saving = true;
+    message = null;
+    try {
+      message = {
+        type: "success",
+        content: await action(),
+      };
+    } catch (err) {
+      message = {
+        type: "error",
+        content: errorText(err, fallback),
+      };
+    } finally {
+      saving = false;
+    }
+  }
+
+  function save(event: SubmitEvent) {
+    event.preventDefault();
+    if (!form.name.trim()) return;
+
+    // Read before pick() below clears them
+    const creating = !chosenId;
+    const uploads = [
+      {
+        path: "avatar",
+        file: avatarFile?.[0],
+      },
+      {
+        path: "banner",
+        file: bannerFile?.[0],
+      },
+    ];
+
+    void run(async () => {
+      const path = chosenId ? `/plural/members/${encodeURIComponent(chosenId)}` : "/plural/members";
+      const saved = await authFetch<PluralMember>(path, {
+        method: chosenId ? "PATCH" : "POST",
+        document: body(),
+      }, "Failed to save member");
+
+      // Select the saved member first, so a failed upload can't lead to creating them twice
+      await reload();
+      pick(members.find((member) => member.id === saved.id) ?? null);
+
+      // Picked images waited in the form until the member existed
+      const picked = uploads.filter((upload) => upload.file);
+      for (const { path, file } of picked) {
+        await authFetch(`/plural/members/${encodeURIComponent(saved.id)}/${path}`, {
+          method: "POST",
+          headers: {
+            "Content-Type": file!.type,
+          },
+          body: file,
+        }, `Member saved, but the ${path} upload failed`);
+      }
+      if (picked.length > 0) {
+        await reload();
+        pick(members.find((member) => member.id === saved.id) ?? null);
+      }
+
+      return creating ? "Member created!" : "Member saved!";
+    }, "Failed to save member");
+  }
+
+  function remove() {
+    if (!chosen || !confirm(`Delete ${memberName(chosen)}? Their past switches stay in the history.`)) return;
+
+    void run(async () => {
+      await authFetch(`/plural/members/${encodeURIComponent(chosen.id)}`, { method: "DELETE" }, "Failed to delete member");
+      pick(null);
+      await reload();
+      return "Member deleted";
+    }, "Failed to delete member");
+  }
+</script>
+
+<svelte:head>
+  <title>Member manager · Plural System</title>
+</svelte:head>
+
+<div class="page">
+  <PageHead
+    eyebrow="Owner"
+    title="Member manager"
+    subtitle="Create, edit and remove members"
+    back={{
+      href: "/owner/dash",
+      label: "Back to dashboard",
+    }}
+  />
+
+  <Message {message} />
+
+  {#if loading}
+    <p class="muted">Loading…</p>
+  {:else}
+    <div class="two-col">
+      <form class="panel stack" onsubmit={save}>
+        <h2>{chosen ? `Editing ${memberName(chosen)}` : "New member"}</h2>
+
+        {#each FIELDS as field (field.key)}
+          <label class="field">
+            <span>{field.label}</span>
+            <input type="text" bind:value={form[field.key]} placeholder={field.placeholder} required={field.key === "name"} />
+          </label>
+        {/each}
+
+        {#if auth.isOwner}
+          <label class="field">
+            <span>Avatar</span>
+            <input type="file" accept="image/png,image/jpeg,image/gif,image/webp" bind:files={avatarFile} />
+            <small class="muted">
+              {chosen ? "Uploads when you save. Replaces the current avatar and the proxy avatar" : "Uploads when you create the member"}. PNG, JPEG, GIF or WebP, up to 10 MB
+            </small>
+          </label>
+
+          <label class="field">
+            <span>Banner</span>
+            <input type="file" accept="image/png,image/jpeg,image/gif,image/webp" bind:files={bannerFile} />
+            <small class="muted">
+              {chosen ? "Uploads when you save. Replaces the current banner" : "Uploads when you create the member"}. Same formats, up to 10 MB
+            </small>
+          </label>
+        {/if}
+
+        <label class="field">
+          <span>Description</span>
+          <textarea bind:value={form.description} maxlength="1000" rows="4"></textarea>
+        </label>
+
+        <label class="field">
+          <span>Proxy tags</span>
+          <textarea bind:value={form.proxy_tags} rows="2" placeholder={"c:text\n[text]"}></textarea>
+          <small class="muted">One per line. "text" marks where the message goes</small>
+        </label>
+
+        <div class="buttons">
+          <button type="submit" class="primary" disabled={saving || !form.name.trim()}>
+            {saving ? "Saving..." : chosen ? "Save member" : "Create member"}
+          </button>
+          {#if chosen}
+            <button type="button" disabled={saving} onclick={() => pick(null)}>New member</button>
+            {#if auth.isOwner}
+              <button type="button" class="danger" disabled={saving} onclick={remove}>Delete</button>
+            {/if}
+          {/if}
+        </div>
+      </form>
+
+      <section class="panel">
+        <h2>Members</h2>
+        <p class="muted small">{members.length} member(s)</p>
+        <div class="pick-list">
+          {#each members as member (member.id)}
+            <button type="button" class="pick" class:selected={member.id === chosenId} onclick={() => pick(member)}>
+              <img class="member-avatar avatar-sm" src={member.avatar_url || fallbackAvatar} alt="" onerror={avatarFallback} />
+              <span class="grow">
+                <p>{memberName(member)}</p>
+                <p class="muted small">{member.id}{member.pronouns ? ` · ${member.pronouns}` : ""}</p>
+              </span>
+            </button>
+          {:else}
+            <p class="muted">No members yet. Create one with the form.</p>
+          {/each}
+        </div>
+      </section>
+    </div>
+
+  {/if}
+</div>
+
+<style>
+  h2,
+  p {
+    margin: 0;
+  }
+
+  h2 {
+    font-size: 1.05rem;
+  }
+
+</style>
diff --git a/web/src/routes/owner/pride/+page.svelte b/web/src/routes/owner/pride/+page.svelte
new file mode 100644
index 0000000..9f3bd2d
--- /dev/null
+++ b/web/src/routes/owner/pride/+page.svelte
@@ -0,0 +1,150 @@
+<!-- src/routes/owner/pride/+page.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import { onMount } from "svelte";
+  import type { PluralMember } from "#lib/types.ts";
+  import { avatarFallback, errorText, fallbackAvatar, memberName, sortMembers, type Message as MessageType } from "#lib";
+  import { client } from "#lib/api.ts";
+  import { PRIDE_FLAGS } from "#lib/pride.ts";
+  import PageHead from "#lib/components/PageHead.svelte";
+  import Message from "#lib/components/Message.svelte";
+  import MemberSelect from "#lib/components/MemberSelect.svelte";
+  import PrideSwatch from "#lib/components/PrideSwatch.svelte";
+
+  let members = $state<PluralMember[]>([]);
+  let chosen = $state("");
+  let loading = $state(true);
+  let saving = $state(false);
+  let message = $state<MessageType>(null);
+
+  const selected = $derived(members.find((m) => m.name === chosen));
+  const selectedPride = $derived(selected?.pride ?? []);
+
+  async function reload() {
+    members = sortMembers(await client.getMembers());
+  }
+
+  onMount(() => {
+    void reload().finally(() => (loading = false));
+  });
+
+  async function change(identity: string, action: "add" | "remove") {
+    if (!chosen) return;
+    saving = true;
+    message = null;
+    try {
+      if (action === "add") await client.addMemberPride(chosen, identity);
+      else await client.removeMemberPride(chosen, identity);
+      await reload();
+      message = {
+        type: "success",
+        content: action === "add" ? "Pride identity added!" : "Pride identity removed!",
+      };
+    } catch (err) {
+      message = {
+        type: "error",
+        content: errorText(err, "Failed to update pride identity"),
+      };
+    } finally {
+      saving = false;
+    }
+  }
+</script>
+
+<svelte:head>
+  <title>Pride manager · Plural System</title>
+</svelte:head>
+
+<div class="page">
+  <PageHead
+    eyebrow="Owner"
+    title="Pride manager"
+    subtitle="Assign pride identities to members"
+    back={{
+      href: "/owner/dash",
+      label: "Back to dashboard",
+    }}
+  />
+
+  <Message {message} />
+
+  {#if loading}
+    <p class="muted">Loading…</p>
+  {:else}
+    <div class="two-col">
+      <section class="panel">
+        <h2>All members</h2>
+        <p class="muted small">{members.filter((m) => m.pride?.length).length} member(s) with pride identities</p>
+        <div class="pick-list">
+          {#each members as member (member.id)}
+            <button type="button" class="pick" class:selected={member.name === chosen} onclick={() => (chosen = member.name ?? "")}>
+              <img class="member-avatar avatar-sm" src={member.avatar_url || fallbackAvatar} alt="" onerror={avatarFallback} />
+              <span class="grow">
+                <p>{memberName(member)}</p>
+                {#if member.pride?.length}
+                  <span class="chips">
+                    {#each member.pride as identity (identity)}
+                      <span class="chip"><PrideSwatch label={identity} />{identity}</span>
+                    {/each}
+                  </span>
+                {:else}
+                  <p class="muted small">No pride identities</p>
+                {/if}
+              </span>
+            </button>
+          {/each}
+        </div>
+      </section>
+
+      <section class="panel">
+        <h2>Set pride identities</h2>
+        <MemberSelect id="member-select" label="Select member" {members} bind:value={chosen} note={(m) => (m.pride?.length ? ` (${m.pride.length})` : "")} />
+
+        {#if selected}
+          {#if selectedPride.length}
+            <p class="muted small">Current identities:</p>
+            <div class="chips">
+              {#each selectedPride as identity (identity)}
+                <span class="chip active">
+                  <PrideSwatch label={identity} />{identity}
+                  <button type="button" class="x" title="Remove {identity}" disabled={saving} onclick={() => change(identity, "remove")}>×</button>
+                </span>
+              {/each}
+            </div>
+          {/if}
+          <p class="muted small">Add an identity:</p>
+          <div class="chips">
+            {#each PRIDE_FLAGS.filter((flag) => !selectedPride.includes(flag.label)) as flag (flag.label)}
+              <button type="button" class="chip" disabled={saving} onclick={() => change(flag.label, "add")}>
+                <PrideSwatch label={flag.label} />{flag.label}
+              </button>
+            {/each}
+          </div>
+        {/if}
+      </section>
+    </div>
+  {/if}
+</div>
+
+<style>
+  h2,
+  p {
+    margin: 0;
+  }
+
+  h2 {
+    font-size: 1.05rem;
+  }
+
+  .x {
+    padding: 0 0.15rem;
+    border: 0;
+    background: none;
+    color: inherit;
+    line-height: 1;
+  }
+</style>
diff --git a/web/src/routes/owner/relationships/+page.svelte b/web/src/routes/owner/relationships/+page.svelte
new file mode 100644
index 0000000..07f1a33
--- /dev/null
+++ b/web/src/routes/owner/relationships/+page.svelte
@@ -0,0 +1,198 @@
+<!-- src/routes/owner/relationships/+page.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import IcFavorite from "~icons/ic/outline-favorite";
+  import { onMount } from "svelte";
+  import type { PluralMember, Relationship } from "#lib/types.ts";
+  import { errorText, memberName, sortMembers, type Message as MessageType } from "#lib";
+  import { client } from "#lib/api.ts";
+  import PageHead from "#lib/components/PageHead.svelte";
+  import Message from "#lib/components/Message.svelte";
+  import MemberSelect from "#lib/components/MemberSelect.svelte";
+
+  const TYPES = ["partner", "spouse", "queerplatonic", "datemate", "crush"];
+
+  let members = $state<PluralMember[]>([]);
+  let relationships = $state<Relationship[]>([]);
+  let memberA = $state("");
+  let memberB = $state("");
+  let type = $state("partner");
+  let since = $state("");
+  let loading = $state(true);
+  let saving = $state(false);
+  let message = $state<MessageType>(null);
+
+  function labelFor(identifier: string): string {
+    const member = members.find((m) => m.id === identifier || m.name === identifier);
+    return member ? memberName(member) : identifier;
+  }
+
+  async function reload() {
+    relationships = (await client.getRelationships()).relationships ?? [];
+  }
+
+  onMount(async () => {
+    try {
+      members = sortMembers(await client.getMembers());
+      await reload();
+    } finally {
+      loading = false;
+    }
+  });
+
+  async function add() {
+    message = null;
+    if (!memberA || !memberB) {
+      message = {
+        type: "error",
+        content: "Pick two members",
+      };
+      return;
+    }
+    if (memberA === memberB) {
+      message = {
+        type: "error",
+        content: "Pick two different members",
+      };
+      return;
+    }
+
+    saving = true;
+    try {
+      await client.addRelationship({
+        memberA,
+        memberB,
+        type,
+        since: since || null,
+      });
+      memberA = "";
+      memberB = "";
+      since = "";
+      type = "partner";
+      message = {
+        type: "success",
+        content: "Relationship added!",
+      };
+      await reload();
+    } catch (err) {
+      message = {
+        type: "error",
+        content: errorText(err, "Failed to add relationship"),
+      };
+    } finally {
+      saving = false;
+    }
+  }
+
+  async function remove(edge: Relationship) {
+    const pair = `${labelFor(edge.members[0])} ${edge.type === "crush" ? "→" : "&"} ${labelFor(edge.members[1])}`;
+    if (!confirm(`Remove the relationship between ${pair}?`)) return;
+
+    saving = true;
+    message = null;
+    try {
+      await client.removeRelationship(edge.id);
+      message = {
+        type: "success",
+        content: "Relationship removed!",
+      };
+      await reload();
+    } catch (err) {
+      message = {
+        type: "error",
+        content: errorText(err, "Failed to remove relationship"),
+      };
+    } finally {
+      saving = false;
+    }
+  }
+</script>
+
+<svelte:head>
+  <title>Relationship manager · Plural System</title>
+</svelte:head>
+
+<div class="page">
+  <PageHead
+    eyebrow="Owner"
+    title="Relationship manager"
+    subtitle="Map who is dating who across the system"
+    back={{
+      href: "/owner/dash",
+      label: "Back to dashboard",
+    }}
+  />
+  <div><a class="btn" href="/relationships"><IcFavorite width="16" height="16" />View map</a></div>
+
+  <Message {message} />
+
+  {#if loading}
+    <p class="muted">Loading…</p>
+  {:else}
+    <div class="two-col">
+      <section class="panel">
+        <h2>All relationships</h2>
+        <p class="muted small">{relationships.length} link{relationships.length !== 1 ? "s" : ""}</p>
+        {#each relationships as edge (edge.id)}
+          <div class="edge">
+            <div class="grow">
+              <!-- Crushes are one way, from the first member to the second -->
+              <p>{labelFor(edge.members[0])} {edge.type === "crush" ? "→" : "&"} {labelFor(edge.members[1])}</p>
+              <p class="muted small">{edge.type}{edge.since ? ` · since ${edge.since}` : ""}</p>
+            </div>
+            <button type="button" class="small danger" disabled={saving} onclick={() => remove(edge)}>Remove</button>
+          </div>
+        {:else}
+          <p class="muted">No relationships yet</p>
+        {/each}
+      </section>
+
+      <section class="panel">
+        <h2>Add relationship</h2>
+        <p class="muted small">Link two members. A member can have many. Crushes are one way.</p>
+        <MemberSelect id="member-a" label={type === "crush" ? "Who has the crush" : "First member"} {members} bind:value={memberA} by="id" />
+        <MemberSelect id="member-b" label={type === "crush" ? "Who they have a crush on" : "Second member"} {members} bind:value={memberB} by="id" />
+        <label class="field">
+          <span>Type</span>
+          <select bind:value={type}>
+            {#each TYPES as option (option)}
+              <option value={option}>{option}</option>
+            {/each}
+          </select>
+        </label>
+        <label class="field">
+          <span>Since (optional)</span>
+          <input type="date" bind:value={since} />
+        </label>
+        <div>
+          <button type="button" class="primary" disabled={saving || !memberA || !memberB} onclick={add}>
+            {saving ? "Adding..." : "Add relationship"}
+          </button>
+        </div>
+      </section>
+    </div>
+  {/if}
+</div>
+
+<style>
+  h2,
+  p {
+    margin: 0;
+  }
+
+  h2 {
+    font-size: 1.05rem;
+  }
+
+  .edge {
+    display: flex;
+    gap: 0.75rem;
+    align-items: center;
+    padding: 0.6rem 0;
+    border-top: 1px solid var(--line);
+  }
+</style>
diff --git a/web/src/routes/owner/tags/+page.svelte b/web/src/routes/owner/tags/+page.svelte
new file mode 100644
index 0000000..4c7fcce
--- /dev/null
+++ b/web/src/routes/owner/tags/+page.svelte
@@ -0,0 +1,231 @@
+<!-- src/routes/owner/tags/+page.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import { onMount } from "svelte";
+  import type { PluralMember } from "#lib/types.ts";
+  import { avatarFallback, errorText, fallbackAvatar, memberName, sortMembers, type Message as MessageType } from "#lib";
+  import { authFetch, client } from "#lib/api.ts";
+  import PageHead from "#lib/components/PageHead.svelte";
+  import Message from "#lib/components/Message.svelte";
+  import MemberSelect from "#lib/components/MemberSelect.svelte";
+
+  let members = $state<PluralMember[]>([]);
+  let chosen = $state("");
+  let newTag = $state("");
+  let search = $state("");
+  let loading = $state(true);
+  let saving = $state(false);
+  let message = $state<MessageType>(null);
+
+  const allTags = $derived([...new Set(members.flatMap((m) => m.tags ?? []))].sort((a, b) => a.localeCompare(b)));
+  const selected = $derived(members.find((m) => m.name === chosen));
+  const shown = $derived(
+    members.filter((m) => {
+      const query = search.toLowerCase();
+      return memberName(m).toLowerCase().includes(query) || m.tags?.some((tag) => tag.toLowerCase().includes(query));
+    }),
+  );
+
+  async function reload() {
+    members = sortMembers(await client.getMembers());
+  }
+
+  onMount(() => {
+    void reload().finally(() => (loading = false));
+  });
+
+  async function change(action: () => Promise<unknown>, done: string, fallback: string) {
+    saving = true;
+    message = null;
+    try {
+      await action();
+      message = {
+        type: "success",
+        content: done,
+      };
+      await reload();
+    } catch (err) {
+      message = {
+        type: "error",
+        content: errorText(err, fallback),
+      };
+    } finally {
+      saving = false;
+    }
+  }
+
+  async function addTag() {
+    const tag = newTag.trim();
+    if (!chosen || !tag) return;
+    await change(
+      () =>
+        authFetch(
+          `/plural/member-tags/${encodeURIComponent(chosen)}/add`,
+          {
+            method: "POST",
+            document: { tag },
+          },
+          "Failed to add tag",
+        ),
+      "Tag added successfully!",
+      "Failed to add tag",
+    );
+    newTag = "";
+  }
+
+  async function removeTag(member: string, tag: string) {
+    if (!confirm(`Remove tag "${tag}" from ${member}?`)) return;
+    await change(
+      () =>
+        authFetch(
+          `/plural/member-tags/${encodeURIComponent(member)}/${encodeURIComponent(tag)}`,
+          { method: "DELETE" },
+          "Failed to remove tag",
+        ),
+      "Tag removed successfully!",
+      "Failed to remove tag",
+    );
+  }
+</script>
+
+<svelte:head>
+  <title>Tag manager · Plural System</title>
+</svelte:head>
+
+<div class="page">
+  <PageHead
+    eyebrow="Owner"
+    title="Tag manager"
+    subtitle="Manage member tags and sub-systems"
+    back={{
+      href: "/owner/dash",
+      label: "Back to dashboard",
+    }}
+  />
+
+  <Message {message} />
+
+  {#if loading}
+    <p class="muted">Loading…</p>
+  {:else}
+    <div class="two-col">
+      <section class="panel">
+        <h2>All members</h2>
+        <p class="muted small">{members.filter((m) => m.tags?.length).length} member(s) with tags</p>
+        <input type="text" placeholder="Search members or tags..." bind:value={search} />
+        <div class="pick-list">
+          {#each shown as member (member.id)}
+            <div class="pick" class:selected={member.name === chosen}>
+              <img class="member-avatar avatar-sm" src={member.avatar_url || fallbackAvatar} alt="" onerror={avatarFallback} />
+              <span class="grow">
+                <button type="button" class="link" onclick={() => (chosen = member.name ?? "")}>{memberName(member)}</button>
+                {#if member.tags?.length}
+                  <span class="chips">
+                    {#each member.tags as tag (tag)}
+                      <span class="chip">
+                        {tag}
+                        <button type="button" class="x" title="Remove {tag}" disabled={saving} onclick={() => removeTag(member.name ?? "", tag)}>×</button>
+                      </span>
+                    {/each}
+                  </span>
+                {:else}
+                  <span class="muted small">No tags</span>
+                {/if}
+              </span>
+            </div>
+          {:else}
+            <p class="muted">{search ? "No members found matching your search" : "No members available"}</p>
+          {/each}
+        </div>
+      </section>
+
+      <div class="stack">
+        <section class="panel">
+          <h2>Add tag</h2>
+          <MemberSelect id="member-select" label="Select member" {members} bind:value={chosen} note={(m) => (m.tags?.length ? ` (${m.tags.length} tag${m.tags.length !== 1 ? "s" : ""})` : "")} />
+
+          {#if selected}
+            <p class="muted small">Current tags:</p>
+            <div class="chips">
+              {#each selected.tags ?? [] as tag (tag)}
+                <span class="chip">{tag}</span>
+              {:else}
+                <span class="muted small">No tags assigned</span>
+              {/each}
+            </div>
+
+            <label class="field">
+              <span>New tag</span>
+              <input
+                type="text"
+                bind:value={newTag}
+                placeholder="Enter tag name..."
+                onkeydown={(event) => {
+                  if (event.key !== "Enter") return;
+                  event.preventDefault();
+                  void addTag();
+                }}
+              />
+            </label>
+            {#if allTags.length}
+              <p class="muted small">Or pick an existing tag:</p>
+              <div class="chips">
+                {#each allTags as tag (tag)}
+                  <button type="button" class="chip" class:active={newTag === tag} onclick={() => (newTag = tag)}>{tag}</button>
+                {/each}
+              </div>
+            {/if}
+            <div>
+              <button type="button" class="primary" disabled={saving || !newTag.trim()} onclick={addTag}>{saving ? "Adding..." : "Add tag"}</button>
+            </div>
+          {/if}
+        </section>
+
+        {#if allTags.length}
+          <section class="panel">
+            <h2>Tag statistics</h2>
+            <p class="muted small">{allTags.length} unique tag{allTags.length !== 1 ? "s" : ""}</p>
+            <div class="chips">
+              {#each allTags as tag (tag)}
+                <span class="chip">{tag} <span class="muted">×{members.filter((m) => m.tags?.includes(tag)).length}</span></span>
+              {/each}
+            </div>
+          </section>
+        {/if}
+      </div>
+    </div>
+  {/if}
+</div>
+
+<style>
+  h2,
+  p {
+    margin: 0;
+  }
+
+  h2 {
+    font-size: 1.05rem;
+  }
+
+  .link {
+    display: block;
+    margin-bottom: 0.3rem;
+    padding: 0;
+    border: 0;
+    background: none;
+    font-weight: 600;
+  }
+
+  .x {
+    padding: 0 0.15rem;
+    border: 0;
+    background: none;
+    color: var(--bad);
+    font-size: 0.9rem;
+    line-height: 1;
+  }
+</style>
diff --git a/web/src/routes/owner/users/+page.svelte b/web/src/routes/owner/users/+page.svelte
new file mode 100644
index 0000000..96aab46
--- /dev/null
+++ b/web/src/routes/owner/users/+page.svelte
@@ -0,0 +1,339 @@
+<!-- src/routes/owner/users/+page.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import IcPersonAdd from "~icons/ic/outline-person-add";
+  import { onMount } from "svelte";
+  import { avatarFallback, errorText, fallbackAvatar, type Message as MessageType } from "#lib";
+  import { authFetch } from "#lib/api.ts";
+  import { auth } from "#lib/auth.svelte.ts";
+  import PageHead from "#lib/components/PageHead.svelte";
+  import Message from "#lib/components/Message.svelte";
+
+  type User = {
+    id: string;
+    username: string;
+    display_name?: string;
+    email?: string | null;
+    is_admin: boolean;
+    is_owner?: boolean;
+    avatar_url?: string;
+  };
+
+  let users = $state<User[]>([]);
+  let loading = $state(true);
+  let saving = $state(false);
+  let message = $state<MessageType>(null);
+
+  let creating = $state(false);
+  let draft = $state({
+    username: "",
+    displayName: "",
+    email: "",
+    password: "",
+    isAdmin: false,
+  });
+
+  let editingId = $state<string | null>(null);
+  let edit = $state({
+    displayName: "",
+    email: "",
+    password: "",
+    avatarUrl: "",
+    isAdmin: false,
+  });
+
+  const myId = $derived(auth.user?.id ?? "");
+
+  async function fetchUsers() {
+    try {
+      const document = await authFetch<{ users: User[] }>("/plural/users", {}, "Failed to fetch users");
+      users = [...document.users].sort((a, b) => a.username.localeCompare(b.username));
+    } catch (err) {
+      message = {
+        type: "error",
+        content: errorText(err, "Network error occurred"),
+      };
+    }
+  }
+
+  onMount(() => {
+    void fetchUsers().finally(() => (loading = false));
+  });
+
+  // Runs a change, reports it, and reloads the list
+  async function run(action: () => Promise<unknown>, done: string, fallback: string): Promise<boolean> {
+    saving = true;
+    message = null;
+    try {
+      await action();
+      message = {
+        type: "success",
+        content: done,
+      };
+      await fetchUsers();
+      return true;
+    } catch (err) {
+      message = {
+        type: "error",
+        content: errorText(err, fallback),
+      };
+      return false;
+    } finally {
+      saving = false;
+    }
+  }
+
+  async function createUser(event: SubmitEvent) {
+    event.preventDefault();
+    if (!draft.username.trim()) {
+      message = {
+        type: "error",
+        content: "Username is required",
+      };
+      return;
+    }
+
+    const ok = await run(
+      () =>
+        authFetch(
+          "/plural/users",
+          {
+            method: "POST",
+            document: {
+              username: draft.username.trim(),
+              password: draft.password,
+              display_name: draft.displayName.trim() || undefined,
+              email: draft.email.trim() || undefined,
+              is_admin: draft.isAdmin,
+            },
+          },
+          "Failed to create user",
+        ),
+      "User created.",
+      "Failed to create user",
+    );
+    if (ok) cancelCreate();
+  }
+
+  function cancelCreate() {
+    creating = false;
+    draft = {
+      username: "",
+      displayName: "",
+      email: "",
+      password: "",
+      isAdmin: false,
+    };
+  }
+
+  function startEditing(user: User) {
+    editingId = user.id;
+    edit = {
+      displayName: user.display_name || "",
+      email: user.email || "",
+      password: "",
+      avatarUrl: user.avatar_url || "",
+      isAdmin: Boolean(user.is_admin),
+    };
+    message = null;
+  }
+
+  async function saveUser(user: User) {
+    // Only the owner may change someone's email, and only when it actually changed
+    const emailChange = auth.isOwner && edit.email.trim() !== (user.email || "") ? { email: edit.email.trim() || null } : {};
+
+    const ok = await run(
+      () =>
+        authFetch(
+          `/plural/users/${user.id}`,
+          {
+            method: "PUT",
+            document: {
+              display_name: edit.displayName.trim() || null,
+              avatar_url: edit.avatarUrl.trim() || null,
+              is_admin: edit.isAdmin,
+              ...emailChange,
+              ...(edit.password ? { password: edit.password } : {}),
+            },
+          },
+          "Failed to update user",
+        ),
+      `Updated @${user.username} successfully!`,
+      "Failed to update user",
+    );
+    if (ok) editingId = null;
+  }
+
+  async function deleteUser(user: User) {
+    if (user.id === myId) {
+      message = {
+        type: "error",
+        content: "Cannot delete your own account",
+      };
+      return;
+    }
+    if (!confirm(`Delete user "${user.username}"? This action cannot be undone.`)) return;
+
+    await run(
+      () => authFetch(`/plural/users/${user.id}`, { method: "DELETE" }, "Failed to delete user"),
+      "User deleted successfully!",
+      "Failed to delete user",
+    );
+  }
+</script>
+
+<svelte:head>
+  <title>User manager · Plural System</title>
+</svelte:head>
+
+<div class="page">
+  <PageHead
+    eyebrow="Owner"
+    title="User manager"
+    subtitle="Manage system users, roles and permissions"
+    back={{
+      href: "/owner/dash",
+      label: "Back to dashboard",
+    }}
+  />
+
+  <Message {message} />
+
+  {#if loading}
+    <p class="muted">Loading…</p>
+  {:else}
+    {#if creating}
+      <form class="panel stack" onsubmit={createUser}>
+        <h2>Create new user</h2>
+        <div class="grid2">
+          <label class="field">
+            <span>Username *</span>
+            <input type="text" bind:value={draft.username} placeholder="Enter username" disabled={saving} />
+          </label>
+          <label class="field">
+            <span>Display name</span>
+            <input type="text" bind:value={draft.displayName} placeholder="Optional display name" disabled={saving} />
+          </label>
+        </div>
+        <label class="field">
+          <span>Email</span>
+          <input type="email" bind:value={draft.email} placeholder="[email protected]" disabled={saving} />
+        </label>
+        <label class="field">
+          <span>Password</span>
+          <input required minlength="8" type="password" autocomplete="new-password" bind:value={draft.password} disabled={saving} />
+        </label>
+        <label class="check"><input type="checkbox" bind:checked={draft.isAdmin} disabled={saving} /> Admin privileges</label>
+        <div class="buttons">
+          <button type="submit" class="primary" disabled={saving}>{saving ? "Creating..." : "Create user"}</button>
+          <button type="button" disabled={saving} onclick={cancelCreate}>Cancel</button>
+        </div>
+      </form>
+    {:else}
+      <div><button type="button" class="primary" onclick={() => (creating = true)}>
+        <IcPersonAdd width="16" height="16" />Create new user
+      </button></div>
+    {/if}
+
+    <section class="panel">
+      <h2>All users</h2>
+      <p class="muted small">{users.length} user{users.length !== 1 ? "s" : ""} in the system · {users.filter((u) => u.is_admin).length} admin(s)</p>
+
+      {#each users as user (user.id)}
+        <div class="user">
+          <div class="user-row">
+            <img class="member-avatar avatar-sm" src={user.avatar_url || fallbackAvatar} alt="" onerror={avatarFallback} />
+            <div class="grow">
+              <p>
+                <strong>{user.display_name || user.username}</strong>
+                {#if user.is_owner}<span class="badge accent">Owner</span>{/if}
+                {#if user.is_admin}<span class="badge danger">Admin</span>{/if}
+                {#if user.id === myId}<span class="badge">You</span>{/if}
+              </p>
+              <p class="muted small">@{user.username} · {user.email || "no email on file"}</p>
+            </div>
+            <div class="buttons">
+              <button type="button" class="small" disabled={saving} onclick={() => (editingId === user.id ? (editingId = null) : startEditing(user))}>
+                {editingId === user.id ? "Close" : "Edit"}
+              </button>
+              {#if user.id !== myId}
+                <button type="button" class="small danger" disabled={saving} onclick={() => deleteUser(user)}>Delete</button>
+              {/if}
+            </div>
+          </div>
+
+          {#if editingId === user.id}
+            <div class="stack edit">
+              <div class="grid2">
+                <label class="field">
+                  <span>Display name</span>
+                  <input type="text" bind:value={edit.displayName} placeholder="Display name" disabled={saving} />
+                </label>
+                <label class="field">
+                  <span>Email</span>
+                  <input type="email" bind:value={edit.email} placeholder="[email protected]" disabled={saving || !auth.isOwner} />
+                </label>
+              </div>
+              <label class="field">
+                <span>Avatar URL</span>
+                <input type="url" bind:value={edit.avatarUrl} placeholder="https://example.com/avatar.png" disabled={saving} />
+                <small class="muted">Avatars are external image links — no uploads</small>
+              </label>
+              {#if !user.is_owner}
+                <label class="field">
+                  <span>New password</span>
+                  <input type="password" autocomplete="new-password" bind:value={edit.password} disabled={saving} />
+                </label>
+              {/if}
+              <label class="check"><input type="checkbox" bind:checked={edit.isAdmin} disabled={saving} /> Admin privileges</label>
+              <div class="buttons">
+                <button type="button" class="primary" disabled={saving} onclick={() => saveUser(user)}>{saving ? "Saving..." : "Save changes"}</button>
+                <button type="button" disabled={saving} onclick={() => (editingId = null)}>Cancel</button>
+              </div>
+            </div>
+          {/if}
+        </div>
+      {:else}
+        <p class="muted">No users found</p>
+      {/each}
+    </section>
+  {/if}
+</div>
+
+<style>
+  h2,
+  p {
+    margin: 0;
+  }
+
+  h2 {
+    font-size: 1.15rem;
+  }
+
+  .user {
+    padding: 0.75rem 0;
+    border-top: 1px solid var(--line);
+  }
+
+  .user-row {
+    display: flex;
+    flex-wrap: wrap;
+    gap: 0.75rem;
+    align-items: center;
+  }
+
+  .user-row .badge {
+    margin-left: 0.25rem;
+  }
+
+  .edit {
+    margin-top: 0.75rem;
+    padding: 1rem;
+    border-radius: 0.75rem;
+    background: rgb(0 0 0 / 20%);
+  }
+</style>
diff --git a/web/src/routes/relationships/+page.svelte b/web/src/routes/relationships/+page.svelte
new file mode 100644
index 0000000..7f1f9b6
--- /dev/null
+++ b/web/src/routes/relationships/+page.svelte
@@ -0,0 +1,127 @@
+<!-- src/routes/relationships/+page.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import type { PluralMember } from "#lib/types.ts";
+  import { avatarFallback, fallbackAvatar, memberName } from "#lib";
+  import PageHead from "#lib/components/PageHead.svelte";
+  import RelationshipGraph from "#lib/components/RelationshipGraph.svelte";
+  import DiscordEmbed from "#lib/components/DiscordEmbed.svelte";
+
+  let { data } = $props();
+
+  function find(identifier: string) {
+    return data.members.find((member) => member.id === identifier || member.name === identifier);
+  }
+
+  // The same links as the map, as a plain list. Two crushes on each other
+  // fold into one mutual crush
+  const pairs = $derived.by(() => {
+    const list: { edge: (typeof data.relationships)[number]; a: PluralMember; b: PluralMember; mutual: boolean }[] = [];
+    for (const edge of data.relationships) {
+      const a = find(edge.members[0]);
+      const b = find(edge.members[1]);
+      if (!a || !b) continue;
+      const reverse =
+        edge.type === "crush" &&
+        list.find((pair) => pair.edge.type === "crush" && pair.a.id === b.id && pair.b.id === a.id);
+      if (reverse) reverse.mutual = true;
+      else list.push({ edge, a, b, mutual: false });
+    }
+    return list;
+  });
+
+  function label(pair: (typeof pairs)[number]): string {
+    if (pair.edge.type !== "crush") return pair.edge.type;
+    return pair.mutual ? "mutual crush" : "has a crush on";
+  }
+</script>
+
+<svelte:head>
+  <title>Relationship Map · Plural System</title>
+</svelte:head>
+
+<DiscordEmbed
+  title="Relationship Map"
+  description="Who is dating who across the system."
+/>
+
+<div class="page">
+  <PageHead
+    eyebrow="// system.relationships"
+    title="Relationship Map"
+    subtitle="Who is dating who across the system"
+    back={{
+      href: "/",
+      label: "Back to home",
+    }}
+  />
+
+  {#if pairs.length === 0}
+    <p class="panel muted">No relationships to show yet</p>
+  {:else}
+    <section class="panel">
+      <RelationshipGraph members={data.members} relationships={data.relationships} />
+    </section>
+
+    <section class="panel">
+      <h2>Everyone, in pairs</h2>
+      <ul class="pairs">
+        {#each pairs as pair (pair.edge.id)}
+          <li>
+            <a class="who" href="/{pair.a.name ?? pair.a.id}">
+              <img class="member-avatar avatar-sm" src={pair.a.avatar_url || fallbackAvatar} alt="" onerror={avatarFallback} />{memberName(pair.a)}
+            </a>
+            <span class="badge" class:accent={pair.edge.type !== "crush"}>{label(pair)}</span>
+            <a class="who" href="/{pair.b.name ?? pair.b.id}">
+              <img class="member-avatar avatar-sm" src={pair.b.avatar_url || fallbackAvatar} alt="" onerror={avatarFallback} />{memberName(pair.b)}
+            </a>
+            {#if pair.edge.since}<span class="muted small">since {pair.edge.since}</span>{/if}
+          </li>
+        {/each}
+      </ul>
+    </section>
+  {/if}
+</div>
+
+<style>
+  h2 {
+    margin: 0;
+    font-size: 1.05rem;
+  }
+
+  .pairs {
+    display: grid;
+    grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
+    gap: 0.6rem 1.5rem;
+    margin: 0;
+    padding: 0;
+    list-style: none;
+  }
+
+  .pairs li {
+    display: flex;
+    flex-wrap: wrap;
+    gap: 0.5rem;
+    align-items: center;
+  }
+
+  .who {
+    display: inline-flex;
+    gap: 0.45rem;
+    align-items: center;
+    text-decoration: none;
+  }
+
+  .who:hover {
+    color: var(--accent);
+  }
+
+  .avatar-sm {
+    width: 1.75rem;
+    height: 1.75rem;
+  }
+</style>
diff --git a/web/src/routes/relationships/+page.ts b/web/src/routes/relationships/+page.ts
new file mode 100644
index 0000000..01699ff
--- /dev/null
+++ b/web/src/routes/relationships/+page.ts
@@ -0,0 +1,23 @@
+/* src/routes/relationships/+page.ts
+ * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+ * Licensed under the DASL-1.0 Licence.
+ * See LICENCE.md in the project root for full licence information.
+ */
+
+import type { PageLoad } from "./$types";
+import { publicClient } from "#lib/api.ts";
+
+export const load: PageLoad = async ({ fetch, depends, url }) => {
+  depends("api:public");
+  const api = publicClient(fetch, url.origin);
+
+  const [members, relationships] = await Promise.all([
+    api.getMembers().catch(() => []),
+    api.getRelationships().catch(() => null),
+  ]);
+
+  return {
+    members,
+    relationships: relationships?.relationships ?? [],
+  };
+};
diff --git a/web/src/routes/user/+layout.ts b/web/src/routes/user/+layout.ts
new file mode 100644
index 0000000..0039f72
--- /dev/null
+++ b/web/src/routes/user/+layout.ts
@@ -0,0 +1,8 @@
+/* src/routes/user/+layout.ts
+ * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+ * Licensed under the DASL-1.0 Licence.
+ * See LICENCE.md in the project root for full licence information.
+ */
+
+// Signed-in pages: the token lives in localStorage, so they render in the browser
+export const ssr = false;
diff --git a/web/src/routes/user/dash/+page.svelte b/web/src/routes/user/dash/+page.svelte
new file mode 100644
index 0000000..338d040
--- /dev/null
+++ b/web/src/routes/user/dash/+page.svelte
@@ -0,0 +1,47 @@
+<!-- src/routes/user/dash/+page.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.2 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import IcApi from "~icons/ic/outline-api";
+  import IcBarChart from "~icons/ic/outline-bar-chart";
+  import IcFavorite from "~icons/ic/outline-favorite";
+  import Protected from "#lib/components/Protected.svelte";
+  import PageHead from "#lib/components/PageHead.svelte";
+</script>
+
+<svelte:head>
+  <title>User dashboard · Plural System</title>
+</svelte:head>
+
+<Protected>
+  <div class="page">
+    <PageHead
+      title="User dashboard"
+      back={{
+        href: "/",
+        label: "Back to home",
+      }}
+    />
+
+    <div class="tiles">
+      <a class="tile" href="/user/docs">
+        <span class="tile-icon"><IcApi width="22" height="22" /></span>
+        <h2>API docs</h2>
+        <p>Every endpoint on this site</p>
+      </a>
+      <a class="tile" href="/user/metrics">
+        <span class="tile-icon"><IcBarChart width="22" height="22" /></span>
+        <h2>Metrics</h2>
+        <p>Fronting and switching statistics</p>
+      </a>
+      <a class="tile" href="/relationships">
+        <span class="tile-icon"><IcFavorite width="22" height="22" /></span>
+        <h2>Relationship map</h2>
+        <p>Who is dating who</p>
+      </a>
+    </div>
+  </div>
+</Protected>
diff --git a/web/src/routes/user/docs/+page.svelte b/web/src/routes/user/docs/+page.svelte
new file mode 100644
index 0000000..1bcc743
--- /dev/null
+++ b/web/src/routes/user/docs/+page.svelte
@@ -0,0 +1,140 @@
+<!-- src/routes/user/docs/+page.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.2 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import { dumps } from "jpcl-lang/core";
+  import { onMount } from "svelte";
+  import { errorText, type Message as MessageType } from "#lib";
+  import { authFetch } from "#lib/api.ts";
+  import { JPCL_MEDIA_TYPE } from "#lib/jpcl.ts";
+  import Protected from "#lib/components/Protected.svelte";
+  import PageHead from "#lib/components/PageHead.svelte";
+  import Message from "#lib/components/Message.svelte";
+
+  interface Operation {
+    summary?: string;
+    tags?: string[];
+    security?: unknown[];
+  }
+
+  interface Endpoint {
+    method: string;
+    path: string;
+    summary: string;
+    signedIn: boolean;
+  }
+
+  let spec = $state<{ paths: Record<string, Record<string, Operation>> } | null>(null);
+  let message = $state<MessageType>(null);
+
+  // Endpoints grouped by their first tag, in spec order
+  const groups = $derived.by(() => {
+    const byTag = new Map<string, Endpoint[]>();
+    for (const [path, methods] of Object.entries(spec?.paths ?? {})) {
+      for (const [method, operation] of Object.entries(methods)) {
+        const tag = operation.tags?.[0] ?? "Other";
+        const list = byTag.get(tag) ?? [];
+        list.push({
+          method: method.toUpperCase(),
+          path,
+          summary: operation.summary ?? "",
+          signedIn: Boolean(operation.security?.length),
+        });
+        byTag.set(tag, list);
+      }
+    }
+    return [...byTag];
+  });
+
+  function download(format: "jp" | "json") {
+    if (!spec) return;
+    const jpcl = format === "jp";
+    const text = jpcl ? dumps(spec) : JSON.stringify(spec, null, 2);
+    const blob = new Blob([text], { type: jpcl ? JPCL_MEDIA_TYPE : "application/json" });
+    const link = document.createElement("a");
+    link.href = URL.createObjectURL(blob);
+    link.download = `openapi.${format}`;
+    link.click();
+    URL.revokeObjectURL(link.href);
+  }
+
+  onMount(async () => {
+    try {
+      spec = await authFetch("/openapi.jp", {}, "Failed to load the API spec");
+    } catch (err) {
+      message = {
+        type: "error",
+        content: errorText(err, "Failed to load the API spec"),
+      };
+    }
+  });
+</script>
+
+<svelte:head>
+  <title>API docs · Plural System</title>
+</svelte:head>
+
+<Protected>
+  <div class="page">
+    <PageHead
+      eyebrow="// system.api"
+      title="API docs"
+      subtitle="Every endpoint on this site"
+      back={{
+        href: "/",
+        label: "Back to home",
+      }}
+    />
+
+    <Message {message} />
+
+    {#if spec}
+      <div class="buttons">
+        <button type="button" class="primary" onclick={() => download("jp")}>Download JPCL</button>
+        <button type="button" onclick={() => download("json")}>Download JSON</button>
+      </div>
+
+      {#each groups as [tag, endpoints] (tag)}
+        <section class="panel">
+          <h2>{tag}</h2>
+          <ul class="endpoints">
+            {#each endpoints as endpoint (endpoint.method + endpoint.path)}
+              <li>
+                <span class="badge">{endpoint.method}</span>
+                <code>{endpoint.path}</code>
+                {#if endpoint.signedIn}<span class="badge accent">Sign-in</span>{/if}
+                <span class="muted">{endpoint.summary}</span>
+              </li>
+            {/each}
+          </ul>
+        </section>
+      {/each}
+    {:else if !message}
+      <p class="muted">Loading the API spec…</p>
+    {/if}
+  </div>
+</Protected>
+
+<style>
+  .endpoints {
+    display: grid;
+    gap: 0.5rem;
+    margin: 0;
+    padding: 0;
+    list-style: none;
+  }
+
+  .endpoints li {
+    display: flex;
+    flex-wrap: wrap;
+    align-items: baseline;
+    gap: 0.5rem;
+  }
+
+  .endpoints code {
+    overflow-wrap: anywhere;
+  }
+</style>
diff --git a/web/src/routes/user/login/+page.svelte b/web/src/routes/user/login/+page.svelte
new file mode 100644
index 0000000..88a3d72
--- /dev/null
+++ b/web/src/routes/user/login/+page.svelte
@@ -0,0 +1,82 @@
+<!-- src/routes/user/login/+page.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import IcKey from "~icons/ic/outline-key";
+  import { goto } from "$app/navigation";
+  import { page } from "$app/state";
+  import { client } from "#lib/api.ts";
+  import { auth } from "#lib/auth.svelte.ts";
+
+  let username = $state("");
+  let password = $state("");
+  let pending = $state(false);
+  let error = $state("");
+
+  async function signIn(event: SubmitEvent) {
+    event.preventDefault();
+    if (pending) return;
+    pending = true;
+    error = "";
+
+    try {
+      auth.signIn(await client.localSignIn(username, password));
+      password = "";
+
+      const from = page.url.searchParams.get("from") || "/";
+      const target = /^\/(?![\/\\])/.test(from) ? from : "/";
+      await goto(target === "/admin/login" ? "/admin/dash" : target, {
+        replaceState: true,
+      });
+    } catch (failure) {
+      error = failure instanceof Error ? failure.message : "Sign-in failed.";
+    } finally {
+      pending = false;
+    }
+  }
+</script>
+
+<svelte:head>
+  <title>Sign in · Plural System</title>
+  <meta name="robots" content="noindex" />
+</svelte:head>
+
+<div class="page narrow">
+  <section class="panel">
+    <h1>Sign in</h1>
+    {#if error}
+      <p class="notice error" role="alert">{error}</p>
+    {/if}
+
+    <form onsubmit={signIn}>
+      <label>
+        Username
+        <input required autocomplete="username" bind:value={username} />
+      </label>
+      <label>
+        Password
+        <input required type="password" autocomplete="current-password" bind:value={password} />
+      </label>
+      <button class="primary" disabled={pending}>
+        <IcKey width="18" height="18" />
+        {pending ? "Signing in…" : "Sign in"}
+      </button>
+    </form>
+  </section>
+</div>
+
+<style>
+  form,
+  label {
+    display: grid;
+    gap: 0.5rem;
+  }
+
+  form {
+    gap: 1rem;
+    justify-items: start;
+  }
+</style>
diff --git a/web/src/routes/user/metrics/+page.svelte b/web/src/routes/user/metrics/+page.svelte
new file mode 100644
index 0000000..077ce4d
--- /dev/null
+++ b/web/src/routes/user/metrics/+page.svelte
@@ -0,0 +1,390 @@
+<!-- src/routes/user/metrics/+page.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import { onMount } from "svelte";
+  import { avatarFallback, fallbackAvatar, type Message as MessageType } from "#lib";
+  import { client, readApiResponse, readToken } from "#lib/api.ts";
+  import { JPCL_MEDIA_TYPE } from "#lib/jpcl.ts";
+  import PageHead from "#lib/components/PageHead.svelte";
+  import Protected from "#lib/components/Protected.svelte";
+  import Message from "#lib/components/Message.svelte";
+
+  type Timeframe = "24h" | "48h" | "5d" | "7d" | "30d";
+
+  type MemberMetric = {
+    id: string;
+    name: string;
+    display_name: string;
+    avatar_url?: string;
+    total_seconds: number;
+    total_percent: number;
+  } & Record<Timeframe, number>;
+
+  type FrontingMetrics = {
+    total_time: number;
+    members: Record<string, MemberMetric>;
+  };
+
+  type SwitchMetrics = {
+    total_switches: number;
+    avg_switches_per_day: number;
+    timeframes: Record<Timeframe, number>;
+  };
+
+  const COLORS = [
+    "#8b5cf6",
+    "#ec4899",
+    "#f59e0b",
+    "#10b981",
+    "#3b82f6",
+    "#ef4444",
+    "#14b8a6",
+    "#f97316",
+    "#6366f1",
+    "#84cc16",
+  ];
+
+  const TIMEFRAMES: { value: Timeframe; label: string }[] = [
+    {
+      value: "24h",
+      label: "Last 24 Hours",
+    },
+    {
+      value: "48h",
+      label: "Last 48 Hours",
+    },
+    {
+      value: "5d",
+      label: "Last 5 Days",
+    },
+    {
+      value: "7d",
+      label: "Last 7 Days",
+    },
+    {
+      value: "30d",
+      label: "Last 30 Days",
+    },
+  ];
+
+  let fronting = $state<FrontingMetrics | null>(null);
+  let switches = $state<SwitchMetrics | null>(null);
+  let timeframe = $state<Timeframe>("7d");
+  let loading = $state(true);
+  let message = $state<MessageType>(null);
+
+  const timeframeLabel = $derived(TIMEFRAMES.find((t) => t.value === timeframe)?.label ?? "");
+
+  // The ten members who fronted most in the chosen window
+  const top = $derived(
+    fronting
+      ? Object.values(fronting.members)
+          .filter((m) => m[timeframe] > 0)
+          .sort((a, b) => b[timeframe] - a[timeframe])
+          .slice(0, 10)
+      : [],
+  );
+  const topTotal = $derived(top.reduce((sum, m) => sum + m[timeframe], 0));
+
+  // Donut slices as stroke-dasharray arcs on one circle
+  const RADIUS = 80;
+  const CIRCUMFERENCE = 2 * Math.PI * RADIUS;
+  const slices = $derived.by(() => {
+    let offset = 0;
+    return top.map((member, index) => {
+      const length = topTotal ? (member[timeframe] / topTotal) * CIRCUMFERENCE : 0;
+      const slice = {
+        member,
+        colour: COLORS[index % COLORS.length],
+        dash: `${length} ${CIRCUMFERENCE - length}`,
+        offset: -offset,
+        percent: topTotal ? (member[timeframe] / topTotal) * 100 : 0,
+      };
+      offset += length;
+      return slice;
+    });
+  });
+
+  const switchMax = $derived(switches ? Math.max(1, ...Object.values(switches.timeframes)) : 1);
+
+  function duration(seconds: number): string {
+    const hours = Math.floor(seconds / 3600);
+    const minutes = Math.floor((seconds % 3600) / 60);
+    if (hours > 24) return `${Math.floor(hours / 24)}d ${hours % 24}h`;
+    return `${hours}h ${minutes}m`;
+  }
+
+  onMount(async () => {
+    const token = readToken();
+    const headers = new Headers({ Accept: JPCL_MEDIA_TYPE });
+    if (token) headers.set("Authorization", `Bearer ${token}`);
+    try {
+      const [frontingRes, switchRes] = await Promise.all([
+        fetch(`${client.baseUrl}/plural/metrics/fronting-time?days=30`, { headers }),
+        fetch(`${client.baseUrl}/plural/metrics/switch-frequency?days=30`, { headers }),
+      ]);
+      if (frontingRes.ok && switchRes.ok) {
+        const [frontingData, switchData] = await Promise.all([
+          readApiResponse<FrontingMetrics>(frontingRes),
+          readApiResponse<SwitchMetrics>(switchRes),
+        ]);
+        fronting = frontingData;
+        switches = switchData;
+      } else {
+        message = {
+          type: "error",
+          content:
+            frontingRes.status === 401 || switchRes.status === 401
+              ? "Sign in to see metrics"
+              : "Failed to fetch metrics",
+        };
+      }
+    } catch {
+      message = {
+        type: "error",
+        content: "Network error occurred",
+      };
+    } finally {
+      loading = false;
+    }
+  });
+</script>
+
+<svelte:head>
+  <title>Metrics · Plural System</title>
+</svelte:head>
+
+<Protected>
+  <div class="page">
+    <PageHead
+      eyebrow="// system.metrics"
+      title="Metrics"
+      subtitle="System fronting and switching statistics"
+      back={{
+        href: "/",
+        label: "Back to home",
+      }}
+    />
+
+    <Message {message} />
+
+    {#if loading}
+      <p class="muted">Loading metrics…</p>
+    {:else}
+      <label class="field timeframe">
+        <span>Timeframe</span>
+        <select bind:value={timeframe}>
+          {#each TIMEFRAMES as option (option.value)}
+            <option value={option.value}>{option.label}</option>
+          {/each}
+        </select>
+      </label>
+
+      {#if switches}
+        <div class="tiles">
+          <div class="panel stat">
+            <p class="eyebrow">Total switches</p>
+            <p class="value">{switches.total_switches}</p>
+            <p class="muted small">Last 30 days</p>
+          </div>
+          <div class="panel stat">
+            <p class="eyebrow">Avg per day</p>
+            <p class="value">{switches.avg_switches_per_day.toFixed(1)}</p>
+            <p class="muted small">Switches per day</p>
+          </div>
+          <div class="panel stat">
+            <p class="eyebrow">Selected period</p>
+            <p class="value">{switches.timeframes[timeframe]}</p>
+            <p class="muted small">{timeframeLabel}</p>
+          </div>
+        </div>
+      {/if}
+
+      {#if fronting && top.length > 0}
+        <section class="panel">
+          <h2>Fronting time distribution</h2>
+          <p class="muted small">Top fronters for {timeframeLabel.toLowerCase()}</p>
+          <div class="donut-row">
+            <svg viewBox="0 0 200 200" class="donut" role="img" aria-label="Fronting time by member">
+              <g transform="rotate(-90 100 100)">
+                {#each slices as slice (slice.member.id)}
+                  <circle
+                    cx="100"
+                    cy="100"
+                    r={RADIUS}
+                    fill="none"
+                    stroke={slice.colour}
+                    stroke-width="28"
+                    stroke-dasharray={slice.dash}
+                    stroke-dashoffset={slice.offset}
+                  >
+                    <title>{slice.member.display_name || slice.member.name}: {duration(slice.member[timeframe])}</title>
+                  </circle>
+                {/each}
+              </g>
+            </svg>
+            <ul class="legend">
+              {#each slices as slice (slice.member.id)}
+                <li>
+                  <span class="key" style:background={slice.colour}></span>
+                  {slice.member.display_name || slice.member.name}
+                  <span class="muted">{slice.percent.toFixed(0)}%</span>
+                </li>
+              {/each}
+            </ul>
+          </div>
+        </section>
+      {/if}
+
+      {#if switches}
+        <section class="panel">
+          <h2>Switch frequency over time</h2>
+          <p class="muted small">Number of switches across different timeframes</p>
+          <div class="bars">
+            {#each TIMEFRAMES as option (option.value)}
+              <div class="bar-col">
+                <span class="small">{switches.timeframes[option.value]}</span>
+                <div class="bar" style:height="{(switches.timeframes[option.value] / switchMax) * 100}%"></div>
+                <span class="muted small">{option.value}</span>
+              </div>
+            {/each}
+          </div>
+        </section>
+      {/if}
+
+      {#if fronting && top.length > 0}
+        <section class="panel">
+          <h2>Top fronters</h2>
+          <p class="muted small">Most active members for {timeframeLabel.toLowerCase()}</p>
+          <ol class="ranking">
+            {#each top as member, index (member.id)}
+              <li>
+                <span class="rank">{index + 1}</span>
+                <img class="member-avatar avatar-sm" src={member.avatar_url || fallbackAvatar} alt="" onerror={avatarFallback} />
+                <div class="grow">
+                  <p>{member.display_name || member.name} <span class="muted small">{duration(member[timeframe])}</span></p>
+                  <div class="meter"><div style:width="{(member[timeframe] / top[0]![timeframe]) * 100}%"></div></div>
+                </div>
+              </li>
+            {/each}
+          </ol>
+        </section>
+      {:else if fronting}
+        <p class="panel muted">No fronting data available for the selected timeframe</p>
+      {/if}
+    {/if}
+  </div>
+</Protected>
+
+<style>
+  h2,
+  p {
+    margin: 0;
+  }
+
+  h2 {
+    font-size: 1.15rem;
+  }
+
+  .timeframe {
+    max-width: 16rem;
+  }
+
+  .stat .value {
+    font-size: 2rem;
+    font-weight: 700;
+  }
+
+  .donut-row {
+    display: flex;
+    flex-wrap: wrap;
+    gap: 2rem;
+    align-items: center;
+  }
+
+  .donut {
+    width: min(16rem, 100%);
+  }
+
+  .legend {
+    display: grid;
+    gap: 0.35rem;
+    margin: 0;
+    padding: 0;
+    list-style: none;
+  }
+
+  .legend li {
+    display: flex;
+    gap: 0.5rem;
+    align-items: center;
+  }
+
+  .key {
+    width: 0.8rem;
+    height: 0.8rem;
+    border-radius: 0.2rem;
+  }
+
+  .bars {
+    display: grid;
+    grid-template-columns: repeat(5, 1fr);
+    gap: 1rem;
+    align-items: end;
+    height: 14rem;
+  }
+
+  .bar-col {
+    display: flex;
+    flex-direction: column;
+    gap: 0.35rem;
+    align-items: center;
+    justify-content: flex-end;
+    height: 100%;
+  }
+
+  .bar {
+    width: 100%;
+    min-height: 2px;
+    border-radius: 0.5rem 0.5rem 0 0;
+    background: var(--accent);
+  }
+
+  .ranking {
+    display: grid;
+    gap: 0.6rem;
+    margin: 0;
+    padding: 0;
+    list-style: none;
+  }
+
+  .ranking li {
+    display: flex;
+    gap: 0.75rem;
+    align-items: center;
+  }
+
+  .rank {
+    width: 1.5rem;
+    color: var(--accent);
+    font-weight: 700;
+    text-align: right;
+  }
+
+  .meter {
+    height: 0.4rem;
+    margin-top: 0.25rem;
+    overflow: hidden;
+    border-radius: 999px;
+    background: var(--line);
+  }
+
+  .meter div {
+    height: 100%;
+    background: var(--accent);
+  }
+</style>
diff --git a/web/src/routes/user/profile/+page.svelte b/web/src/routes/user/profile/+page.svelte
new file mode 100644
index 0000000..13b251e
--- /dev/null
+++ b/web/src/routes/user/profile/+page.svelte
@@ -0,0 +1,70 @@
+<!-- src/routes/user/profile/+page.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import IcPerson from "~icons/ic/outline-person";
+  import { auth } from "#lib/auth.svelte.ts";
+  import Protected from "#lib/components/Protected.svelte";
+
+  let broken = $state(false);
+</script>
+
+<svelte:head>
+  <title>Profile · Plural System</title>
+</svelte:head>
+
+<Protected>
+  <div class="page narrow">
+    <section class="panel profile">
+      <p class="eyebrow">Account</p>
+      {#if auth.user}
+        {#if auth.user.avatar_url && !broken}
+          <img class="member-avatar avatar" src={auth.user.avatar_url} alt="" onerror={() => (broken = true)} />
+        {:else}
+          <span class="avatar placeholder"><IcPerson width="48" height="48" /></span>
+        {/if}
+        <h1>{auth.user.display_name || auth.user.username}</h1>
+        <p class="chips">
+          {#if auth.user.is_owner}<span class="badge accent">Owner</span>{/if}
+          {#if auth.user.is_admin}<span class="badge">Admin</span>{/if}
+        </p>
+        <p class="muted">@{auth.user.username}</p>
+        <div class="buttons">
+          <a class="btn primary" href="/user/profile/edit">Edit profile</a>
+          <a class="btn" href="/">Back to home</a>
+        </div>
+      {:else}
+        <p class="muted">User data not available.</p>
+        <div><a class="btn" href="/">Back to home</a></div>
+      {/if}
+    </section>
+  </div>
+</Protected>
+
+<style>
+  .profile {
+    align-items: center;
+    text-align: center;
+  }
+
+  h1,
+  p {
+    margin: 0;
+  }
+
+  .avatar {
+    width: 7rem;
+    height: 7rem;
+  }
+
+  .placeholder {
+    display: grid;
+    place-items: center;
+    border-radius: 1rem;
+    background: var(--accent-dim);
+    color: var(--accent);
+  }
+</style>
diff --git a/web/src/routes/user/profile/edit/+page.svelte b/web/src/routes/user/profile/edit/+page.svelte
new file mode 100644
index 0000000..e3f7f83
--- /dev/null
+++ b/web/src/routes/user/profile/edit/+page.svelte
@@ -0,0 +1,164 @@
+<!-- src/routes/user/profile/edit/+page.svelte
+     Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+     Licensed under the DASL-1.0 Licence.
+     See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+  import IcPerson from "~icons/ic/outline-person";
+  import { errorText, type Message as MessageType } from "#lib";
+  import { authFetch } from "#lib/api.ts";
+  import { auth } from "#lib/auth.svelte.ts";
+  import Protected from "#lib/components/Protected.svelte";
+  import PageHead from "#lib/components/PageHead.svelte";
+  import Message from "#lib/components/Message.svelte";
+
+  const EMAIL_PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
+
+  let displayName = $state("");
+  let avatarUrl = $state("");
+  let email = $state("");
+  let seeded = false;
+  let broken = $state(false);
+  let saving = $state(false);
+  let message = $state<MessageType>(null);
+
+  // Fill the form once the user has loaded
+  $effect(() => {
+    if (seeded || !auth.user) return;
+    seeded = true;
+    displayName = auth.user.display_name || "";
+    avatarUrl = auth.user.avatar_url || "";
+    email = auth.user.email || "";
+  });
+
+  const previewable = $derived(/^https?:\/\/[^\s/]+\.[^\s/]+/.test(avatarUrl.trim()) || avatarUrl.startsWith("/"));
+  const avatarChanged = $derived(avatarUrl.trim() !== (auth.user?.avatar_url || ""));
+
+  async function save(event: SubmitEvent) {
+    event.preventDefault();
+    if (!auth.user) return;
+
+    const trimmedEmail = email.trim();
+    if (trimmedEmail && !EMAIL_PATTERN.test(trimmedEmail)) {
+      message = {
+        type: "error",
+        content: "Please enter a valid email address",
+      };
+      return;
+    }
+
+    saving = true;
+    message = null;
+    try {
+      await authFetch(
+        `/plural/users/${auth.user.id}`,
+        {
+          method: "PUT",
+          document: {
+            display_name: displayName.trim() || null,
+            avatar_url: avatarUrl.trim() || null,
+            email: trimmedEmail || null,
+          },
+        },
+        "Failed to update profile",
+      );
+      message = {
+        type: "success",
+        content: "Profile updated successfully",
+      };
+      await auth.refresh();
+    } catch (err) {
+      message = {
+        type: "error",
+        content: errorText(err, "Failed to update profile"),
+      };
+    } finally {
+      saving = false;
+    }
+  }
+</script>
+
+<svelte:head>
+  <title>Edit profile · Plural System</title>
+</svelte:head>
+
+<Protected>
+  <div class="page narrow">
+    <PageHead
+      eyebrow="Account"
+      title="Edit profile"
+      subtitle="Update your profile information"
+      back={{
+        href: "/user/profile",
+        label: "Cancel",
+      }}
+    />
+
+    <Message {message} />
+
+    {#if auth.user}
+      <form class="panel stack" onsubmit={save}>
+        <div class="field">
+          <span>Avatar</span>
+          <div class="avatar-row">
+            {#if avatarUrl && previewable && !broken}
+              <img class="member-avatar preview" src={avatarUrl.trim()} alt="Avatar preview" onerror={() => (broken = true)} onload={() => (broken = false)} />
+            {:else}
+              <span class="preview placeholder"><IcPerson width="28" height="28" /></span>
+            {/if}
+            <input
+              id="avatarUrl"
+              type="url"
+              bind:value={avatarUrl}
+              oninput={() => (broken = false)}
+              placeholder="https://example.com/avatar.png"
+            />
+            {#if avatarChanged}
+              <button type="button" class="small" onclick={() => (avatarUrl = auth.user?.avatar_url || "")}>Reset</button>
+            {/if}
+          </div>
+          <small class="muted">Paste a direct link to an image (square recommended)</small>
+        </div>
+
+        <label class="field">
+          <span>Display name</span>
+          <input id="displayName" type="text" bind:value={displayName} placeholder="Enter display name" />
+          <small class="muted">Leave blank to use username: @{auth.user.username}</small>
+        </label>
+
+        <label class="field">
+          <span>Contact email</span>
+          <input id="email" type="email" bind:value={email} placeholder="[email protected]" autocomplete="email" />
+          <small class="muted">Optional contact address.</small>
+        </label>
+
+        <div>
+          <button type="submit" class="primary" disabled={saving}>{saving ? "Saving..." : "Save changes"}</button>
+        </div>
+      </form>
+    {/if}
+  </div>
+</Protected>
+
+<style>
+  .avatar-row {
+    display: flex;
+    gap: 0.75rem;
+    align-items: center;
+  }
+
+  .preview {
+    flex-shrink: 0;
+    width: 3.5rem;
+    height: 3.5rem;
+  }
+
+  .placeholder {
+    display: grid;
+    place-items: center;
+    border-radius: 0.75rem;
+    background: var(--accent-dim);
+    color: var(--accent);
+  }
+</style>
diff --git a/web/static/favicon.png b/web/static/favicon.png
new file mode 100644
index 0000000..a3d0162
Binary files /dev/null and b/web/static/favicon.png differ
diff --git a/web/static/favicon.svg b/web/static/favicon.svg
new file mode 100644
index 0000000..e11683a
--- /dev/null
+++ b/web/static/favicon.svg
@@ -0,0 +1,8 @@
+<!-- web/static/favicon.svg -->
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
+  <rect width="64" height="64" rx="14" fill="#251d2b"/>
+  <path d="M20 39 32 22l12 17H20Z" fill="none" stroke="#efe0ff" stroke-width="3"/>
+  <circle cx="32" cy="21" r="6" fill="#d9acff"/>
+  <circle cx="20" cy="39" r="6" fill="#d9acff"/>
+  <circle cx="44" cy="39" r="6" fill="#d9acff"/>
+</svg>
diff --git a/web/tsconfig.json b/web/tsconfig.json
new file mode 100644
index 0000000..0e38492
--- /dev/null
+++ b/web/tsconfig.json
@@ -0,0 +1,25 @@
+{
+  "extends": "$app/tsconfig",
+  "include": [
+    "src",
+    "*.ts"
+  ],
+  "exclude": [
+    "node_modules"
+  ],
+  "compilerOptions": {
+    "allowImportingTsExtensions": true,
+    "checkJs": false,
+    "strict": true,
+    "skipLibCheck": true,
+    "noUncheckedIndexedAccess": true,
+    "types": [
+      "$app/types",
+      "node"
+    ],
+    "rootDirs": [
+      ".",
+      "./.svelte-kit/types"
+    ]
+  }
+}
diff --git a/web/vite.config.ts b/web/vite.config.ts
new file mode 100644
index 0000000..d6bb095
--- /dev/null
+++ b/web/vite.config.ts
@@ -0,0 +1,35 @@
+/* vite.config.ts
+ * Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+ * Licensed under the DASL-1.0 Licence.
+ * See LICENCE.md in the project root for full licence information.
+ */
+
+import { sveltekit } from "@sveltejs/kit/vite";
+import { defineConfig } from "vite";
+import Icons from "unplugin-icons/vite";
+
+export default defineConfig({
+  plugins: [
+    sveltekit({
+      compilerOptions: {
+        // Runes everywhere except libraries
+        runes: ({ filename }) => (filename.split(/[/\\]/).includes("node_modules") ? undefined : true),
+      },
+      adapter: {
+        name: "rust-static",
+        async adapt(builder) {
+          const directory = "dist";
+          builder.rimraf(directory);
+          builder.writeClient(directory);
+          builder.writePrerendered(directory);
+          await builder.generateFallback(`${directory}/index.html`);
+        },
+      },
+    }),
+    // Turns each `~icons/<set>/<name>` import into an inline-SVG Svelte component at build time
+    Icons({
+      compiler: "svelte",
+      scale: 1,
+    }),
+  ],
+});