A comprehensive web-based interface monitoring dashboard for HR integrations, built with MERN stack (MongoDB, Express.js, React, Node.js).
- Summary Metrics: Success rate, total executions, failed runs, and running processes
- Visual Trends: Real-time charts showing interface execution patterns
- Status Distribution: Pie chart visualization of success/failure rates
- Interface Health: Overview of all HR integration interfaces with health indicators
- Recent Failures: Quick view of the latest failed integrations
- Comprehensive Table: Display all interface logs with key information
- Advanced Filtering: Filter by interface name, integration key, status, severity, date range
- Search Functionality: Global search across all log fields
- Pagination: Efficient handling of large datasets (500k+ records)
- Real-time Updates: Auto-refresh capabilities
- Quick Periods: Last Hour, 24 Hours, Week, Month
- Custom Date Range: Select specific start and end dates
- Performance Optimized: Efficient queries for large datasets
- React 19 with Vite for fast development
- React Router for navigation
- Recharts for interactive charts and visualizations
- Lucide React for consistent icons
- Date-fns for date manipulation
- CSS3 for responsive styling
- Node.js with Express.js framework
- MongoDB with Mongoose ODM
- Security: Helmet, CORS, rate limiting
- Performance: Pagination, indexing, aggregation queries
- Error Handling: Comprehensive error management
HR/
βββ Backend/
β βββ models/
β β βββ InterfaceLog.js
β βββ routes/
β β βββ logs.js
β β βββ dashboard.js
β βββ utils/
β β βββ seedData.js
β βββ .env
β βββ server.js
β βββ package.json
βββ Frontend/
β βββ src/
β β βββ components/
β β β βββ Dashboard.jsx
β β β βββ Logs.jsx
β β β βββ Header.jsx
β β β βββ *.css
β β βββ App.jsx
β β βββ App.css
β β βββ main.jsx
β βββ .env
β βββ package.json
βββ README.md
- Node.js (v16 or higher)
- MongoDB Atlas account (or local MongoDB)
- npm or yarn
-
Navigate to backend directory:
cd Backend -
Install dependencies:
npm install
-
Configure environment variables:
- Copy
.envfile (already configured with MongoDB URI) - Update MongoDB connection string if needed
- Copy
-
Seed database (optional - generates 500k test records):
npm run seed
-
Start backend server:
npm run dev
-
Navigate to frontend directory:
cd Frontend -
Install dependencies:
npm install
-
Configure API endpoint:
- Update
.envfile with correct API URL if needed
- Update
-
Start development server:
npm run dev
-
Open browser:
- Navigate to
http://localhost:5173
- Navigate to
GET /api/dashboard/summary- Summary metrics for dashboardGET /api/dashboard/trends- Trend data for chartsGET /api/dashboard/interfaces- Interface health overview
GET /api/logs- Get all logs with pagination and filteringGET /api/logs/:id- Get specific log by IDPOST /api/logs- Create new log entryPUT /api/logs/:id- Update log entryDELETE /api/logs/:id- Delete log entryGET /api/logs/filters/values- Get unique values for filters
- Database Indexing: Optimized indexes for 500k+ records
- Pagination: 50 records per page with efficient cursor-based pagination
- Aggregation Pipelines: MongoDB aggregations for complex queries
- Caching: Frontend caching for better UX
- Responsive Design: Mobile-first responsive design
- Lazy Loading: Efficient data loading strategies
- Rate Limiting: 1000 requests per 15-minute window
- CORS Configuration: Secure cross-origin requests
- Input Validation: Comprehensive validation on all endpoints
- Helmet: Security headers
- Environment Variables: Sensitive data protection
- Navigate to home (
/) for dashboard overview - Select time period using buttons (1h, 24h, 7d, 30d)
- View metrics and charts in real-time
- Monitor interface health across all integrations
- Navigate to logs (
/logs) for detailed log view - Use filters to narrow down results:
- Interface name dropdown
- Status and severity filters
- Date range picker
- Global search
- Navigate pages using pagination controls
- Export data (future enhancement)
- Backend: Add new routes in
routes/directory - Frontend: Create new components in
components/directory - Styling: Use CSS modules or styled-components
- Testing: Add unit tests for critical functions
The InterfaceLog model includes:
- Interface identification (name, key)
- Execution details (status, message, duration)
- Metadata (source/target systems, job ID)
- Timestamps and performance metrics
- Connection errors: Check MongoDB connection string
- CORS issues: Verify CORS configuration in backend
- Port conflicts: Ensure ports 5000 and 5173 are available
- Missing data: Run seed script to populate test data
- Use database indexes for large datasets
- Implement pagination for list views
- Cache frequently accessed data
- Monitor API response times
- Fork the repository
- Create feature branch
- Make changes with tests
- Submit pull request
This project is created for the HR Interface Monitoring Challenge.
For issues or questions:
- Check the troubleshooting section
- Review API documentation
- Test with provided seed data
- Monitor browser console for errors