Messenger/packages/backend/package.json
Заид Омар Медхат | Zaid Omar Medhat 47fbf861ee Phase 6.5: notifications service + in-app toasts; in-app voice/video messages; SVG icons
Notifications (web push now, Android FCM ready, iOS prepared):
- device_tokens / notification_settings / conversation_mutes (migration 006)
- REST: register/list/unregister devices, get/update settings (quiet hours,
  timezone, enable), mute/unmute conversation, VAPID public key
- BullMQ queue: backend enqueues a job per new message; a dedicated stateless
  `notifications` worker service drains it
- Delivery gating: skip sender, muted chats, disabled users, quiet hours, and
  ONLINE users (they get the message live + an in-app toast) — offline → push
- Providers behind one interface: Web Push (VAPID/web-push) + FCM (firebase-admin,
  HTTP v1; Android + iOS via the same path). Dead tokens (404/410/unregistered)
  auto-retired; transient failures recorded
- Web: service worker (push display + tap-to-open the originating chat), push
  registration/unregistration, in-app toast stack, deep-link via ?conversation=

In-app voice & video messages: MediaRecorder capture in the composer (mic/video),
live preview + timer, upload via the existing presigned-media path.

No emojis anywhere: replaced all glyphs with inline SVG icons (shared/ui) so the
UI renders identically across web/desktop/mobile; notification text is plain.

Chores: dedupe ioredis (BullMQ) + pin uuid>=11.1.1 (audit clean) via pnpm overrides;
reusable Centrifugo client factory for the worker.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BFRyKxkKEjfAgpXygzoNiD
2026-07-10 19:05:39 +05:00

46 lines
1.2 KiB
JSON

{
"name": "@altricade/backend",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "tsx watch src/server.ts",
"dev:worker": "tsx watch src/worker.ts",
"build": "tsup",
"start": "node dist/server.js",
"start:worker": "node dist/worker.js",
"typecheck": "tsc --noEmit",
"lint": "eslint .",
"migrate:up": "node-pg-migrate up",
"migrate:down": "node-pg-migrate down"
},
"dependencies": {
"@altricade/core": "workspace:^",
"@fastify/cookie": "^11.1.1",
"@fastify/cors": "^11.3.0",
"@fastify/rate-limit": "^11.1.0",
"@fastify/swagger": "^9.8.0",
"@fastify/swagger-ui": "^6.1.0",
"@node-rs/argon2": "^2.0.2",
"ajv-formats": "^3.0.1",
"bullmq": "^5.80.0",
"fastify": "^5.10.0",
"fastify-plugin": "^6.0.0",
"firebase-admin": "^14.1.0",
"ioredis": "^5.11.1",
"jose": "^6.2.3",
"kysely": "^0.29.3",
"minio": "^8.0.7",
"node-pg-migrate": "^8.0.4",
"pg": "^8.22.0",
"web-push": "^3.6.7"
},
"devDependencies": {
"@types/node": "^26.1.1",
"@types/pg": "^8.20.0",
"@types/web-push": "^3.6.4",
"tsup": "^8.5.1",
"tsx": "^4.23.0",
"typescript": "^5.9.3"
}
}