How donjuan2000/badminton-anzeige works
Main Components
• Frontend Service:
• Built using SvelteKit (visible from the .svelte-kit directory and Vite configurations).
• Handles the web interfaces with distinct routes for the “Anzeige” (display) and “Controller” views.
• Has its own Dockerfile and environment variables (.env), indicating it runs inside its dedicated container.
• Backend Service:
• Contains a server.js file along with a package.json and package-lock.json, so it’s a Node.js-based server.
• Also has its own Dockerfile, meaning it is encapsulated as another container.
• Docker & Docker Compose:
• The project includes a compose.yaml file to orchestrate the simultaneous startup and communication of both the Frontend and Backend containers.
• Auxiliary Scripts:
• install.sh and run.sh scripts help in building images and managing container startup and integration with the operating system (e.g., auto-startup via a .desktop file).
Interaction Flow
• A user starts the system either manually (via ‘docker compose up’ or run.sh) or automatically on boot.
• The Frontend container, serving the SvelteKit application, is accessible by a web browser.
• The Frontend communicates with the Backend service to fetch or update game data (match scores, etc.).
• The Docker network established by Docker Compose ensures that inter-container communication is secure and isolated.
Architectural Patterns and Design Principles
• Microservices/Modular Design: Separation into distinct containers (Frontend and Backend) promotes independent scaling and development.
• Containerization: Making use of Docker for reproducible environments.
• Environment Configurability: The Frontend’s .env file enables dynamic environment configuration, such as specifying the server’s IP address.
• Clear Separation between Display (Anzeige) and Control (Controller) aspects, as seen from the route structure in the Frontend.