Skip to content

Level 2: Containers

Container Diagrams focus on the major software systems within the system boundary identified in the System Context Diagram. Containers represent executable software applications, such as web applications, APIs, or databases, that reside within the system.

Diagram

Architecture Level 2 - Containers AClimate

Architecture Overview

flowchart LR
    subgraph "External Data"
        WS[Weather Stations]
        SD[Satellite Data<br/>ERA5, CHIRPS]
        IDEAM[IDEAM]
    end

    subgraph "AClimate v3 Platform"
        direction TB
        ETL[ETL Layer<br/>spatial, location, cut]
        DB[(PostgreSQL DB<br/>ORM-managed)]
        API[WebAPI<br/>FastAPI]
        ORM[ORM Package<br/>SQLAlchemy]
        FE[Frontend<br/>Next.js]
        AD[Admin<br/>Flask]
        KC[Keycloak<br/>SSO/Auth]
        GS[GeoServer<br/>WMS/WFS/WCS]
    end

    WS --> ETL
    SD --> ETL
    IDEAM --> ETL
    ETL --> DB
    DB <--> ORM
    ORM <--> API
    API --> FE
    API --> AD
    KC --> API
    KC --> FE
    KC --> AD
    DB --> GS
    GS --> FE

Containers

AClimate Frontend

Type: Web Application Technology: TypeScript, React, Next.js

The Web component serves as a user-friendly frontend interface tailored for the final users (farmers, extension agents, policy makers, and others) of the platform. Designed with a focus on usability and accessibility, this component provides a seamless browsing experience. Users can access the website to explore historical and forecast information presented in various formats. The website offers intuitive navigation and search functionalities, allowing users to easily find the specific data they need.

Repository: aclimate_v3_frontend

AClimate WebAPI

Type: RESTful API Service Technology: Python, FastAPI

The WebAPI component plays a vital role in the platform by exposing data to external applications. This powerful component enables the extraction of essential information from the system, including geographical configuration, historical data, and forecast data. The API is organized into domain-specific modules: Geographic, Climate, Forecast, Agronomic, and Auth. All endpoints use JWT-based authentication via Keycloak.

Repository: aclimate_v3_webapi

AClimate ORM + Database

Type: Database + ORM Package Technology: Python, SQLAlchemy, PostgreSQL

The ORM Package serves as a robust repository for storing and managing all the information required for the entire platform. It consolidates data from various processes, including parameters, geographical configuration, forecast results, crop simulations, and other relevant datasets.

The ORM package provides: Models (31 entities), Schemas (31), Services (31), Validations (31), Enums (7), and Migrations (Alembic).

Repository: aclimate_v3_orm

AClimate Admin

Type: Web Application Technology: HTML, Python, Flask

The Admin website serves as a central hub for managing and configuring the entire platform. Modules include: Geographic Configuration, Production Configuration, Data Import, User Management, and System Configuration.

Repository: aclimate_v3_admin

Keycloak

Type: Identity and Access Management System Technology: Keycloak

Keycloak serves as the centralized system for managing user identities and access across all platform components. It provides Single Sign-On (SSO), managing realms, clients, roles, users, JWT tokens, and sessions.

GeoServer

Type: Spatial Data Server Technology: GeoServer

GeoServer serves as a pivotal element within the platform, specifically dedicated to storing, managing and serving spatial information. It supports OGC standards: WMS (map images), WFS (vector features), and WCS (raster/coverage data).

ETLs (Data Processing Pipelines)

Type: Scripts / Batch Processes Technology: Python

Three specialized repositories: cut_spatial_data, historical_spatial_etl (ERA5, CHIRPS), historical_location_etl (station data with quality control). All ETLs are idempotent.