Skip to content

Commit 5a6ede4

Browse files
Sahil Chachraclaude
authored andcommitted
docs: add dashboard screenshot and update docs to mention /dashboard
- README: new "Monitoring Dashboard" section with screenshot and feature list, dashboard added to API endpoint table, roadmap item marked done - QUICKSTART: dashboard step added after statistics curl examples - PROJECT_OVERVIEW: /dashboard row added to API endpoints table Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent aeeab43 commit 5a6ede4

4 files changed

Lines changed: 30 additions & 1 deletion

File tree

PROJECT_OVERVIEW.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ FastAPI application that wraps the pipeline.
217217
| `/api/v1/config` | GET || Sanitised safety config |
218218
| `/health` | GET || Server health + uptime |
219219
| `/health/backend` | GET || Remote LLM reachability probe |
220+
| `/dashboard` | GET || Built-in monitoring dashboard UI |
220221

221222
**Environment variables:**
222223

QUICKSTART.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,15 @@ curl -X POST http://localhost:8000/api/v1/statistics/reset \
244244
-H "X-API-Key: <ADMIN_API_KEY>"
245245
```
246246

247+
#### 6. Monitoring dashboard (browser)
248+
249+
Open **http://localhost:8000/dashboard** in your browser for a live visual
250+
overview of all the above — no extra tools needed. The dashboard polls the API
251+
every 10 seconds and shows request counts, accept rate, rejection reasons,
252+
latency, and backend health.
253+
254+
![Dashboard preview](docs/dashboard-preview.png)
255+
247256
---
248257

249258
## 📊 Common Use Cases

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,11 +395,30 @@ python api_server.py
395395
| `GET /api/v1/config` | Sanitised safety config |
396396
| `GET /health` | Server health + uptime |
397397
| `GET /health/backend` | Remote LLM reachability probe |
398+
| `GET /dashboard` | Monitoring dashboard UI |
398399

399400
Interactive docs: `http://localhost:8000/docs`
400401

401402
---
402403

404+
## Monitoring Dashboard
405+
406+
A built-in real-time dashboard is served at **`http://localhost:8000/dashboard`** — no extra tooling required.
407+
408+
![LLM Safety Dashboard](docs/dashboard-preview.png)
409+
410+
The dashboard auto-refreshes every 10 seconds and shows:
411+
412+
- **Live status chips** — server health and backend reachability
413+
- **Request counts** — total / accepted / rejected with percentages
414+
- **Average latency** per request
415+
- **Accept rate** progress bar
416+
- **Accept / reject donut chart** (pure SVG, no external dependencies)
417+
- **Rejection reason breakdown** — colour-coded bars for each rejection type (`token_filter`, `pattern_match`, `semantic_unsafe`, etc.)
418+
- **System info** — version, uptime, backend type, model, backend URL
419+
420+
---
421+
403422
## Testing
404423

405424
```bash
@@ -450,7 +469,7 @@ docker run -p 8000:8000 \
450469
## Roadmap
451470

452471
- [ ] Multi-language support (non-English prompts)
453-
- [ ] Real-time monitoring dashboard
472+
- [x] Real-time monitoring dashboard (`/dashboard`)
454473
- [ ] Streaming response support
455474
- [ ] Custom classifier model plug-in API
456475
- [ ] Distributed deployment with shared rate-limit store (Redis)

docs/dashboard-preview.png

77.8 KB
Loading

0 commit comments

Comments
 (0)