diff --git a/.github/skills/gh-tickets/next-ticket.ps1 b/.github/skills/gh-tickets/next-ticket.ps1 index 0324cd2..d52bee2 100644 --- a/.github/skills/gh-tickets/next-ticket.ps1 +++ b/.github/skills/gh-tickets/next-ticket.ps1 @@ -13,35 +13,36 @@ $repo = "jreinemann-euris/krisenvorrat" if ($IssueNumber -gt 0) { # Variante A: Explizite Issue-Nummer - $json = gh issue view $IssueNumber --repo $repo --json number,title,labels | ConvertFrom-Json + $json = gh issue view $IssueNumber --repo $repo --json number, title, labels | ConvertFrom-Json $labels = $json.labels | ForEach-Object { $_.name } $type = if ($labels -contains "block-planning") { "[B]" } - elseif ($labels -contains "migration") { "[M]" } - elseif ($labels -contains "feature") { "[F]" } - elseif ($labels -contains "refactoring") { "[F]" } - elseif ($labels -contains "tech-decision") { "[T]" } - elseif ($labels -contains "infrastructure") { "[I]" } - elseif ($labels -contains "planning") { "[P]" } - elseif ($labels -contains "test") { "[X]" } - else { "[?]" } + elseif ($labels -contains "migration") { "[M]" } + elseif ($labels -contains "feature") { "[F]" } + elseif ($labels -contains "refactoring") { "[F]" } + elseif ($labels -contains "tech-decision") { "[T]" } + elseif ($labels -contains "infrastructure") { "[I]" } + elseif ($labels -contains "planning") { "[P]" } + elseif ($labels -contains "test") { "[X]" } + else { "[?]" } Write-Host "#$($json.number) $type $($json.title)" -} else { +} +else { # Variante B: Nächstes Ticket per Board-Query (serverseitig auf Todo gefiltert) $raw = gh project item-list 2 --owner jreinemann-euris --format json --query "status:Todo" | ConvertFrom-Json $todos = $raw.items | ForEach-Object { $labels = $_.labels $prio = if ($labels -contains "priority:high") { 0 } - elseif ($labels -contains "priority:low") { 2 } - else { 1 } + elseif ($labels -contains "priority:low") { 2 } + else { 1 } $type = if ($labels -contains "block-planning") { "[B]" } - elseif ($labels -contains "migration") { "[M]" } - elseif ($labels -contains "feature") { "[F]" } - elseif ($labels -contains "refactoring") { "[F]" } - elseif ($labels -contains "tech-decision") { "[T]" } - elseif ($labels -contains "infrastructure") { "[I]" } - elseif ($labels -contains "planning") { "[P]" } - elseif ($labels -contains "test") { "[X]" } - else { "[?]" } + elseif ($labels -contains "migration") { "[M]" } + elseif ($labels -contains "feature") { "[F]" } + elseif ($labels -contains "refactoring") { "[F]" } + elseif ($labels -contains "tech-decision") { "[T]" } + elseif ($labels -contains "infrastructure") { "[I]" } + elseif ($labels -contains "planning") { "[P]" } + elseif ($labels -contains "test") { "[X]" } + else { "[?]" } [PSCustomObject]@{ Number = $_.content.number Title = $_.content.title @@ -53,7 +54,8 @@ if ($IssueNumber -gt 0) { if ($todos) { Write-Host "#$($todos.Number) $($todos.Type) $($todos.Title) (Order: $($todos.Order))" - } else { + } + else { Write-Host "Keine offenen Tickets gefunden." } } diff --git a/Anforderungen/KRISENVORRAT_INVENTAR_PLAN-1.md b/Anforderungen/KRISENVORRAT_INVENTAR_PLAN-1.md new file mode 100644 index 0000000..574c01d --- /dev/null +++ b/Anforderungen/KRISENVORRAT_INVENTAR_PLAN-1.md @@ -0,0 +1,155 @@ +# Krisenvorrat Inventar-App – Projektplan + +**Version:** 1.0 +**Datum:** 2026-05-13 +**Status:** Planung abgeschlossen, Umsetzung bereit + +--- + +## 1. Projektziel + +Eine mobile-optimierte Web-App zur Verwaltung eines Krisenvorrats-Inventars. Die App läuft vollständig im Browser (kein App Store, keine Installation), speichert alle Daten in einer einzigen JSON-Datei in OneDrive, und funktioniert autark auf dem Smartphone. + +--- + +## 2. Technischer Stack + +| Komponente | Technologie | Begründung | +|---|---|---| +| App | Einzelne HTML-Datei (Vanilla JS) | Keine Installation, läuft in jedem Browser | +| Datenhaltung | JSON (eine Datei) | Strukturiert, KI-lesbar, kein Redundanz | +| Cloud-Sync | Microsoft Graph API (OneDrive) | Autark, später teilbar | +| Authentifizierung | OAuth 2.0 (Microsoft) | Einmalig, sicher | +| Versionierung | OneDrive Versionsverlauf | Automatisch, kein Git nötig | + +--- + +## 3. Dateistruktur (OneDrive) + +``` +Krisenvorrat/ +├── app/ +│ └── inventory.html ← Die App selbst (einmalig ablegen) +└── data/ + └── inventory.json ← Alle Daten (automatisch von App geschrieben) +``` + +--- + +## 4. Datenmodell (inventory.json) + +```json +{ + "meta": { + "version": "1.0", + "lastUpdated": "2026-05-13T00:00:00Z", + "persons": 4, + "kcalPerPersonPerDay": 2000 + }, + "categories": [ + "Grundnahrungsmittel", + "Fette & Öle", + "Wasser & Aufbereitung", + "Kochen & Energie", + "Gesundheit & Hygiene", + "Werkzeuge", + "Kleidung", + "Sonstiges" + ], + "locations": [ + "Keller", + "Küche", + "Garage", + "Schlafzimmer", + "Sonstiges" + ], + "items": [ + { + "id": "uuid", + "name": "Weizen", + "category": "Grundnahrungsmittel", + "quantity": 200, + "unit": "kg", + "unitPrice": 0.80, + "totalPrice": 160.00, + "kcalPer100g": 340, + "expiryDate": "2028-01-01", + "location": "Keller", + "minStock": 50, + "notes": "", + "lastUpdated": "2026-05-13T00:00:00Z" + } + ] +} +``` + +--- + +## 5. Funktionsumfang – Version 1.0 + +### 5.1 Inventarverwaltung +- [ ] Artikel anlegen (Name, Kategorie, Menge, Einheit, Preis, Lagerort, Ablaufdatum, Mindestbestand) +- [ ] Artikel bearbeiten +- [ ] Artikel löschen +- [ ] Kategorien und Lagerorte verwalten + +### 5.2 Übersichten & Analyse +- [ ] Gesamtübersicht nach Kategorie +- [ ] **Reichweitenrechner:** Automatische Berechnung wie lange Vorrat reicht (basierend auf Personenzahl + kcal/Tag) +- [ ] **Ablaufdaten-Warnung:** Was läuft in 6 / 12 Monaten ab? +- [ ] **Mindestbestand-Warnung:** Artikel unterhalb Mindestniveau (rot markiert) +- [ ] Gesamtwert des Vorrats + +### 5.3 Datenhaltung +- [ ] Beim Start: Prüfen ob inventory.json in OneDrive vorhanden → laden +- [ ] Bei jeder Änderung: sofortiges Schreiben nach OneDrive +- [ ] Offline-Modus: Änderungen im Speicher halten, beim nächsten Online-Start synchronisieren +- [ ] Einmalige Microsoft OAuth-Anmeldung + +### 5.4 Export +- [ ] Markdown-Ansicht (zum Kopieren / für KI-Eingabe) +- [ ] JSON-Download (Backup) + +--- + +## 6. UI / UX + +- **Plattform:** Android Chrome (Smartphone), optimiert für Touch +- **Design:** Klar, funktional, industriell – kein unnötiger Schnickschnack +- **Navigation:** Bottom Navigation Bar (Übersicht / Inventur / Warnungen / Einstellungen) +- **Eingabe:** Große Touch-Targets, Dropdown für Einheiten/Kategorien/Lagerorte +- **Farbschema:** Dunkel (Dunkelgrün / Anthrazit) – Krisenvorrat-Ästhetik, gut lesbar + +--- + +## 7. Spätere Erweiterungen (nicht in v1.0) + +- Mehrbenutzer / Teilen des OneDrive-Ordners mit Freunden/Netzwerk +- Einkaufslisten-Funktion (automatisch aus Mindestbeständen generieren) +- Barcode-Scanner für schnelle Erfassung +- Foto-Anhänge pro Artikel +- Benachrichtigungen bei ablaufenden Artikeln + +--- + +## 8. Einrichtung (einmalig) + +1. App-Datei (`inventory.html`) herunterladen +2. In OneDrive unter `Krisenvorrat/app/` ablegen +3. Datei im Browser öffnen (OneDrive → Datei → Im Browser öffnen) +4. Microsoft-Anmeldung einmalig bestätigen +5. Initialen Inventarstand erfassen +6. Fertig – alle Änderungen werden automatisch gespeichert + +--- + +## 9. Sicherheit & Datenschutz + +- Daten liegen ausschließlich im eigenen OneDrive-Konto +- Kein externer Server, keine Telemetrie +- OAuth-Token wird nur im Browser-Speicher gehalten (Session) +- Zugriff jederzeit über Microsoft-Konto-Einstellungen widerrufbar + +--- + +*Erstellt mit Claude Sonnet 4.6 – 2026-05-13*