Files
oott/push_relay/package.json
T
rzuastiandClaude Opus 4.8 4f3fe10332 Implement push notifications Phase 1 (FCM + project relay)
Backend (Rust):
- push_tokens migration, model (PushToken/PushPlatform), and db layer
  (upsert/list/delete/delete_many)
- PUT/DELETE /api/push_tokens endpoints wired into the router + OpenAPI
- "push" notification method: relay sender (reqwest) that forwards only the
  sanitized title/body and prunes dead tokens, plus settings with a default
  relay_url
- 164 tests pass, clippy clean

Relay (push_relay/, TypeScript Firebase Cloud Function):
- POST /v1/push (firebase-admin sendEach + per-token status mapping),
  GET /healthz, payload validation, per-IP Firestore rate limiting
- Jest tests + README documenting the manual project-owned setup

Frontend (Flutter):
- oott_api_push.dart (register/unregister), push_service.dart behind a
  PushService abstraction, and a per-device push toggle in settings
- firebase_core/firebase_messaging/flutter_local_notifications deps
- 145 tests pass, dart analyze clean

Dev shell:
- add nodejs_22 to the Nix dev shell so the relay tests/build run locally

Remaining (manual, project-owned): create the Firebase project, deploy the
relay and set the real default_relay_url, add native Firebase config, and test
on real devices.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 12:28:03 -04:00

32 lines
791 B
JSON

{
"name": "oott-push-relay",
"version": "0.1.0",
"description": "Stateless relay that forwards OOTT push notifications to FCM/APNs.",
"license": "MIT",
"private": true,
"main": "lib/index.js",
"engines": {
"node": "22"
},
"scripts": {
"build": "tsc",
"lint": "tsc --noEmit",
"test": "jest",
"serve": "npm run build && firebase emulators:start --only functions",
"deploy": "npm run build && firebase deploy --only functions"
},
"dependencies": {
"express": "^4.21.2",
"firebase-admin": "^13.0.2",
"firebase-functions": "^6.3.0"
},
"devDependencies": {
"@types/express": "^4.17.21",
"@types/jest": "^29.5.14",
"@types/node": "^22.10.5",
"jest": "^29.7.0",
"ts-jest": "^29.2.5",
"typescript": "^5.7.3"
}
}