A real-time dashboard for visualizing Conspire P2P statistics and metrics.
- Dynamic Data Loading: Fetches stats data from online JSON endpoints
- Multiple Data Sources: Supports remote URLs, local JSON files, CORS proxies, and demo data
- Real-time Visualizations: Interactive charts showing peer activity, room usage, communication patterns, and system metrics
- Responsive Design: Works on desktop and mobile devices
- CORS Handling: Comprehensive solutions for cross-origin request issues
- Error Handling: Graceful handling of network errors with retry functionality and helpful solutions
- Customizable Data Source: Configurable stats URL via URL parameters
Open index.html in a web browser. The dashboard will automatically fetch data from the default stats endpoint:
https://conspire.dyne.org:8443/admin/stats.json
You can specify a custom stats URL using the statsUrl parameter:
index.html?statsUrl=https://your-conspire-server.com:8443/admin/stats.json
If you encounter CORS (Cross-Origin Resource Sharing) errors when fetching data from a remote server, you have several options:
Click the "Try CORS Proxy" button in the error dialog to route requests through a public CORS proxy service.
- Click "Load JSON File" button
- Select a JSON file from your computer (use
sample-stats.jsonfor testing) - The dashboard will display data from your local file
Click "Load Sample Data" to see the dashboard with demonstration data.
- Same Origin: Host the dashboard on the same server as the stats API
- CORS Headers: Configure your server to include CORS headers:
Access-Control-Allow-Origin: * Access-Control-Allow-Methods: GET, OPTIONS Access-Control-Allow-Headers: Content-Type
For local development, start Chrome with disabled web security:
google-chrome --disable-web-security --user-data-dir="/tmp/chrome_dev"Start a local web server in the dashboard directory:
cd dashboard
python3 -m http.server 8000Then open http://localhost:8000 in your browser.
The dashboard expects JSON data in the following format:
[
{
"timestamp": 1759175878080771,
"ev_front_page_loaded": 1,
"ev_peer_connected": 11,
"ev_peer_disconnected": 9,
"ev_peer_zombie_dropped": 5,
"ev_peer_send_message": 4,
"ev_peer_share_file": 2,
"ev_room_created": 6,
"ev_room_deleted": 4,
"file_served_bytes": 468185
}
]The dashboard displays four main visualizations:
- Peer Activity: Tracks peer connections, disconnections, and zombie drops
- Room Activity: Shows room creation and deletion patterns
- Communication: Displays message sending and file sharing activity
- System Metrics: Combines front page loads and data served metrics
- Network Errors: Displays error messages with retry functionality
- Invalid Data: Validates JSON format and data structure
- Loading States: Shows loading indicators during data fetch
Use the "Refresh Data" button to manually reload the latest statistics, or call refreshDashboard() programmatically.
The dashboard uses modern JavaScript features (async/await, fetch API) and requires:
- Chrome 55+
- Firefox 52+
- Safari 10.1+
- Edge 79+
Chart colors are defined in the colors array in app.js and follow the design system.
Dashboard styling uses CSS custom properties (variables) defined in style.css with support for light/dark mode themes.
To add new metrics:
- Ensure the data is present in the JSON response
- Add new datasets to the appropriate chart configuration
- Assign colors from the
colorsarray