feat: add notifications system with bell badge, polling, Directus flows, and webhook integration
This commit is contained in:
@@ -64,7 +64,8 @@ js/
|
||||
│ ├── currency.js # XMR/Fiat Umrechnung
|
||||
│ ├── pow-captcha.js # Proof-of-Work Captcha (Challenge/Verify)
|
||||
│ ├── btcpay.js # BTCPay Server Integration (Invoice, Checkout, Webhook)
|
||||
│ └── favorites.js # Favoriten-Service (localStorage + Directus Sync)
|
||||
│ ├── favorites.js # Favoriten-Service (localStorage + Directus Sync)
|
||||
│ └── notifications.js # Benachrichtigungen (Polling, Badge)
|
||||
└── components/
|
||||
├── app-shell.js # Layout, registriert Routes
|
||||
├── app-header.js # Header (Theme-Toggle, Lang-Dropdown, Profil-Dropdown)
|
||||
@@ -147,7 +148,8 @@ locales/
|
||||
8. ~~Favoriten Directus Sync~~ ✅ FavoritesService mit Union-Merge bei Login
|
||||
9. ~~Expired Listings~~ ✅ Directus Flow (alle 15 Min), Status-Badges auf Cards
|
||||
10. Reputation-System (5/15/50 Deals Stufen)
|
||||
11. Push-Benachrichtigungen für neue Nachrichten
|
||||
11. ~~In-App Benachrichtigungen~~ ✅ NotificationsService mit Polling, Glocke-Icon mit Badge
|
||||
12. Push-Benachrichtigungen (Web Push API)
|
||||
|
||||
## Directus Berechtigungen (Public-Rolle)
|
||||
|
||||
@@ -163,12 +165,15 @@ locales/
|
||||
| `conversations` | ✓ | ✓ | ✓ | Filter via `participant_hash`, Update nur `status` |
|
||||
| `messages` | ✓ | ✓ | - | Filter via `conversation` ID |
|
||||
| `favorites` | ✓ | ✓ | - | User-Rolle: Filter `user = $CURRENT_USER`, Delete erlaubt |
|
||||
| `notifications` | ✓ | ✓ (via Flow/Webhook) | ✓ | User-Rolle: Filter `user_hash`, nur `read` updaten |
|
||||
|
||||
### Directus Flows
|
||||
|
||||
| Flow | Trigger | Aktion |
|
||||
|------|---------|--------|
|
||||
| Archive Expired Listings | Schedule `*/15 * * * *` | `status → archived` wenn `expires_at < NOW` |
|
||||
| Notify: Listing Published | Webhook (btcpay-webhook.php) | Creates notification when listing is published after payment |
|
||||
| Notify: New Message | Event Hook `items.create` on `messages` | Creates notification for message recipient |
|
||||
|
||||
Siehe `docs/DIRECTUS-SCHEMA.md` für vollständiges Schema.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user