How tdung1807/minecraft-server-online-check works
Minecraft Monitor polls one configured Minecraft Java server, keeps a current in-memory snapshot, and serves it to a browser through REST and SSE. The browser also has a polling fallback and displays live player information. A separate listener exposes readiness and Prometheus metrics. The README documents a separately deployed GitHub Pages frontend as well as the embedded frontend; deployment mechanics are omitted. Relationships are based on the shown source and README; unsampled deployment details are not inferred.
Main entry points: main.go Server bootstrap · server.go REST and SSE API · store.go Poller and state transitions · client.go Status ping client
Components 12
Startup and configuration
- Runtime configuration
internal/config/config.go - Server bootstrap
cmd/server/main.go
Minecraft polling
- Poller and state transitions
internal/monitor/store.go - Status ping client
internal/minecraft/client.go - Snapshot and subscribers
internal/monitor/store.go
HTTP and monitoring
- REST and SSE API
internal/httpapi/server.go - Metrics endpoint
internal/httpapi/server.go
Browser interface
- Embedded web assets
internal/httpapi/web/index.html - Live status interface
internal/httpapi/web/app.js
Other components
- Website visitor
- Minecraft server
- Metrics scraper
Connections 13
- Website visitor → Live status interface: views
README.md - Runtime configuration → Server bootstrap: configures
cmd/server/main.go - Server bootstrap → Poller and state transitions: starts
cmd/server/main.go - Server bootstrap → Status ping client: configures
cmd/server/main.go - Server bootstrap → REST and SSE API: serves HTTP
cmd/server/main.go - Server bootstrap → Metrics endpoint: serves metrics
cmd/server/main.go - Poller and state transitions → Status ping client: queries
internal/monitor/store.go - Status ping client → Minecraft server: TCP status ping
internal/minecraft/client.go - Poller and state transitions → Snapshot and subscribers: records results
internal/monitor/store.go - REST and SSE API → Snapshot and subscribers: reads and subscribes
internal/httpapi/server.go - REST and SSE API → Embedded web assets: serves embedded
internal/httpapi/server.go - Live status interface → REST and SSE API: fetches and streams
internal/httpapi/web/app.js - Metrics scraper → Metrics endpoint: scrapes
README.md