# m5y3w1/tiwantiwa-magazine architecture

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

- Interactive diagram: https://gitdiagram.com/m5y3w1/tiwantiwa-magazine
- Repository: https://github.com/m5y3w1/tiwantiwa-magazine

## Overview

Tiwantiwa is a digital magazine with Markdown-based editorial content and a lightweight Astro website, alongside Node scripts for feed ingestion, draft review, and content administration. The main workflow stages stories as drafts, lets an editor approve them into the published collection, and presents magazine pages to readers. The sampled scripts confirm ingestion and editorial file operations; page implementations and several listed scripts were not sampled, so their detailed wiring is not inferred.

Main entry points: [`content/drafts`](https://github.com/m5y3w1/tiwantiwa-magazine/tree/main/content/drafts) (Draft Articles), [`content/published`](https://github.com/m5y3w1/tiwantiwa-magazine/tree/main/content/published) (Published Articles), [`scripts/editorial_web_dashboard.mjs`](https://github.com/m5y3w1/tiwantiwa-magazine/blob/main/scripts/editorial_web_dashboard.mjs) (Web Review Dashboard), [`scripts/media_org.mjs`](https://github.com/m5y3w1/tiwantiwa-magazine/blob/main/scripts/media_org.mjs) (Media Org CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Reader Website"]
  node_astro_pages["Magazine Pages"]
  node_layout["Shared Layout<br/>[Layout.astro]"]
  node_home["Homepage<br/>[index.astro]"]
  node_post_page["Article Page<br/>[&#91;slug&#93;.astro]"]
  node_category_page["Category Page<br/>[&#91;category&#93;.astro]"]
  node_info_pages["Info Pages"]
end

subgraph group_content["Editorial Content"]
  node_drafts["Draft Articles"]
  node_published["Published Articles"]
  node_posts_content["Post Content"]
  node_rss_output["RSS Feed<br/>[rss.xml]"]
end

subgraph group_workflow["Editorial Workflow"]
  node_feed_worker["Feed Ingestion<br/>[ingest_worker.mjs]"]
  node_approval["Approval Pipeline"]
  node_web_dashboard["Web Review Dashboard"]
  node_cli_dashboard["CLI Review Dashboard"]
  node_media_org["Media Org CLI<br/>[media_org.mjs]"]
end

subgraph group_admin["Editorial Tools"]
  node_tools["Editorial Tools<br/>[tools.mjs]"]
  node_cache[("AI Cache<br/>[ai_cache.mjs]")]
  node_rss_generator["RSS Generator<br/>[generate_rss.mjs]"]
end

node_reader(("Reader"))
node_rss_source(("TechCrunch RSS"))
node_editor(("Editor"))

node_reader -->|"visits"| node_home
node_reader -->|"opens article"| node_post_page
node_reader -->|"browses category"| node_category_page
node_home -->|"uses layout"| node_layout
node_post_page -->|"uses layout"| node_layout
node_category_page -->|"uses layout"| node_layout
node_info_pages -->|"uses layout"| node_layout
node_rss_source -->|"provides feed"| node_feed_worker
node_feed_worker -->|"writes drafts"| node_drafts
node_editor -->|"approves draft"| node_approval
node_approval -->|"reads and removes"| node_drafts
node_approval -->|"promotes article"| node_published
node_editor -->|"reviews drafts"| node_web_dashboard
node_web_dashboard -->|"reads drafts"| node_drafts
node_web_dashboard -->|"publishes article"| node_published
node_web_dashboard -->|"archives draft"| node_drafts
node_editor -->|"reviews drafts"| node_cli_dashboard
node_cli_dashboard -->|"reads drafts"| node_drafts
node_cli_dashboard -->|"publishes article"| node_published
node_editor -->|"manages content"| node_media_org
node_media_org -->|"creates draft"| node_drafts
node_media_org -->|"lists drafts"| node_drafts
node_media_org -->|"publishes article"| node_published
node_tools -->|"uses cache and fetch"| node_cache
node_tools -->|"reads and writes"| node_drafts
node_tools -->|"reads and writes"| node_published
node_rss_generator -->|"reads articles"| node_published
node_rss_generator -->|"generates feed"| node_rss_output

click node_astro_pages "https://github.com/m5y3w1/tiwantiwa-magazine/tree/main/src/pages"
click node_layout "https://github.com/m5y3w1/tiwantiwa-magazine/blob/main/src/components/Layout.astro"
click node_home "https://github.com/m5y3w1/tiwantiwa-magazine/blob/main/src/pages/index.astro"
click node_post_page "https://github.com/m5y3w1/tiwantiwa-magazine/blob/main/src/pages/posts/%5Bslug%5D.astro"
click node_category_page "https://github.com/m5y3w1/tiwantiwa-magazine/blob/main/src/pages/category/%5Bcategory%5D.astro"
click node_info_pages "https://github.com/m5y3w1/tiwantiwa-magazine/tree/main/src/pages"
click node_drafts "https://github.com/m5y3w1/tiwantiwa-magazine/tree/main/content/drafts"
click node_published "https://github.com/m5y3w1/tiwantiwa-magazine/tree/main/content/published"
click node_posts_content "https://github.com/m5y3w1/tiwantiwa-magazine/tree/main/content/posts"
click node_feed_worker "https://github.com/m5y3w1/tiwantiwa-magazine/blob/main/scripts/ingest_worker.mjs"
click node_approval "https://github.com/m5y3w1/tiwantiwa-magazine/blob/main/scripts/approval_pipeline.mjs"
click node_web_dashboard "https://github.com/m5y3w1/tiwantiwa-magazine/blob/main/scripts/editorial_web_dashboard.mjs"
click node_cli_dashboard "https://github.com/m5y3w1/tiwantiwa-magazine/blob/main/scripts/editorial_dashboard.mjs"
click node_media_org "https://github.com/m5y3w1/tiwantiwa-magazine/blob/main/scripts/media_org.mjs"
click node_tools "https://github.com/m5y3w1/tiwantiwa-magazine/blob/main/scripts/tools.mjs"
click node_cache "https://github.com/m5y3w1/tiwantiwa-magazine/blob/main/scripts/ai_cache.mjs"
click node_rss_output "https://github.com/m5y3w1/tiwantiwa-magazine/blob/main/public/rss.xml"
click node_rss_generator "https://github.com/m5y3w1/tiwantiwa-magazine/blob/main/scripts/generate_rss.mjs"

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_astro_pages,node_layout,node_home,node_post_page,node_category_page,node_info_pages toneBlue
class node_drafts,node_published,node_posts_content,node_rss_output toneAmber
class node_feed_worker,node_approval,node_web_dashboard,node_cli_dashboard,node_media_org toneMint
class node_tools,node_cache,node_rss_generator toneRose
class node_reader,node_rss_source,node_editor toneIndigo
```

## Components

### Reader Website

- [Magazine Pages](https://github.com/m5y3w1/tiwantiwa-magazine/tree/main/src/pages): `src/pages`
- [Shared Layout](https://github.com/m5y3w1/tiwantiwa-magazine/blob/main/src/components/Layout.astro): `src/components/Layout.astro`
- [Homepage](https://github.com/m5y3w1/tiwantiwa-magazine/blob/main/src/pages/index.astro): `src/pages/index.astro`
- [Article Page](https://github.com/m5y3w1/tiwantiwa-magazine/blob/main/src/pages/posts/%5Bslug%5D.astro): `src/pages/posts/[slug].astro`
- [Category Page](https://github.com/m5y3w1/tiwantiwa-magazine/blob/main/src/pages/category/%5Bcategory%5D.astro): `src/pages/category/[category].astro`
- [Info Pages](https://github.com/m5y3w1/tiwantiwa-magazine/tree/main/src/pages): `src/pages`

### Editorial Content

- [Draft Articles](https://github.com/m5y3w1/tiwantiwa-magazine/tree/main/content/drafts): `content/drafts`
- [Published Articles](https://github.com/m5y3w1/tiwantiwa-magazine/tree/main/content/published): `content/published`
- [Post Content](https://github.com/m5y3w1/tiwantiwa-magazine/tree/main/content/posts): `content/posts`
- [RSS Feed](https://github.com/m5y3w1/tiwantiwa-magazine/blob/main/public/rss.xml): `public/rss.xml`

### Editorial Workflow

- [Feed Ingestion](https://github.com/m5y3w1/tiwantiwa-magazine/blob/main/scripts/ingest_worker.mjs): `scripts/ingest_worker.mjs`
- [Approval Pipeline](https://github.com/m5y3w1/tiwantiwa-magazine/blob/main/scripts/approval_pipeline.mjs): `scripts/approval_pipeline.mjs`
- [Web Review Dashboard](https://github.com/m5y3w1/tiwantiwa-magazine/blob/main/scripts/editorial_web_dashboard.mjs): `scripts/editorial_web_dashboard.mjs`
- [CLI Review Dashboard](https://github.com/m5y3w1/tiwantiwa-magazine/blob/main/scripts/editorial_dashboard.mjs): `scripts/editorial_dashboard.mjs`
- [Media Org CLI](https://github.com/m5y3w1/tiwantiwa-magazine/blob/main/scripts/media_org.mjs): `scripts/media_org.mjs`

### Editorial Tools

- [Editorial Tools](https://github.com/m5y3w1/tiwantiwa-magazine/blob/main/scripts/tools.mjs): `scripts/tools.mjs`
- [AI Cache](https://github.com/m5y3w1/tiwantiwa-magazine/blob/main/scripts/ai_cache.mjs): `scripts/ai_cache.mjs`
- [RSS Generator](https://github.com/m5y3w1/tiwantiwa-magazine/blob/main/scripts/generate_rss.mjs): `scripts/generate_rss.mjs`

### Other components

- **Reader**
- **TechCrunch RSS**
- **Editor**

## Connections

- Reader → Homepage: visits
- Reader → Article Page: opens article
- Reader → Category Page: browses category
- Homepage → Shared Layout: uses layout
- Article Page → Shared Layout: uses layout
- Category Page → Shared Layout: uses layout
- Info Pages → Shared Layout: uses layout
- TechCrunch RSS → Feed Ingestion: provides feed
- Feed Ingestion → Draft Articles: writes drafts
- Editor → Approval Pipeline: approves draft
- Approval Pipeline → Draft Articles: reads and removes
- Approval Pipeline → Published Articles: promotes article
- Editor → Web Review Dashboard: reviews drafts
- Web Review Dashboard → Draft Articles: reads drafts
- Web Review Dashboard → Published Articles: publishes article
- Web Review Dashboard → Draft Articles: archives draft
- Editor → CLI Review Dashboard: reviews drafts
- CLI Review Dashboard → Draft Articles: reads drafts
- CLI Review Dashboard → Published Articles: publishes article
- Editor → Media Org CLI: manages content
- Media Org CLI → Draft Articles: creates draft
- Media Org CLI → Draft Articles: lists drafts
- Media Org CLI → Published Articles: publishes article
- Editorial Tools → AI Cache: uses cache and fetch
- Editorial Tools → Draft Articles: reads and writes
- Editorial Tools → Published Articles: reads and writes
- RSS Generator → Published Articles: reads articles
- RSS Generator → RSS Feed: generates feed
