root = Card([header, liveStatus, activePlayers, revenueSection, sessionTrend, topItems, regionHealth, crashByVersion, eventsSection, moderationSection, inflationSection, experimentsSection, patchNotes, regionFocus, hotfixActions])
header = CardHeader("Live Ops Command Center", "Game Studio · Real-time dashboard")
liveStatus = Callout("success", "Players Online", "128,431 players are in-game right now. Peak today: 142,760.")
activePlayers = Card([activeHeading, activeTable], "sunk")
activeHeading = Heading("Active Players", "h3")
activeTable = Table([activeMetric, activeValue])
activeMetric = Col("Metric", ["Daily Active Players", "Monthly Active Players"])
activeValue = Col("Value", ["1,204,332", "8,912,540"])
revenueSection = Card([revenueHeading, revenueTable, revenueChart], "sunk")
revenueHeading = Heading("Revenue", "h3")
revenueTable = Table([revMetric, revValue])
revMetric = Col("Metric", ["Revenue Today", "Revenue Per User"])
revValue = Col("Value", ["$412,890", "$0.34"])
revenueChart = BarChart(["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], [revSeries], "grouped", "Day", "USD")
revSeries = Series("Revenue", [389000, 402000, 395000, 418000, 431000, 445000, 412890])
sessionTrend = Card([sessionHeading, sessionChart], "sunk")
sessionHeading = Heading("Average Session Length (Last 14 Days)", "h3")
sessionChart = LineChart(["D1", "D2", "D3", "D4", "D5", "D6", "D7", "D8", "D9", "D10", "D11", "D12", "D13", "D14"], [sessionSeries], "natural", "Day", "Minutes")
sessionSeries = Series("Session Length", [22, 23, 21, 24, 25, 26, 24, 27, 28, 29, 27, 30, 31, 30])
topItems = Card([topHeading, topTable], "sunk")
topHeading = Heading("Best-Selling Items", "h3")
topTable = Table([itemName, itemUnits])
itemName = Col("Item", ["Dragon Bundle", "Mythic Chest", "Starter Pack", "Season Pass", "XP Boost"])
itemUnits = Col("Units Sold", [45210, 38940, 31280, 27450, 19820])
regionHealth = Card([regionHeading, regionTable], "sunk")
regionHeading = Heading("Server Regions & Health", "h3")
regionTable = Table([regionName, regionStatus])
regionName = Col("Region", ["US-East", "US-West", "EU-West", "Asia-Pacific", "South America"])
regionStatus = Col("Health", ["Healthy", "Healthy", "Degraded", "Healthy", "Healthy"])
crashByVersion = Card([crashHeading, crashTable], "sunk")
crashHeading = Heading("Crash Rate by App Version", "h3")
crashTable = Table([versionName, crashRate])
versionName = Col("Version", ["2.4.1", "2.4.0", "2.3.9", "2.3.8"])
crashRate = Col("Crash Rate", ["0.12%", "0.31%", "0.08%", "0.15%"])
eventsSection = Card([eventsHeading, eventsList], "sunk")
eventsHeading = Heading("Live Events", "h3")
eventsList = ListBlock([eventLive, eventUpcoming1, eventUpcoming2], "number")
eventLive = ListItem("Double XP Weekend", "Live now · Ends Sunday 23:59 UTC")
eventUpcoming1 = ListItem("Summer Festival", "Starts June 1 · 7-day event")
eventUpcoming2 = ListItem("Boss Rush", "Starts June 8 · 3-day event")
moderationSection = Card([modHeading, modTable], "sunk")
modHeading = Heading("Moderation Queue", "h3")
modTable = Table([modType, modCount])
modType = Col("Queue", ["Player Reports", "Ban Appeals"])
modCount = Col("Pending Review", [342, 87])
inflationSection = Card([inflationHeading, inflationChart], "sunk")
inflationHeading = Heading("In-Game Currency Inflation", "h3")
inflationChart = LineChart(["Jan", "Feb", "Mar", "Apr", "May"], [inflationSeries], "linear", "Month", "Gold Supply (millions)")
inflationSeries = Series("Gold Supply", [120, 135, 148, 162, 175])
experimentsSection = Card([expHeading, expTable], "sunk")
expHeading = Heading("Running Experiments", "h3")
expTable = Table([expName, expResult])
expName = Col("Experiment", ["A: Faster Respawn", "B: New Loot Table"])
expResult = Col("Result", ["+8% session length", "+12% item purchases"])
patchNotes = Card([patchHeading, patchForm], "sunk")
patchHeading = Heading("Draft Patch Notes", "h3")
patchForm = Form("patch-notes", patchButtons, [patchTitle, patchBody])
patchTitle = FormControl("Title", patchTitleInput)
patchTitleInput = Input("title", "e.g. v2.5.0 — Summer Festival")
patchBody = FormControl("Notes", patchBodyArea)
patchBodyArea = TextArea("body", "Write patch notes here...", 6)
patchButtons = Buttons([savePatchBtn, publishPatchBtn])
savePatchBtn = Button("Save Draft", null, "secondary")
publishPatchBtn = Button("Publish")
regionFocus = Card([focusHeading, focusForm], "sunk")
focusHeading = Heading("Focus on a Region", "h3")
focusForm = Form("region-focus", focusButtons, [regionField])
regionField = FormControl("Region", regionSelect)
regionSelect = Select("region", [regionUS, regionEU, regionAP, regionSA], "Choose a region")
regionUS = SelectItem("us-east", "US-East")
regionEU = SelectItem("eu-west", "EU-West")
regionAP = SelectItem("asia-pacific", "Asia-Pacific")
regionSA = SelectItem("south-america", "South America")
focusButtons = Buttons([focusBtn])
focusBtn = Button("Focus on Region", null, "primary")
hotfixActions = Card([hotfixHeading, hotfixButtons], "sunk")
hotfixHeading = Heading("Ship a Hotfix", "h3")
hotfixButtons = Buttons([hotfixBtn, rollbackBtn])
hotfixBtn = Button("Ship Hotfix", null, "primary")
rollbackBtn = Button("Rollback Last Build", null, "secondary")
followups = FollowUpBlock([f1, f2, f3])
f1 = FollowUpItem("Show crash details for version 2.4.0")
f2 = FollowUpItem("Summarize the moderation queue")
f3 = FollowUpItem("Compare revenue to last week")