Monorepo: Vite React site (frontend) and FAQ chatbot API (backend, FastAPI + Uvicorn).
- Node.js — see frontend/README.md
- Python 3.11+ — see backend/README.md
From the repository root:
npm install- Frontend (Vite, env vars, build, tests, lint): frontend/README.md
- Backend (Python venv,
pip install, API env): backend/README.md
From the repo root, one command starts both the Vite app and the chat API:
npm run dev- Frontend only:
npm run dev:frontend - API only:
npm run dev:backend(runs Uvicorn with reload onbackend)
Environment files live in frontend/.env and backend/.env (copy from each package’s .env.example). Details: frontend/README.md, backend/README.md.
- Browser calls
POST /chaton the backend URL (VITE_CHATBOT_API_BASE_URL, defaulthttp://localhost:8787) - The API retrieves snippets from static site copy, optional Contentful entries, and optional GitHub Markdown
- Hugging Face chat completion (with text-generation fallback) produces grounded answers
- Weak retrieval (with no prior conversation history) returns a safe fallback with contact guidance
npm test
npm run test:backend- Frontend (Vitest): frontend/README.md
- Backend (pytest): backend/README.md
npm run lintSee frontend/README.md.
- Frontend build / preview: frontend/README.md
- API (Uvicorn): backend/README.md
npm run build:backend runs compileall on backend/app as a quick syntax check only.