# aydinheugh/ecoloco-fl architecture

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

- Interactive diagram: https://gitdiagram.com/aydinheugh/ecoloco-fl
- Repository: https://github.com/aydinheugh/ecoloco-fl

## Overview

EcoLoco is a climate-action app for identifying plants and assessing schoolyard biodiversity. A user navigates to plant identification or an audit, submits photos and a ZIP code, then reviews identification results; audit results include a biodiversity score, local plant recommendations, action guidance, and a draft letter. The mobile app calls a Flask API, which delegates identification and recommendation work to AI and Florida plant-status services, and score calculation to a separate scoring service. Source excerpts show the main call paths; some screens and backend services are indexed but not excerpted, so their internal behavior is not expanded.

Main entry points: [`frontend/navigation/AppNavigator.js`](https://github.com/aydinheugh/ecoloco-fl/blob/master/frontend/navigation/AppNavigator.js) (Navigation), [`frontend/services/geminiService.js`](https://github.com/aydinheugh/ecoloco-fl/blob/master/frontend/services/geminiService.js) (API client), [`backend/services/ai_service.py`](https://github.com/aydinheugh/ecoloco-fl/blob/master/backend/services/ai_service.py) (Plant AI workflows), [`frontend/screens/AuditResultsScreen.js`](https://github.com/aydinheugh/ecoloco-fl/blob/master/frontend/screens/AuditResultsScreen.js) (Audit results)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Mobile app"]
  node_app["App entry<br/>[App.js]"]
  node_navigation["Navigation<br/>[AppNavigator.js]"]
  node_home["Home<br/>[HomeScreen.js]"]
  node_identify_screen["Plant identification"]
  node_audit_screen["Plant audit<br/>[AuditScreen.js]"]
  node_recommend_screen["Recommendations"]
  node_results_screen["Audit results"]
  node_client["API client<br/>[geminiService.js]"]
end

subgraph group_api["API"]
  node_api_app["HTTP endpoints<br/>[app.py]"]
end

subgraph group_domain["Plant and biodiversity"]
  node_ai_service["Plant AI workflows<br/>[ai_service.py]"]
  node_identification["Species identification"]
  node_fl_status["Florida plant status"]
  node_score["Biodiversity scoring<br/>[score_service.py]"]
  node_inat["iNaturalist service<br/>[inat_service.py]"]
end

subgraph group_integrations["AI integration"]
  node_openai_client["OpenAI client<br/>[openai_client.py]"]
end

node_user(("App user"))
node_openai{{"OpenAI"}}

node_user -->|"opens"| node_app
node_app -->|"renders"| node_navigation
node_navigation -->|"routes"| node_home
node_navigation -->|"routes"| node_identify_screen
node_navigation -->|"routes"| node_audit_screen
node_navigation -->|"routes"| node_recommend_screen
node_navigation -->|"routes"| node_results_screen
node_identify_screen -->|"requests identification"| node_client
node_audit_screen -->|"requests identification"| node_client
node_recommend_screen -->|"requests recommendations"| node_client
node_results_screen -->|"requests score and letter"| node_client
node_results_screen -->|"requests recommendations"| node_client
node_client -->|"posts API requests"| node_api_app
node_api_app -->|"delegates identify, recommend, letter"| node_ai_service
node_api_app -->|"delegates score"| node_score
node_ai_service -->|"identifies species"| node_identification
node_ai_service -->|"checks plant status"| node_fl_status
node_ai_service -->|"requests AI responses"| node_openai_client
node_identification -->|"requests image analysis"| node_openai_client
node_openai_client -->|"sends chat requests"| node_openai

click node_app "https://github.com/aydinheugh/ecoloco-fl/blob/master/App.js"
click node_navigation "https://github.com/aydinheugh/ecoloco-fl/blob/master/frontend/navigation/AppNavigator.js"
click node_home "https://github.com/aydinheugh/ecoloco-fl/blob/master/frontend/screens/HomeScreen.js"
click node_identify_screen "https://github.com/aydinheugh/ecoloco-fl/blob/master/frontend/screens/IdentificationScreen.js"
click node_audit_screen "https://github.com/aydinheugh/ecoloco-fl/blob/master/frontend/screens/AuditScreen.js"
click node_recommend_screen "https://github.com/aydinheugh/ecoloco-fl/blob/master/frontend/screens/RecommendationScreen.js"
click node_results_screen "https://github.com/aydinheugh/ecoloco-fl/blob/master/frontend/screens/AuditResultsScreen.js"
click node_client "https://github.com/aydinheugh/ecoloco-fl/blob/master/frontend/services/geminiService.js"
click node_api_app "https://github.com/aydinheugh/ecoloco-fl/blob/master/backend/app.py"
click node_ai_service "https://github.com/aydinheugh/ecoloco-fl/blob/master/backend/services/ai_service.py"
click node_identification "https://github.com/aydinheugh/ecoloco-fl/blob/master/backend/services/identification_service.py"
click node_fl_status "https://github.com/aydinheugh/ecoloco-fl/blob/master/backend/services/fl_plants_service.py"
click node_score "https://github.com/aydinheugh/ecoloco-fl/blob/master/backend/services/score_service.py"
click node_inat "https://github.com/aydinheugh/ecoloco-fl/blob/master/backend/services/inat_service.py"
click node_openai_client "https://github.com/aydinheugh/ecoloco-fl/blob/master/backend/services/openai_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_navigation,node_home,node_identify_screen,node_audit_screen,node_recommend_screen,node_results_screen,node_client,node_user toneBlue
class node_api_app toneAmber
class node_ai_service,node_identification,node_fl_status,node_score,node_inat toneMint
class node_openai_client toneRose
class node_openai toneIndigo
```

## Components

### Mobile app

- [App entry](https://github.com/aydinheugh/ecoloco-fl/blob/master/App.js): `App.js`
- [Navigation](https://github.com/aydinheugh/ecoloco-fl/blob/master/frontend/navigation/AppNavigator.js): `frontend/navigation/AppNavigator.js`
- [Home](https://github.com/aydinheugh/ecoloco-fl/blob/master/frontend/screens/HomeScreen.js): `frontend/screens/HomeScreen.js`
- [Plant identification](https://github.com/aydinheugh/ecoloco-fl/blob/master/frontend/screens/IdentificationScreen.js): `frontend/screens/IdentificationScreen.js`
- [Plant audit](https://github.com/aydinheugh/ecoloco-fl/blob/master/frontend/screens/AuditScreen.js): `frontend/screens/AuditScreen.js`
- [Recommendations](https://github.com/aydinheugh/ecoloco-fl/blob/master/frontend/screens/RecommendationScreen.js): `frontend/screens/RecommendationScreen.js`
- [Audit results](https://github.com/aydinheugh/ecoloco-fl/blob/master/frontend/screens/AuditResultsScreen.js): `frontend/screens/AuditResultsScreen.js`
- [API client](https://github.com/aydinheugh/ecoloco-fl/blob/master/frontend/services/geminiService.js): `frontend/services/geminiService.js`

### API

- [HTTP endpoints](https://github.com/aydinheugh/ecoloco-fl/blob/master/backend/app.py): `backend/app.py`

### Plant and biodiversity

- [Plant AI workflows](https://github.com/aydinheugh/ecoloco-fl/blob/master/backend/services/ai_service.py): `backend/services/ai_service.py`
- [Species identification](https://github.com/aydinheugh/ecoloco-fl/blob/master/backend/services/identification_service.py): `backend/services/identification_service.py`
- [Florida plant status](https://github.com/aydinheugh/ecoloco-fl/blob/master/backend/services/fl_plants_service.py): `backend/services/fl_plants_service.py`
- [Biodiversity scoring](https://github.com/aydinheugh/ecoloco-fl/blob/master/backend/services/score_service.py): `backend/services/score_service.py`
- [iNaturalist service](https://github.com/aydinheugh/ecoloco-fl/blob/master/backend/services/inat_service.py): `backend/services/inat_service.py`

### AI integration

- [OpenAI client](https://github.com/aydinheugh/ecoloco-fl/blob/master/backend/services/openai_client.py): `backend/services/openai_client.py`

### Other components

- **App user**
- **OpenAI**

## Connections

- App user → App entry: opens
- App entry → Navigation: renders (evidence: `App.js`)
- Navigation → Home: routes (evidence: `frontend/navigation/AppNavigator.js`)
- Navigation → Plant identification: routes (evidence: `frontend/navigation/AppNavigator.js`)
- Navigation → Plant audit: routes (evidence: `frontend/navigation/AppNavigator.js`)
- Navigation → Recommendations: routes (evidence: `frontend/navigation/AppNavigator.js`)
- Navigation → Audit results: routes (evidence: `frontend/navigation/AppNavigator.js`)
- Plant identification → API client: requests identification (evidence: `frontend/screens/IdentificationScreen.js`)
- Plant audit → API client: requests identification (evidence: `frontend/screens/AuditScreen.js`)
- Recommendations → API client: requests recommendations (evidence: `frontend/screens/RecommendationScreen.js`)
- Audit results → API client: requests score and letter (evidence: `frontend/screens/AuditResultsScreen.js`)
- Audit results → API client: requests recommendations (evidence: `frontend/screens/AuditResultsScreen.js`)
- API client → HTTP endpoints: posts API requests (evidence: `frontend/services/geminiService.js`)
- HTTP endpoints → Plant AI workflows: delegates identify, recommend, letter (evidence: `backend/app.py`)
- HTTP endpoints → Biodiversity scoring: delegates score (evidence: `backend/app.py`)
- Plant AI workflows → Species identification: identifies species (evidence: `backend/services/ai_service.py`)
- Plant AI workflows → Florida plant status: checks plant status (evidence: `backend/services/ai_service.py`)
- Plant AI workflows → OpenAI client: requests AI responses (evidence: `backend/services/ai_service.py`)
- Species identification → OpenAI client: requests image analysis (evidence: `backend/services/identification_service.py`)
- OpenAI client → OpenAI: sends chat requests (evidence: `backend/services/openai_client.py`)
