# febryannnn/ai-route-optimizer-with-search-algorithm architecture

> Architecture diagram of the GitHub repository febryannnn/ai-route-optimizer-with-search-algorithm, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/febryannnn/ai-route-optimizer-with-search-algorithm
- Repository: https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm

## Overview

Route Optimization Dashboard lets an operator manage delivery locations and a mixed vehicle fleet, choose a routing algorithm, and inspect optimized routes and results. The frontend App coordinates the workflow through the API service and Flask backend; the backend prepares vehicle-specific distance data, runs an optimizer, and returns route results. The interface also includes map visualization, optimization history, and a route-schedule view. Source excerpts are partial, so uncertain wiring and unsampled implementation details are omitted.

Main entry points: [`frontend/src/App.jsx`](https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/frontend/src/App.jsx) (Dashboard App), [`backend/app.py`](https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/backend/app.py) (Flask API), [`frontend/src/services/api.js`](https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/frontend/src/services/api.js) (API Client), [`frontend/src/components/ui/LocationManager.jsx`](https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/frontend/src/components/ui/LocationManager.jsx) (Location Manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Dashboard"]
  node_app["Dashboard App<br/>[App.jsx]"]
  node_location_manager["Location Manager"]
  node_location_picker["Location Picker"]
  node_fleet_manager["Fleet Manager<br/>[FleetManager.jsx]"]
  node_algorithm_control["Algorithm Controls"]
  node_map["Map View"]
  node_chart["Optimization Chart"]
  node_results["Route Results<br/>[ResultsPanel.jsx]"]
  node_schedule["Route Schedule<br/>[ScheduleModal.jsx]"]
end

subgraph group_api["API and Data"]
  node_api_client["API Client<br/>[api.js]"]
  node_backend["Flask API<br/>[app.py]"]
  node_locations_store[("Locations<br/>[locations.json]")]
  node_vehicles_store[("Vehicles<br/>[vehicles.json]")]
end

subgraph group_routing["Route Optimization"]
  node_genetic["Genetic Algorithm"]
  node_tabu["Tabu Search<br/>[TabuSearch.py]"]
  node_annealing["Simulated Annealing"]
end

subgraph group_integrations["External Services"]
  node_osrm["OSRM Routing"]
end

node_operator(("Operator"))

node_operator -->|"uses"| node_app
node_app -->|"renders"| node_location_manager
node_app -->|"opens"| node_location_picker
node_app -->|"renders"| node_fleet_manager
node_app -->|"renders"| node_algorithm_control
node_app -->|"renders"| node_map
node_app -->|"renders"| node_chart
node_app -->|"renders"| node_results
node_app -->|"renders"| node_schedule
node_app -->|"requests"| node_api_client
node_api_client -->|"HTTP calls"| node_backend
node_backend -->|"reads/writes"| node_locations_store
node_backend -->|"reads/writes"| node_vehicles_store
node_backend -.->|"requests routes"| node_osrm
node_backend -->|"runs"| node_genetic
node_backend -->|"runs"| node_tabu
node_backend -->|"runs"| node_annealing

click node_app "https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/frontend/src/App.jsx"
click node_location_manager "https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/frontend/src/components/ui/LocationManager.jsx"
click node_location_picker "https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/frontend/src/components/ui/LocationPickerModal.jsx"
click node_fleet_manager "https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/frontend/src/components/ui/FleetManager.jsx"
click node_algorithm_control "https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/frontend/src/components/ui/AlgorithmControl.jsx"
click node_map "https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/frontend/src/components/ui/MapVisualization.jsx"
click node_chart "https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/frontend/src/components/ui/OptimizationChart.jsx"
click node_results "https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/frontend/src/components/ui/ResultsPanel.jsx"
click node_schedule "https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/frontend/src/components/ui/ScheduleModal.jsx"
click node_api_client "https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/frontend/src/services/api.js"
click node_backend "https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/backend/app.py"
click node_locations_store "https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/backend/data/locations.json"
click node_vehicles_store "https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/backend/data/vehicles.json"
click node_genetic "https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/backend/algorithms/GeneticAlgorithm.py"
click node_tabu "https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/backend/algorithms/TabuSearch.py"
click node_annealing "https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/backend/algorithms/simulatedAnnealing.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_location_manager,node_location_picker,node_fleet_manager,node_algorithm_control,node_map,node_chart,node_results,node_schedule toneBlue
class node_api_client,node_backend,node_locations_store,node_vehicles_store toneAmber
class node_genetic,node_tabu,node_annealing toneMint
class node_osrm toneRose
class node_operator toneIndigo
```

## Components

### Dashboard

- [Dashboard App](https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Location Manager](https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/frontend/src/components/ui/LocationManager.jsx): `frontend/src/components/ui/LocationManager.jsx`
- [Location Picker](https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/frontend/src/components/ui/LocationPickerModal.jsx): `frontend/src/components/ui/LocationPickerModal.jsx`
- [Fleet Manager](https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/frontend/src/components/ui/FleetManager.jsx): `frontend/src/components/ui/FleetManager.jsx`
- [Algorithm Controls](https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/frontend/src/components/ui/AlgorithmControl.jsx): `frontend/src/components/ui/AlgorithmControl.jsx`
- [Map View](https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/frontend/src/components/ui/MapVisualization.jsx): `frontend/src/components/ui/MapVisualization.jsx`
- [Optimization Chart](https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/frontend/src/components/ui/OptimizationChart.jsx): `frontend/src/components/ui/OptimizationChart.jsx`
- [Route Results](https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/frontend/src/components/ui/ResultsPanel.jsx): `frontend/src/components/ui/ResultsPanel.jsx`
- [Route Schedule](https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/frontend/src/components/ui/ScheduleModal.jsx): `frontend/src/components/ui/ScheduleModal.jsx`

### API and Data

- [API Client](https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`
- [Flask API](https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/backend/app.py): `backend/app.py`
- [Locations](https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/backend/data/locations.json): `backend/data/locations.json`
- [Vehicles](https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/backend/data/vehicles.json): `backend/data/vehicles.json`

### Route Optimization

- [Genetic Algorithm](https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/backend/algorithms/GeneticAlgorithm.py): `backend/algorithms/GeneticAlgorithm.py`
- [Tabu Search](https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/backend/algorithms/TabuSearch.py): `backend/algorithms/TabuSearch.py`
- [Simulated Annealing](https://github.com/febryannnn/ai-route-optimizer-with-search-algorithm/blob/main/backend/algorithms/simulatedAnnealing.py): `backend/algorithms/simulatedAnnealing.py`

### External Services

- **OSRM Routing**

### Other components

- **Operator**

## Connections

- Operator → Dashboard App: uses
- Dashboard App → Location Manager: renders
- Dashboard App → Location Picker: opens
- Dashboard App → Fleet Manager: renders
- Dashboard App → Algorithm Controls: renders
- Dashboard App → Map View: renders
- Dashboard App → Optimization Chart: renders
- Dashboard App → Route Results: renders
- Dashboard App → Route Schedule: renders
- Dashboard App → API Client: requests
- API Client → Flask API: HTTP calls
- Flask API → Locations: reads/writes
- Flask API → Vehicles: reads/writes
- Flask API → OSRM Routing: requests routes
- Flask API → Genetic Algorithm: runs
- Flask API → Tabu Search: runs
- Flask API → Simulated Annealing: runs
