# akazizu1/dynamic-tourist-guide architecture

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

- Interactive diagram: https://gitdiagram.com/akazizu1/dynamic-tourist-guide
- Repository: https://github.com/akazizu1/dynamic-tourist-guide

## Overview

Dynamic Tourist Guide is a Streamlit app that takes a visitor’s coordinates and interests, loads location data, then runs clustering, preference filtering, and distance ranking before showing nearby locations on a map and in a table. The stages are invoked by the app rather than calling one another. The source excerpts show these calls and the dataset load; the CSV contents were not sampled.

Main entry points: [`app.py`](https://github.com/akazizu1/dynamic-tourist-guide/blob/main/app.py) (Streamlit App), [`data/locations.csv`](https://github.com/akazizu1/dynamic-tourist-guide/blob/main/data/locations.csv) (Location Dataset), [`modules/clustering.py`](https://github.com/akazizu1/dynamic-tourist-guide/blob/main/modules/clustering.py) (Location Clustering), [`modules/rules.py`](https://github.com/akazizu1/dynamic-tourist-guide/blob/main/modules/rules.py) (Preference Filtering)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Visitor Interface"]
  node_app["Streamlit App<br/>[app.py]"]
  node_results["Map and Table<br/>[app.py]"]
end

subgraph group_recommendations["Recommendation Logic"]
  node_clustering["Location Clustering<br/>[clustering.py]"]
  node_filtering["Preference Filtering<br/>[rules.py]"]
  node_ranking["Distance Ranking<br/>[heuristics.py]"]
end

subgraph group_location_data["Location Data"]
  node_locations["Location Dataset<br/>[locations.csv]"]
end

node_visitor(("Visitor"))

node_visitor -->|"provides preferences"| node_app
node_locations -->|"loaded by"| node_app
node_app -->|"applies clustering"| node_clustering
node_app -->|"filters preferences"| node_filtering
node_app -->|"ranks distances"| node_ranking
node_app -->|"renders"| node_results

click node_app "https://github.com/akazizu1/dynamic-tourist-guide/blob/main/app.py"
click node_results "https://github.com/akazizu1/dynamic-tourist-guide/blob/main/app.py"
click node_locations "https://github.com/akazizu1/dynamic-tourist-guide/blob/main/data/locations.csv"
click node_clustering "https://github.com/akazizu1/dynamic-tourist-guide/blob/main/modules/clustering.py"
click node_filtering "https://github.com/akazizu1/dynamic-tourist-guide/blob/main/modules/rules.py"
click node_ranking "https://github.com/akazizu1/dynamic-tourist-guide/blob/main/modules/heuristics.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_results toneBlue
class node_clustering,node_filtering,node_ranking toneAmber
class node_locations toneMint
class node_visitor toneIndigo
```

## Components

### Visitor Interface

- [Streamlit App](https://github.com/akazizu1/dynamic-tourist-guide/blob/main/app.py): `app.py`
- [Map and Table](https://github.com/akazizu1/dynamic-tourist-guide/blob/main/app.py): `app.py`

### Recommendation Logic

- [Location Clustering](https://github.com/akazizu1/dynamic-tourist-guide/blob/main/modules/clustering.py): `modules/clustering.py`
- [Preference Filtering](https://github.com/akazizu1/dynamic-tourist-guide/blob/main/modules/rules.py): `modules/rules.py`
- [Distance Ranking](https://github.com/akazizu1/dynamic-tourist-guide/blob/main/modules/heuristics.py): `modules/heuristics.py`

### Location Data

- [Location Dataset](https://github.com/akazizu1/dynamic-tourist-guide/blob/main/data/locations.csv): `data/locations.csv`

### Other components

- **Visitor**

## Connections

- Visitor → Streamlit App: provides preferences (evidence: `app.py`)
- Location Dataset → Streamlit App: loaded by (evidence: `app.py`)
- Streamlit App → Location Clustering: applies clustering (evidence: `app.py`)
- Streamlit App → Preference Filtering: filters preferences (evidence: `app.py`)
- Streamlit App → Distance Ranking: ranks distances (evidence: `app.py`)
- Streamlit App → Map and Table: renders (evidence: `app.py`)
