cai-web
Web dashboard interface for CAI.
Overview
cai-web provides a local web server with real-time updates for browsing CAI data.
Features
- Dashboard: Overview and statistics
- Query Interface: Execute SQL queries
- Entry Browser: Browse all entries
- Real-time Updates: WebSocket for live data
- REST API: Programmatic access
Usage
Standalone
In Code
use MemoryStorage;
use ;
let storage = new;
let config = Config ;
run.await?;
API Endpoints
GET /- Web dashboardGET /api/query- Execute queryGET /api/entries- List entriesGET /api/entries/:id- Get entryWS /ws- WebSocket for updates
Usage
Add to your Cargo.toml:
[]
= { = "../cai-web" }
Design Decisions
- Axum: Async web framework
- WebSocket: Real-time updates
- HTMX: Interactive frontend (optional)
Testing
License
MIT OR Apache-2.0