layouts schick gemacht und packagelimits weiter implementiert

This commit is contained in:
Codex Agent
2025-11-01 22:55:13 +01:00
parent 79b209de9a
commit 8e6c66f0db
16 changed files with 756 additions and 422 deletions

View File

@@ -6,7 +6,7 @@
- Super Admin: session-authenticated Filament (web only).
- Common
- Pagination: `page`, `per_page` (max 100).
- Errors: `{ error: { code, message, trace_id }, details?: {...} }`.
- Errors: `{ error: { code, title, message, meta? } }` across public + tenant APIs.
- Rate limits: per-tenant and per-device for tenant apps; 429 with `x-rate-limit-*` headers.
Key Endpoints (abridged)
@@ -31,6 +31,28 @@ Webhooks
- Payment provider events, media pipeline status, and deletion callbacks. All signed with shared secret per provider.
- RevenueCat webhook: `POST /api/v1/webhooks/revenuecat` signed via `X-Signature` (HMAC SHA1/256). Dispatches `ProcessRevenueCatWebhook` to credit tenants and sync subscription expiry.
### Error Responses
- Every non-2xx response returns a JSON body with the `error` envelope:
```json
{
"error": {
"code": "photo_limit_exceeded",
"title": "Upload Limit Reached",
"message": "Es wurden 120 von 120 Fotos hochgeladen. Bitte kontaktiere das Team für ein Upgrade.",
"meta": {
"limit": 120,
"used": 120,
"remaining": 0
}
}
}
```
- `code` is stable for clients; `title` is a short human-friendly label; `message` is localized; `meta` may contain structured data (e.g. `trace_id`, quota counts) when relevant.
- Guests and tenant admins consume the same structure to surface tailored UI (toast banners, upload dialogs, etc.).
Public Gallery
- `GET /gallery/{token}`: returns event snapshot + branding colors; responds with `410` once the package gallery window expires.
- `GET /gallery/{token}/photos?cursor=&limit=`: cursor-based pagination of approved photos. Response shape `{ data: Photo[], next_cursor: string|null }`.

View File

@@ -13,6 +13,14 @@ Capabilities
- Manage events, galleries, members, settings, legal pages, purchases.
- Notifications: Web Push (Android TWA) and Capacitor push (iOS).
- Conflict handling: ETag/If-Match; audit changes.
- Dashboard highlights tenant quota status (photo uploads, guest slots, gallery expiry) with traffic-light cards fed by package limit metrics.
- Global toast handler consumes the shared API error schema and surfaces localized error messages for tenant operators.
Support Playbook (Limits)
- Wenn Tenant-Admins Upload- oder Gäste-Limits erreichen, zeigt der Header Warn-Badges + Toast mit derselben Fehlermeldung wie im Backend (`code`, `title`, `message`).
- Support-Team kann `php artisan metrics:package-limits` ausführen, um die aggregierten Warn-/Expired-Zähler der letzten Stunden einzusehen und Engpässe zu bestätigen (`--reset` leert die Zähler nach Eskalation).
- Empfehlung an Kunden: Paketupgrade oder Kontakt zu Sales; bei abgelaufener Galerie ggf. Verlängerung via Tenant Package.
- Bei Fehlalarmen zuerst Logs nach `package_limit_metric` durchsuchen und prüfen, ob der Zähler `recovered` die Credits bereits wieder freigibt.
Distribution & CI
- Play: assetlinks.json at `/.well-known/assetlinks.json`.

View File

@@ -26,11 +26,14 @@ Core Features
- Choose from camera or library; limit file size; show remaining upload cap.
- Client-side resize to sane max (e.g., 2560px longest edge); EXIF stripped client-side if available.
- Assign optional emotion/task before submit; default to “Uncategorized”.
- Upload screen shows quota cards (Photos, Guests) with traffic-light styling and friendly copy when nearing limits.
- When the backend blocks uploads (limit reached, device blocked, gallery expired), surface localized dialogs with actionable hints.
- Gallery
- Masonry grid, lazy-load, pull-to-refresh; open photo lightbox with swipe.
- Like (heart) with optimistic UI; share system sheet (URL to CDN variant).
- Filters: emotion, featured, mine (local-only tag for items uploaded from this device).
- Public share: host can hand out `https://app.domain/g/{token}`; guests see a themed, read-only gallery with per-photo downloads.
- Banner on gallery header highlights approaching expiry (D-7/D-1) and offers CTA to upload remaining shots before the deadline.
- Safety & abuse controls
- Rate limits per device and IP; content-length checks; mime/type sniffing.
- Upload moderation state: pending → approved/hidden; show local status.

View File

@@ -37,10 +37,10 @@
- [ ] E2E-Tests für Limitwarnungen & abgelaufene Galerie aktualisieren.
### 4. Tenant Admin PWA Improvements
- [ ] Dashboard-Karten & Event-Header mit Ampelsystem für Limitfortschritt.
- [ ] Event-Formular: Warnhinweise bei 80%/95% + Upgrade-CTA.
- [ ] Globale Fehlerzustände aus Fehlerkontrakt (Toast/Dialog).
- [ ] Übersetzungen für alle neuen Messages hinzufügen.
- [x] Dashboard-Karten & Event-Header mit Ampelsystem für Limitfortschritt.
- [x] Event-Formular: Warnhinweise bei 80%/95% + Upgrade-CTA.
- [x] Globale Fehlerzustände aus Fehlerkontrakt (Toast/Dialog).
- [x] Übersetzungen für alle neuen Messages hinzufügen.
- [x] E-Mail-Schablonen & Notifications für Foto- und Gäste-Schwellen/Limits.
- [x] Galerie-Warnungen (D-7/D-1) & Ablauf-Mails + Cron Task.
@@ -50,9 +50,9 @@
- [ ] Audit-Log & Retry-Logik für gesendete Mails.
### 6. Monitoring, Docs & Support
- [ ] Prometheus/Grafana-Metriken für Paketnutzung & Warns triggern.
- [ ] PRP & API-Doku mit neuem Fehlerschema & Limitverhalten aktualisieren.
- [ ] Support-Playbook & FAQ für Limitwarnungen erweitern.
- [x] Prometheus/Grafana-Metriken für Paketnutzung & Warns triggern. *(`PackageLimitMetrics` + `php artisan metrics:package-limits` Snapshot)*
- [x] PRP & API-Doku mit neuem Fehlerschema & Limitverhalten aktualisieren.
- [x] Support-Playbook & FAQ für Limitwarnungen erweitern. *(docs/prp/06 Tenant Admin Playbook Abschnitt)*
## Dependencies & Notes
- Bestehende Credit-Logik parallel weiter unterstützen (Legacy-Kunden).