feat: Implement alert creation service with FCM notifications

- Add AlertCreationService to handle alert creation and notifications.
- Implement idempotency key support to prevent duplicate alerts.
- Create alert notification service for sending FCM messages.
- Add tests for alert creation and notification services.
- Document FCM notification flow and alert creation process.
This commit is contained in:
2026-07-11 01:18:18 +03:00
parent 93b266f26d
commit ddd67f438b
18 changed files with 1662 additions and 46 deletions

View File

@@ -55,6 +55,11 @@ services:
ADMIN_PASSWORD: ${ADMIN_PASSWORD:-admin123}
ADMIN_FULL_NAME: ${ADMIN_FULL_NAME:-Main administrator}
ADMIN_EMAIL: ${ADMIN_EMAIL:-admin@polotsk-transit.local}
FCM_ENABLED: "${FCM_ENABLED:-false}"
FCM_TOPIC: "${FCM_TOPIC:-route_alerts}"
FCM_ANDROID_CHANNEL_ID: "${FCM_ANDROID_CHANNEL_ID:-route_alerts}"
FIREBASE_PROJECT_ID: "${FIREBASE_PROJECT_ID:-}"
GOOGLE_APPLICATION_CREDENTIALS: "${GOOGLE_APPLICATION_CREDENTIALS:-}"
ports:
- "3000:3000"
depends_on: