# kotaharsha25/wilddiscover architecture

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

## Overview

WildDiscover is a React Native app for identifying plants, animals, and landmarks from captured or uploaded images, then presenting details and Wikipedia links. Users choose a category, provide an image, and receive a category-specific result. The category screens invoke a detection router that selects PlantNet, Google Vision, or fauna-specific identification paths; those integrations enrich results with Wikipedia data. The excerpts show the main routing and several provider calls, but not all provider implementation details or the Home screen’s navigation code.

Main entry points: [`api/detectionAPI.js`](https://github.com/kotaharsha25/wilddiscover/blob/main/api/detectionAPI.js) (Detection router), [`App.js`](https://github.com/kotaharsha25/wilddiscover/blob/main/App.js) (App navigation), [`screens/HomeScreen.js`](https://github.com/kotaharsha25/wilddiscover/blob/main/screens/HomeScreen.js) (Home screen), [`api/wikipediaAPI.js`](https://github.com/kotaharsha25/wilddiscover/blob/main/api/wikipediaAPI.js) (Wikipedia enrichment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_app["App navigation<br/>[App.js]"]
  node_home["Home screen<br/>[HomeScreen.js]"]
  node_flora_screen["Flora screen<br/>[FloraScreen.js]"]
  node_fauna_screen["Fauna screen<br/>[FaunaScreen.js]"]
  node_landmark_screen["Landmark screen<br/>[LandmarkScreen.js]"]
  node_result["Result display<br/>[ResultScreen.js]"]
end

subgraph group_detection["Detection routing"]
  node_detection_router["Detection router<br/>[detectionAPI.js]"]
end

subgraph group_providers["Identification providers"]
  node_plantnet["PlantNet integration<br/>[plantNetAPI.js]"]
  node_animal["Animal identification<br/>[animalAPI.js]"]
  node_google_vision["Google Vision integration<br/>[googleVisionAPI.js]"]
  node_pollinations["Pollinations integration<br/>[pollinationsAPI.js]"]
end

subgraph group_enrichment["Information enrichment"]
  node_wikipedia["Wikipedia enrichment<br/>[wikipediaAPI.js]"]
end

node_user(("App user"))
node_plantnet_service["PlantNet API"]
node_animal_service["API Ninjas"]
node_vision_service["Google Vision API"]
node_pollinations_service["Pollinations.ai"]
node_wikipedia_service["Wikipedia API"]

node_user -->|"chooses category"| node_home
node_app -->|"registers screen"| node_home
node_app -->|"registers screen"| node_flora_screen
node_app -->|"registers screen"| node_fauna_screen
node_app -->|"registers screen"| node_landmark_screen
node_app -->|"registers screen"| node_result
node_home -->|"navigates to"| node_flora_screen
node_home -->|"navigates to"| node_fauna_screen
node_home -->|"navigates to"| node_landmark_screen
node_flora_screen -->|"submits image"| node_detection_router
node_fauna_screen -->|"submits image"| node_detection_router
node_landmark_screen -->|"submits image"| node_detection_router
node_flora_screen -->|"navigates with result"| node_result
node_fauna_screen -->|"navigates with result"| node_result
node_landmark_screen -->|"navigates with result"| node_result
node_detection_router -->|"routes flora"| node_plantnet
node_detection_router -->|"routes landmarks"| node_google_vision
node_detection_router -->|"checks fauna labels"| node_google_vision
node_detection_router -->|"routes birds and insects"| node_pollinations
node_detection_router -->|"routes other fauna"| node_animal
node_plantnet -->|"sends image"| node_plantnet_service
node_google_vision -->|"sends image"| node_vision_service
node_animal -->|"requests animal details"| node_animal_service
node_pollinations -->|"sends image"| node_pollinations_service
node_plantnet -->|"enriches plant result"| node_wikipedia
node_google_vision -->|"enriches detection"| node_wikipedia
node_animal -->|"enriches animal result"| node_wikipedia
node_pollinations -->|"enriches identification"| node_wikipedia
node_wikipedia -->|"fetches summary"| node_wikipedia_service

click node_app "https://github.com/kotaharsha25/wilddiscover/blob/main/App.js"
click node_home "https://github.com/kotaharsha25/wilddiscover/blob/main/screens/HomeScreen.js"
click node_flora_screen "https://github.com/kotaharsha25/wilddiscover/blob/main/screens/FloraScreen.js"
click node_fauna_screen "https://github.com/kotaharsha25/wilddiscover/blob/main/screens/FaunaScreen.js"
click node_landmark_screen "https://github.com/kotaharsha25/wilddiscover/blob/main/screens/LandmarkScreen.js"
click node_result "https://github.com/kotaharsha25/wilddiscover/blob/main/screens/ResultScreen.js"
click node_detection_router "https://github.com/kotaharsha25/wilddiscover/blob/main/api/detectionAPI.js"
click node_plantnet "https://github.com/kotaharsha25/wilddiscover/blob/main/api/plantNetAPI.js"
click node_animal "https://github.com/kotaharsha25/wilddiscover/blob/main/api/animalAPI.js"
click node_google_vision "https://github.com/kotaharsha25/wilddiscover/blob/main/api/googleVisionAPI.js"
click node_pollinations "https://github.com/kotaharsha25/wilddiscover/blob/main/api/pollinationsAPI.js"
click node_wikipedia "https://github.com/kotaharsha25/wilddiscover/blob/main/api/wikipediaAPI.js"

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_home,node_flora_screen,node_fauna_screen,node_landmark_screen,node_result,node_user toneBlue
class node_detection_router toneAmber
class node_plantnet,node_animal,node_google_vision,node_pollinations,node_plantnet_service,node_animal_service,node_vision_service,node_wikipedia_service toneMint
class node_wikipedia toneRose
class node_pollinations_service toneIndigo
```

## Components

### App experience

- [App navigation](https://github.com/kotaharsha25/wilddiscover/blob/main/App.js): `App.js`
- [Home screen](https://github.com/kotaharsha25/wilddiscover/blob/main/screens/HomeScreen.js): `screens/HomeScreen.js`
- [Flora screen](https://github.com/kotaharsha25/wilddiscover/blob/main/screens/FloraScreen.js): `screens/FloraScreen.js`
- [Fauna screen](https://github.com/kotaharsha25/wilddiscover/blob/main/screens/FaunaScreen.js): `screens/FaunaScreen.js`
- [Landmark screen](https://github.com/kotaharsha25/wilddiscover/blob/main/screens/LandmarkScreen.js): `screens/LandmarkScreen.js`
- [Result display](https://github.com/kotaharsha25/wilddiscover/blob/main/screens/ResultScreen.js): `screens/ResultScreen.js`

### Detection routing

- [Detection router](https://github.com/kotaharsha25/wilddiscover/blob/main/api/detectionAPI.js): `api/detectionAPI.js`

### Identification providers

- [PlantNet integration](https://github.com/kotaharsha25/wilddiscover/blob/main/api/plantNetAPI.js): `api/plantNetAPI.js`
- [Animal identification](https://github.com/kotaharsha25/wilddiscover/blob/main/api/animalAPI.js): `api/animalAPI.js`
- [Google Vision integration](https://github.com/kotaharsha25/wilddiscover/blob/main/api/googleVisionAPI.js): `api/googleVisionAPI.js`
- [Pollinations integration](https://github.com/kotaharsha25/wilddiscover/blob/main/api/pollinationsAPI.js): `api/pollinationsAPI.js`

### Information enrichment

- [Wikipedia enrichment](https://github.com/kotaharsha25/wilddiscover/blob/main/api/wikipediaAPI.js): `api/wikipediaAPI.js`

### Other components

- **App user**
- **PlantNet API**
- **API Ninjas**
- **Google Vision API**
- **Pollinations.ai**
- **Wikipedia API**

## Connections

- App user → Home screen: chooses category (evidence: `README.md`)
- App navigation → Home screen: registers screen (evidence: `App.js`)
- App navigation → Flora screen: registers screen (evidence: `App.js`)
- App navigation → Fauna screen: registers screen (evidence: `App.js`)
- App navigation → Landmark screen: registers screen (evidence: `App.js`)
- App navigation → Result display: registers screen (evidence: `App.js`)
- Home screen → Flora screen: navigates to (evidence: `README.md`)
- Home screen → Fauna screen: navigates to (evidence: `README.md`)
- Home screen → Landmark screen: navigates to (evidence: `README.md`)
- Flora screen → Detection router: submits image (evidence: `screens/FloraScreen.js`)
- Fauna screen → Detection router: submits image (evidence: `screens/FaunaScreen.js`)
- Landmark screen → Detection router: submits image (evidence: `screens/LandmarkScreen.js`)
- Flora screen → Result display: navigates with result (evidence: `screens/FloraScreen.js`)
- Fauna screen → Result display: navigates with result (evidence: `screens/FaunaScreen.js`)
- Landmark screen → Result display: navigates with result (evidence: `screens/LandmarkScreen.js`)
- Detection router → PlantNet integration: routes flora (evidence: `api/detectionAPI.js`)
- Detection router → Google Vision integration: routes landmarks (evidence: `api/detectionAPI.js`)
- Detection router → Google Vision integration: checks fauna labels (evidence: `api/detectionAPI.js`)
- Detection router → Pollinations integration: routes birds and insects (evidence: `api/detectionAPI.js`)
- Detection router → Animal identification: routes other fauna (evidence: `api/detectionAPI.js`)
- PlantNet integration → PlantNet API: sends image (evidence: `api/plantNetAPI.js`)
- Google Vision integration → Google Vision API: sends image (evidence: `api/googleVisionAPI.js`)
- Animal identification → API Ninjas: requests animal details (evidence: `api/animalAPI.js`)
- Pollinations integration → Pollinations.ai: sends image (evidence: `api/pollinationsAPI.js`)
- PlantNet integration → Wikipedia enrichment: enriches plant result (evidence: `api/plantNetAPI.js`)
- Google Vision integration → Wikipedia enrichment: enriches detection (evidence: `api/googleVisionAPI.js`)
- Animal identification → Wikipedia enrichment: enriches animal result (evidence: `api/animalAPI.js`)
- Pollinations integration → Wikipedia enrichment: enriches identification (evidence: `api/pollinationsAPI.js`)
- Wikipedia enrichment → Wikipedia API: fetches summary (evidence: `api/wikipediaAPI.js`)
