# faneditfanclub/fanedit-social-feeds architecture

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

- Interactive diagram: https://gitdiagram.com/faneditfanclub/fanedit-social-feeds
- Repository: https://github.com/faneditfanclub/fanedit-social-feeds

## Overview

This repository publishes social-feed JSON and renders it in Google Sites embeds and an installable app. The main workflow refreshes feeds, preserves prior good data on failures, then presents posts in scroll-safe cards; the app also mirrors published site pages. The README documents several refresh paths and integrations not fully visible in the sampled source, so those links are attributed to the README rather than treated as inspected implementation details.

Main entry points: [`fetch.py`](https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/fetch.py) (Feed and site fetcher), [`app/app.js`](https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/app/app.js) (App interface), [`embed.js`](https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/embed.js) (Card renderer), [`x-list.json`](https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/x-list.json) (X list feed)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_refresh["Feed refresh"]
  node_fetcher["Feed and site fetcher<br/>[fetch.py]"]
end

subgraph group_published["Published data"]
  node_xlist["X list feed<br/>[x-list.json]"]
  node_xposts["X profile feed<br/>[x-posts.json]"]
  node_fbpage["Facebook Page feed<br/>[fb-page.json]"]
  node_fbgroup["Facebook Group feed<br/>[fb-group.json]"]
  node_redditfeeds["Reddit feeds"]
  node_socialfeeds["Threads and Instagram feeds<br/>[threads.json]"]
  node_sitepages["Site page data<br/>[site-pages.json]"]
end

subgraph group_embeds["Social embeds"]
  node_embedpages["Feed embed pages<br/>[embed-x-list.html]"]
  node_embedrenderer["Card renderer<br/>[embed.js]"]
  node_discord["Discord embed<br/>[embed-discord.html]"]
  node_otherembeds["Other embed pages<br/>[embed-icons.html]"]
end

subgraph group_app["Installable app"]
  node_appclient["App interface<br/>[app.js]"]
  node_serviceworker["Offline support<br/>[sw.js]"]
end

node_actions(("Scheduled refresh"))
node_xsyndication["X syndication"]
node_buffer["Buffer fallback"]
node_facebook["Facebook sources"]
node_sociablekit["SociableKit snapshot"]
node_googlesite["Published Google Site"]
node_reddit_scan["Reddit browser scan"]
node_local_cli["Local feed CLIs"]
node_visitor(("Site and app visitors"))

node_actions -->|"runs"| node_fetcher
node_xsyndication -->|"provides posts"| node_fetcher
node_buffer -->|"fills gaps"| node_fetcher
node_facebook -->|"provides posts"| node_fetcher
node_sociablekit -->|"provides snapshot"| node_fetcher
node_googlesite -->|"provides pages"| node_fetcher
node_fetcher -->|"writes"| node_xlist
node_fetcher -->|"writes"| node_xposts
node_fetcher -->|"writes"| node_fbpage
node_fetcher -->|"writes"| node_fbgroup
node_reddit_scan -->|"writes daily"| node_redditfeeds
node_local_cli -->|"writes"| node_socialfeeds
node_fetcher -->|"writes"| node_sitepages
node_xlist -->|"loads feed"| node_embedrenderer
node_xposts -->|"loads feed"| node_embedrenderer
node_fbpage -->|"loads feed"| node_embedrenderer
node_fbgroup -->|"loads feed"| node_embedrenderer
node_redditfeeds -->|"loads feed"| node_embedrenderer
node_socialfeeds -->|"loads feed"| node_embedrenderer
node_embedrenderer -->|"renders cards"| node_embedpages
node_visitor -->|"views"| node_embedpages
node_visitor -->|"opens chat"| node_discord
node_visitor -->|"views"| node_otherembeds
node_visitor -->|"opens app"| node_appclient
node_sitepages -->|"drives navigation"| node_appclient
node_xlist -->|"loads feed"| node_appclient
node_xposts -->|"loads feed"| node_appclient
node_fbpage -->|"loads feed"| node_appclient
node_fbgroup -->|"loads feed"| node_appclient
node_redditfeeds -->|"loads feed"| node_appclient
node_appclient -->|"uses cached shell"| node_serviceworker

