How luke0630/minecraftservermanager works
Main Components
• Core Manager Module: Represented by the classes in the "org.manager" package (including CallBack, Data, and Utility classes). These classes encapsulate the core business logic required to monitor the Minecraft servers.
• Web Application (Backend): Under "WebApp/Backend," this component includes APIController, Application, and configuration classes (like WebConfig). This layer provides the RESTful API endpoints and handles web server responsibilities.
• Frontend Application: Found under "WebApp/Fronted" with Vue components (App.vue, ServerList.vue, HelloWorld.vue, etc.), configuration files (babel.config.js, vue.config.js), and public assets. It serves as the user interface that renders the server status and additional information.
• WebSocket Servers: Located in the "WebSocket" folder (e.g., APIWebsocketServer and LunchWebSocketServer), these classes provide real-time communication channels for push notifications or live updates.
• Configuration & Static Resources: The "src/main/resources" folder provides configuration (config.yml for server lists and port numbers) and static files (CSS, JS, HTML) that are served as part of the frontend.
• External Integration: The README mentions integration with the "PlaceholderAPI" via StatusReporter, meaning that external Minecraft plugins also interact with this software.
Relationships and Interactions
• The Main module (initiated via Main.java) boots up the application, loading configuration files (e.g., config.yml) and initializing the various components (backend server, WebSocket servers, and so on).
• The Backend Web Application exposes REST APIs. It interacts with the Core Manager module to retrieve the server monitoring data that is then consumed by the Frontend.
• The Frontend Vue application consumes these REST APIs and might also establish WebSocket connections to get live updates.
• Communication flows:
• Data flow from the Minecraft servers into the Core Manager (via Message/Data classes) and then to the API controllers.
• API Controllers provide data to the Frontend, shown as status information and lists.
• WebSocket components push live updates to the Frontend.
• Integration with external plugins (like StatusReporter) ensures that data is pushed from Minecraft servers into this management system.
Architectural Patterns and Design Principles
• Layered Architecture: The project separates concerns by dividing into Core Logic, API/Backend Services, and a Frontend User Interface.
• MVC/MVVM Elements: The WebApp/Backend follows MVC principles (API controllers, configuration classes), and the Frontend (Vue components) uses an MVVM-like approach.
• Asynchronous Communication: Utilization of WebSockets to provide real-time updates in addition to standard REST communication.
• Configuration Driven: The use of external YAML configuration (config.yml) for server lists and port numbering emphasizes flexibility and ease of customization.
Relevant Technologies and Frameworks
• Java and Maven for dependency management and project building.
• Spring-like (or similar) Java web framework for the Backend (inferred from the existence of WebConfig and APIController) even if not explicitly mentioned.
• Vue.js and Node.js (via package.json, babel.config.js, etc.) for the Frontend components.
• WebSocket protocol for real-time data push (implemented in dedicated classes within the WebSocket package).