Files
eventify-server-monitor/server/package.json
Sicherhaven a246bee2aa feat: add Settings (user management) and Notifications pages
Backend:
- User management API: GET/POST/PUT/DELETE /api/users
  Supports two roles: developer, server-admin
  Each user has notifyOnError toggle for email alerts
- Notification API: GET /api/notifications, mark read, unread count
- Email service: sends alerts via SMTP (mail.bshtech.net/noreply@bshtech.net)
  to all users with notifyOnError=true on error/warning events
- Health monitor: checks CPU, memory, disk, Docker containers every 60s
  Creates notifications + sends email on threshold breaches
  Detects container down, high CPU (>90%), memory (>90%), disk (>85%)
  Sends recovery notifications when issues resolve
- File-based JSON storage for users and notifications (data/ directory)
- Added nodemailer dependency

Frontend:
- Settings page: user list with role badges, email alert toggles,
  add/remove user forms. Roles: Developer (blue), Server Admin (amber)
- Notifications page: real-time alert feed with type icons (error/warning/
  info/recovery), read/unread state, email sent indicator, time ago display
- Added Notifications to sidebar navigation
- Wired both pages into App.tsx router

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 08:23:00 +05:30

28 lines
593 B
JSON

{
"name": "server",
"version": "1.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "tsx watch src/index.ts",
"start": "tsx src/index.ts"
},
"dependencies": {
"cors": "^2.8.5",
"dotenv": "^16.4.0",
"express": "^4.21.0",
"jsonwebtoken": "^9.0.3",
"nodemailer": "^6.9.0",
"ssh2": "^1.16.0"
},
"devDependencies": {
"@types/cors": "^2.8.17",
"@types/express": "^5.0.0",
"@types/jsonwebtoken": "^9.0.10",
"@types/nodemailer": "^6.4.0",
"@types/ssh2": "^1.15.0",
"tsx": "^4.19.0",
"typescript": "^5.8.0"
}
}