click node_fetcher "https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/fetch.py"
click node_xlist "https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/x-list.json"
click node_xposts "https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/x-posts.json"
click node_fbpage "https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/fb-page.json"
click node_fbgroup "https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/fb-group.json"
click node_redditfeeds "https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/reddit-community.json"
click node_socialfeeds "https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/threads.json"
click node_sitepages "https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/site-pages.json"
click node_embedpages "https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/embed-x-list.html"
click node_embedrenderer "https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/embed.js"
click node_discord "https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/embed-discord.html"
click node_otherembeds "https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/embed-icons.html"
click node_appclient "https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/app/app.js"
click node_serviceworker "https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/app/sw.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_fetcher,node_reddit_scan toneBlue
class node_xlist,node_xposts,node_fbpage,node_fbgroup,node_redditfeeds,node_socialfeeds,node_sitepages toneAmber
class node_embedpages,node_embedrenderer,node_discord,node_otherembeds toneMint
class node_appclient,node_serviceworker toneRose
class node_actions,node_xsyndication,node_buffer,node_facebook,node_sociablekit,node_googlesite,node_local_cli,node_visitor toneIndigo
```

## Components

### Feed refresh

- [Feed and site fetcher](https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/fetch.py): `fetch.py`

### Published data

- [X list feed](https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/x-list.json): `x-list.json`
- [X profile feed](https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/x-posts.json): `x-posts.json`
- [Facebook Page feed](https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/fb-page.json): `fb-page.json`
- [Facebook Group feed](https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/fb-group.json): `fb-group.json`
- [Reddit feeds](https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/reddit-community.json): `reddit-community.json`
- [Threads and Instagram feeds](https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/threads.json): `threads.json`
- [Site page data](https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/site-pages.json): `site-pages.json`

### Social embeds

- [Feed embed pages](https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/embed-x-list.html): `embed-x-list.html`
- [Card renderer](https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/embed.js): `embed.js`
- [Discord embed](https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/embed-discord.html): `embed-discord.html`
- [Other embed pages](https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/embed-icons.html): `embed-icons.html`

### Installable app

- [App interface](https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/app/app.js): `app/app.js`
- [Offline support](https://github.com/faneditfanclub/fanedit-social-feeds/blob/main/app/sw.js): `app/sw.js`

### Other components

- **Scheduled refresh**
- **X syndication**
- **Buffer fallback**
- **Facebook sources**
- **SociableKit snapshot**
- **Published Google Site**
- **Reddit browser scan**
- **Local feed CLIs**
- **Site and app visitors**

## Connections

- Scheduled refresh → Feed and site fetcher: runs (evidence: `README.md`)
- X syndication → Feed and site fetcher: provides posts (evidence: `README.md`)
- Buffer fallback → Feed and site fetcher: fills gaps (evidence: `README.md`)
- Facebook sources → Feed and site fetcher: provides posts (evidence: `README.md`)
- SociableKit snapshot → Feed and site fetcher: provides snapshot (evidence: `README.md`)
- Published Google Site → Feed and site fetcher: provides pages (evidence: `README.md`)
- Feed and site fetcher → X list feed: writes (evidence: `README.md`)
- Feed and site fetcher → X profile feed: writes (evidence: `README.md`)
- Feed and site fetcher → Facebook Page feed: writes (evidence: `README.md`)
- Feed and site fetcher → Facebook Group feed: writes (evidence: `README.md`)
- Reddit browser scan → Reddit feeds: writes daily (evidence: `README.md`)
- Local feed CLIs → Threads and Instagram feeds: writes (evidence: `README.md`)
- Feed and site fetcher → Site page data: writes (evidence: `README.md`)
- X list feed → Card renderer: loads feed (evidence: `README.md`)
- X profile feed → Card renderer: loads feed (evidence: `README.md`)
- Facebook Page feed → Card renderer: loads feed (evidence: `README.md`)
- Facebook Group feed → Card renderer: loads feed (evidence: `README.md`)
- Reddit feeds → Card renderer: loads feed (evidence: `README.md`)
- Threads and Instagram feeds → Card renderer: loads feed (evidence: `README.md`)
- Card renderer → Feed embed pages: renders cards (evidence: `README.md`)
- Site and app visitors → Feed embed pages: views (evidence: `README.md`)
- Site and app visitors → Discord embed: opens chat (evidence: `README.md`)
- Site and app visitors → Other embed pages: views (evidence: `README.md`)
- Site and app visitors → App interface: opens app (evidence: `README.md`)
- Site page data → App interface: drives navigation (evidence: `app/app.js`)
- X list feed → App interface: loads feed (evidence: `app/app.js`)
- X profile feed → App interface: loads feed (evidence: `app/app.js`)
- Facebook Page feed → App interface: loads feed (evidence: `app/app.js`)
- Facebook Group feed → App interface: loads feed (evidence: `app/app.js`)
- Reddit feeds → App interface: loads feed (evidence: `app/app.js`)
- App interface → Offline support: uses cached shell (evidence: `app/sw.js`)
