Commit Graph

6 Commits

Author SHA1 Message Date
Jose Olarte III
a5266615eb feat(push): send silent iOS wakeups via FCM APNs background
Use apns-push-type background, priority 5, contentAvailable-only aps
payload, and WAKEUP_PING data without alert or sound.
2026-05-11 17:09:01 +08:00
Jose Olarte III
1115929437 feat(push): dedupe FCM sends with 23h / 10m windows
Track lastNotifiedAt on stored tokens, preserve it on register upsert,
and skip messaging.send when inside the production or test-mode window.
2026-05-11 16:56:07 +08:00
Jose Olarte III
2b57ec0e1c feat(notifications): add POST /refresh schedule response
Return shouldNotify and nextNotifications with a 10-minute lookahead
timestamp for the app schedule API.
2026-05-11 15:59:26 +08:00
Jose Olarte III
64ea7d2f98 feat(notifications): persist FCM tokens on POST /register
Add JSON-backed upsert store (data/fcm-tokens.json, optional
FCM_TOKEN_DATA_DIR), validate body fields, and gitignore data/.
2026-05-11 14:52:09 +08:00
Jose Olarte III
d311b6a504 feat(fcm): add Firebase Admin SDK and messaging export
Wire firebase-admin with ADC or FIREBASE_SERVICE_ACCOUNT_JSON,
export messaging from src/services/firebase.ts, and load it at
server startup.
2026-05-11 14:47:05 +08:00
Jose Olarte III
94c38bac74 feat(backend): scaffold Express API with health and module layout
Add src/routes/notifications, services/pushService, models/device,
scheduler stubs, and entrypoint with GET /health and startup log.
2026-05-11 14:33:32 +08:00