Files
helldivers/AGENTS.md
2026-04-03 11:34:59 +02:00

40 lines
1.8 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Codex Instructions helldivers
## Pflichtlektüre vor dem ersten Code-Zugriff
Lies **PROJECT_MAP.md** in diesem Verzeichnis sie enthält alle Funktionen, API-Routen, WebSocket-Message-Types, State-Struktur und Datenbank-Details.
## Projekt-Überblick
- **Port:** 3012
- **Typ:** Authenticated Multiplayer App (WebSocket, SQLite, ELO-Rating)
- **Stack:** Node.js / Express, WebSocket (ws), SQLite (better-sqlite3), bcrypt, Helmet, rate-limit, Vanilla JS
- **Features:** Stratagem-Trainer (Timed/Endless/Drill/Speedrun), 1v1-Multiplayer-Matches, ELO-Rangliste, Tages-Challenge, Admin-Panel
## Struktur
```
helldivers/
├── server.js # Express + WebSocket + SQLite (~650 Zeilen)
├── public/app.js # Gesamte Client-Logik (~1840 Zeilen)
├── public/styles.css
├── public/index.html
├── scripts/ # DB-Migrations / Seed
└── data/helldivers.db # SQLite (Scores, Users, History, Sessions)
```
## Git-Workflow
1. Branch: immer `bugfixes-features` für Änderungen
2. Commit: `type: kurze Beschreibung` **keine Co-Authored-By-Zeile**
3. Vor Commit: `CHANGELOG.md` aktualisieren
4. Vor Commit: `PROJECT_MAP.md` aktualisieren, falls Funktionen/Routen/WS-Types geändert wurden
5. `git add` nur einzelne Dateien kein `git add -A`
6. Merge nach `main` nur auf explizite Anweisung
## Sicherheit
- Niemals `data/helldivers.db` committen
## Release-Automation
- **Version ist Single Source of Truth:** `package.json`
- **Cache-Busting nie manuell pflegen** stattdessen `npm run release:sync`
- **Vor jedem Commit zusätzlich:** `npm run release:verify`
- Repo-Hook: `.githooks/pre-commit` führt `release:sync` und `release:verify` automatisch aus
- Für Versionssprünge: `npm run release:bump:patch`, `release:bump:minor` oder `release:bump:major`