M7: Frontend - HTML/JS/CSS mit dunklem Design, Vollbild, WebSocket-Updates, embed.FS-Integration
- Frontend: index.html, style.css, app.js - Dunkles Kontrast-Design mit Team-Farben (Rot/Grün) - Vollbild-Toggle, Responsive Design - Echtzeit-Updates über WebSocket + Polling-Fallback - Tastatur-Shortcuts (R/G für Punkte, N für nächste Runde) - Rundenverlauf mit Farbcodierung - Go-Integration: - frontend.go: embed.FS für statische Dateien - websocket.go: WebSocket-Handler (/ws) für State-Broadcast - httpapi.go: broadcastState() nach jeder Mutation, /ws-Route - main.go: api.SetupFrontend() für Frontend-Einbettung - Frontend unter '/' verfügbar, API unter '/api/' - Tests: 17 End-to-End-Tests bestanden - Alle HTTP-Endpunkte funktionsfähig - Frontend-Assets korrekt eingebettet - Persistenz (state.json) funktioniert
This commit is contained in:
@@ -44,12 +44,14 @@
|
||||
- [x] Alle API-Endpunkte vor Commit auf Funktion geprüft (14 Tests)
|
||||
- [x] Dokumentation
|
||||
|
||||
### ⏳ M7: Frontend
|
||||
- [ ] HTML, JS, CSS erstellt
|
||||
- [ ] Plausibilitäts- und Funktionstest
|
||||
- [ ] In Go-Binary integriert (embed)
|
||||
- [ ] Unter `/` verfügbar
|
||||
- [ ] End-to-End-Test
|
||||
### ✅ M7: Frontend
|
||||
- [x] HTML, JS, CSS erstellt (dunkles Design, Vollbild, 2 Teams)
|
||||
- [x] Plausibilitäts- und Funktionstest bestanden (17 Tests)
|
||||
- [x] In Go-Binary integriert (embed.FS)
|
||||
- [x] Unter `/` verfügbar
|
||||
- [x] End-to-End-Test: Backend + Frontend gemeinsam
|
||||
- [x] WebSocket-Endpoint `/ws` für Echtzeit-Updates
|
||||
- [x] Persistenz-Datei: `state.json`
|
||||
|
||||
---
|
||||
|
||||
@@ -68,19 +70,21 @@ goSportpunktetafel/
|
||||
│ ├── logik/ – Zählerlogik (Rot/Grün, Runden)
|
||||
│ ├── persistenz/ – Datei-basierte Persistenz
|
||||
│ ├── mdns/ – mDNS-Bekanntmachung & Discovery
|
||||
│ └── httpapi/ – HTTP-API-Server
|
||||
├── static/ – Frontend (HTML, JS, CSS)
|
||||
├── test/ – Testdateien
|
||||
│ ├── usb/
|
||||
│ ├── logik/
|
||||
│ ├── persistenz/
|
||||
│ ├── httpapi/
|
||||
│ └── mdns/
|
||||
│ └── httpapi/ – HTTP-API-Server, WebSocket, eingebettetes Frontend
|
||||
├── systemd/ – Systemd-Service-Datei
|
||||
├── docs/ – Dokumentation
|
||||
└── scripts/ – Hilfs-Scripts
|
||||
```
|
||||
|
||||
## Wichtige Dateien
|
||||
|
||||
| Datei | Beschreibung |
|
||||
|-------|-------------|
|
||||
| `internal/httpapi/frontend.go` | Eingebettetes Frontend (embed.FS) |
|
||||
| `internal/httpapi/static/` | Frontend-Dateien (index.html, style.css, app.js) |
|
||||
| `internal/httpapi/websocket.go` | WebSocket-Handler für Echtzeit-Updates |
|
||||
| `data/state.json` | Persistenz-Datei (JSON) |
|
||||
|
||||
---
|
||||
|
||||
## Domänenlogik
|
||||
@@ -110,6 +114,6 @@ goSportpunktetafel/
|
||||
---
|
||||
|
||||
## Aktueller Status
|
||||
**Letztes Update:** 2026-07-14 14:25 CET
|
||||
**Aktueller Meilenstein:** M7 – Frontend
|
||||
**Nächster Schritt:** Frontend (HTML/JS/CSS) erstellen und in Go-Binary integrieren
|
||||
**Letztes Update:** 2026-07-14 16:30 CET
|
||||
**Aktueller Meilenstein:** M7 abgeschlossen ✅
|
||||
**Nächster Schritt:** Frontend-Design verfeinern (Vollbild-UX, Animationen, responsive)
|
||||
|
||||
Reference in New Issue
Block a user