System Architecture Overview
This section outlines how the frontend React clients, the FastAPI backend core, and the local AI integration communicate with each other.
High-Level Architecture Diagram
The system comprises three main blocks: the web gateway proxy, the application core services, and the database/storage engines.
Key Design Principles
- Monorepo Structure: Allows shared validation rules, schemas, styling packages, and dev tooling settings to be kept dry across various applications.
- Domain-Driven Design (DDD): Separates the database layers (
infrastructure), request-routing frameworks (api), and pure business logical states (domain) to make backend features highly maintainable. - Local-First AI Execution: By communicating directly with a local instance of Ollama and running local embedding services, data does not leave local servers, respecting privacy constraints.
- Asynchronous Task Processing: High-latency GIS file operations (STAC parsing, raster processing, vector overlays calculation) are scheduled via Celery worker queues, leaving the core FastAPI request cycle responsive.