{
  "entry_points": [
    "app/main.py (FastAPI application initialization and route registration)",
    "HTTP POST /v1/chat/completions (handled by app/proxy.py)",
    "Dashboard/Report GET routes (served by app/main.py)"
  ],
  "data_flow": [
    "Client request -> app/main.py router -> app/proxy.py",
    "app/proxy.py captures metadata -> app/store.py -> SQLite INSERT (runs/llm_requests)",
    "app/proxy.py forwards request/response to upstream llama.cpp",
    "app/reports.py reads from SQLite -> aggregates statistics -> serves dashboard data",
    "Raw stored data -> app/redaction.py -> sanitizes secrets -> serves preview UI"
  ],
  "risks": [
    "Proxy forwarding to llama.cpp lacks explicit input validation, rate limiting, or authentication, risking abuse, prompt injection, or resource exhaustion",
    "SQLite single-file architecture may cause lock contention, concurrency bottlenecks, or database corruption under high write throughput",
    "Metadata logging in SQLite may inadvertently persist PII/secrets if redaction is not applied before storage",
    "app/redaction.py likely relies on pattern matching; naive regex can be bypassed (false negatives) or corrupt legitimate data (false positives)",
    "Synchronous proxy/store operations may block the FastAPI async event loop, leading to request timeouts and cascading service degradation"
  ]
}