feat: web dashboard and playground work

The NexusDashboard-parity dashboard (dDashboardServer) and everything built on it on the experimental branch:
accounts, characters, properties and moderation tools, permissions shared with in-game slash commands, economy
reports, World 3D and property 3D views with client scenery, scheduled events (features, vanity changes, live
events, announcements, restarts), vanity files and events, the CDClient browser, the message inspector with saved
captures, chat filter tools, community challenges, live ops, the AI moderator helper, and the server-side changes
they need.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-26 17:52:10 -05:00
parent 854d02f509
commit e213a7aeff
681 changed files with 88310 additions and 1321 deletions

View File

@@ -0,0 +1,31 @@
#pragma once
#include <functional>
#include <string>
#include "json.hpp"
class GameDatabase;
/**
* Runs slow database work (scans over every character, nightly jobs) on a worker thread with its own database
* connection, so the dashboard keeps answering while it runs. Tasks must only use the connection they are given:
* no Database::Get(), no game data (item names) and no config; do that in the completion, which runs on the main
* thread from Update().
*/
namespace Background {
using Task = std::function<nlohmann::json(GameDatabase& db)>;
// error is empty on success
using Completion = std::function<void(nlohmann::json result, const std::string& error)>;
void Initialize();
void Shutdown();
// Main loop: run completions of finished tasks
void Update();
// Queue a task. `name` identifies work that should not run twice at once; returns false if it is already queued or running.
bool Run(const std::string& name, Task task, Completion done);
bool IsRunning(const std::string& name);
}