Commit Graph

10 Commits

Author SHA1 Message Date
ac49f0a542 fix: use ESM import for mkdirSync instead of require()
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 08:29:20 +05:30
9f399f33e4 fix: resolve TS errors in Settings and Notifications pages
- Remove unused Pencil import and editId/handleUpdate from SettingsPage
- Wrap lucide icons with span for title attribute in NotificationsPage

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 08:27:15 +05:30
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
f98bd60c29 Live CPU chart: 1s polling with 5s x-axis labels
- New useCpuLive hook: dedicated 1s React Query poll for CPU/loadAvg
- CpuChart x-axis labels every 5 data points (= every 5 seconds)
- 60-point visible window (last 60 seconds)
- Removed useCpuHistory in favour of useCpuLive in dashboard

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 16:58:24 +05:30
a22f7b535a Fix unused tick state causing TS build error in CpuChart
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 16:47:57 +05:30
201d40c481 Redesign CPU chart with live flow and real-time status
- Scrolling chart: latest point always anchors to right edge, older points flow left
- LIVE pulsing red badge
- Color-coded CPU%: green/amber/red based on load level
- Load average chips (1m/5m/15m) with color-coded borders
- NOW marker line at right edge
- Smooth cubic-bezier transitions on path, dot, and area
- Gradient fill color adapts to CPU status

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 16:46:43 +05:30
ba63c1ba1a Add multi-user auth: nafih and vivek accounts
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 16:41:43 +05:30
ed13991515 Add JWT authentication with animated login page
- Backend: JWT auth with /api/auth/login and /api/auth/verify endpoints
- Middleware: requireAuth protects all /api routes except /api/auth
- Frontend: Animated characters login page with eye-tracking effects
- Auth state persisted in localStorage with token verification on mount
- Sidebar logout button, 401 auto-logout, 30-day token expiry
- shadcn button, input, checkbox, label components added

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 16:35:30 +05:30
eb6c097664 Add Docker deployment config and production CORS
- Dockerfile with multi-stage build (builder + production)
- docker-compose.yml for EC2 deployment with SSH localhost
- Add status.eventifyplus.com to CORS origins

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 14:05:10 +05:30
7dee2d8069 Initial commit: Eventify Server Health Monitor
Full-stack real-time server monitoring dashboard with:
- Express.js backend with SSH-based metrics collection
- React + TypeScript + Tailwind CSS + shadcn/ui frontend
- CPU, memory, disk, Docker container, and Nginx monitoring
- Pure SVG charts (CPU area chart + memory donut)
- Gilroy font, 10s auto-refresh polling
- Multi-page dashboard with sidebar navigation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 14:02:27 +05:30