# imranhasan13421/ezzemap architecture

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

## Overview

Local Host BD is a browser-based guide to all 64 Bangladesh districts. Visitors search or inspect the interactive map, open a district profile with bilingual geographic and administrative details, heritage and tourism highlights, travel information, and imagery, and can track visited districts. The README documents these capabilities and the optional native static-file server. The app excerpt confirms routing and travel-tracker state handling; other internal links are based on documented behavior where source excerpts do not show the implementation.

Main entry points: [`app.js`](https://github.com/imranhasan13421/ezzemap/blob/main/app.js) (App controller), [`server.js`](https://github.com/imranhasan13421/ezzemap/blob/main/server.js) (Static file server), [`district-data.js`](https://github.com/imranhasan13421/ezzemap/blob/main/district-data.js) (Legacy district data), [`data/main-info/catalog.js`](https://github.com/imranhasan13421/ezzemap/blob/main/data/main-info/catalog.js) (64-district catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Visitor experience"]
  node_app["App controller<br/>[app.js]"]
  node_directory["District directory<br/>[app.js]"]
  node_profiles["District profiles<br/>[app.js]"]
  node_travel["Visited districts<br/>[app.js]"]
  node_language["Bilingual display<br/>[app.js]"]
  node_theme["Theme preference<br/>[app.js]"]
  node_browser_storage[("Browser localStorage")]
end

subgraph group_content["District content"]
  node_catalog["64-district catalog<br/>[catalog.js]"]
  node_district_modules["District profiles data"]
  node_legacy_data["Legacy district data<br/>[district-data.js]"]
  node_heritage_tourism["Heritage and tourism"]
  node_routes_carousel["Routes and panoramas"]
end

subgraph group_mapping["Maps and geography"]
  node_map_ui["Interactive map<br/>[app.js]"]
  node_map_paths["District vector paths<br/>[map-paths.js]"]
  node_map_bounds["Map viewBox"]
end

subgraph group_delivery["Local delivery"]
  node_server["Static file server<br/>[server.js]"]
end

node_visitor(("Visitor"))
node_browser(("Web browser"))

node_visitor -->|"uses"| node_app
node_app -->|"routes views"| node_directory
node_directory -.->|"presents districts"| node_catalog
node_directory -->|"inspects districts"| node_map_ui
node_map_ui -->|"renders polygons"| node_map_paths
node_map_ui -.->|"uses coordinates"| node_map_bounds
node_map_ui -->|"opens profile"| node_profiles
node_directory -.->|"opens profile"| node_profiles
node_profiles -.->|"displays details"| node_district_modules
node_profiles -->|"shows highlights"| node_heritage_tourism
node_profiles -->|"shows travel content"| node_routes_carousel
node_visitor -->|"tracks visits"| node_travel
node_app -->|"updates state"| node_travel
node_travel -.->|"persists state"| node_browser_storage
node_app -.->|"formats text"| node_language
node_visitor -->|"toggles theme"| node_theme
node_theme -->|"persists preference"| node_browser_storage
node_browser -->|"requests files"| node_server
node_server -->|"streams files"| node_browser
node_legacy_data -.->|"supports compatibility"| node_app

click node_app "https://github.com/imranhasan13421/ezzemap/blob/main/app.js"
click node_directory "https://github.com/imranhasan13421/ezzemap/blob/main/app.js"
click node_profiles "https://github.com/imranhasan13421/ezzemap/blob/main/app.js"
click node_travel "https://github.com/imranhasan13421/ezzemap/blob/main/app.js"
click node_language "https://github.com/imranhasan13421/ezzemap/blob/main/app.js"
click node_theme "https://github.com/imranhasan13421/ezzemap/blob/main/app.js"
click node_catalog "https://github.com/imranhasan13421/ezzemap/blob/main/data/main-info/catalog.js"
click node_district_modules "https://github.com/imranhasan13421/ezzemap/tree/main/data/main-info"
click node_legacy_data "https://github.com/imranhasan13421/ezzemap/blob/main/district-data.js"
click node_heritage_tourism "https://github.com/imranhasan13421/ezzemap/tree/main/data/main-info"
click node_routes_carousel "https://github.com/imranhasan13421/ezzemap/tree/main/data/main-info"
click node_map_ui "https://github.com/imranhasan13421/ezzemap/blob/main/app.js"
click node_map_paths "https://github.com/imranhasan13421/ezzemap/blob/main/data/map-paths.js"
click node_map_bounds "https://github.com/imranhasan13421/ezzemap/blob/main/data/bangladesh-map-viewbox.js"
click node_server "https://github.com/imranhasan13421/ezzemap/blob/main/server.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_directory,node_profiles,node_travel,node_language,node_theme,node_browser_storage,node_browser toneBlue
class node_catalog,node_district_modules,node_legacy_data,node_heritage_tourism,node_routes_carousel toneAmber
class node_map_ui,node_map_paths,node_map_bounds toneMint
class node_server toneRose
class node_visitor toneIndigo
```

## Components

### Visitor experience

- [App controller](https://github.com/imranhasan13421/ezzemap/blob/main/app.js): `app.js`
- [District directory](https://github.com/imranhasan13421/ezzemap/blob/main/app.js): `app.js`
- [District profiles](https://github.com/imranhasan13421/ezzemap/blob/main/app.js): `app.js`
- [Visited districts](https://github.com/imranhasan13421/ezzemap/blob/main/app.js): `app.js`
- [Bilingual display](https://github.com/imranhasan13421/ezzemap/blob/main/app.js): `app.js`
- [Theme preference](https://github.com/imranhasan13421/ezzemap/blob/main/app.js): `app.js`
- **Browser localStorage**

### District content

- [64-district catalog](https://github.com/imranhasan13421/ezzemap/blob/main/data/main-info/catalog.js): `data/main-info/catalog.js`
- [District profiles data](https://github.com/imranhasan13421/ezzemap/tree/main/data/main-info): `data/main-info`
- [Legacy district data](https://github.com/imranhasan13421/ezzemap/blob/main/district-data.js): `district-data.js`
- [Heritage and tourism](https://github.com/imranhasan13421/ezzemap/tree/main/data/main-info): `data/main-info`
- [Routes and panoramas](https://github.com/imranhasan13421/ezzemap/tree/main/data/main-info): `data/main-info`

### Maps and geography

- [Interactive map](https://github.com/imranhasan13421/ezzemap/blob/main/app.js): `app.js`
- [District vector paths](https://github.com/imranhasan13421/ezzemap/blob/main/data/map-paths.js): `data/map-paths.js`
- [Map viewBox](https://github.com/imranhasan13421/ezzemap/blob/main/data/bangladesh-map-viewbox.js): `data/bangladesh-map-viewbox.js`

### Local delivery

- [Static file server](https://github.com/imranhasan13421/ezzemap/blob/main/server.js): `server.js`

### Other components

- **Visitor**
- **Web browser**

## Connections

- Visitor → App controller: uses (evidence: `README.md`)
- App controller → District directory: routes views (evidence: `app.js`)
- District directory → 64-district catalog: presents districts (evidence: `README.md`)
- District directory → Interactive map: inspects districts (evidence: `README.md`)
- Interactive map → District vector paths: renders polygons (evidence: `README.md`)
- Interactive map → Map viewBox: uses coordinates (evidence: `README.md`)
- Interactive map → District profiles: opens profile (evidence: `README.md`)
- District directory → District profiles: opens profile (evidence: `README.md`)
- District profiles → District profiles data: displays details (evidence: `README.md`)
- District profiles → Heritage and tourism: shows highlights (evidence: `README.md`)
- District profiles → Routes and panoramas: shows travel content (evidence: `README.md`)
- Visitor → Visited districts: tracks visits (evidence: `README.md`)
- App controller → Visited districts: updates state (evidence: `app.js`)
- Visited districts → Browser localStorage: persists state (evidence: `app.js`)
- App controller → Bilingual display: formats text (evidence: `README.md`)
- Visitor → Theme preference: toggles theme (evidence: `README.md`)
- Theme preference → Browser localStorage: persists preference (evidence: `README.md`)
- Web browser → Static file server: requests files (evidence: `README.md`)
- Static file server → Web browser: streams files (evidence: `server.js`)
- Legacy district data → App controller: supports compatibility (evidence: `README.md`)
