toknmtr — self-hostable Claude Code usage & analytics dashboard

Server (SvelteKit + SQLite Docker container) + per-machine agent that parses
Claude Code JSONL transcripts. docker-compose one-command deploy; raw transcript
view + search gated behind SHOW_TRANSCRIPTS (hidden by default).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
megaproxy 2026-07-08 19:33:55 +01:00
commit 71a60ab054
74 changed files with 15613 additions and 0 deletions

18
src/lib/server/config.ts Normal file
View file

@ -0,0 +1,18 @@
import { env } from '$env/dynamic/private';
/**
* Runtime feature flags. Read from the environment lazily (via `$env/dynamic/private`)
* so the container is reconfigurable without a rebuild.
*/
/**
* Gate for the raw-conversation surfaces the full per-session **transcript view**
* (`/sessions/[host]/[sessionId]`) and full-text **search** (`/search` + `/api/search`),
* both of which expose verbatim prompt/response text.
*
* Defaults to **false (hidden)**: the dashboard is currently reachable publicly, so no
* conversation content should be readable. Aggregate analytics (charts, KPIs, the sessions
* list metadata) stay public regardless. Flip on with `SHOW_TRANSCRIPTS=true` once access
* is gated behind auth.
*/
export const showTranscripts = env.SHOW_TRANSCRIPTS === 'true';