Sources

This page lists the main tools and code sources that SAGEinfo is built with: the Python backend, the static frontend, the testing and quality tooling, and the deployment stack. All backend dependencies are pinned in backend/requirements.txt (plus backend/requirements-dev.txt for development tooling).

Backend (Python 3.12)

The API is a FastAPI application that serves the versioned /api/v1 endpoints and mounts the static WebUI in development.

Package Pinned Version Role in SAGEinfo
fastapi 0.139.0 Web framework for the REST API.
starlette 1.3.1 ASGI foundation used by FastAPI.
uvicorn 0.34.2 ASGI server that runs the API.
pydantic / pydantic-settings 2.11.4 / 2.9.1 Data validation, API schemas, and application settings.
sqlalchemy 2.0.41 ORM for the document, user, and organization models.
alembic 1.18.5 Database schema migrations.
psycopg 3.2.9 PostgreSQL driver for production deployments (SQLite is used for local development).
bcrypt 4.3.0 Password hashing for user accounts.
PyJWT 2.13.0 Signed session tokens for authentication.
pymupdf 1.28.0 PDF text extraction for search indexing.
pytesseract / pdf2image / pillow 0.3.13 / 1.17.0 / 12.3.0 OCR pipeline for scanned or image-based documents.
python-docx / python-pptx 1.2.0 / 1.0.2 Word and PowerPoint text extraction.
openpyxl 3.1.5 Excel spreadsheet text extraction.
python-multipart 0.0.32 Multipart form handling for file uploads.
python-dotenv 1.2.2 Environment-based configuration loading.

Frontend (static WebUI)

  • Plain HTML/CSS/JS — the WebUI is served as static files with no build step or framework runtime.
  • Bootstrap 5.3.3 — layout and UI components, loaded from the jsDelivr CDN (MIT licensed).
  • Custom app code — /assets/css/app.css for SAGEinfo styling, /assets/js/api-client.js for versioned API access, /assets/js/action-delegation.js for delegated UI actions, and /includes/header-auth.js for the shared header and session state.
  • Migraine-mode shell — /includes/migraine-mode.js and /includes/migraine-mode.css provide the low-stimulation accessibility mode applied on every page.

Testing and Quality (development)

Tool Pinned Version Purpose
pytest / httpx 9.1.1 / 0.28.1 Backend unit tests and API integration tests.
playwright 1.61.0 Headless browser regression tests (search, upload, account, documents).
coverage 7.10.6 Test coverage measurement.
mypy 1.18.2 Static type checking.
ruff 0.13.2 Linting and formatting.
bandit 1.8.6 Security scanning of Python code.
pip-audit 2.9.0 Vulnerability scanning of Python dependencies.

Deployment

  • Docker Compose (docker-compose.yml) — runs the API and frontend services together.
  • Backend image (backend/Dockerfile) — Python 3.12 with the pinned requirements, served by Uvicorn.
  • Frontend image (frontend/Dockerfile + nginx.conf) — static WebUI served by nginx, proxying /api to the backend.

Keeping This Page Accurate

  • Backend versions are pinned in backend/requirements.txt and backend/requirements-dev.txt; update the tables above when dependencies change.
  • Static assets are cache-busted with ?v= query strings; bump those version tags when shared assets change.
  • Third-party code used by the frontend is limited to Bootstrap 5 (MIT) from jsDelivr and the Tesseract OCR engine used server-side.