Standalone read-only dashboard for minecraft-survival.coder.kiwi.
- A file-backed API in api that discovers the mounted Minecraft world, reads
stats,advancements,usercache.json, andwhitelist.json, normalizes the data, and serves JSON endpoints. - A frontend in web that renders an overview dashboard, player leaderboard, and per-player detail pages.
- Tests for API parsing and frontend loading/empty/detail rendering.
- Dockerfiles for the API and frontend images.
The API mounts the Minecraft survival files read-only at DATA_DIR and discovers a world directory containing:
world/stats/*.jsonworld/advancements/*.jsonusercache.jsonwhitelist.json- optional
logs/latest.log
DATA_DIR defaults to /data.
GET /api/healthGET /api/summaryGET /api/playersGET /api/players/:uuidGET /api/players/:uuid/advancements
/api/players accepts:
sort=name|playtimeHours|deaths|playerKills|mobKills|advancementCount|totalDistanceTravelledKm|lastUpdated|isWhitelisteddirection=asc|descsearch=<player name or uuid fragment>
The API converts raw Minecraft stats into dashboard-facing fields:
- ticks to hours using
72,000 ticks = 1 hour - centimeters to kilometers for travel metrics
blocksMined,blocksPlaced,itemsCrafted, anditemsUsedare aggregated totalsrecentlySeenPlayersis derived from stat and advancement file modification times
Raw Minecraft stat keys do not leak into the frontend contract.
Install API dependencies:
cd api
npm installRun the API:
cd api
npm run devInstall frontend dependencies:
cd web
npm installRun the frontend:
cd web
npm run devSet VITE_API_BASE_URL in web/.env.example if the frontend is not reverse-proxied to /api.
cd api && npm test && npm run build
cd web && npm test && npm run buildThe app has no database and is intended to stay read-only against the Minecraft data directory.
The API container or process must be able to read a directory containing:
world/stats/*.jsonworld/advancements/*.jsonusercache.jsonwhitelist.json- optional
logs/latest.log
Set DATA_DIR to that directory. In production, mount it read-only.
- Mount the Minecraft survival data into the API container as read-only at
/data. - Keep the API scheduled on the same node as the Minecraft server if the source data is still exposed through
hostPath. - Publish the API image from Dockerfile.api.
- Publish the frontend image from Dockerfile.web.
- If you are using Kubernetes with
hostPath, the API pod needs node affinity or some equivalent scheduling rule so it lands on the same node that has the Minecraft files. - If you expose the app on
minecraft-survival.coder.kiwi, route/apito the API service and/to the frontend service.
- Run the API with
node api/dist/index.js. - Serve
web/distfrom nginx or Caddy. - Reverse-proxy
/apito the API process.