How brymahh/query_court works
The repository currently implements a small FastAPI foundation: it loads settings and serves a health endpoint, with a PostgreSQL connectivity helper. The README describes the broader Query-Court product—a streamed generator/critic SQL-review workflow with optional schema and sandbox checks, persistence, and tracing—but those components are not present in the supplied source tree. Those documented capabilities are shown as planned or unsampled components, using only supported paths. The workflow relationships beyond the health endpoint are README-level evidence, not inspected implementation.
Main entry points: app Generator-critic workflow · main.py FastAPI service · database.py DB connectivity check · settings.py Runtime settings
Components 15
API foundation
- FastAPI service
src/app/main.py - Runtime settings
src/app/settings.py - Health endpoint
src/app/main.py - DB connectivity check
src/app/database.py
SQL review workflow
- Generator-critic workflow
src/app - SQL generator
src/app - SQL critic
src/app - Deterministic checks
src/app
Schema and execution
- Schema context input
src/app - DDL schema parser
src/app - Isolated SQL sandbox
src/app
History and observability
- PostgreSQL history
- LangSmith tracing
Other components
- User
- Next.js frontend
Connections 14
- FastAPI service → Runtime settings: loads config
src/app/main.py - FastAPI service → Health endpoint: serves
src/app/main.py - User → FastAPI service: requests review
README.md - Next.js frontend → FastAPI service: streams events
README.md - User → Generator-critic workflow: provides request
README.md - Generator-critic workflow → SQL generator: requests SQL
README.md - Generator-critic workflow → SQL critic: requests critique
README.md - SQL critic → Deterministic checks: runs checks
README.md - SQL critic → Schema context input: uses context
README.md - Schema context input → DDL schema parser: parses DDL
README.md - SQL critic → Isolated SQL sandbox: optionally executes
README.md - Generator-critic workflow → PostgreSQL history: stores history
README.md - Generator-critic workflow → LangSmith tracing: sends traces
README.md - DB connectivity check → PostgreSQL history: tests connection
README.md