# ngaboelyse/sentinel-geowatch-ai architecture

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

- Interactive diagram: https://gitdiagram.com/ngaboelyse/sentinel-geowatch-ai
- Repository: https://github.com/ngaboelyse/sentinel-geowatch-ai

## Overview

GeoWatch AI is a satellite-based land-use and environmental monitoring platform. Its principal workflow is to define an area of interest (AOI), acquire Sentinel-2 imagery, classify land use, and detect changes over time; users can also manage accounts and poll long-running jobs. The backend exposes these capabilities through FastAPI and uses Celery for asynchronous work. README-documented capabilities are included where source excerpts are unavailable; the Flutter application’s product screens and API wiring are not shown, so that connection is unverified.

Main entry points: [`backend/app/main.py`](https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/main.py) (FastAPI app), [`backend/app/services/tasks.py`](https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/services/tasks.py) (Task workflows), [`backend/app/core/database.py`](https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/core/database.py) (Database), [`backend/app/services/satellite.py`](https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/services/satellite.py) (Satellite service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API and users"]
  node_app["FastAPI app<br/>[main.py]"]
  node_auth["Authentication<br/>[auth.py]"]
  node_users["User management<br/>[users.py]"]
  node_aoi["AOI management<br/>[aoi.py]"]
  node_sat_api["Satellite API<br/>[satellite.py]"]
  node_class_api["Classification API<br/>[classification.py]"]
  node_change_api["Change detection API<br/>[changes.py]"]
  node_task_api["Task API<br/>[tasks.py]"]
  node_flutter["Flutter client"]
end

subgraph group_imagery["Imagery and analysis"]
  node_sat_service["Satellite service<br/>[satellite.py]"]
  node_downloader["Image downloaders<br/>[downloader.py]"]
  node_mock_downloader["Mock downloader<br/>[mock_downloader.py]"]
  node_processor["Image processor<br/>[processor.py]"]
  node_preprocessor["Sentinel preprocessing<br/>[sentinel.py]"]
  node_classifier["Land-use classifier<br/>[classifier.py]"]
  node_classification_service["Classification service<br/>[classification.py]"]
end

subgraph group_jobs["Async processing"]
  node_task_service["Task workflows<br/>[tasks.py]"]
  node_celery["Celery workers<br/>[celery_app.py]"]
end

subgraph group_platform["Data platform"]
  node_database[("Database<br/>[database.py]")]
  node_config["Configuration<br/>[config.py]"]
  node_s3["Image object storage<br/>[s3_client.py]"]
end

node_actor(("User"))
node_sentinel(("Sentinel-2 source"))

node_actor -->|"uses API"| node_app
node_app -->|"routes to"| node_auth
node_app -->|"routes to"| node_users
node_app -->|"routes to"| node_aoi
node_app -->|"routes to"| node_sat_api
node_app -->|"routes to"| node_class_api
node_app -->|"routes to"| node_change_api
node_app -->|"routes to"| node_task_api
node_app -->|"initializes"| node_database
node_auth -->|"gets session"| node_database
node_users -->|"gets session"| node_database
node_aoi -->|"gets session"| node_database
node_sat_api -->|"gets session"| node_database
node_sat_api -->|"uses service"| node_sat_service
node_class_api -->|"queues work"| node_task_service
node_change_api -->|"queues work"| node_task_service
node_task_api -->|"queues work"| node_task_service
node_task_api -->|"checks status"| node_celery
node_task_service -->|"opens sessions"| node_database
node_task_service -->|"loads imagery"| node_sat_service
node_task_service -->|"stores results"| node_classification_service
node_task_service -->|"runs model"| node_classifier
node_task_service -->|"preprocesses imagery"| node_preprocessor
node_sat_service -->|"downloads imagery"| node_downloader
node_sat_service -->|"uses mock"| node_mock_downloader
node_sentinel -.->|"provides imagery"| node_downloader
node_flutter -.->|"calls API"| node_app
node_s3 -.->|"stores images"| node_sat_service
node_database -->|"reads settings"| node_config
node_actor -->|"polls progress"| node_task_api

click node_app "https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/main.py"
click node_auth "https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/api/endpoints/auth.py"
click node_users "https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/api/endpoints/users.py"
click node_aoi "https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/api/endpoints/aoi.py"
click node_sat_api "https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/api/endpoints/satellite.py"
click node_class_api "https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/api/endpoints/classification.py"
click node_change_api "https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/api/endpoints/changes.py"
click node_task_api "https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/api/endpoints/tasks.py"
click node_flutter "https://github.com/ngaboelyse/sentinel-geowatch-ai/tree/main/frontend/flutter_app"
click node_sat_service "https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/services/satellite.py"
click node_downloader "https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/satellite/downloader.py"
click node_mock_downloader "https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/satellite/mock_downloader.py"
click node_processor "https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/satellite/processor.py"
click node_preprocessor "https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/ml/preprocessing/sentinel.py"
click node_classifier "https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/ml/models/classifier.py"
click node_classification_service "https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/services/classification.py"
click node_task_service "https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/services/tasks.py"
click node_celery "https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/celery_app.py"
click node_database "https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/core/database.py"
click node_config "https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/core/config.py"
click node_s3 "https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/storage/s3_client.py"

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_app,node_auth,node_users,node_aoi,node_sat_api,node_class_api,node_change_api,node_task_api,node_flutter,node_actor toneBlue
class node_sat_service,node_downloader,node_mock_downloader,node_processor,node_preprocessor,node_classifier,node_classification_service toneAmber
class node_task_service,node_celery toneMint
class node_database,node_config,node_s3 toneRose
class node_sentinel toneIndigo
```

## Components

### API and users

- [FastAPI app](https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/main.py): `backend/app/main.py`
- [Authentication](https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/api/endpoints/auth.py): `backend/app/api/endpoints/auth.py`
- [User management](https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/api/endpoints/users.py): `backend/app/api/endpoints/users.py`
- [AOI management](https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/api/endpoints/aoi.py): `backend/app/api/endpoints/aoi.py`
- [Satellite API](https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/api/endpoints/satellite.py): `backend/app/api/endpoints/satellite.py`
- [Classification API](https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/api/endpoints/classification.py): `backend/app/api/endpoints/classification.py`
- [Change detection API](https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/api/endpoints/changes.py): `backend/app/api/endpoints/changes.py`
- [Task API](https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/api/endpoints/tasks.py): `backend/app/api/endpoints/tasks.py`
- [Flutter client](https://github.com/ngaboelyse/sentinel-geowatch-ai/tree/main/frontend/flutter_app): `frontend/flutter_app`

### Imagery and analysis

- [Satellite service](https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/services/satellite.py): `backend/app/services/satellite.py`
- [Image downloaders](https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/satellite/downloader.py): `backend/app/satellite/downloader.py`
- [Mock downloader](https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/satellite/mock_downloader.py): `backend/app/satellite/mock_downloader.py`
- [Image processor](https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/satellite/processor.py): `backend/app/satellite/processor.py`
- [Sentinel preprocessing](https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/ml/preprocessing/sentinel.py): `backend/app/ml/preprocessing/sentinel.py`
- [Land-use classifier](https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/ml/models/classifier.py): `backend/app/ml/models/classifier.py`
- [Classification service](https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/services/classification.py): `backend/app/services/classification.py`

### Async processing

- [Task workflows](https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/services/tasks.py): `backend/app/services/tasks.py`
- [Celery workers](https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/celery_app.py): `backend/app/celery_app.py`

### Data platform

- [Database](https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/core/database.py): `backend/app/core/database.py`
- [Configuration](https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/core/config.py): `backend/app/core/config.py`
- [Image object storage](https://github.com/ngaboelyse/sentinel-geowatch-ai/blob/main/backend/app/storage/s3_client.py): `backend/app/storage/s3_client.py`

### Other components

- **User**
- **Sentinel-2 source**

## Connections

- User → FastAPI app: uses API (evidence: `README.md`)
- FastAPI app → Authentication: routes to (evidence: `backend/app/main.py`)
- FastAPI app → User management: routes to (evidence: `backend/app/main.py`)
- FastAPI app → AOI management: routes to (evidence: `backend/app/main.py`)
- FastAPI app → Satellite API: routes to (evidence: `backend/app/main.py`)
- FastAPI app → Classification API: routes to (evidence: `backend/app/main.py`)
- FastAPI app → Change detection API: routes to (evidence: `backend/app/main.py`)
- FastAPI app → Task API: routes to (evidence: `backend/app/main.py`)
- FastAPI app → Database: initializes (evidence: `backend/app/main.py`)
- Authentication → Database: gets session (evidence: `backend/app/api/endpoints/auth.py`)
- User management → Database: gets session (evidence: `backend/app/api/endpoints/users.py`)
- AOI management → Database: gets session (evidence: `backend/app/api/endpoints/aoi.py`)
- Satellite API → Database: gets session (evidence: `backend/app/api/endpoints/satellite.py`)
- Satellite API → Satellite service: uses service (evidence: `backend/app/api/endpoints/satellite.py`)
- Classification API → Task workflows: queues work (evidence: `backend/app/api/endpoints/classification.py`)
- Change detection API → Task workflows: queues work (evidence: `backend/app/api/endpoints/changes.py`)
- Task API → Task workflows: queues work (evidence: `backend/app/api/endpoints/tasks.py`)
- Task API → Celery workers: checks status (evidence: `backend/app/api/endpoints/tasks.py`)
- Task workflows → Database: opens sessions (evidence: `backend/app/services/tasks.py`)
- Task workflows → Satellite service: loads imagery (evidence: `backend/app/services/tasks.py`)
- Task workflows → Classification service: stores results (evidence: `backend/app/services/tasks.py`)
- Task workflows → Land-use classifier: runs model (evidence: `backend/app/services/tasks.py`)
- Task workflows → Sentinel preprocessing: preprocesses imagery (evidence: `backend/app/services/tasks.py`)
- Satellite service → Image downloaders: downloads imagery (evidence: `backend/app/services/satellite.py`)
- Satellite service → Mock downloader: uses mock (evidence: `backend/app/services/satellite.py`)
- Sentinel-2 source → Image downloaders: provides imagery (evidence: `README.md`)
- Flutter client → FastAPI app: calls API
- Image object storage → Satellite service: stores images (evidence: `README.md`)
- Database → Configuration: reads settings (evidence: `backend/app/core/database.py`)
- User → Task API: polls progress (evidence: `backend/app/api/endpoints/tasks.py`)
