How anushkabadakh/incident-pulselive works
Incident PulseLive lets employees report incidents, engineers assign and update them, and managers monitor operational status. The React dashboard uses REST for incident actions and queries; backend controllers dispatch to separate CQRS command and query handlers. Commands mutate the incident domain, persist through a repository adapter, and publish notifications; dashboard updates also arrive over WebSockets. The README documents authentication and live updates, while sampled source confirms selected handlers and adapters; unsampled frontend wiring is represented only where documented.
Main entry points: command Command handlers · Dashboard.jsx Dashboard · IncidentController.java Incident API · App.jsx React app
Components 26
React dashboard
- React app
frontend/src/App.jsx - Dashboard
frontend/src/pages/Dashboard.jsx - Create incident
frontend/src/components/CreateIncidentForm.jsx - Incident list
frontend/src/components/IncidentList.jsx - Dashboard metrics
frontend/src/components/DashboardMetrics.jsx - REST client
frontend/src/services/api.js - WebSocket client
frontend/src/services/websocket.js
REST presentation
- Incident API
backend/src/main/java/com/eaton/incidentmanagement/presentation/controller/IncidentController.java - Login API
backend/src/main/java/com/eaton/incidentmanagement/presentation/controller/AuthController.java - API errors
backend/src/main/java/com/eaton/incidentmanagement/presentation/exception/GlobalExceptionHandler.java
Incident application
- Command handlers
backend/src/main/java/com/eaton/incidentmanagement/application/command - Query handler
backend/src/main/java/com/eaton/incidentmanagement/application/query/IncidentQueryHandler.java - Incident DTO
backend/src/main/java/com/eaton/incidentmanagement/application/dto/IncidentDto.java - Notification port
backend/src/main/java/com/eaton/incidentmanagement/application/dto/NotificationPort.java
Incident domain
- Incident aggregate
backend/src/main/java/com/eaton/incidentmanagement/domain/entity/Incident.java - Repository port
backend/src/main/java/com/eaton/incidentmanagement/domain/entity/IncidentRepository.java
Infrastructure
- Repository adapter
backend/src/main/java/com/eaton/incidentmanagement/infrastructure/persistence/IncidentRepositoryImpl.java - JPA repository
backend/src/main/java/com/eaton/incidentmanagement/infrastructure/persistence/IncidentJpaSpringRepository.java - WebSocket publisher
backend/src/main/java/com/eaton/incidentmanagement/infrastructure/websocket/WebSocketNotificationService.java - JWT service
backend/src/main/java/com/eaton/incidentmanagement/infrastructure/security/JwtService.java - Security config
backend/src/main/java/com/eaton/incidentmanagement/infrastructure/config/SecurityConfig.java
Other components
- Employee
- Engineer
- Manager
- MySQL
- STOMP topics
Connections 28
- Employee → React app: uses
- Engineer → React app: uses
- Manager → React app: uses
- React app → Dashboard: renders
- Dashboard → Create incident: shows
- Dashboard → Incident list: shows
- Dashboard → Dashboard metrics: shows
- Create incident → REST client: submits via
- Incident list → REST client: loads via
- Dashboard metrics → REST client: loads via
- REST client → Incident API: HTTP requests
- WebSocket client → STOMP topics: subscribes
- WebSocket publisher → STOMP topics: publishes
- Incident API → Command handlers: dispatches writes
- Incident API → Query handler: dispatches reads
- Login API → JWT service: generates token
- Security config → JWT service: validates token
- Command handlers → Repository port: reads and saves
- Command handlers → Incident aggregate: changes state
- Command handlers → Incident DTO: maps result
- Command handlers → Notification port: notifies
- Query handler → Repository port: reads incidents
- Query handler → Incident DTO: maps results
- Repository adapter → Repository port: implements
- Repository adapter → JPA repository: delegates storage
- JPA repository → MySQL: reads and writes
- WebSocket publisher → Notification port: implements
- API errors → Incident API: formats errors