Backend

Code Structure

Main backend areas
Path
  • Description

backend/main.py
  • FastAPI application creation and lifecycle wiring.

backend/api/
  • HTTP routes (compute, documents, prompt, variables, and related domains).

backend/service/
  • Business logic modules (chat, climate data, geocoding, and processing).

backend/core/
  • Configuration and cross-cutting runtime components.

API

The OpenAPI schema is exposed by FastAPI:

  • /openapi.json

  • /docs (Swagger UI)

Best Practices

  • Add routes in backend/api/ and then wire the router.

  • Keep business logic in backend/service/.

  • Write pytest tests in backend/tests/ for each new feature.