This repo is now a small monorepo:
apps/dashboard/— the Cloudflare Workers + D1 analytics appplugins/hermes-token-analytics/— the Hermes-native plugin source that exportsstate.dbrollups into the dashboard ingest endpointdocs/— shared operator and deployment documentation
The goal is simple: keep the dashboard, ingest contract, plugin source, and operational docs in one place instead of splitting the truth across repos.
For Hermes ingestion operations, the canonical operator guides are:
docs/hermes-token-analytics-plugin.mddocs/hermes-token-analytics-install-runbook.md
- TanStack Start app scaffolded for Cloudflare Workers
- Dashboard shell for daily token, cost, request, latency, model, and tool analytics
- D1 schema for workspaces, daily rollups, model usage, tool usage, and issue events
- Initial migration for local and remote D1 environments
- Product docs:
docs/requirements.mddocs/implementation-plan.mddocs/ai-build-prompts.mddocs/cloudflare-deployment.mddocs/hermes-token-analytics-plugin.mddocs/hermes-token-analytics-install-runbook.mddocs/hermes-sidecar-sync.md(migration pointer to the plugin doc)
The target UX is a dense, operator-facing analytics surface, not a marketing dashboard. The visual reference we preserved:
- crisp header with lightweight tabs
- compact control bar for workspace, environment, and date range
- six dense panels with low-friction chart scanning
- issue list beside metrics, so anomalies are visible without leaving the page
- operational table at the bottom for trace-level or day-level inspection
apps/
dashboard/
plugins/
hermes-token-analytics/
docs/
.github/workflows/
Run these from apps/dashboard/:
npm ci
npm run dev
npm run typecheck
npm run lint
npm run build
npm run cf:d1:migrate:local
npm run cf:d1:bootstrap:local
npm run cf:d1:migrate:remote
npm run deployIf a fresh worktree has no local D1 data yet, run npm run cf:d1:bootstrap:local before npm run dev. It applies local migrations, wipes/reseeds the demo workspaces, and inserts recent daily plus hourly sample data so the dashboard renders immediately.
The Hermes plugin source lives at:
plugins/hermes-token-analytics/
Supporting files:
- install helper:
plugins/hermes-token-analytics/scripts/install-local-plugin.sh - tests:
plugins/hermes-token-analytics/tests/ - operator guide:
docs/hermes-token-analytics-plugin.md - install runbook:
docs/hermes-token-analytics-install-runbook.md - install helper also writes a legacy shim for
plugins/observability/token_analyticsin target Hermes checkouts
GitHub Actions is path-aware:
- app changes validate and deploy from
apps/dashboard/ - plugin changes run Python/plugin validation
- Cloudflare deploy workflows only fire for dashboard/deploy-path changes
See:
docs/github-actions.mddocs/cloudflare-deployment.md
docs/requirements.mddocs/implementation-plan.mddocs/ai-build-prompts.mddocs/cloudflare-deployment.mddocs/github-actions.mddocs/hermes-token-analytics-plugin.mddocs/hermes-sidecar-sync.md
Project board: https://github.com/orgs/Tevpro/projects/32