- Add web-push VAPID backend with push_subscriptions table (migration 078) - Backend push module with sendPushToUser/sendPushToRoom helpers - Push routes: GET vapid-key, POST subscribe, DELETE unsubscribe - Trigger push on new chat messages in direct/group rooms - PWA manifest, service worker, and icons (72–512px) - Frontend push lib: SW registration, subscribe/unsubscribe helpers - Push API in api.ts, SW registered in main.tsx - usePushSubscription hook for auto-subscribe on permission grant - PushPermissionRow component in ChatWidget settings view Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
38 lines
952 B
JSON
38 lines
952 B
JSON
{
|
|
"name": "hotelsync-api",
|
|
"version": "1.0.0",
|
|
"description": "HotelSync PMS — REST API",
|
|
"main": "dist/server.js",
|
|
"scripts": {
|
|
"dev": "tsx watch src/server.ts",
|
|
"build": "tsc",
|
|
"start": "node dist/server.js"
|
|
},
|
|
"dependencies": {
|
|
"@fastify/cookie": "^9.4.0",
|
|
"@fastify/cors": "^9.0.1",
|
|
"@fastify/helmet": "^11.1.1",
|
|
"@fastify/jwt": "^8.0.1",
|
|
"@fastify/multipart": "^8.3.0",
|
|
"@fastify/rate-limit": "^9.1.0",
|
|
"@fastify/static": "^7.0.4",
|
|
"@fastify/websocket": "^8.3.1",
|
|
"@types/web-push": "^3.6.4",
|
|
"bcryptjs": "^2.4.3",
|
|
"fastify": "^4.28.1",
|
|
"ioredis": "^5.3.2",
|
|
"nodemailer": "^8.0.2",
|
|
"pg": "^8.12.0",
|
|
"web-push": "^3.6.7"
|
|
},
|
|
"devDependencies": {
|
|
"@types/bcryptjs": "^2.4.6",
|
|
"@types/node": "^20.14.0",
|
|
"@types/nodemailer": "^7.0.11",
|
|
"@types/pg": "^8.11.6",
|
|
"@types/ws": "^8.18.1",
|
|
"tsx": "^4.15.7",
|
|
"typescript": "^5.4.5"
|
|
}
|
|
}
|