Page: Dashboard¶
Cluster overview with stat cards, live feeds, and staggered animations.
Overview¶
The Dashboard is the default landing page after login. It provides a high-level overview of the entire server cluster with real-time data from SpacetimeDB subscriptions.
Layout¶
The dashboard consists of two main sections:
Stat Cards (top row)¶
Four animated stat cards display cluster-wide metrics:
| Card | Data Source | Description |
|---|---|---|
| Total Servers | ServerRegistry subscription |
Count of registered servers with online/offline breakdown |
| Players Online | ServerRegistry.online_count |
Sum of all connected players across the cluster |
| Active Bans | BanEntry subscription |
Count of non-revoked, non-expired bans |
| Admin Actions | PanelAuditLog subscription |
Actions in the last 24 hours |
Each card uses a color-mix background with the accent colour and enters with a staggered framer-motion animation.
3-Column Live Feed (bottom section)¶
| Column | Data Source | Content |
|---|---|---|
| Recent Bans | BanEntry |
Latest bans with player name, reason, and timestamp |
| Events | PanelAuditLog |
Admin actions (kicks, config changes, role grants) |
| Chat | Game module subscription | Recent chat messages (when game module is connected) |
All feeds update in real-time — new entries slide in with AnimatePresence.
Data Flow¶
graph LR
STDB["SpacetimeDB"]
STDB --> SR["ServerRegistry"] --> Stats1["Stat cards (server count, total players)"]
STDB --> BE["BanEntry"] --> Stats2["Stat card (ban count) + ban feed column"]
STDB --> PAL["PanelAuditLog"] --> Stats3["Stat card (action count) + events column"]
STDB --> UCS["useClusterState()"] --> Cache["Cached cluster data with 10s stale time"]
Related Pages¶
- Panel Overview — panel architecture
- Real-Time Subscriptions — how live data flows