# munanga/news-max architecture

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

- Interactive diagram: https://gitdiagram.com/munanga/news-max
- Repository: https://github.com/munanga/news-max

## Overview

NewsMax is a cross-platform Flutter app for browsing Guardian headlines, filtering by section, searching articles, and reading full article content. The documented flow starts in the app’s presentation layer, which requests news through the Guardian API client; article cards and the detail screen provide browsing and reading views. The README establishes these capabilities and paths, but Dart source excerpts were not provided, so internal call ownership is not verified and the relevant links are shown as unverified.

Main entry points: [`lib/presentation/home_screen.dart`](https://github.com/munanga/news-max/blob/main/lib/presentation/home_screen.dart) (Headlines and filters), [`lib/api/get_top_news.dart`](https://github.com/munanga/news-max/blob/main/lib/api/get_top_news.dart) (Guardian API client), [`lib/main.dart`](https://github.com/munanga/news-max/blob/main/lib/main.dart) (App entry), [`lib/widgets/stateless/news_card.dart`](https://github.com/munanga/news-max/blob/main/lib/widgets/stateless/news_card.dart) (News cards)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["News experience"]
  node_app_entry["App entry<br/>[main.dart]"]
  node_home["Headlines and filters<br/>[home_screen.dart]"]
  node_search["Article search<br/>[search_screen.dart]"]
  node_detail["Article reader<br/>[detail_screen.dart]"]
  node_cards["News cards<br/>[news_card.dart]"]
  node_dates["Date formatting<br/>[date_utils.dart]"]
end

subgraph group_content["Content access"]
  node_guardian_api["Guardian API client<br/>[get_top_news.dart]"]
end

node_user(("Reader"))
node_guardian[("Guardian Content API")]

node_user -.->|"opens"| node_app_entry
node_app_entry -.->|"starts"| node_home
node_home -.->|"requests headlines"| node_guardian_api
node_home -.->|"filters sections"| node_guardian_api
node_search -.->|"searches articles"| node_guardian_api
node_guardian_api -.->|"queries"| node_guardian
node_home -.->|"shows stories"| node_cards
node_cards -.->|"opens article"| node_detail

click node_app_entry "https://github.com/munanga/news-max/blob/main/lib/main.dart"
click node_home "https://github.com/munanga/news-max/blob/main/lib/presentation/home_screen.dart"
click node_search "https://github.com/munanga/news-max/blob/main/lib/presentation/search_screen.dart"
click node_detail "https://github.com/munanga/news-max/blob/main/lib/presentation/detail_screen.dart"
click node_cards "https://github.com/munanga/news-max/blob/main/lib/widgets/stateless/news_card.dart"
click node_dates "https://github.com/munanga/news-max/blob/main/lib/utils/date_utils.dart"
click node_guardian_api "https://github.com/munanga/news-max/blob/main/lib/api/get_top_news.dart"

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_entry,node_home,node_search,node_detail,node_cards,node_dates toneBlue
class node_guardian_api,node_guardian toneAmber
class node_user toneIndigo
```

## Components

### News experience

- [App entry](https://github.com/munanga/news-max/blob/main/lib/main.dart): `lib/main.dart`
- [Headlines and filters](https://github.com/munanga/news-max/blob/main/lib/presentation/home_screen.dart): `lib/presentation/home_screen.dart`
- [Article search](https://github.com/munanga/news-max/blob/main/lib/presentation/search_screen.dart): `lib/presentation/search_screen.dart`
- [Article reader](https://github.com/munanga/news-max/blob/main/lib/presentation/detail_screen.dart): `lib/presentation/detail_screen.dart`
- [News cards](https://github.com/munanga/news-max/blob/main/lib/widgets/stateless/news_card.dart): `lib/widgets/stateless/news_card.dart`
- [Date formatting](https://github.com/munanga/news-max/blob/main/lib/utils/date_utils.dart): `lib/utils/date_utils.dart`

### Content access

- [Guardian API client](https://github.com/munanga/news-max/blob/main/lib/api/get_top_news.dart): `lib/api/get_top_news.dart`

### Other components

- **Reader**
- **Guardian Content API**

## Connections

- Reader → App entry: opens
- App entry → Headlines and filters: starts
- Headlines and filters → Guardian API client: requests headlines
- Headlines and filters → Guardian API client: filters sections
- Article search → Guardian API client: searches articles
- Guardian API client → Guardian Content API: queries (evidence: `README.md`)
- Headlines and filters → News cards: shows stories (evidence: `README.md`)
- News cards → Article reader: opens article
