Co-Authored-By: Claude Opus 5.5 <[email protected]>
1.9 KiB
t5de-hub
T5DE's hub: accounts linked to IMVU accounts, presence, and (to come) the registry of community products and catalogs, T5DE-hosted rooms, and the moderation console. Part of T5DE (git.t5de.dev/t5de). Design: docs/design.md; what a room needs from a server: docs/imq-rooms.md.
What works
- Accounts: sign-up and sign-in (Argon2id passwords), sessions with CSRF protection. The first account is an admin.
- Linking IMVU accounts: the person puts a code in the account's tagline; the hub reads it from IMVU's public API. The most recent proof wins (an account linked elsewhere moves). Link caps per person (default 10).
- Age: an account counts as adult if IMVU says it's age verified or has Access Pass, checked by the hub.
- Proxy sign-in: OAuth 2.0 device codes (
t5de-proxy signinshows a code to enter at/device); Ed25519 JWT access tokens (keys at/.well-known/jwks.json) and rotating refresh tokens. - Presence: signed-in proxies keep a WebSocket (
/api/v1/realtime) telling the hub which IMVU account is in use and the community products it wears./onlineshows accounts that opted in, with the opt-in T5DE badge. - Console (moderators): counts, who's online (live), people search, link caps, bans, roles, audit log.
Running it
go run ./cmd/t5de-hub -dev
runs the hub at http://127.0.0.1:8080 with its own Postgres (downloaded once, kept in t5de-hub-data/). In
production: t5de-hub -db postgres://... -public-url https://hub.t5de.dev -listen :8080 -data /var/lib/t5de-hub
(the data directory holds the token signing key).
To point a T5DE proxy at it: t5de-proxy signin -hub http://127.0.0.1:8080.
Tests
go test ./... runs everything, the website and API against a real Postgres (embedded, downloaded on first run
and cached; T5DE_PG_CACHE sets where), or the Postgres at T5DE_TEST_DB (as CI does), and a fake IMVU API.