How elmodo7/wakeonlan-web-api works
Main Components
• Web Client Layer: Represent the user interface delivered through HTML templates and static resources (CSS, JavaScript, images). This is the actual “Web Panel” that users interact with – the login page, device list page, and control pages.
• Controllers (e.g., HomeController, LoginController, DevicesController) handling incoming HTTP/HTTPS requests.
• Service Layer (e.g., WakeService, WakeServiceImpl, PingService) that encapsulates the business logic such as sending WoL packets.
• Configuration components (e.g., AppConfiguration, HttpsConfig, WebConfig) which set up security, HTTPS, and route management.
• Data/Configuration Storage: Even though there is no full relational database, important static resource files like devices.json (which holds devices configuration) and application.properties for app settings should be highlighted.
• External Integration Components: Indicate integration with the “Remote Shutdown API Service” (as mentioned in the README) and any external services or user-provided tunnels (VPN/SSH) or HTTPS certificates.
Relationships and Interactions
• Within the Application Server, illustrate that controllers delegate to the Service Layer. For instance, when a wake command is issued from the Web Panel, the DevicesController routes the call to WakeService which processes the WoL logic.
• That the servers fetch configuration and device information from resources (devices.json, application.properties) used during runtime.
Architectural Patterns and Technologies
• MVC Pattern: Label clearly the separation between View (templates and static resources), Controller (REST endpoints), and Service (business logic).
• REST API: Indicate that exposed endpoints follow RESTful principles.
• Spring Boot Framework: Note that the app leverages Spring Boot for web serving and dependency injection.
• Deployment Artifacts: Show that the application is containerized (using Dockerfile and deploy.sh) and that it can be run as a Unix service (via the wolapi_linux_service_template). Additionally, mention that it relies on Maven for build automation.