feat(sprint-6): Phase 6 — Notifications (WebSocket) + PWA
Deploy to Production / test (push) Has been cancelled
Deploy to Production / deploy (push) Has been cancelled

- WebSocket: Spring STOMP + SockJS, NotificationService, persistent notifications table
- NotificationController: GET/PUT endpoints for notification management
- Frontend: notification bell with unread badge, dropdown panel, real-time via STOMP
- PWA: manifest.json, service worker (manual sw.js), offline page, install prompt
- PWA icons (192+512), dark theme colors, standalone display
- Full i18n (de/en) for notifications and PWA
- Flyway V10 migration for notifications table
- spring-boot-starter-websocket dependency added
This commit is contained in:
Patrick Plate
2026-06-12 23:02:44 +02:00
parent 076fd6f9b3
commit 599514c0db
39 changed files with 6684 additions and 3217 deletions
@@ -0,0 +1,32 @@
import { apiClient } from "@/lib/api-client"
export interface Notification {
id: string
type: string
title: string
message: string
link: string
read: boolean
createdAt: string
}
export interface NotificationsResponse {
notifications: Notification[]
unreadCount: number
}
export async function getNotifications(): Promise<NotificationsResponse> {
return apiClient<NotificationsResponse>("/notifications")
}
export async function markNotificationAsRead(id: string): Promise<void> {
await apiClient<void>(`/notifications/${id}/read`, { method: "PUT" })
}
export async function markAllNotificationsAsRead(): Promise<{
updated: number
}> {
return apiClient<{ updated: number }>("/notifications/read-all", {
method: "PUT",
})
}