feat: implement admin web interface#347
Merged
Merged
Conversation
0476e6e to
38497b3
Compare
There was a problem hiding this comment.
Pull request overview
This pull request introduces a web-based admin dashboard for the R-Type game server, providing browser-based administrative capabilities alongside the existing command-line admin console. The implementation includes a new AdminWebServer class that serves a REST API and embedded frontend, allowing administrators to manage game sessions and rooms through HTTP endpoints.
Changes:
- Added
cpp-httplibdependency for HTTP server functionality - Implemented
AdminWebServerclass with RESTful API endpoints for session/room management - Integrated the web server into
ServerRuntimeto start alongside the admin console - Added frontend files (HTML, CSS, JS) that appear to be separate from the embedded versions actually served by the implementation
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| vcpkg.json | Added cpp-httplib dependency for HTTP server support |
| server/src/thread/ServerRuntime.hpp | Added include for AdminWebServer and member variable declaration |
| server/src/thread/ServerRuntime.cpp | Instantiated and started AdminWebServer alongside AdminConsole |
| server/src/admin/webServer/AdminWebServer.hpp | Declared AdminWebServer class with constructor, lifecycle methods, and private members |
| server/src/admin/webServer/AdminWebServer.cpp | Implemented AdminWebServer with embedded frontend and API handlers for sessions, rooms, kicks, and bans |
| server/src/admin/webServer/index.html | Added HTML dashboard file (appears unused - embedded version is served instead) |
| server/src/admin/webServer/app.js | Added JavaScript app file (appears unused - embedded version differs significantly) |
| server/src/admin/webServer/style.css | Added CSS stylesheet (appears unused - embedded version differs significantly) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


This pull request introduces a new web-based admin dashboard for the R-Type server, allowing administrators to manage sessions, rooms, and bans through a browser interface. The implementation includes a new
AdminWebServerclass, supporting frontend files (HTML, CSS, JS), and integration with the server runtime. Additionally, the necessary dependency for the HTTP server library is added.Admin web dashboard implementation:
AdminWebServerclass inAdminWebServer.hppto provide a RESTful administrative web server for managing sessions, rooms, and bans, with authentication and shutdown support.AdminWebServerinto the server runtime (ServerRuntime.cpp,ServerRuntime.hpp), so it starts alongside the existing admin console. [1] [2] [3]Frontend for admin dashboard:
index.html), a JavaScript app (app.js) for interacting with the API and rendering tables, and a CSS stylesheet (style.css) for basic styling. [1] [2] [3]Dependencies:
cpp-httplibtovcpkg.jsonto provide the HTTP server functionality used byAdminWebServer.