# hariomgupta70427/world-map architecture

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

- Interactive diagram: https://gitdiagram.com/hariomgupta70427/world-map
- Repository: https://github.com/hariomgupta70427/world-map

## Overview

World Explorer is a browser-based interactive country map backed by a small Express server. Users hover over map regions for names and select a country to load its details into a sidebar; the browser requests country and time data through the server. The README documents responsive styling and REST Countries integration. The supplied excerpts show map event handling, detail rendering, and both server routes; the map asset’s exact loading relationship is not shown, so it is not modeled separately.

Main entry points: [`script.js`](https://github.com/hariomgupta70427/world-map/blob/main/script.js) (Map interactions), [`index.html`](https://github.com/hariomgupta70427/world-map/blob/main/index.html) (Map page), [`server.js`](https://github.com/hariomgupta70427/world-map/blob/main/server.js) (Country data proxy), [`styles.css`](https://github.com/hariomgupta70427/world-map/blob/main/styles.css) (Responsive styling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Map interface"]
  node_page["Map page<br/>[index.html]"]
  node_styles["Responsive styling<br/>[styles.css]"]
end

subgraph group_interaction["Country exploration"]
  node_map_logic["Map interactions<br/>[script.js]"]
  node_country_details["Country details<br/>[script.js]"]
end

subgraph group_backend["Server services"]
  node_static_host["Static file hosting<br/>[server.js]"]
  node_country_proxy["Country data proxy<br/>[server.js]"]
  node_time_service["Time endpoint<br/>[server.js]"]
end

subgraph group_external["External data"]
  node_rest_countries{{"REST Countries API"}}
end

node_visitor(("Visitor"))

node_visitor -->|"explores"| node_page
node_map_logic -->|"updates"| node_page
node_map_logic -->|"loads details"| node_country_details
node_page -->|"styled by"| node_styles
node_static_host -->|"serves"| node_page
node_map_logic -->|"requests country"| node_country_proxy
node_country_proxy -->|"fetches data"| node_rest_countries
node_map_logic -->|"requests time"| node_time_service

click node_page "https://github.com/hariomgupta70427/world-map/blob/main/index.html"
click node_styles "https://github.com/hariomgupta70427/world-map/blob/main/styles.css"
click node_map_logic "https://github.com/hariomgupta70427/world-map/blob/main/script.js"
click node_country_details "https://github.com/hariomgupta70427/world-map/blob/main/script.js"
click node_static_host "https://github.com/hariomgupta70427/world-map/blob/main/server.js"
click node_country_proxy "https://github.com/hariomgupta70427/world-map/blob/main/server.js"
click node_time_service "https://github.com/hariomgupta70427/world-map/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_page,node_styles toneBlue
class node_map_logic,node_country_details toneAmber
class node_static_host,node_country_proxy,node_time_service toneMint
class node_rest_countries toneRose
class node_visitor toneIndigo
```

## Components

### Map interface

- [Map page](https://github.com/hariomgupta70427/world-map/blob/main/index.html): `index.html`
- [Responsive styling](https://github.com/hariomgupta70427/world-map/blob/main/styles.css): `styles.css`

### Country exploration

- [Map interactions](https://github.com/hariomgupta70427/world-map/blob/main/script.js): `script.js`
- [Country details](https://github.com/hariomgupta70427/world-map/blob/main/script.js): `script.js`

### Server services

- [Static file hosting](https://github.com/hariomgupta70427/world-map/blob/main/server.js): `server.js`
- [Country data proxy](https://github.com/hariomgupta70427/world-map/blob/main/server.js): `server.js`
- [Time endpoint](https://github.com/hariomgupta70427/world-map/blob/main/server.js): `server.js`

### External data

- **REST Countries API**

### Other components

- **Visitor**

## Connections

- Visitor → Map page: explores (evidence: `README.md`)
- Map interactions → Map page: updates (evidence: `script.js`)
- Map interactions → Country details: loads details (evidence: `script.js`)
- Map page → Responsive styling: styled by (evidence: `README.md`)
- Static file hosting → Map page: serves (evidence: `server.js`)
- Map interactions → Country data proxy: requests country (evidence: `script.js`)
- Country data proxy → REST Countries API: fetches data (evidence: `server.js`)
- Map interactions → Time endpoint: requests time (evidence: `script.js`)
