# osaac-jh/social-knowledge architecture

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

- Interactive diagram: https://gitdiagram.com/osaac-jh/social-knowledge
- Repository: https://github.com/osaac-jh/social-knowledge

## Overview

Social Knowledge is a Markdown-first repository for capturing, curating, and reusing social-media and web content. Its documented workflow separates source notes from human/AI interpretation, classifies notes with controlled metadata, and makes the library available through Obsidian while GitHub holds canonical knowledge and Drive holds binary assets. The sampled Instagram utility implements one capture path: it fetches post metadata and images, runs OCR, creates a Markdown draft, and writes it to the inbox. Other curation and reuse links reflect README-level architecture; their implementation was not sampled.

Main entry points: [`scripts/capture_instagram.py`](https://github.com/osaac-jh/social-knowledge/blob/main/scripts/capture_instagram.py) (Capture CLI), [`sources`](https://github.com/osaac-jh/social-knowledge/tree/main/sources) (Source library), [`templates/source-note.md`](https://github.com/osaac-jh/social-knowledge/blob/main/templates/source-note.md) (Source notes), [`insights`](https://github.com/osaac-jh/social-knowledge/tree/main/insights) (Insight notes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Capture"]
  node_cli["Capture CLI"]
  node_post_fetch["Post metadata fetch"]
  node_image_fetch["Image download"]
  node_ocr["Image OCR"]
  node_draft["Markdown draft"]
end

subgraph group_knowledge["Knowledge library"]
  node_inbox["Capture inbox"]
  node_source_notes["Source notes<br/>[source-note.md]"]
  node_insight_notes["Insight notes"]
  node_taxonomy_schema["Metadata schema<br/>[schema.yml]"]
  node_topics["Topic vocabulary<br/>[topics.yml]"]
  node_aliases["Vocabulary aliases<br/>[aliases.yml]"]
  node_source_library["Source library"]
end

subgraph group_platforms["Knowledge platforms"]
  node_github["Canonical repository"]
  node_drive[("Binary asset repository")]
  node_obsidian["Note interface"]
  node_chatgpt["Capture and curation workflow"]
end

node_user(("Curator"))
node_instagram(("Instagram"))
node_media_cdn(("Instagram media CDN"))

node_user -->|"runs"| node_cli
node_cli -->|"requests metadata"| node_post_fetch
node_post_fetch -->|"fetches post"| node_instagram
node_cli -->|"downloads media"| node_image_fetch
node_image_fetch -->|"requests images"| node_media_cdn
node_cli -->|"recognizes text"| node_ocr
node_cli -->|"formats result"| node_draft
node_draft -->|"writes draft"| node_inbox
node_inbox -.->|"starts review"| node_source_notes
node_source_notes -->|"separates interpretation"| node_insight_notes
node_source_notes -->|"uses metadata"| node_taxonomy_schema
node_taxonomy_schema -->|"classifies with vocabulary"| node_topics
node_taxonomy_schema -->|"supports controlled terms"| node_aliases
node_source_notes -.->|"organizes content"| node_source_library
node_source_library -->|"canonical storage"| node_github
node_insight_notes -->|"canonical storage"| node_github
node_source_library -->|"presents notes"| node_obsidian
node_insight_notes -->|"presents notes"| node_obsidian
node_chatgpt -->|"captures and curates"| node_inbox
node_chatgpt -.->|"reuses knowledge"| node_source_library
node_source_library -->|"stores binary assets separately"| node_drive

click node_cli "https://github.com/osaac-jh/social-knowledge/blob/main/scripts/capture_instagram.py"
click node_post_fetch "https://github.com/osaac-jh/social-knowledge/blob/main/scripts/capture_instagram.py"
click node_image_fetch "https://github.com/osaac-jh/social-knowledge/blob/main/scripts/capture_instagram.py"
click node_ocr "https://github.com/osaac-jh/social-knowledge/blob/main/scripts/capture_instagram.py"
click node_draft "https://github.com/osaac-jh/social-knowledge/blob/main/scripts/capture_instagram.py"
click node_inbox "https://github.com/osaac-jh/social-knowledge/tree/main/inbox"
click node_source_notes "https://github.com/osaac-jh/social-knowledge/blob/main/templates/source-note.md"
click node_insight_notes "https://github.com/osaac-jh/social-knowledge/tree/main/insights"
click node_taxonomy_schema "https://github.com/osaac-jh/social-knowledge/blob/main/taxonomy/schema.yml"
click node_topics "https://github.com/osaac-jh/social-knowledge/blob/main/taxonomy/topics.yml"
click node_aliases "https://github.com/osaac-jh/social-knowledge/blob/main/taxonomy/aliases.yml"
click node_source_library "https://github.com/osaac-jh/social-knowledge/tree/main/sources"

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_cli,node_post_fetch,node_image_fetch,node_ocr,node_draft toneBlue
class node_inbox,node_source_notes,node_insight_notes,node_taxonomy_schema,node_topics,node_aliases,node_source_library toneAmber
class node_github,node_drive,node_obsidian,node_chatgpt toneMint
class node_user,node_instagram,node_media_cdn toneIndigo
```

## Components

### Capture

- [Capture CLI](https://github.com/osaac-jh/social-knowledge/blob/main/scripts/capture_instagram.py): `scripts/capture_instagram.py`
- [Post metadata fetch](https://github.com/osaac-jh/social-knowledge/blob/main/scripts/capture_instagram.py): `scripts/capture_instagram.py`
- [Image download](https://github.com/osaac-jh/social-knowledge/blob/main/scripts/capture_instagram.py): `scripts/capture_instagram.py`
- [Image OCR](https://github.com/osaac-jh/social-knowledge/blob/main/scripts/capture_instagram.py): `scripts/capture_instagram.py`
- [Markdown draft](https://github.com/osaac-jh/social-knowledge/blob/main/scripts/capture_instagram.py): `scripts/capture_instagram.py`

### Knowledge library

- [Capture inbox](https://github.com/osaac-jh/social-knowledge/tree/main/inbox): `inbox`
- [Source notes](https://github.com/osaac-jh/social-knowledge/blob/main/templates/source-note.md): `templates/source-note.md`
- [Insight notes](https://github.com/osaac-jh/social-knowledge/tree/main/insights): `insights`
- [Metadata schema](https://github.com/osaac-jh/social-knowledge/blob/main/taxonomy/schema.yml): `taxonomy/schema.yml`
- [Topic vocabulary](https://github.com/osaac-jh/social-knowledge/blob/main/taxonomy/topics.yml): `taxonomy/topics.yml`
- [Vocabulary aliases](https://github.com/osaac-jh/social-knowledge/blob/main/taxonomy/aliases.yml): `taxonomy/aliases.yml`
- [Source library](https://github.com/osaac-jh/social-knowledge/tree/main/sources): `sources`

### Knowledge platforms

- **Canonical repository**
- **Binary asset repository**
- **Note interface**
- **Capture and curation workflow**

### Other components

- **Curator**
- **Instagram**
- **Instagram media CDN**

## Connections

- Curator → Capture CLI: runs (evidence: `scripts/capture_instagram.py`)
- Capture CLI → Post metadata fetch: requests metadata (evidence: `scripts/capture_instagram.py`)
- Post metadata fetch → Instagram: fetches post (evidence: `scripts/capture_instagram.py`)
- Capture CLI → Image download: downloads media (evidence: `scripts/capture_instagram.py`)
- Image download → Instagram media CDN: requests images (evidence: `scripts/capture_instagram.py`)
- Capture CLI → Image OCR: recognizes text (evidence: `scripts/capture_instagram.py`)
- Capture CLI → Markdown draft: formats result (evidence: `scripts/capture_instagram.py`)
- Markdown draft → Capture inbox: writes draft (evidence: `scripts/capture_instagram.py`)
- Capture inbox → Source notes: starts review (evidence: `README.md`)
- Source notes → Insight notes: separates interpretation (evidence: `README.md`)
- Source notes → Metadata schema: uses metadata (evidence: `README.md`)
- Metadata schema → Topic vocabulary: classifies with vocabulary (evidence: `README.md`)
- Metadata schema → Vocabulary aliases: supports controlled terms (evidence: `README.md`)
- Source notes → Source library: organizes content (evidence: `README.md`)
- Source library → Canonical repository: canonical storage (evidence: `README.md`)
- Insight notes → Canonical repository: canonical storage (evidence: `README.md`)
- Source library → Note interface: presents notes (evidence: `README.md`)
- Insight notes → Note interface: presents notes (evidence: `README.md`)
- Capture and curation workflow → Capture inbox: captures and curates (evidence: `README.md`)
- Capture and curation workflow → Source library: reuses knowledge (evidence: `README.md`)
- Source library → Binary asset repository: stores binary assets separately (evidence: `README.md`)
