← arif.shProject system
FastAPI Radar
Real-time request, SQL query, exception, and trace dashboard for FastAPI apps.
What it does
FastAPI Radar mounts middleware, captures HTTP and database behavior, stores it in DuckDB by default, and exposes API/dashboard routes inside the app.
System map
1input
FastAPI App
Routes stay unchanged
2service
Radar(app)
Configures middleware and routes
3service
RadarMiddleware
Requests, responses, exceptions
4service
QueryCapture
SQLAlchemy events
5storage
DuckDB Store
Captured requests and traces
6output
Dashboard/API
/__radar live view
Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.
Selected node
FastAPI App
Routes stay unchanged
input
Codebase read
- Radar adds a Starlette middleware that records request metadata, bodies, exceptions, and timings.
- QueryCapture attaches SQLAlchemy before/after cursor listeners and connects queries back to request context.
- The storage layer defaults to DuckDB and switches to memory under development reload to avoid file locks.
Key snippet
from fastapi import FastAPI
from fastapi_radar import Radar
from sqlalchemy import create_engine
app = FastAPI()
engine = create_engine("sqlite:///./app.db")
radar = Radar(app, db_engine=engine)
radar.create_tables()
Tech used
PythonFastAPIStarletteSQLAlchemyDuckDBPydanticTracing
Source paths inspected
fastapi_radar/radar.pymiddleware.pycapture.pytracing.pyapi.py
More project systems
GoVisualZero-config HTTP request visualizer for Go applications.→ LLMDogTerminal UI for selecting code context and turning it into LLM-ready Markdown.→ PromptPilotPrompt versioning and A/B testing across AI providers.→ GIQAI-enhanced Git workflow assistant that keeps normal Git semantics intact.→