# dummypush1-ui/geo-intel-brief architecture

> Architecture diagram of the GitHub repository dummypush1-ui/geo-intel-brief, 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/dummypush1-ui/geo-intel-brief
- Repository: https://github.com/dummypush1-ui/geo-intel-brief

## Overview

Geo Intel Brief is a merged codebase: its Flask workspace is intended to connect stored news with country views, story groups, trade context, exports, and reports, while the README warns that public launchers expose only bounded read-only previews and do not mount collectors, accounts, mail, or the full Finder provider. The preserved trade-code Finder and original Geo/BRICS engines are separate product branches. Edges are limited to README statements and visible imports/calls; unsampled modules are represented only where the tree or README establishes their role.

Main entry points: [`src/app.js`](https://github.com/dummypush1-ui/geo-intel-brief/blob/main/src/app.js) (Finder interface), [`intelligence/brics/app.py`](https://github.com/dummypush1-ui/geo-intel-brief/blob/main/intelligence/brics/app.py) (BRICS engine), [`intelligence/geo/app.py`](https://github.com/dummypush1-ui/geo-intel-brief/blob/main/intelligence/geo/app.py) (Geo engine), [`intelligence/geo/collectors`](https://github.com/dummypush1-ui/geo-intel-brief/tree/main/intelligence/geo/collectors) (Geo collectors)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Flask workspace"]
  node_private_preview["Private preview router<br/>[private_router.py]"]
  node_public_news["Public news preview<br/>[public_live107.py]"]
  node_world_views["World views<br/>[routes.py]"]
  node_carrier["Story context<br/>[api.py]"]
  node_news_storage[("Stored news<br/>[storage_reader.py]")]
  node_exports["News exports<br/>[export.py]"]
  node_reports["Report tools<br/>[report.py]"]
end

subgraph group_finder["Trade-code Finder"]
  node_finder_app["Finder interface<br/>[app.js]"]
  node_trade_data[("Trade lookup data<br/>[data.ts]")]
  node_fta["Free trade agreements<br/>[fta.ts]"]
  node_gst["GST mapping<br/>[gstmap.ts]"]
  node_markets["Market data<br/>[marketdata.ts]"]
  node_market_exports["Market exports<br/>[marketexp.ts]"]
  node_rodtep["RoDTEP lookup<br/>[rodtep.ts]"]
  node_sanctions["Sanctions lookup<br/>[sanctions.ts]"]
  node_sanctions_gap["Sanctions gap analysis<br/>[sancgap.ts]"]
  node_trade_season["Trade seasonality<br/>[tradeseson.ts]"]
  node_trade_trends["Trade trends<br/>[tradetrend.ts]"]
  node_trade_values["Trade values<br/>[tradevalues.ts]"]
  node_world_ports["World ports<br/>[worldports.ts]"]
end

subgraph group_engines["Original intelligence engines"]
  node_geo_app["Geo engine<br/>[app.py]"]
  node_geo_collectors["Geo collectors"]
  node_geo_processing["Geo processing"]
  node_geo_db[("Geo database<br/>[database.py]")]
  node_geo_reports["Geo reports"]
  node_brics_app["BRICS engine<br/>[app.py]"]
  node_brics_collectors["BRICS collectors"]
  node_brics_processing["BRICS processing"]
  node_brics_db[("BRICS storage<br/>[database.py]")]
  node_brics_reports["BRICS reports"]
end

subgraph group_collection["Collector preparation"]
  node_collector_pipeline["Supplied collector pipeline"]
  node_feed_prep["Supplied feed preparation"]
  node_fulltext_prep["Supplied text preparation"]
end

node_user(("Workspace user"))

node_user -->|"requests preview"| node_private_preview
node_private_preview -.->|"mounts views"| node_world_views
node_user -->|"reads news"| node_public_news
node_public_news -->|"reads bounded news"| node_news_storage
node_user -.->|"views countries"| node_world_views
node_user -.->|"views story context"| node_carrier
node_user -.->|"exports news"| node_exports
node_user -.->|"uses reports"| node_reports
node_user -->|"looks up codes"| node_finder_app
node_finder_app -->|"uses data"| node_trade_data
node_finder_app -->|"uses agreements"| node_fta
node_finder_app -->|"uses mappings"| node_gst
node_finder_app -->|"uses market data"| node_markets
node_finder_app -->|"uses exports"| node_market_exports
node_finder_app -.->|"uses lookup"| node_rodtep
node_finder_app -->|"uses lookup"| node_sanctions
node_finder_app -->|"uses analysis"| node_sanctions_gap
node_finder_app -->|"uses seasonality"| node_trade_season
node_finder_app -->|"uses trends"| node_trade_trends
node_finder_app -->|"uses trade values"| node_trade_values
node_finder_app -->|"uses port data"| node_world_ports
node_geo_app -->|"runs collectors"| node_geo_collectors
node_geo_app -->|"initializes storage"| node_geo_db
node_geo_app -->|"dispatches reports"| node_geo_reports
node_geo_collectors -.->|"classifies articles"| node_geo_processing
node_geo_collectors -->|"writes articles"| node_geo_db
node_brics_app -->|"fetches items"| node_brics_collectors
node_brics_app -->|"dedupes classifies"| node_brics_processing
node_brics_app -->|"stores items"| node_brics_db
node_brics_app -->|"dispatches reports"| node_brics_reports
node_collector_pipeline -->|"prepares feed"| node_feed_prep
node_collector_pipeline -->|"prepares text"| node_fulltext_prep

click node_private_preview "https://github.com/dummypush1-ui/geo-intel-brief/blob/main/integration/private_router.py"
click node_public_news "https://github.com/dummypush1-ui/geo-intel-brief/blob/main/public_live107.py"
click node_world_views "https://github.com/dummypush1-ui/geo-intel-brief/blob/main/feature_world_views/routes.py"
click node_carrier "https://github.com/dummypush1-ui/geo-intel-brief/blob/main/feature_carrier_prep/api.py"
click node_news_storage "https://github.com/dummypush1-ui/geo-intel-brief/blob/main/integration/storage_reader.py"
click node_exports "https://github.com/dummypush1-ui/geo-intel-brief/blob/main/integration/news_export/export.py"
click node_reports "https://github.com/dummypush1-ui/geo-intel-brief/blob/main/integration/weekly_report/report.py"
click node_finder_app "https://github.com/dummypush1-ui/geo-intel-brief/blob/main/src/app.js"
click node_trade_data "https://github.com/dummypush1-ui/geo-intel-brief/blob/main/src/data.ts"
click node_fta "https://github.com/dummypush1-ui/geo-intel-brief/blob/main/src/fta.ts"
click node_gst "https://github.com/dummypush1-ui/geo-intel-brief/blob/main/src/gstmap.ts"
click node_markets "https://github.com/dummypush1-ui/geo-intel-brief/blob/main/src/marketdata.ts"
click node_market_exports "https://github.com/dummypush1-ui/geo-intel-brief/blob/main/src/marketexp.ts"
click node_rodtep "https://github.com/dummypush1-ui/geo-intel-brief/blob/main/src/rodtep.ts"
click node_sanctions "https://github.com/dummypush1-ui/geo-intel-brief/blob/main/src/sanctions.ts"
click node_sanctions_gap "https://github.com/dummypush1-ui/geo-intel-brief/blob/main/src/sancgap.ts"
click node_trade_season "https://github.com/dummypush1-ui/geo-intel-brief/blob/main/src/tradeseson.ts"
click node_trade_trends "https://github.com/dummypush1-ui/geo-intel-brief/blob/main/src/tradetrend.ts"
click node_trade_values "https://github.com/dummypush1-ui/geo-intel-brief/blob/main/src/tradevalues.ts"
click node_world_ports "https://github.com/dummypush1-ui/geo-intel-brief/blob/main/src/worldports.ts"
click node_geo_app "https://github.com/dummypush1-ui/geo-intel-brief/blob/main/intelligence/geo/app.py"
click node_geo_collectors "https://github.com/dummypush1-ui/geo-intel-brief/tree/main/intelligence/geo/collectors"
click node_geo_processing "https://github.com/dummypush1-ui/geo-intel-brief/tree/main/intelligence/geo/processing"
click node_geo_db "https://github.com/dummypush1-ui/geo-intel-brief/blob/main/intelligence/geo/database.py"
click node_geo_reports "https://github.com/dummypush1-ui/geo-intel-brief/tree/main/intelligence/geo/reports"
click node_brics_app "https://github.com/dummypush1-ui/geo-intel-brief/blob/main/intelligence/brics/app.py"
click node_brics_collectors "https://github.com/dummypush1-ui/geo-intel-brief/tree/main/intelligence/brics/collectors"
click node_brics_processing "https://github.com/dummypush1-ui/geo-intel-brief/tree/main/intelligence/brics/processing"
click node_brics_db "https://github.com/dummypush1-ui/geo-intel-brief/blob/main/intelligence/brics/database.py"
click node_brics_reports "https://github.com/dummypush1-ui/geo-intel-brief/tree/main/intelligence/brics/reports"
click node_collector_pipeline "https://github.com/dummypush1-ui/geo-intel-brief/blob/main/integration/supplied_collector_pipeline.py"
click node_feed_prep "https://github.com/dummypush1-ui/geo-intel-brief/blob/main/integration/supplied_feed_fixture.py"
click node_fulltext_prep "https://github.com/dummypush1-ui/geo-intel-brief/blob/main/integration/supplied_fulltext_fixture.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_private_preview,node_public_news,node_world_views,node_carrier,node_news_storage,node_exports,node_reports,node_user toneBlue
class node_finder_app,node_trade_data,node_fta,node_gst,node_markets,node_market_exports,node_rodtep,node_sanctions,node_sanctions_gap,node_trade_season,node_trade_trends,node_trade_values,node_world_ports toneAmber
class node_geo_app,node_geo_collectors,node_geo_processing,node_geo_db,node_geo_reports,node_brics_app,node_brics_collectors,node_brics_processing,node_brics_db,node_brics_reports toneMint
class node_collector_pipeline,node_feed_prep,node_fulltext_prep toneRose
```

## Components

### Flask workspace

- [Private preview router](https://github.com/dummypush1-ui/geo-intel-brief/blob/main/integration/private_router.py): `integration/private_router.py`
- [Public news preview](https://github.com/dummypush1-ui/geo-intel-brief/blob/main/public_live107.py): `public_live107.py`
- [World views](https://github.com/dummypush1-ui/geo-intel-brief/blob/main/feature_world_views/routes.py): `feature_world_views/routes.py`
- [Story context](https://github.com/dummypush1-ui/geo-intel-brief/blob/main/feature_carrier_prep/api.py): `feature_carrier_prep/api.py`
- [Stored news](https://github.com/dummypush1-ui/geo-intel-brief/blob/main/integration/storage_reader.py): `integration/storage_reader.py`
- [News exports](https://github.com/dummypush1-ui/geo-intel-brief/blob/main/integration/news_export/export.py): `integration/news_export/export.py`
- [Report tools](https://github.com/dummypush1-ui/geo-intel-brief/blob/main/integration/weekly_report/report.py): `integration/weekly_report/report.py`

### Trade-code Finder

- [Finder interface](https://github.com/dummypush1-ui/geo-intel-brief/blob/main/src/app.js): `src/app.js`
- [Trade lookup data](https://github.com/dummypush1-ui/geo-intel-brief/blob/main/src/data.ts): `src/data.ts`
- [Free trade agreements](https://github.com/dummypush1-ui/geo-intel-brief/blob/main/src/fta.ts): `src/fta.ts`
- [GST mapping](https://github.com/dummypush1-ui/geo-intel-brief/blob/main/src/gstmap.ts): `src/gstmap.ts`
- [Market data](https://github.com/dummypush1-ui/geo-intel-brief/blob/main/src/marketdata.ts): `src/marketdata.ts`
- [Market exports](https://github.com/dummypush1-ui/geo-intel-brief/blob/main/src/marketexp.ts): `src/marketexp.ts`
- [RoDTEP lookup](https://github.com/dummypush1-ui/geo-intel-brief/blob/main/src/rodtep.ts): `src/rodtep.ts`
- [Sanctions lookup](https://github.com/dummypush1-ui/geo-intel-brief/blob/main/src/sanctions.ts): `src/sanctions.ts`
- [Sanctions gap analysis](https://github.com/dummypush1-ui/geo-intel-brief/blob/main/src/sancgap.ts): `src/sancgap.ts`
- [Trade seasonality](https://github.com/dummypush1-ui/geo-intel-brief/blob/main/src/tradeseson.ts): `src/tradeseson.ts`
- [Trade trends](https://github.com/dummypush1-ui/geo-intel-brief/blob/main/src/tradetrend.ts): `src/tradetrend.ts`
- [Trade values](https://github.com/dummypush1-ui/geo-intel-brief/blob/main/src/tradevalues.ts): `src/tradevalues.ts`
- [World ports](https://github.com/dummypush1-ui/geo-intel-brief/blob/main/src/worldports.ts): `src/worldports.ts`

### Original intelligence engines

- [Geo engine](https://github.com/dummypush1-ui/geo-intel-brief/blob/main/intelligence/geo/app.py): `intelligence/geo/app.py`
- [Geo collectors](https://github.com/dummypush1-ui/geo-intel-brief/tree/main/intelligence/geo/collectors): `intelligence/geo/collectors`
- [Geo processing](https://github.com/dummypush1-ui/geo-intel-brief/tree/main/intelligence/geo/processing): `intelligence/geo/processing`
- [Geo database](https://github.com/dummypush1-ui/geo-intel-brief/blob/main/intelligence/geo/database.py): `intelligence/geo/database.py`
- [Geo reports](https://github.com/dummypush1-ui/geo-intel-brief/tree/main/intelligence/geo/reports): `intelligence/geo/reports`
- [BRICS engine](https://github.com/dummypush1-ui/geo-intel-brief/blob/main/intelligence/brics/app.py): `intelligence/brics/app.py`
- [BRICS collectors](https://github.com/dummypush1-ui/geo-intel-brief/tree/main/intelligence/brics/collectors): `intelligence/brics/collectors`
- [BRICS processing](https://github.com/dummypush1-ui/geo-intel-brief/tree/main/intelligence/brics/processing): `intelligence/brics/processing`
- [BRICS storage](https://github.com/dummypush1-ui/geo-intel-brief/blob/main/intelligence/brics/database.py): `intelligence/brics/database.py`
- [BRICS reports](https://github.com/dummypush1-ui/geo-intel-brief/tree/main/intelligence/brics/reports): `intelligence/brics/reports`

### Collector preparation

- [Supplied collector pipeline](https://github.com/dummypush1-ui/geo-intel-brief/blob/main/integration/supplied_collector_pipeline.py): `integration/supplied_collector_pipeline.py`
- [Supplied feed preparation](https://github.com/dummypush1-ui/geo-intel-brief/blob/main/integration/supplied_feed_fixture.py): `integration/supplied_feed_fixture.py`
- [Supplied text preparation](https://github.com/dummypush1-ui/geo-intel-brief/blob/main/integration/supplied_fulltext_fixture.py): `integration/supplied_fulltext_fixture.py`

### Other components

- **Workspace user**

## Connections

- Workspace user → Private preview router: requests preview (evidence: `README.md`)
- Private preview router → World views: mounts views
- Workspace user → Public news preview: reads news (evidence: `README.md`)
- Public news preview → Stored news: reads bounded news (evidence: `README.md`)
- Workspace user → World views: views countries
- Workspace user → Story context: views story context
- Workspace user → News exports: exports news (evidence: `README.md`)
- Workspace user → Report tools: uses reports (evidence: `README.md`)
- Workspace user → Finder interface: looks up codes (evidence: `README.md`)
- Finder interface → Trade lookup data: uses data (evidence: `src/app.js`)
- Finder interface → Free trade agreements: uses agreements (evidence: `src/app.js`)
- Finder interface → GST mapping: uses mappings (evidence: `src/app.js`)
- Finder interface → Market data: uses market data (evidence: `src/app.js`)
- Finder interface → Market exports: uses exports (evidence: `src/app.js`)
- Finder interface → RoDTEP lookup: uses lookup (evidence: `src/app.js`)
- Finder interface → Sanctions lookup: uses lookup (evidence: `src/app.js`)
- Finder interface → Sanctions gap analysis: uses analysis (evidence: `src/app.js`)
- Finder interface → Trade seasonality: uses seasonality (evidence: `src/app.js`)
- Finder interface → Trade trends: uses trends (evidence: `src/app.js`)
- Finder interface → Trade values: uses trade values (evidence: `src/app.js`)
- Finder interface → World ports: uses port data (evidence: `src/app.js`)
- Geo engine → Geo collectors: runs collectors (evidence: `intelligence/geo/app.py`)
- Geo engine → Geo database: initializes storage (evidence: `intelligence/geo/app.py`)
- Geo engine → Geo reports: dispatches reports (evidence: `intelligence/geo/app.py`)
- Geo collectors → Geo processing: classifies articles (evidence: `intelligence/geo/collectors/gnews_search.py`)
- Geo collectors → Geo database: writes articles (evidence: `intelligence/geo/collectors/gnews_search.py`)
- BRICS engine → BRICS collectors: fetches items (evidence: `intelligence/brics/app.py`)
- BRICS engine → BRICS processing: dedupes classifies (evidence: `intelligence/brics/app.py`)
- BRICS engine → BRICS storage: stores items (evidence: `intelligence/brics/app.py`)
- BRICS engine → BRICS reports: dispatches reports (evidence: `intelligence/brics/app.py`)
- Supplied collector pipeline → Supplied feed preparation: prepares feed (evidence: `integration/supplied_collector_pipeline.py`)
- Supplied collector pipeline → Supplied text preparation: prepares text (evidence: `integration/supplied_collector_pipeline.py`)
