Upload a venue spec PDF → structured findings, prioritized questions, and a draft email. Built for WashU DevFest / Google Build with AI (April 2026).
- API: FastAPI (Python 3.12+), PyMuPDF, Gemini, ChromaDB (see
PLAN.mdfor full roadmap) - Pipeline (Phase 2): Ingest → validate vs canonical JSON → ambiguity (Gemini + RAG snippets) → synthesize (
FinalReport+ email draft). Orchestration: asyncio sequential runner withPipelineStepevents (SSE-friendly); LangGraph/ADK deferred to limit deps. - UI: React, Vite, Tailwind (dark theme)
Backend
cd backend
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reload --port 8000Backend tests
cd backend
source .venv/bin/activate
pip install -r requirements.txt
python -m pytest tests -qOptional: ITCH_PDF_PATH=/path/to/NQTVITCHspecification.pdf python -m pytest tests -q -m integration
Frontend
cd frontend
npm install
npm run devVite proxies /api/* to http://127.0.0.1:8000 (strip /api prefix). For Gemini, set GEMINI_API_KEY in the environment or in a .env file at the repo root or in backend/.env (loaded automatically on API startup via python-dotenv).
Check Gemini at runtime: GET http://127.0.0.1:8000/health returns gemini_configured (boolean, never the key) and golden_demo. If golden_demo is true, uploads use the cached golden job and do not call the live pipeline or Gemini. After a real PDF upload, inspect ambiguity_findings and server logs (Gemini ambiguity pass failed indicates an API error after the key was accepted).
API (after upload): GET /report/{job_id} returns spec_document, schema_findings, ambiguity_findings, final_report, and pipeline_steps. SSE: GET /jobs/{job_id}/stream streams step events until {"done": true, ...}. Demo cache: set SPEC_SENTINEL_GOLDEN_DEMO=1 to return backend/data/cache/golden_job.json without processing the PDF.
cp .env.example .env
# edit .env — set GEMINI_API_KEY when needed (Compose loads repo-root `.env` for the API service)
docker compose up --build- API: http://localhost:8000
- Frontend (nginx): http://localhost:5173
backend/— FastAPI app, agents, tools,models/schema.py,data/reference_schema/frontend/— Vite + React shell (Tier A UI in Step 9 ofPLAN.md)
Implementation follows the linear steps in PLAN.md (scaffold → schema → ingestion → validation API → orchestration → full pipeline / Phase 2).
User (React) ──HTTP/SSE──► FastAPI ──► Orchestrator (asyncio pipeline)
│
┌───────────────────────────────┼───────────────────────────────┐
▼ ▼ ▼ ▼
Agent 1 Agent 2 Agent 3 Agent 4
Ingest Validate Ambiguity Synthesize
PyMuPDF vs canonical Gemini + Merge + email draft
JSON + rules RAG snippets (typed FinalReport)
Typed payloads live in backend/models/schema.py. Step events stream over SSE for GET /jobs/{job_id}/stream. A fuller diagram and roadmap live in plan.md (Appendix B).
See DEMO.md for the ~3 minute judge script, golden vs live run, measured-count table, and Devpost/video checklist.