# pradipdhungel/world-interesting-news architecture

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

- Interactive diagram: https://gitdiagram.com/pradipdhungel/world-interesting-news
- Repository: https://github.com/pradipdhungel/world-interesting-news

## Overview

World Interesting News is a Node.js news-discovery website. Visitors filter and search news by country, category, language, and source, then open article briefs with source context; the browser requests data from the server, which gathers and enriches news for display. The site also offers saved-interest briefings, AI insights, sports and holiday views, visitor statistics, RSS, advertising, and SEO features. Server internals are only partially sampled, so uncertain subsystem links are omitted rather than inferred.

Main entry points: [`public/app.js`](https://github.com/pradipdhungel/world-interesting-news/blob/main/public/app.js) (News search and briefings), [`server.js`](https://github.com/pradipdhungel/world-interesting-news/blob/main/server.js) (News and metadata API), [`public/index.html`](https://github.com/pradipdhungel/world-interesting-news/blob/main/public/index.html) (Discovery interface), [`public/article.html`](https://github.com/pradipdhungel/world-interesting-news/blob/main/public/article.html) (Article reader page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["News discovery"]
  node_home["Discovery interface<br/>[index.html]"]
  node_feed["News search and briefings<br/>[app.js]"]
  node_newsapi["News and metadata API<br/>[server.js]"]
  node_feed_sources["News feeds"]
  node_translator["Translation service"]
end

subgraph group_reading["Article reading"]
  node_article_page["Article reader page<br/>[article.html]"]
  node_reader["Article brief and coverage<br/>[article.js]"]
  node_ai["AI insight endpoint<br/>[server.js]"]
end

subgraph group_extras["World features"]
  node_world_views["Sports and calendar views<br/>[app.js]"]
  node_stats_ui["Visitor statistics display<br/>[visit-stats.js]"]
  node_visit_api["Visit statistics API<br/>[server.js]"]
  node_stats_store[("Visit statistics file<br/>[server.js]")]
end

subgraph group_platform["Site platform"]
  node_seo["SEO metadata<br/>[seo.js]"]
  node_static_seo["Static-page metadata<br/>[static-page.js]"]
  node_ads["Advertising slots<br/>[ads.js]"]
  node_ad_service["Ad service"]
  node_rss["RSS feed<br/>[server.js]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens site"| node_home
node_visitor -->|"opens story"| node_article_page
node_home -.->|"loads script"| node_feed
node_feed -->|"requests news"| node_newsapi
node_newsapi -->|"fetches feeds"| node_feed_sources
node_newsapi -->|"translates stories"| node_translator
node_article_page -.->|"loads script"| node_reader
node_reader -->|"requests insight"| node_ai
node_feed -->|"requests insight"| node_ai
node_feed -->|"renders views"| node_world_views
node_stats_ui -->|"requests counts"| node_visit_api
node_visit_api -.->|"reads and writes"| node_stats_store
node_static_seo -->|"uses metadata"| node_seo
node_ads -->|"loads ads"| node_ad_service
node_visitor -.->|"subscribes"| node_rss

click node_home "https://github.com/pradipdhungel/world-interesting-news/blob/main/public/index.html"
click node_feed "https://github.com/pradipdhungel/world-interesting-news/blob/main/public/app.js"
click node_newsapi "https://github.com/pradipdhungel/world-interesting-news/blob/main/server.js"
click node_article_page "https://github.com/pradipdhungel/world-interesting-news/blob/main/public/article.html"
click node_reader "https://github.com/pradipdhungel/world-interesting-news/blob/main/public/article.js"
click node_ai "https://github.com/pradipdhungel/world-interesting-news/blob/main/server.js"
click node_world_views "https://github.com/pradipdhungel/world-interesting-news/blob/main/public/app.js"
click node_stats_ui "https://github.com/pradipdhungel/world-interesting-news/blob/main/public/visit-stats.js"
click node_visit_api "https://github.com/pradipdhungel/world-interesting-news/blob/main/server.js"
click node_stats_store "https://github.com/pradipdhungel/world-interesting-news/blob/main/server.js"
click node_seo "https://github.com/pradipdhungel/world-interesting-news/blob/main/public/seo.js"
click node_static_seo "https://github.com/pradipdhungel/world-interesting-news/blob/main/public/static-page.js"
click node_ads "https://github.com/pradipdhungel/world-interesting-news/blob/main/public/ads.js"
click node_rss "https://github.com/pradipdhungel/world-interesting-news/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_home,node_feed,node_newsapi,node_feed_sources,node_translator toneBlue
class node_article_page,node_reader,node_ai toneAmber
class node_world_views,node_stats_ui,node_visit_api,node_stats_store toneMint
class node_seo,node_static_seo,node_ads,node_ad_service,node_rss toneRose
class node_visitor toneIndigo
```

## Components

### News discovery

- [Discovery interface](https://github.com/pradipdhungel/world-interesting-news/blob/main/public/index.html): `public/index.html`
- [News search and briefings](https://github.com/pradipdhungel/world-interesting-news/blob/main/public/app.js): `public/app.js`
- [News and metadata API](https://github.com/pradipdhungel/world-interesting-news/blob/main/server.js): `server.js`
- **News feeds**
- **Translation service**

### Article reading

- [Article reader page](https://github.com/pradipdhungel/world-interesting-news/blob/main/public/article.html): `public/article.html`
- [Article brief and coverage](https://github.com/pradipdhungel/world-interesting-news/blob/main/public/article.js): `public/article.js`
- [AI insight endpoint](https://github.com/pradipdhungel/world-interesting-news/blob/main/server.js): `server.js`

### World features

- [Sports and calendar views](https://github.com/pradipdhungel/world-interesting-news/blob/main/public/app.js): `public/app.js`
- [Visitor statistics display](https://github.com/pradipdhungel/world-interesting-news/blob/main/public/visit-stats.js): `public/visit-stats.js`
- [Visit statistics API](https://github.com/pradipdhungel/world-interesting-news/blob/main/server.js): `server.js`
- [Visit statistics file](https://github.com/pradipdhungel/world-interesting-news/blob/main/server.js): `server.js`

### Site platform

- [SEO metadata](https://github.com/pradipdhungel/world-interesting-news/blob/main/public/seo.js): `public/seo.js`
- [Static-page metadata](https://github.com/pradipdhungel/world-interesting-news/blob/main/public/static-page.js): `public/static-page.js`
- [Advertising slots](https://github.com/pradipdhungel/world-interesting-news/blob/main/public/ads.js): `public/ads.js`
- **Ad service**
- [RSS feed](https://github.com/pradipdhungel/world-interesting-news/blob/main/server.js): `server.js`

### Other components

- **Visitor**

## Connections

- Visitor → Discovery interface: opens site (evidence: `README.md`)
- Visitor → Article reader page: opens story (evidence: `README.md`)
- Discovery interface → News search and briefings: loads script
- News search and briefings → News and metadata API: requests news (evidence: `public/app.js`)
- News and metadata API → News feeds: fetches feeds (evidence: `server.js`)
- News and metadata API → Translation service: translates stories (evidence: `server.js`)
- Article reader page → Article brief and coverage: loads script
- Article brief and coverage → AI insight endpoint: requests insight (evidence: `public/article.js`)
- News search and briefings → AI insight endpoint: requests insight (evidence: `public/app.js`)
- News search and briefings → Sports and calendar views: renders views (evidence: `public/app.js`)
- Visitor statistics display → Visit statistics API: requests counts (evidence: `public/visit-stats.js`)
- Visit statistics API → Visit statistics file: reads and writes (evidence: `server.js`)
- Static-page metadata → SEO metadata: uses metadata (evidence: `public/static-page.js`)
- Advertising slots → Ad service: loads ads (evidence: `public/ads.js`)
- Visitor → RSS feed: subscribes
