Stack: FastAPI (Python) + Vanilla JavaScript.
competitor-intel/
backend/
frontend/
cd competitor-intel/backend
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
playwright install
cp .env.example .envSet at least one of:
ANTHROPIC_API_KEY(preferred)OPENAI_API_KEY
Run:
uvicorn main:app --reload --port 8000Serve competitor-intel/frontend/index.html with any static server (VS Code Live Server is fine).
Backend base URL defaults to http://localhost:8000 (see frontend/js/api.js).
POST /api/analyze→ returns report (blocking)GET /api/analyze/stream?url=...→ SSE progress + creates reportGET /api/reports→ list reportsGET /api/reports/{id}→ report detailDELETE /api/reports/{id}→ delete report