# libinworkspacepromatas/agrionecombined architecture

> Architecture diagram of the GitHub repository libinworkspacepromatas/agrionecombined, 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/libinworkspacepromatas/agrionecombined
- Repository: https://github.com/libinworkspacepromatas/agrionecombined

## Overview

AgriOne is a vineyard digital-twin platform: growers and bidders use Angular or the companion React Native app to access farm monitoring, agronomy guidance, water and market tools. Both clients share a FastAPI backend, which exposes domain APIs and coordinates persistence, satellite analysis, weather, and decision services. The mobile excerpts show authentication and farm-data loading; the web route excerpt documents the major browser capabilities. Some backend and frontend domain implementations were not sampled, so their internal links are omitted where evidence is absent.

Main entry points: [`web/agritechplatform/src/app/app.routes.ts`](https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/agritechplatform/src/app/app.routes.ts) (Web application), [`mobile/App.tsx`](https://github.com/libinworkspacepromatas/agrionecombined/blob/development/mobile/App.tsx) (Mobile application), [`web/backend/app/services/satellite_insights.py`](https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/backend/app/services/satellite_insights.py) (Satellite insights), [`web/backend/app/main.py`](https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/backend/app/main.py) (FastAPI service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web client"]
  node_webapp["Web application<br/>[app.routes.ts]"]
  node_dashboard["Farm dashboard"]
  node_water["Water irrigation"]
  node_profit["Profit risk"]
  node_opportunities["Growing opportunities"]
  node_gpt["Grower GPT"]
  node_market["Auctions"]
  node_rental["Equipment rental"]
end

subgraph group_mobile["Mobile client"]
  node_mobileapp["Mobile application<br/>[App.tsx]"]
  node_login["Mobile sign-in<br/>[LoginScreen.tsx]"]
  node_tabs["Mobile farm tabs<br/>[BottomTabs.tsx]"]
  node_farmcontext["Farm data state<br/>[FarmContext.tsx]"]
  node_mobileauth["Mobile auth client<br/>[authService.ts]"]
end

subgraph group_api["Backend APIs"]
  node_backend["FastAPI service<br/>[main.py]"]
  node_routes["Farm and satellite API<br/>[routes.py]"]
  node_domainapi["Domain API routes"]
end

subgraph group_agronomy["Farm intelligence"]
  node_satellite["Satellite insights"]
  node_earth["Earth Engine client<br/>[earth_engine.py]"]
  node_decisions["Irrigation decisions<br/>[decision_engine.py]"]
  node_weather["Weather ingestion<br/>[weather_ingest.py]"]
  node_scheduler["Satellite scheduler"]
end

subgraph group_platform["Platform services"]
  node_database[("Platform database<br/>[models.py]")]
end

node_grower(("Grower"))
node_bidder(("Bidder"))
node_googleee["Google Earth Engine"]
node_mobileuser(("Mobile user"))

node_grower -->|"uses"| node_webapp
node_bidder -->|"uses"| node_webapp
node_webapp -->|"routes to"| node_dashboard
node_webapp -->|"routes to"| node_water
node_webapp -->|"routes to"| node_profit
node_webapp -->|"routes to"| node_opportunities
node_webapp -->|"routes to"| node_gpt
node_webapp -->|"routes to"| node_market
node_webapp -->|"routes to"| node_rental
node_mobileuser -->|"uses"| node_mobileapp
node_mobileapp -->|"shows when signed out"| node_login
node_mobileapp -->|"shows when signed in"| node_tabs
node_login -->|"authenticates with"| node_mobileauth
node_mobileapp -->|"loads farm state"| node_farmcontext
node_farmcontext -->|"fetches farm data"| node_mobileauth
node_mobileapp -->|"shares backend"| node_backend
node_webapp -->|"uses central backend"| node_backend
node_backend -->|"registers router"| node_routes
node_backend -->|"registers routes"| node_domainapi
node_routes -->|"requests insights"| node_satellite
node_satellite -->|"computes imagery"| node_earth
node_earth -.->|"queries imagery"| node_googleee
node_satellite -->|"reads and writes cache"| node_database
node_satellite -.->|"uses decision service"| node_decisions
node_decisions -->|"uses weather data"| node_weather
node_decisions -->|"reads and saves decisions"| node_database
node_scheduler -->|"refreshes insights"| node_satellite
node_scheduler -->|"uses imagery client"| node_earth
node_scheduler -->|"uses database"| node_database

click node_webapp "https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/agritechplatform/src/app/app.routes.ts"
click node_dashboard "https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/agritechplatform/src/app/modules/dashboard/dashboard.component.ts"
click node_water "https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/agritechplatform/src/app/modules/water-irrigation/water-irrigation.component.ts"
click node_profit "https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/agritechplatform/src/app/modules/profit-risk/profit-risk.component.ts"
click node_opportunities "https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/agritechplatform/src/app/modules/growing-opportunities/growing-opportunities.component.ts"
click node_gpt "https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/agritechplatform/src/app/modules/grower-gpt/grower-gpt.component.ts"
click node_market "https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/agritechplatform/src/app/modules/auctions/auctions.component.ts"
click node_rental "https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/agritechplatform/src/app/modules/rental/rental.component.ts"
click node_mobileapp "https://github.com/libinworkspacepromatas/agrionecombined/blob/development/mobile/App.tsx"
click node_login "https://github.com/libinworkspacepromatas/agrionecombined/blob/development/mobile/src/screens/LoginScreen.tsx"
click node_tabs "https://github.com/libinworkspacepromatas/agrionecombined/blob/development/mobile/src/navigation/BottomTabs.tsx"
click node_farmcontext "https://github.com/libinworkspacepromatas/agrionecombined/blob/development/mobile/src/context/FarmContext.tsx"
click node_mobileauth "https://github.com/libinworkspacepromatas/agrionecombined/blob/development/mobile/src/api/authService.ts"
click node_backend "https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/backend/app/main.py"
click node_routes "https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/backend/app/api/routes.py"
click node_domainapi "https://github.com/libinworkspacepromatas/agrionecombined/tree/development/web/backend/app/api"
click node_satellite "https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/backend/app/services/satellite_insights.py"
click node_earth "https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/backend/app/services/earth_engine.py"
click node_decisions "https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/backend/app/services/decision_engine.py"
click node_weather "https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/backend/app/services/weather_ingest.py"
click node_scheduler "https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/backend/app/services/satellite_scheduler.py"
click node_database "https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/backend/app/db/models.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_webapp,node_dashboard,node_water,node_profit,node_opportunities,node_gpt,node_market,node_rental,node_mobileuser toneBlue
class node_mobileapp,node_login,node_tabs,node_farmcontext,node_mobileauth toneAmber
class node_backend,node_routes,node_domainapi toneMint
class node_satellite,node_earth,node_decisions,node_weather,node_scheduler toneRose
class node_database,node_grower,node_bidder,node_googleee toneIndigo
```

## Components

### Web client

- [Web application](https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/agritechplatform/src/app/app.routes.ts): `web/agritechplatform/src/app/app.routes.ts`
- [Farm dashboard](https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/agritechplatform/src/app/modules/dashboard/dashboard.component.ts): `web/agritechplatform/src/app/modules/dashboard/dashboard.component.ts`
- [Water irrigation](https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/agritechplatform/src/app/modules/water-irrigation/water-irrigation.component.ts): `web/agritechplatform/src/app/modules/water-irrigation/water-irrigation.component.ts`
- [Profit risk](https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/agritechplatform/src/app/modules/profit-risk/profit-risk.component.ts): `web/agritechplatform/src/app/modules/profit-risk/profit-risk.component.ts`
- [Growing opportunities](https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/agritechplatform/src/app/modules/growing-opportunities/growing-opportunities.component.ts): `web/agritechplatform/src/app/modules/growing-opportunities/growing-opportunities.component.ts`
- [Grower GPT](https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/agritechplatform/src/app/modules/grower-gpt/grower-gpt.component.ts): `web/agritechplatform/src/app/modules/grower-gpt/grower-gpt.component.ts`
- [Auctions](https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/agritechplatform/src/app/modules/auctions/auctions.component.ts): `web/agritechplatform/src/app/modules/auctions/auctions.component.ts`
- [Equipment rental](https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/agritechplatform/src/app/modules/rental/rental.component.ts): `web/agritechplatform/src/app/modules/rental/rental.component.ts`

### Mobile client

- [Mobile application](https://github.com/libinworkspacepromatas/agrionecombined/blob/development/mobile/App.tsx): `mobile/App.tsx`
- [Mobile sign-in](https://github.com/libinworkspacepromatas/agrionecombined/blob/development/mobile/src/screens/LoginScreen.tsx): `mobile/src/screens/LoginScreen.tsx`
- [Mobile farm tabs](https://github.com/libinworkspacepromatas/agrionecombined/blob/development/mobile/src/navigation/BottomTabs.tsx): `mobile/src/navigation/BottomTabs.tsx`
- [Farm data state](https://github.com/libinworkspacepromatas/agrionecombined/blob/development/mobile/src/context/FarmContext.tsx): `mobile/src/context/FarmContext.tsx`
- [Mobile auth client](https://github.com/libinworkspacepromatas/agrionecombined/blob/development/mobile/src/api/authService.ts): `mobile/src/api/authService.ts`

### Backend APIs

- [FastAPI service](https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/backend/app/main.py): `web/backend/app/main.py`
- [Farm and satellite API](https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/backend/app/api/routes.py): `web/backend/app/api/routes.py`
- [Domain API routes](https://github.com/libinworkspacepromatas/agrionecombined/tree/development/web/backend/app/api): `web/backend/app/api`

### Farm intelligence

- [Satellite insights](https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/backend/app/services/satellite_insights.py): `web/backend/app/services/satellite_insights.py`
- [Earth Engine client](https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/backend/app/services/earth_engine.py): `web/backend/app/services/earth_engine.py`
- [Irrigation decisions](https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/backend/app/services/decision_engine.py): `web/backend/app/services/decision_engine.py`
- [Weather ingestion](https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/backend/app/services/weather_ingest.py): `web/backend/app/services/weather_ingest.py`
- [Satellite scheduler](https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/backend/app/services/satellite_scheduler.py): `web/backend/app/services/satellite_scheduler.py`

### Platform services

- [Platform database](https://github.com/libinworkspacepromatas/agrionecombined/blob/development/web/backend/app/db/models.py): `web/backend/app/db/models.py`

### Other components

- **Grower**
- **Bidder**
- **Google Earth Engine**
- **Mobile user**

## Connections

- Grower → Web application: uses
- Bidder → Web application: uses (evidence: `web/agritechplatform/src/app/app.routes.ts`)
- Web application → Farm dashboard: routes to (evidence: `web/agritechplatform/src/app/app.routes.ts`)
- Web application → Water irrigation: routes to (evidence: `web/agritechplatform/src/app/app.routes.ts`)
- Web application → Profit risk: routes to (evidence: `web/agritechplatform/src/app/app.routes.ts`)
- Web application → Growing opportunities: routes to (evidence: `web/agritechplatform/src/app/app.routes.ts`)
- Web application → Grower GPT: routes to (evidence: `web/agritechplatform/src/app/app.routes.ts`)
- Web application → Auctions: routes to (evidence: `web/agritechplatform/src/app/app.routes.ts`)
- Web application → Equipment rental: routes to (evidence: `web/agritechplatform/src/app/app.routes.ts`)
- Mobile user → Mobile application: uses
- Mobile application → Mobile sign-in: shows when signed out (evidence: `mobile/App.tsx`)
- Mobile application → Mobile farm tabs: shows when signed in (evidence: `mobile/App.tsx`)
- Mobile sign-in → Mobile auth client: authenticates with (evidence: `mobile/src/api/authService.ts`)
- Mobile application → Farm data state: loads farm state (evidence: `mobile/App.tsx`)
- Farm data state → Mobile auth client: fetches farm data (evidence: `mobile/src/context/FarmContext.tsx`)
- Mobile application → FastAPI service: shares backend
- Web application → FastAPI service: uses central backend
- FastAPI service → Farm and satellite API: registers router (evidence: `web/backend/app/main.py`)
- FastAPI service → Domain API routes: registers routes (evidence: `web/backend/app/main.py`)
- Farm and satellite API → Satellite insights: requests insights (evidence: `web/backend/app/api/routes.py`)
- Satellite insights → Earth Engine client: computes imagery (evidence: `web/backend/app/services/satellite_insights.py`)
- Earth Engine client → Google Earth Engine: queries imagery
- Satellite insights → Platform database: reads and writes cache (evidence: `web/backend/app/services/satellite_insights.py`)
- Satellite insights → Irrigation decisions: uses decision service
- Irrigation decisions → Weather ingestion: uses weather data (evidence: `web/backend/app/services/decision_engine.py`)
- Irrigation decisions → Platform database: reads and saves decisions (evidence: `web/backend/app/services/decision_engine.py`)
- Satellite scheduler → Satellite insights: refreshes insights (evidence: `web/backend/app/services/satellite_scheduler.py`)
- Satellite scheduler → Earth Engine client: uses imagery client (evidence: `web/backend/app/services/satellite_scheduler.py`)
- Satellite scheduler → Platform database: uses database (evidence: `web/backend/app/services/satellite_scheduler.py`)
