How leandrosalvas/csserver_wstats works
CS Server Stats combines a multi-server Counter-Strike 1.6 statistics service with a web dashboard. Players and administrators use the dashboard to view live status, rankings, player and match history, and manage servers; the browser reaches an Express API, which serves domain routes backed by MySQL, Redis, and game-server queries. Authentication and monitoring are additional branches. The README documents several capabilities whose implementation files were not sampled; those are represented at the subsystem level, and links are limited to documented or excerpted relationships.
Main entry points: index.js Express API · core.js Service aggregator · admin.js Admin controls · rankings.js Rankings and stats
Components 34
Web dashboard
- Dashboard shell
web/app.js - Shared UI
web/common.js - Rankings and maps
web/rankings.js - Player profiles
web/player.js - Live scoreboard
web/live.js - Match history
web/matches.js - Admin controls
web/admin.js - Server management
web/servers.js - System status
web/system.js - Login UI
web/login.js
API and domain services
- Express API
api/index.js - Rankings and stats
api/lib/routes/rankings.js - Top statistics
api/lib/routes/top.js - Match tracking
api/lib/routes/matches.js - Live endpoints
api/lib/routes/live.js - Authentication routes
api/lib/routes/auth.js - Admin routes
api/lib/routes/admin.js - Server controls
api/lib/routes/adminServers.js - User administration
api/lib/routes/adminUsers.js - System routes
api/lib/routes/system.js - Service aggregator
api/lib/core.js - Identity and RBAC
api/lib/auth.js - Server manager
api/lib/serverManager.js - Runtime configuration
api/lib/config.js
Data and live state
- Server state and polling
api/lib/serverCtx.js - Live data service
api/lib/live.js - Statistics database
api/lib/db.js - Cache and sessions
api/lib/cache.js
Operations and integrations
- Prometheus metrics
api/lib/metrics.js - Status alerts
api/lib/alerts.js - Discord bot
api/lib/discordBot.js
Other components
- Players and admins
- CS game servers
- MariaDB
Connections 39
- Players and admins → Dashboard shell: uses
README.md - Dashboard shell → Express API: requests data
README.md - Express API → Rankings and stats: registers
api/index.js - Express API → Top statistics: registers
api/index.js - Express API → System routes: registers
api/index.js - Express API → Authentication routes: registers
api/index.js - Express API → Admin routes: registers
api/index.js - Express API → Server controls: registers
api/index.js - Express API → User administration: registers
api/index.js - Express API → Match tracking: registers
api/index.js - Express API → Live endpoints: registers
api/index.js - Express API → Service aggregator: initializes services
api/index.js - Rankings and stats → Statistics database: queries
api/lib/routes/rankings.js - Rankings and stats → Cache and sessions: caches results
api/lib/routes/rankings.js - Service aggregator → Server state and polling: imports
api/lib/core.js - Service aggregator → Live data service: imports
api/lib/core.js - Service aggregator → Identity and RBAC: imports
api/lib/core.js - Service aggregator → Server manager: imports
api/lib/core.js - Service aggregator → Statistics database: imports
api/lib/core.js - Service aggregator → Cache and sessions: imports
api/lib/core.js - Service aggregator → Prometheus metrics: imports
api/lib/core.js - Server state and polling → Statistics database: reads and writes
api/lib/serverCtx.js - Server state and polling → CS game servers: queries status
api/lib/serverCtx.js - Players and admins → Login UI: signs in
README.md - Login UI → Authentication routes: authenticates via
README.md - Players and admins → Admin controls: manages
README.md - Admin controls → Server controls: uses controls
README.md - Admin controls → User administration: administers users
README.md - Players and admins → Rankings and maps: views rankings
README.md - Players and admins → Player profiles: views profiles
README.md - Players and admins → Live scoreboard: views live play
README.md - Players and admins → Match history: views matches
README.md - Players and admins → Server management: manages servers
README.md - Players and admins → System status: views monitoring
README.md - Express API → Discord bot: starts bot
api/index.js - Server manager → CS game servers: controls containers
api/lib/serverManager.js - Express API → Prometheus metrics: exposes metrics
README.md - Status alerts → Players and admins: sends alerts
README.md - Identity and RBAC → MariaDB: persists users
api/lib/auth.js