FastAPI backend that powers interview analysis, evidence-linked personas, insights, and an API-first workflow.
This is the code used by OSS mode when you run the project; it exposes /health and /docs locally.
- Python 3.11+
- PostgreSQL 12+
- Gemini API Key (create one)
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txtPreferred: use backend/.env.oss managed from repo root via scripts/oss/run_backend_oss.sh.
Minimum variables:
DATABASE_URL=***REDACTED***
GEMINI_API_KEY=***REMOVED***
OSS_MODE=trueRecommended (from repo root):
scripts/oss/run_backend_oss.shOr directly from backend:
uvicorn backend.api.app:app --host 0.0.0.0 --port 8000 --reloadHealth: http://localhost:8000/health Docs: http://localhost:8000/docs
api/— FastAPI app (entry isbackend.api.app:app)services/— Business/domain servicesinfrastructure/— Config, LLM providers, persistence, settingsmodels/— Pydantic/DB modelsmigrations/,alembic/— Database migrationsrun_migrations.py— Helper to run Alembic migrationsrequirements.txt— Pinned Python dependencies
- Interview analysis and synthesis
- Evidence-linked personas
- Insights/themes, patterns, sentiment
- Multi-LLM support (Gemini by default)
See backend/docs/ for deeper design notes.
- FastAPI — modern Python web framework
- SQLAlchemy 2.x — ORM and SQL toolkit
- PostgreSQL + psycopg2-binary — primary database
- Alembic — database migrations
- Pydantic v2 — data validation and settings models
- Uvicorn — ASGI server
- google-genai — Gemini LLM integration (default provider)
- instructor — structured LLM outputs
Browse and try the endpoints in the interactive docs when running locally:
- OpenAPI:
GET /docs - Health:
GET /health
All available endpoints and schemas are documented in the OpenAPI spec.
pytest
# or
pytest -q backend/tests- Create a feature branch
- Make your changes
- Run tests
- Submit a pull request
This backend is part of AxWise Flow OSS and is licensed under the Apache License 2.0. See the repository root LICENSE file.