# afonsogcardoso/rss-linkedin-app architecture

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

- Interactive diagram: https://gitdiagram.com/afonsogcardoso/rss-linkedin-app
- Repository: https://github.com/afonsogcardoso/rss-linkedin-app

## Overview

The repository has two separate user-facing flows: a scheduled Node/Playwright pipeline turns public LinkedIn posts into a persistent, deduplicated RSS feed, and an independent Next.js app reads that feed for a searchable dashboard and post detail pages. The README documents publication and Power Automate consumption; source excerpts show the root orchestration and web data/UI calls. Some web component wiring and deployment internals were not sampled, so those links are omitted.

Main entry points: [`src/index.js`](https://github.com/afonsogcardoso/rss-linkedin-app/blob/main/src/index.js) (Feed orchestrator), [`web/app/page.tsx`](https://github.com/afonsogcardoso/rss-linkedin-app/blob/main/web/app/page.tsx) (Dashboard route), [`web/lib/feed.ts`](https://github.com/afonsogcardoso/rss-linkedin-app/blob/main/web/lib/feed.ts) (RSS fetch and normalization), [`public/feed.xml`](https://github.com/afonsogcardoso/rss-linkedin-app/blob/main/public/feed.xml) (Published RSS XML)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_scrape["Collection and feed build"]
  node_config["Scrape configuration<br/>[config.js]"]
  node_scraper["Post scraper<br/>[scrape.js]"]
  node_build["Feed orchestrator<br/>[index.js]"]
end

subgraph group_storage["Feed state and output"]
  node_state["Deduplication and state<br/>[state.js]"]
  node_statefile[("Feed state JSON<br/>[feed.json]")]
  node_rss["RSS renderer<br/>[rss.js]"]
  node_feedfile["Published RSS XML<br/>[feed.xml]"]
end

subgraph group_webdata["Dashboard data"]
  node_webpage["Dashboard route<br/>[page.tsx]"]
  node_feedlib["RSS fetch and normalization<br/>[feed.ts]"]
  node_detail["Post detail route<br/>[page.tsx]"]
end

subgraph group_webui["Dashboard interface"]
  node_dashboard["Search and filter dashboard<br/>[feed-dashboard.tsx]"]
  node_postcard["Post cards<br/>[post-card.tsx]"]
end

node_scheduler(("Scheduled/manual run"))
node_linkedin["LinkedIn company page"]
node_consumer["Power Automate"]
node_browser(("Dashboard visitor"))

node_scheduler -->|"starts build"| node_build
node_build -->|"loads settings"| node_config
node_build -->|"loads and merges"| node_state
node_state -->|"reads and writes"| node_statefile
node_build -->|"scrapes posts"| node_scraper
node_scraper -->|"scrapes page"| node_linkedin
node_build -->|"renders feed"| node_rss
node_build -->|"writes XML"| node_feedfile
node_build -->|"updates state"| node_statefile
node_consumer -->|"consumes feed"| node_feedfile
node_webpage -->|"loads feed"| node_feedlib
node_detail -->|"loads and finds post"| node_feedlib
node_feedlib -->|"fetches RSS"| node_feedfile
node_browser -->|"opens dashboard"| node_webpage
node_browser -->|"opens post"| node_detail
node_webpage -->|"renders dashboard"| node_dashboard
node_dashboard -->|"renders posts"| node_postcard

click node_config "https://github.com/afonsogcardoso/rss-linkedin-app/blob/main/src/config.js"
click node_scraper "https://github.com/afonsogcardoso/rss-linkedin-app/blob/main/src/scrape.js"
click node_build "https://github.com/afonsogcardoso/rss-linkedin-app/blob/main/src/index.js"
click node_state "https://github.com/afonsogcardoso/rss-linkedin-app/blob/main/src/state.js"
click node_statefile "https://github.com/afonsogcardoso/rss-linkedin-app/blob/main/data/feed.json"
click node_rss "https://github.com/afonsogcardoso/rss-linkedin-app/blob/main/src/rss.js"
click node_feedfile "https://github.com/afonsogcardoso/rss-linkedin-app/blob/main/public/feed.xml"
click node_webpage "https://github.com/afonsogcardoso/rss-linkedin-app/blob/main/web/app/page.tsx"
click node_feedlib "https://github.com/afonsogcardoso/rss-linkedin-app/blob/main/web/lib/feed.ts"
click node_detail "https://github.com/afonsogcardoso/rss-linkedin-app/blob/main/web/app/posts/%5Bid%5D/page.tsx"
click node_dashboard "https://github.com/afonsogcardoso/rss-linkedin-app/blob/main/web/components/feed-dashboard.tsx"
click node_postcard "https://github.com/afonsogcardoso/rss-linkedin-app/blob/main/web/components/post-card.tsx"

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_config,node_scraper,node_build toneBlue
class node_state,node_statefile,node_rss,node_feedfile toneAmber
class node_webpage,node_feedlib,node_detail toneMint
class node_dashboard,node_postcard toneRose
class node_scheduler,node_linkedin,node_consumer,node_browser toneIndigo
```

## Components

### Collection and feed build

- [Scrape configuration](https://github.com/afonsogcardoso/rss-linkedin-app/blob/main/src/config.js): `src/config.js`
- [Post scraper](https://github.com/afonsogcardoso/rss-linkedin-app/blob/main/src/scrape.js): `src/scrape.js`
- [Feed orchestrator](https://github.com/afonsogcardoso/rss-linkedin-app/blob/main/src/index.js): `src/index.js`

### Feed state and output

- [Deduplication and state](https://github.com/afonsogcardoso/rss-linkedin-app/blob/main/src/state.js): `src/state.js`
- [Feed state JSON](https://github.com/afonsogcardoso/rss-linkedin-app/blob/main/data/feed.json): `data/feed.json`
- [RSS renderer](https://github.com/afonsogcardoso/rss-linkedin-app/blob/main/src/rss.js): `src/rss.js`
- [Published RSS XML](https://github.com/afonsogcardoso/rss-linkedin-app/blob/main/public/feed.xml): `public/feed.xml`

### Dashboard data

- [Dashboard route](https://github.com/afonsogcardoso/rss-linkedin-app/blob/main/web/app/page.tsx): `web/app/page.tsx`
- [RSS fetch and normalization](https://github.com/afonsogcardoso/rss-linkedin-app/blob/main/web/lib/feed.ts): `web/lib/feed.ts`
- [Post detail route](https://github.com/afonsogcardoso/rss-linkedin-app/blob/main/web/app/posts/%5Bid%5D/page.tsx): `web/app/posts/[id]/page.tsx`

### Dashboard interface

- [Search and filter dashboard](https://github.com/afonsogcardoso/rss-linkedin-app/blob/main/web/components/feed-dashboard.tsx): `web/components/feed-dashboard.tsx`
- [Post cards](https://github.com/afonsogcardoso/rss-linkedin-app/blob/main/web/components/post-card.tsx): `web/components/post-card.tsx`

### Other components

- **Scheduled/manual run**
- **LinkedIn company page**
- **Power Automate**
- **Dashboard visitor**

## Connections

- Scheduled/manual run → Feed orchestrator: starts build (evidence: `README.md`)
- Feed orchestrator → Scrape configuration: loads settings (evidence: `src/index.js`)
- Feed orchestrator → Deduplication and state: loads and merges (evidence: `src/index.js`)
- Deduplication and state → Feed state JSON: reads and writes (evidence: `README.md`)
- Feed orchestrator → Post scraper: scrapes posts (evidence: `src/index.js`)
- Post scraper → LinkedIn company page: scrapes page (evidence: `README.md`)
- Feed orchestrator → RSS renderer: renders feed (evidence: `src/index.js`)
- Feed orchestrator → Published RSS XML: writes XML (evidence: `src/index.js`)
- Feed orchestrator → Feed state JSON: updates state (evidence: `README.md`)
- Power Automate → Published RSS XML: consumes feed (evidence: `README.md`)
- Dashboard route → RSS fetch and normalization: loads feed (evidence: `web/app/page.tsx`)
- Post detail route → RSS fetch and normalization: loads and finds post (evidence: `web/app/posts/[id]/page.tsx`)
- RSS fetch and normalization → Published RSS XML: fetches RSS (evidence: `README.md`)
- Dashboard visitor → Dashboard route: opens dashboard (evidence: `README.md`)
- Dashboard visitor → Post detail route: opens post (evidence: `README.md`)
- Dashboard route → Search and filter dashboard: renders dashboard (evidence: `web/app/page.tsx`)
- Search and filter dashboard → Post cards: renders posts (evidence: `web/components/feed-dashboard.tsx`)
