# abdoudjigo/assaman-suuf architecture

> Architecture diagram of the GitHub repository abdoudjigo/assaman-suuf, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abdoudjigo/assaman-suuf
- Repository: https://github.com/abdoudjigo/assaman-suuf

## Overview

Assaman & Suuf is an agroclimatology and agricultural decision-support project for Senegal. The documented workflow brings together heterogeneous API, PostgreSQL, MongoDB, and Kafka data, loads it into Snowflake, transforms it with dbt, then serves analytics through BI, an API, and yield-prediction interfaces. Sampled source confirms PostgreSQL-to-Snowflake loading, Kafka event publishing, MongoDB cleaning, and a placeholder Airflow DAG. Several documented capabilities have no implementation files in the tree; those branches are represented at their available directory paths, with no unsupported runtime links asserted.

Main entry points: [`dbt_project/models/marts`](https://github.com/abdoudjigo/assaman-suuf/tree/main/dbt_project/models/marts) (Analytics marts), [`orchestration/dags/dataflow360_dag.py`](https://github.com/abdoudjigo/assaman-suuf/blob/main/orchestration/dags/dataflow360_dag.py) (Airflow pipeline DAG), [`dbt_project/models/staging`](https://github.com/abdoudjigo/assaman-suuf/tree/main/dbt_project/models/staging) (Staging models), [`ingestion/postgres_source/pipeline.py`](https://github.com/abdoudjigo/assaman-suuf/blob/main/ingestion/postgres_source/pipeline.py) (PostgreSQL loader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Data ingestion"]
  node_api_source["API source"]
  node_postgres_eda["PostgreSQL EDA<br/>[eda.py]"]
  node_postgres_pipeline["PostgreSQL loader<br/>[pipeline.py]"]
  node_postgres_db[("PostgreSQL source")]
  node_mongo_cleaner["MongoDB cleaner<br/>[clean_mongo.py]"]
  node_mongo_source[("MongoDB source")]
  node_kafka_producer["Kafka producer"]
  node_kafka_broker["Kafka broker"]
end

subgraph group_warehouse["Warehouse transforms"]
  node_snowflake[("Snowflake warehouse")]
  node_dbt_staging["Staging models"]
  node_dbt_intermediate["Intermediate models"]
  node_dbt_marts["Analytics marts"]
end

subgraph group_orchestration["Workflow orchestration"]
  node_airflow_dag["Airflow pipeline DAG<br/>[dataflow360_dag.py]"]
end

subgraph group_consumption["Decision products"]
  node_dashboard["BI dashboard"]
  node_api_layer["Analytics API"]
  node_ml_training["Yield prediction"]
  node_react_app["Prediction interface"]
end

node_agricultural_actors(("Agricultural actors"))

node_postgres_eda -->|"queries"| node_postgres_db
node_postgres_pipeline -->|"reads"| node_postgres_db
node_postgres_pipeline -->|"loads"| node_snowflake
node_mongo_cleaner -->|"cleans data"| node_mongo_source
node_kafka_producer -->|"publishes events"| node_kafka_broker
node_snowflake -.->|"transforms"| node_dbt_staging
node_dbt_staging -.->|"models onward"| node_dbt_intermediate
node_dbt_intermediate -.->|"models onward"| node_dbt_marts
node_airflow_dag -.->|"checks raw"| node_snowflake
node_airflow_dag -.->|"stages"| node_dbt_staging
node_airflow_dag -.->|"tests models"| node_dbt_marts
node_dbt_marts -.->|"feeds analytics"| node_dashboard
node_dbt_marts -.->|"serves data"| node_api_layer
node_dbt_marts -.->|"supplies features"| node_ml_training
node_ml_training -.->|"serves predictions"| node_react_app
node_agricultural_actors -.->|"views insights"| node_dashboard
node_agricultural_actors -.->|"requests data"| node_api_layer
node_agricultural_actors -.->|"uses predictions"| node_react_app

click node_api_source "https://github.com/abdoudjigo/assaman-suuf/tree/main/ingestion/api_source"
click node_postgres_eda "https://github.com/abdoudjigo/assaman-suuf/blob/main/ingestion/postgres_source/eda.py"
click node_postgres_pipeline "https://github.com/abdoudjigo/assaman-suuf/blob/main/ingestion/postgres_source/pipeline.py"
click node_postgres_db "https://github.com/abdoudjigo/assaman-suuf/tree/main/ingestion/postgres_source"
click node_mongo_cleaner "https://github.com/abdoudjigo/assaman-suuf/blob/main/ingestion/mongodb_source/clean_mongo.py"
click node_mongo_source "https://github.com/abdoudjigo/assaman-suuf/tree/main/ingestion/mongodb_source"
click node_kafka_producer "https://github.com/abdoudjigo/assaman-suuf/blob/main/ingestion/kafka_source/kafka_producer_agriculture.py"
click node_dbt_staging "https://github.com/abdoudjigo/assaman-suuf/tree/main/dbt_project/models/staging"
click node_dbt_intermediate "https://github.com/abdoudjigo/assaman-suuf/tree/main/dbt_project/models/intermediate"
click node_dbt_marts "https://github.com/abdoudjigo/assaman-suuf/tree/main/dbt_project/models/marts"
click node_airflow_dag "https://github.com/abdoudjigo/assaman-suuf/blob/main/orchestration/dags/dataflow360_dag.py"
click node_dashboard "https://github.com/abdoudjigo/assaman-suuf/tree/main/dashboard"
click node_api_layer "https://github.com/abdoudjigo/assaman-suuf/tree/main/api"
click node_ml_training "https://github.com/abdoudjigo/assaman-suuf/tree/main/ml/training"
click node_react_app "https://github.com/abdoudjigo/assaman-suuf/tree/main/ml"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_api_source,node_postgres_eda,node_postgres_pipeline,node_postgres_db,node_mongo_cleaner,node_mongo_source,node_kafka_producer,node_kafka_broker toneBlue
class node_snowflake,node_dbt_staging,node_dbt_intermediate,node_dbt_marts toneAmber
class node_airflow_dag toneMint
class node_dashboard,node_api_layer,node_ml_training,node_react_app toneRose
class node_agricultural_actors toneIndigo
```

## Components

### Data ingestion

- [API source](https://github.com/abdoudjigo/assaman-suuf/tree/main/ingestion/api_source): `ingestion/api_source`
- [PostgreSQL EDA](https://github.com/abdoudjigo/assaman-suuf/blob/main/ingestion/postgres_source/eda.py): `ingestion/postgres_source/eda.py`
- [PostgreSQL loader](https://github.com/abdoudjigo/assaman-suuf/blob/main/ingestion/postgres_source/pipeline.py): `ingestion/postgres_source/pipeline.py`
- [PostgreSQL source](https://github.com/abdoudjigo/assaman-suuf/tree/main/ingestion/postgres_source): `ingestion/postgres_source`
- [MongoDB cleaner](https://github.com/abdoudjigo/assaman-suuf/blob/main/ingestion/mongodb_source/clean_mongo.py): `ingestion/mongodb_source/clean_mongo.py`
- [MongoDB source](https://github.com/abdoudjigo/assaman-suuf/tree/main/ingestion/mongodb_source): `ingestion/mongodb_source`
- [Kafka producer](https://github.com/abdoudjigo/assaman-suuf/blob/main/ingestion/kafka_source/kafka_producer_agriculture.py): `ingestion/kafka_source/kafka_producer_agriculture.py`
- **Kafka broker**

### Warehouse transforms

- **Snowflake warehouse**
- [Staging models](https://github.com/abdoudjigo/assaman-suuf/tree/main/dbt_project/models/staging): `dbt_project/models/staging`
- [Intermediate models](https://github.com/abdoudjigo/assaman-suuf/tree/main/dbt_project/models/intermediate): `dbt_project/models/intermediate`
- [Analytics marts](https://github.com/abdoudjigo/assaman-suuf/tree/main/dbt_project/models/marts): `dbt_project/models/marts`

### Workflow orchestration

- [Airflow pipeline DAG](https://github.com/abdoudjigo/assaman-suuf/blob/main/orchestration/dags/dataflow360_dag.py): `orchestration/dags/dataflow360_dag.py`

### Decision products

- [BI dashboard](https://github.com/abdoudjigo/assaman-suuf/tree/main/dashboard): `dashboard`
- [Analytics API](https://github.com/abdoudjigo/assaman-suuf/tree/main/api): `api`
- [Yield prediction](https://github.com/abdoudjigo/assaman-suuf/tree/main/ml/training): `ml/training`
- [Prediction interface](https://github.com/abdoudjigo/assaman-suuf/tree/main/ml): `ml`

### Other components

- **Agricultural actors**

## Connections

- PostgreSQL EDA → PostgreSQL source: queries (evidence: `ingestion/postgres_source/eda.py`)
- PostgreSQL loader → PostgreSQL source: reads (evidence: `ingestion/postgres_source/pipeline.py`)
- PostgreSQL loader → Snowflake warehouse: loads (evidence: `ingestion/postgres_source/pipeline.py`)
- MongoDB cleaner → MongoDB source: cleans data (evidence: `ingestion/mongodb_source/clean_mongo.py`)
- Kafka producer → Kafka broker: publishes events (evidence: `ingestion/kafka_source/kafka_producer_agriculture.py`)
- Snowflake warehouse → Staging models: transforms (evidence: `README.md`)
- Staging models → Intermediate models: models onward (evidence: `README.md`)
- Intermediate models → Analytics marts: models onward (evidence: `README.md`)
- Airflow pipeline DAG → Snowflake warehouse: checks raw
- Airflow pipeline DAG → Staging models: stages
- Airflow pipeline DAG → Analytics marts: tests models
- Analytics marts → BI dashboard: feeds analytics (evidence: `README.md`)
- Analytics marts → Analytics API: serves data (evidence: `README.md`)
- Analytics marts → Yield prediction: supplies features (evidence: `README.md`)
- Yield prediction → Prediction interface: serves predictions (evidence: `README.md`)
- Agricultural actors → BI dashboard: views insights (evidence: `README.md`)
- Agricultural actors → Analytics API: requests data (evidence: `README.md`)
- Agricultural actors → Prediction interface: uses predictions (evidence: `README.md`)
