A real-time system health monitoring dashboard integrated with the BOCH API via RapidAPI. Features a professional, high-density interface with dark and light theme support.
- Node.js 18+ (or Bun)
- A valid RapidAPI key with BOCH API access
# Clone the repository
git clone <YOUR_GIT_URL>
cd <YOUR_PROJECT_NAME>
# Install dependencies
npm install
# or
bun install
# Start development server
npm run dev
# or
bun devThe app will be available at http://localhost:5173
- Launch the dashboard
- Click the key icon in the top navigation bar
- Enter your
X-RapidApi-KeyorX-RapidApi-Userkey - Click Connect to load your watches
- Real-time Watch Monitoring — View all configured watches with live status indicators
- Stoplight Status System — Green/Yellow/Red/Grey indicators based on response latency thresholds
- Global Health Summary — Aggregated status across all watches
- Response Time Graphs — Historical latency visualization per watch
- History Filtering — Filter data by time range (7, 14, 30, 60, 90 days, or all)
- Dark/Light Theme — Toggle between themes (persisted in localStorage)
- Drag & Drop Reordering — Customize watch card arrangement
- Responsive Layout — Works on desktop and tablet screens
- Watch Management — Add, edit, activate/deactivate, and delete watches
- Uptime Percentage — Calculated from historical checks
- Average Response Time — Mean latency over filtered period
- Last Check Status — Most recent check result with timestamp
- Trend Indicators — Visual cues for performance direction
All configuration is centralized in src/config/app.config.ts:
export const STOPLIGHT_THRESHOLDS = {
percentile: 95, // Percentile for latency calculation
criticalLatencyMs: 3000, // Red light threshold (ms)
warningLatencyMs: 1000, // Yellow light threshold (ms)
graphAggregation: "percentile",
watchStatusScope: "total",
summaryMetricsScope: "total"
};export const HISTORY_FILTER_OPTIONS = [
{ value: 7, label: "Last 7 days" },
{ value: 14, label: "Last 14 days" },
{ value: 30, label: "Last 30 days" },
{ value: 60, label: "Last 60 days" },
{ value: 90, label: "Last 90 days" },
{ value: "all", label: "All time" },
];
export const DEFAULT_HISTORY_FILTER = 30;export const GLOBAL_SUMMARY_SETTINGS = {
statusScope: "default", // "default" | "filtered"
inactiveWatchInclusion: "never" // "always" | "never" | "dynamic"
};export const STOPLIGHT_ANIMATION_SETTINGS = {
strobeScope: "all", // "all" | "watches" | "summary" | "none"
strokeSpeedSeconds: 0.5,
strokeStates: {
red: true,
yellow: true,
green: false,
grey: false
}
};CSS variables are defined in src/index.css. Both light and dark themes are fully customizable:
| Token | Purpose |
|---|---|
--background |
Page background |
--foreground |
Primary text |
--primary |
Accent color (buttons, links) |
--card |
Card backgrounds |
--muted |
Subtle backgrounds |
--stoplight-green/yellow/red |
Status indicators |
--graph-line/area |
Chart colors |
- Define the HSL values in
src/index.cssunder:rootand.dark - Add to
tailwind.config.tsundertheme.extend.colors - Use in components via Tailwind classes
- React 18 — UI framework
- Vite — Build tool
- TypeScript — Type safety
- Tailwind CSS — Styling
- shadcn/ui — Component library
- Recharts — Data visualization
- next-themes — Theme management
- TanStack Query — Data fetching
src/
├── components/
│ ├── ui/ # shadcn/ui components
│ ├── Dashboard.tsx # Main dashboard view
│ ├── WatchCard.tsx # Individual watch display
│ ├── GlobalHealth.tsx # Summary health indicator
│ └── ...
├── config/
│ └── app.config.ts # Centralized configuration
├── lib/
│ ├── api.ts # API client
│ └── stoplight.ts # Status calculation logic
├── types/
│ └── api.ts # TypeScript interfaces
└── index.css # Design tokens & global styles
MIT
