{
  "entry_points": [
    "app/main.py: FastAPI application startup and route registration",
    "/v1/chat/completions: HTTP endpoint handled by app/proxy.py for LLM traffic",
    "Dashboard routes: UI endpoints registered in app/main.py serving aggregated statistics"
  ],
  "data_flow": [
    "External HTTP requests enter via FastAPI (app/main.py) and are dispatched to route handlers",
    "app/proxy.py intercepts /v1/chat/completions, extracts metadata, and forwards the payload to upstream llama.cpp",
    "Request/response metadata and logs are passed to app/store.py for persistence in SQLite",
    "app/reports.py queries SQLite to aggregate metrics and generate dashboard statistics",
    "app/redaction.py processes stored/requested data to strip secrets before rendering previews or dashboard views"
  ],
  "risks": [
    "SQLite concurrency limits and write bottlenecks under high proxy throughput",
    "Secret leakage if app/redaction.py uses incomplete patterns, fails silently, or is bypassed",
    "Unauthenticated/unauthorized access to proxy and dashboard endpoints enabling abuse or data exposure",
    "SSRF or upstream routing risks if llama.cpp endpoint configuration is dynamically resolved or unvalidated",
    "Sensitive prompt/response data stored unencrypted in SQLite at rest",
    "Missing request size limits, timeouts, or circuit breakers could cause memory exhaustion or cascading failures"
  ]
}