FastAPI backend for the Digital Twin Course chat widget. Powers knowledge search, SPIN qualification questionnaire, and product recommendations.
pip install -r requirements.txt
uvicorn main:app --reload| Method | Path | Description |
|---|---|---|
| GET | /api/health |
Health check |
| GET | /api/search?q=... |
Knowledge base search |
| POST | /api/chat |
Chat + SPIN questionnaire |
| GET | /api/resources |
Curated resource list |
| GET | /api/smile |
SMILE methodology overview |
| GET | /api/smile/{phase_id} |
SMILE phase detail |
pip install pytest httpx
python -m pytest tests/ -vDeployed to Vercel via vercel --prod. See vercel.json for config.
See .env.example. The API works without any env vars (fallback mode).