ByteWatch is a premium, high-fidelity hardware telemetry dashboard. It monitors active resource utilization on your system, logs metrics in real-time, and displays them via a modern visual interface that requires zero heavy JavaScript libraries or trackers.
- 🕒 Real-Time Polling: Drives live dashboard updates every 2 seconds using HTMX linear swaps with zero custom heavy JS listeners.
- 🌓 Dual-Theme Design: Sleek, glassmorphic Cyber-Neon Dark Theme (default) and high-contrast, premium soft slate Light Theme, with selections persisted in
localStorage. - 📊 Resource Analytics: Captures precise live CPU core statistics, system load averages, clock speeds, and memory consumption.
- 🗃️ Self-Pruning SQLite Logs: Stores telemetry values to a local database (
bytewatch.db) with an automated rolling cleanup thread that prunes records older than 30 minutes to maintain an ultra-lightweight footprint. - ⚡ Process Inspector: Fetches and sorts the Top 15 resource-intensive system threads by CPU load, highlighting high-utilization processes dynamically.
- 🚀 Pre-rendered Load State: Renders telemetry values instantly on the very first page request to prevent blank screen delays before the initial 2-second poll triggers.
- Backend: FastAPI (Asynchronous Web Framework)
- Telemetry: psutil (System Metrics Interface)
- Database: SQLite (Single-file SQL engine)
- Frontend: HTMX (High-speed HTML swaps)
- Styling: Vanilla CSS (Responsive variables and modern glassmorphism layouts)
bytewatch/
├── static/
│ └── style.css # Modern styling rules (variable sheets & responsive layouts)
├── templates/
│ ├── index.html # Main dashboard base template (head tags, toggle, inline scripts)
│ └── vitals.html # Metric panels and process list tables (HTMX swap fragments)
├── database.py # SQLite initialization, logging, and metrics auto-pruning
├── monitor.py # Multithreaded psutil daemon telemetry engine
├── main.py # FastAPI application, templates router, and server startup
├── .gitignore # Excludes local databases, caches, and IDE profiles
└── README.md # Project documentation (this file!)
Ensure you have Python 3.8+ and Git installed on your system.
git clone https://github.com/YOUR_USERNAME/ByteWatch.git
cd ByteWatchInstall all required libraries using pip:
pip install fastapi uvicorn psutil jinja2Launch the server using Python:
python main.pyNavigate to your web browser and access the live application: 👉 http://localhost:8000
graph TD
subgraph "Python Backend"
Thread[Rolling psutil Thread] -->|Periodically inserts metrics| DB[(SQLite Database)]
App[FastAPI Web App] -->|Reads history| DB
App -->|Fetches current processes & stats| Thread
end
subgraph "Frontend (Web Browser)"
UI[HTMX Dashboard] -->|hx-get every 2s| App
App -->|Returns clean HTML tiles| UI
end
ByteWatch is pre-configured to run out of the box in Serverless environments (like Vercel).
- Dynamic Pathing: Automatically detects serverless environments and writes SQLite logs to
/tmp/bytewatch.db(ephemeral writeable storage) instead of the read-only file system. - On-Demand Polling: Switches from rolling background threads (which are frozen in serverless contexts between requests) to high-speed synchronous querying of
psutildata on demand per incoming page load or HTMX swap.
- Make sure your project is committed to GitHub.
- Log into your Vercel Dashboard.
- Click Add New -> Project.
- Import your
ByteWatchrepository. - Vercel will automatically detect
vercel.jsonand build the Python serverless functions. - Click Deploy!
This project is open-source and available under the MIT License.