cyberdeck-urt)
- JavaScript 57.4%
- CSS 29.3%
- Python 6.5%
- HTML 6.2%
- Dockerfile 0.6%
|
|
||
|---|---|---|
| public | ||
| scripts | ||
| server | ||
| src | ||
| .dockerignore | ||
| .gitignore | ||
| Dockerfile | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| vite.config.js | ||
Cyberdeck UrT Arena: the stats site
A one-pager for the endless Urban Terror bot arena on the Mac mini (cyberdeck-urt). It shows the
match running right now, the season standings, charts (including headshot %), the Armory, the maps,
first blood, the Hall of Fame, awards and the wall of shame, and the resident human. Styled like
1999: olive drab meets GeoCities.
A fork of q3-arena-site (its history is kept here, so
git log shows where the Quake III version ends). Built with Vite and Chart.js, served by a tiny
dependency-free Node server.
Home network only. No Render, no Redis: it runs as the urt-site container on the Mac mini,
deployed by cyberdeck/macmini/urtsite/deploy.py, at http://urt.local (http://192.168.8.154:3008).
How data gets here
Every 2 minutes the arena's companion container (urt-companion, cyberdeck-urt/companion) folds the
server log into its stats and POSTs a public snapshot here:
POST /api/ingest Authorization: Bearer $INGEST_TOKEN (X-Game: urt)
The snapshot, the hit count and the highlight clip (if one is ever posted) are saved under
DATA_DIR (/data, the urt-site-data volume), so a restart serves data straight away.
| endpoint | |
|---|---|
GET /api/stats |
the latest snapshot, plus the hit count |
POST /api/ingest |
the companion's push (bearer token) |
POST /api/hit |
the hit counter; one count per visitor per 30 min |
GET /api/health |
the container's health check |
GET /sig/... |
forum signature images (server/sig.js) |
Develop
npm install
INGEST_TOKEN=dev-token-dev-token PORT=10000 DATA_DIR=/tmp/urt-site npm start # API + built page
npm run dev # Vite; proxies /api to :10000
CYBERDECK_STATE_DIR=/tmp/urt-state python3 ../cyberdeck-urt/companion/stats.py --collect # real stats from the server log
CYBERDECK_STATE_DIR=/tmp/urt-state python3 ../cyberdeck-urt/companion/stats.py --export > sample-snapshot.json
curl -X POST -H "Authorization: Bearer dev-token-dev-token" -H "Content-Type: application/json" \
--data @sample-snapshot.json localhost:10000/api/ingest
Art
Levelshots and weapon icons come from Urban Terror 4.3's own pk3s (freeware, © Frozen Sand); the
bots have no portraits in the game, so scripts/make_art.py draws one per bot in its skin's colors.
public/portraits/bots.json maps each bot to its portrait. A fan page, not affiliated with Frozen Sand.
Patch notes
public/changelog.json drives the "Patch notes" section: newest patch first, each with a date,
version, title and [tag, text] items (tags: new, fix, balance, change). Add an entry whenever the
arena or the site changes.