A lightweight, real-time system health monitoring dashboard for tracking critical pipeline components across Scraper, Backend, and Frontend systems.
-
Install Vercel CLI (if not already installed):
npm install -g vercel
-
Deploy the dashboard:
vercel --prod
-
Your dashboard is live! Vercel will provide you with a URL like
https://your-dashboard.vercel.app
# Install dependencies
npm install
# Start local development server
vercel devThe dashboard will be available at http://localhost:3000
- Real-time status updates (auto-refreshes every 30 seconds)
- Emergency detection - Dashboard turns RED for critical issues
- Service categorization - Scraper, Backend, and Frontend pipelines
- Mobile responsive design
The dashboard implements your defined error response plan:
| Service | Type | Emergency Level |
|---|---|---|
| Data Acquisition | Scraper | 🚨 RED ALERT |
| Data Quality | Scraper | 🕵️ Investigation |
| Server Health | Backend | 🚨 RED ALERT |
| Server Performance | Backend | 🚨 RED ALERT |
| Application Stability | Frontend | 🚨 RED ALERT |
| Client Connectivity | Frontend | 🚨 RED ALERT |
Endpoint: POST /api/update-status
Request Body:
{
"service": "backendHealth",
"status": "red",
"source": "monitoring-system"
}Valid Services:
scraperAcquisitionscraperQualitybackendHealthbackendPerformancefrontendStabilityfrontendConnectivity
Valid Statuses:
green- Operationalred- Issue detected
# Mark backend health as down
curl -X POST https://your-dashboard.vercel.app/api/update-status \
-H "Content-Type: application/json" \
-d '{"service": "backendHealth", "status": "red"}'
# Mark scraper acquisition as operational
curl -X POST https://your-dashboard.vercel.app/api/update-status \
-H "Content-Type: application/json" \
-d '{"service": "scraperAcquisition", "status": "green"}'// In your PostHog webhook handler
const updateDashboard = async (service, status) => {
await fetch('https://your-dashboard.vercel.app/api/update-status', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ service, status, source: 'posthog' })
});
};// In your monitoring system
const alertSlackAndDashboard = async (service, isDown) => {
const status = isDown ? 'red' : 'green';
// Update dashboard
await fetch('https://your-dashboard.vercel.app/api/update-status', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ service, status, source: 'monitoring' })
});
// Send Slack alert if emergency
if (isDown && isEmergencyService(service)) {
await sendSlackAlert(`🚨 EMERGENCY: ${service} is down!`);
}
};// Example health check script
const services = [
{ name: 'backendHealth', url: 'https://api.yourapp.com/health' },
{ name: 'frontendConnectivity', url: 'https://yourapp.com/api/ping' }
];
services.forEach(async (service) => {
try {
const response = await fetch(service.url);
const status = response.ok ? 'green' : 'red';
await fetch('https://your-dashboard.vercel.app/api/update-status', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
service: service.name,
status,
source: 'health-check'
})
});
} catch (error) {
// Mark as down on network errors
await updateDashboard(service.name, 'red');
}
});health-dashboard/
├── index.html # Main dashboard UI
├── status.json # Current system status
├── api/
│ └── update-status.js # Status update webhook
├── package.json # Project configuration
├── vercel.json # Vercel deployment config
└── README.md # This file
- Update
status.jsonwith the new service - Add service configuration in
index.htmlserviceConfig object - Update
VALID_SERVICESarray inapi/update-status.js
All styles are contained in index.html. The dashboard uses:
- CSS Grid for responsive layout
- Modern gradient background
- Card-based service display
- Smooth hover animations
- The API endpoint validates all inputs
- CORS is configured for cross-origin requests
- No authentication required (suitable for internal monitoring)
- Consider adding API keys for production use
For issues or questions about the dashboard implementation, refer to your error triage documentation or create a ticket in your project management system.