mirror of
https://github.com/BigBodyCobain/Shadowbroker.git
synced 2026-12-05 00:53:37 +01:00
Mail between two nodes that had just exchanged contact addresses never arrived readable. Fixes along the whole path, each covered by a test: - Status: the web UI's own requests get the full wormhole status, so it stops treating a ready node as not ready. - Invites: the owner node named in an invite is asked first, with an onion-sized timeout; an import that could not reach it finishes in the background and replaces the keyless contact it left behind. - Aliases: no one-sided mailbox alias is made up on compose; both sides address mail by node id until an alias is agreed. - Signing: each mailbox request is signed once, keeping polls under the sign rate limit. - MLS: the welcome is sent with the mail until the peer answers, and the receiver joins as the identity whose key package the sender used, with that identity's DH key. - Sender seal: a seal addressed to the node's DM identity opens even when the browser names the node's transport identity. - Gate rooms: the chat controller restarted the live stream and the room long-poll on every status refresh, about 60 requests a second, which exhausted local ports; it now reacts only to access changes, and the stream waits a minute between tries when there is no admin session. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ShadowBroker Frontend
Next.js 16 dashboard with MapLibre GL and Framer Motion.
Development
npm install
npm run dev # http://localhost:3000
API URL Configuration
The browser calls relative /api/* paths. The catch-all route handler at
src/app/api/[...path]/route.ts proxies those requests to the backend using
the server-side BACKEND_URL environment variable at request time.
This keeps the backend URL out of the client bundle and lets Docker or other deployments change the backend target without rebuilding the frontend.
Common Scenarios
| Scenario | Action needed |
|---|---|
Local dev (localhost:3000 + backend on 127.0.0.1:8000) |
None. The proxy defaults to http://127.0.0.1:8000. |
| Docker Compose | None. docker-compose.yml sets BACKEND_URL=http://backend:8000. |
| Backend on a different host or port | Set BACKEND_URL before starting the Next.js server/container. |
| Reverse proxy in front of the frontend | Point external clients at the frontend; keep BACKEND_URL set to the backend address reachable from the Next.js server. |
Setting BACKEND_URL
# Shell (Linux/macOS)
BACKEND_URL=http://myserver:8000 npm run dev
# PowerShell (Windows)
$env:BACKEND_URL="http://myserver:8000"; npm run dev
# Docker Compose
# Edit the frontend service environment or add a compose override:
# BACKEND_URL=http://myserver:8000
Theming
Dark mode is the default. A light/dark toggle is available in the left panel
toolbar. Theme preference is persisted in localStorage as sb-theme and
applied via the data-theme attribute on <html>. CSS variables in
globals.css define all structural colors for both themes.