# chromaui/learnstorybook.com architecture

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

- Interactive diagram: https://gitdiagram.com/chromaui/learnstorybook.com
- Repository: https://github.com/chromaui/learnstorybook.com

## Overview

Learn Storybook is a Gatsby static tutorial site for learning Storybook and Component-Driven Development. Readers browse the tutorial index, choose a guide, then follow its chapters; chapter pages provide table-of-contents navigation, framework and language choices, pagination, and links to example code. Guide and chapter content is authored as Markdown with frontmatter, while the Gatsby layer supplies page data and routes. The graph reflects the supplied tree, README, and excerpts; content files are not present in the supplied tree, so their processing details are limited.

Main entry points: [`src/components/screens/ChapterScreen/index.js`](https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/ChapterScreen/index.js) (Chapter reader), [`src/components/screens/GuideScreen/index.js`](https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/GuideScreen/index.js) (Guide overview), [`src/components/screens/IndexScreen/index.js`](https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/IndexScreen/index.js) (Tutorial index), [`src/components/composite/AppLayout.js`](https://github.com/chromaui/learnstorybook.com/blob/master/src/components/composite/AppLayout.js) (Application layout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_site["Site and routing"]
  node_gatsby["Gatsby page layer<br/>[gatsby-node.js]"]
  node_gatsby_config["Site configuration<br/>[gatsby-config.js]"]
  node_dx_source["DX data source<br/>[source-dx-data.js]"]
  node_index_route["Tutorial index route<br/>[index.js]"]
  node_notfound_route["Not-found route<br/>[404.js]"]
end

subgraph group_guide["Guide discovery"]
  node_index_screen["Tutorial index<br/>[index.js]"]
  node_guide_screen["Guide overview<br/>[index.js]"]
  node_guide_hero["Guide hero<br/>[Hero.js]"]
  node_guide_toc["Guide contents<br/>[TableOfContents.js]"]
  node_guide_contributors["Guide contributors<br/>[Contributors.js]"]
  node_guide_catalog["Guide listing<br/>[Guides.js]"]
  node_community["Community features<br/>[Community.js]"]
  node_social["Social proof"]
end

subgraph group_chapter["Chapter learning"]
  node_chapter_screen["Chapter reader<br/>[index.js]"]
  node_chapter_links["Chapter resources<br/>[ChapterLinks.js]"]
  node_framework_selector["Framework selector"]
  node_language_selector["Language selector"]
  node_chapter_sidebar["Chapter contents<br/>[Sidebar.js]"]
  node_pagination["Chapter pagination<br/>[Pagination.js]"]
  node_github_link["Example code link<br/>[GithubLink.js]"]
  node_toc_entries["TOC entry mapping<br/>[tocEntries.js]"]
  node_language_name["Language names<br/>[getLanguageName.js]"]
  node_other_language["Translation lookup"]
  node_translation_messages["Translation messages"]
end

subgraph group_shared["Shared presentation"]
  node_layout["Application layout<br/>[AppLayout.js]"]
  node_header["Site header<br/>[Header.js]"]
  node_footer["Site footer<br/>[Footer.js]"]
  node_user["Contributor profile<br/>[User.js]"]
  node_link["Gatsby link adapter<br/>[GatsbyLink.js]"]
  node_box_link["Card link<br/>[BoxLink.js]"]
  node_formatting["Guide and chapter styles<br/>[formatting.js]"]
  node_notfound["Not-found screen<br/>[NotFoundScreen.js]"]
end

node_reader(("Reader"))
node_dx_service["DX data service"]

node_reader -->|"opens tutorials"| node_index_route
node_index_route -->|"renders"| node_index_screen
node_index_screen -->|"renders"| node_guide_catalog
node_index_screen -->|"renders"| node_community
node_index_screen -->|"renders"| node_social
node_index_screen -->|"renders"| node_layout
node_reader -->|"opens guide"| node_guide_screen
node_guide_screen -->|"renders"| node_layout
node_guide_screen -->|"renders"| node_guide_hero
node_guide_screen -->|"renders"| node_guide_toc
node_guide_screen -->|"renders"| node_guide_contributors
node_guide_screen -->|"maps contents"| node_toc_entries
node_guide_screen -->|"names languages"| node_language_name
node_reader -->|"opens chapter"| node_chapter_screen
node_chapter_screen -->|"renders"| node_layout
node_chapter_screen -->|"maps contents"| node_toc_entries
node_chapter_screen -->|"loads messages"| node_translation_messages
node_chapter_screen -->|"renders"| node_framework_selector
node_chapter_screen -->|"renders"| node_chapter_sidebar
node_chapter_screen -->|"renders"| node_pagination
node_chapter_screen -->|"renders"| node_github_link
node_chapter_screen -->|"styles content"| node_formatting
node_framework_selector -->|"finds translation"| node_other_language
node_framework_selector -->|"links chapters"| node_link
node_language_selector -->|"names language"| node_language_name
node_language_selector -->|"finds translation"| node_other_language
node_language_selector -->|"links chapters"| node_link
node_chapter_links -->|"renders"| node_box_link
node_chapter_sidebar -->|"uses headings"| node_toc_entries
node_guide_contributors -->|"renders profiles"| node_user
node_social -->|"renders profiles"| node_user
node_layout -->|"renders"| node_header
node_layout -->|"renders"| node_footer
node_gatsby -->|"uses configuration"| node_gatsby_config
node_gatsby -->|"sources data"| node_dx_source
node_dx_source -->|"fetches metrics"| node_dx_service
node_notfound_route -->|"renders"| node_notfound

click node_gatsby "https://github.com/chromaui/learnstorybook.com/blob/master/gatsby-node.js"
click node_gatsby_config "https://github.com/chromaui/learnstorybook.com/blob/master/gatsby-config.js"
click node_dx_source "https://github.com/chromaui/learnstorybook.com/blob/master/src/utils/source-dx-data.js"
click node_index_route "https://github.com/chromaui/learnstorybook.com/blob/master/src/pages/index.js"
click node_notfound_route "https://github.com/chromaui/learnstorybook.com/blob/master/src/pages/404.js"
click node_index_screen "https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/IndexScreen/index.js"
click node_guide_screen "https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/GuideScreen/index.js"
click node_guide_hero "https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/GuideScreen/Hero.js"
click node_guide_toc "https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/GuideScreen/TableOfContents.js"
click node_guide_contributors "https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/GuideScreen/Contributors.js"
click node_guide_catalog "https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/IndexScreen/Guides.js"
click node_community "https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/IndexScreen/Community.js"
click node_social "https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/IndexScreen/SocialValidation.js"
click node_chapter_screen "https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/ChapterScreen/index.js"
click node_chapter_links "https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/ChapterScreen/ChapterLinks.js"
click node_framework_selector "https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/ChapterScreen/FrameworkSelector.js"
click node_language_selector "https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/ChapterScreen/LanguageSelector.js"
click node_chapter_sidebar "https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/ChapterScreen/Sidebar.js"
click node_pagination "https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/ChapterScreen/Pagination.js"
click node_github_link "https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/ChapterScreen/GithubLink.js"
click node_toc_entries "https://github.com/chromaui/learnstorybook.com/blob/master/src/lib/tocEntries.js"
click node_language_name "https://github.com/chromaui/learnstorybook.com/blob/master/src/lib/getLanguageName.js"
click node_other_language "https://github.com/chromaui/learnstorybook.com/blob/master/src/lib/getChapterInOtherLanguage.js"
click node_translation_messages "https://github.com/chromaui/learnstorybook.com/blob/master/src/lib/getTranslationMessages.js"
click node_layout "https://github.com/chromaui/learnstorybook.com/blob/master/src/components/composite/AppLayout.js"
click node_header "https://github.com/chromaui/learnstorybook.com/blob/master/src/components/composite/Header.js"
click node_footer "https://github.com/chromaui/learnstorybook.com/blob/master/src/components/composite/Footer.js"
click node_user "https://github.com/chromaui/learnstorybook.com/blob/master/src/components/composite/User.js"
click node_link "https://github.com/chromaui/learnstorybook.com/blob/master/src/components/basics/GatsbyLink.js"
click node_box_link "https://github.com/chromaui/learnstorybook.com/blob/master/src/components/basics/BoxLink.js"
click node_formatting "https://github.com/chromaui/learnstorybook.com/blob/master/src/styles/formatting.js"
click node_notfound "https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/NotFoundScreen/NotFoundScreen.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_gatsby,node_gatsby_config,node_dx_source,node_index_route,node_notfound_route toneBlue
class node_index_screen,node_guide_screen,node_guide_hero,node_guide_toc,node_guide_contributors,node_guide_catalog,node_community,node_social toneAmber
class node_chapter_screen,node_chapter_links,node_framework_selector,node_language_selector,node_chapter_sidebar,node_pagination,node_github_link,node_toc_entries,node_language_name,node_other_language,node_translation_messages toneMint
class node_layout,node_header,node_footer,node_user,node_link,node_box_link,node_formatting,node_notfound toneRose
class node_reader,node_dx_service toneIndigo
```

## Components

### Site and routing

- [Gatsby page layer](https://github.com/chromaui/learnstorybook.com/blob/master/gatsby-node.js): `gatsby-node.js`
- [Site configuration](https://github.com/chromaui/learnstorybook.com/blob/master/gatsby-config.js): `gatsby-config.js`
- [DX data source](https://github.com/chromaui/learnstorybook.com/blob/master/src/utils/source-dx-data.js): `src/utils/source-dx-data.js`
- [Tutorial index route](https://github.com/chromaui/learnstorybook.com/blob/master/src/pages/index.js): `src/pages/index.js`
- [Not-found route](https://github.com/chromaui/learnstorybook.com/blob/master/src/pages/404.js): `src/pages/404.js`

### Guide discovery

- [Tutorial index](https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/IndexScreen/index.js): `src/components/screens/IndexScreen/index.js`
- [Guide overview](https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/GuideScreen/index.js): `src/components/screens/GuideScreen/index.js`
- [Guide hero](https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/GuideScreen/Hero.js): `src/components/screens/GuideScreen/Hero.js`
- [Guide contents](https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/GuideScreen/TableOfContents.js): `src/components/screens/GuideScreen/TableOfContents.js`
- [Guide contributors](https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/GuideScreen/Contributors.js): `src/components/screens/GuideScreen/Contributors.js`
- [Guide listing](https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/IndexScreen/Guides.js): `src/components/screens/IndexScreen/Guides.js`
- [Community features](https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/IndexScreen/Community.js): `src/components/screens/IndexScreen/Community.js`
- [Social proof](https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/IndexScreen/SocialValidation.js): `src/components/screens/IndexScreen/SocialValidation.js`

### Chapter learning

- [Chapter reader](https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/ChapterScreen/index.js): `src/components/screens/ChapterScreen/index.js`
- [Chapter resources](https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/ChapterScreen/ChapterLinks.js): `src/components/screens/ChapterScreen/ChapterLinks.js`
- [Framework selector](https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/ChapterScreen/FrameworkSelector.js): `src/components/screens/ChapterScreen/FrameworkSelector.js`
- [Language selector](https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/ChapterScreen/LanguageSelector.js): `src/components/screens/ChapterScreen/LanguageSelector.js`
- [Chapter contents](https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/ChapterScreen/Sidebar.js): `src/components/screens/ChapterScreen/Sidebar.js`
- [Chapter pagination](https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/ChapterScreen/Pagination.js): `src/components/screens/ChapterScreen/Pagination.js`
- [Example code link](https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/ChapterScreen/GithubLink.js): `src/components/screens/ChapterScreen/GithubLink.js`
- [TOC entry mapping](https://github.com/chromaui/learnstorybook.com/blob/master/src/lib/tocEntries.js): `src/lib/tocEntries.js`
- [Language names](https://github.com/chromaui/learnstorybook.com/blob/master/src/lib/getLanguageName.js): `src/lib/getLanguageName.js`
- [Translation lookup](https://github.com/chromaui/learnstorybook.com/blob/master/src/lib/getChapterInOtherLanguage.js): `src/lib/getChapterInOtherLanguage.js`
- [Translation messages](https://github.com/chromaui/learnstorybook.com/blob/master/src/lib/getTranslationMessages.js): `src/lib/getTranslationMessages.js`

### Shared presentation

- [Application layout](https://github.com/chromaui/learnstorybook.com/blob/master/src/components/composite/AppLayout.js): `src/components/composite/AppLayout.js`
- [Site header](https://github.com/chromaui/learnstorybook.com/blob/master/src/components/composite/Header.js): `src/components/composite/Header.js`
- [Site footer](https://github.com/chromaui/learnstorybook.com/blob/master/src/components/composite/Footer.js): `src/components/composite/Footer.js`
- [Contributor profile](https://github.com/chromaui/learnstorybook.com/blob/master/src/components/composite/User.js): `src/components/composite/User.js`
- [Gatsby link adapter](https://github.com/chromaui/learnstorybook.com/blob/master/src/components/basics/GatsbyLink.js): `src/components/basics/GatsbyLink.js`
- [Card link](https://github.com/chromaui/learnstorybook.com/blob/master/src/components/basics/BoxLink.js): `src/components/basics/BoxLink.js`
- [Guide and chapter styles](https://github.com/chromaui/learnstorybook.com/blob/master/src/styles/formatting.js): `src/styles/formatting.js`
- [Not-found screen](https://github.com/chromaui/learnstorybook.com/blob/master/src/components/screens/NotFoundScreen/NotFoundScreen.js): `src/components/screens/NotFoundScreen/NotFoundScreen.js`

### Other components

- **Reader**
- **DX data service**

## Connections

- Reader → Tutorial index route: opens tutorials (evidence: `README.md`)
- Tutorial index route → Tutorial index: renders (evidence: `src/pages/index.js`)
- Tutorial index → Guide listing: renders (evidence: `src/components/screens/IndexScreen/index.js`)
- Tutorial index → Community features: renders (evidence: `src/components/screens/IndexScreen/index.js`)
- Tutorial index → Social proof: renders (evidence: `src/components/screens/IndexScreen/index.js`)
- Tutorial index → Application layout: renders (evidence: `src/components/screens/IndexScreen/index.js`)
- Reader → Guide overview: opens guide (evidence: `README.md`)
- Guide overview → Application layout: renders (evidence: `src/components/screens/GuideScreen/index.js`)
- Guide overview → Guide hero: renders (evidence: `src/components/screens/GuideScreen/index.js`)
- Guide overview → Guide contents: renders (evidence: `src/components/screens/GuideScreen/index.js`)
- Guide overview → Guide contributors: renders (evidence: `src/components/screens/GuideScreen/index.js`)
- Guide overview → TOC entry mapping: maps contents (evidence: `src/components/screens/GuideScreen/index.js`)
- Guide overview → Language names: names languages (evidence: `src/components/screens/GuideScreen/index.js`)
- Reader → Chapter reader: opens chapter (evidence: `README.md`)
- Chapter reader → Application layout: renders (evidence: `src/components/screens/ChapterScreen/index.js`)
- Chapter reader → TOC entry mapping: maps contents (evidence: `src/components/screens/ChapterScreen/index.js`)
- Chapter reader → Translation messages: loads messages (evidence: `src/components/screens/ChapterScreen/index.js`)
- Chapter reader → Framework selector: renders (evidence: `src/components/screens/ChapterScreen/index.js`)
- Chapter reader → Chapter contents: renders (evidence: `src/components/screens/ChapterScreen/index.js`)
- Chapter reader → Chapter pagination: renders (evidence: `src/components/screens/ChapterScreen/index.js`)
- Chapter reader → Example code link: renders (evidence: `src/components/screens/ChapterScreen/index.js`)
- Chapter reader → Guide and chapter styles: styles content (evidence: `src/components/screens/ChapterScreen/index.js`)
- Framework selector → Translation lookup: finds translation (evidence: `src/components/screens/ChapterScreen/FrameworkSelector.js`)
- Framework selector → Gatsby link adapter: links chapters (evidence: `src/components/screens/ChapterScreen/FrameworkSelector.js`)
- Language selector → Language names: names language (evidence: `src/components/screens/ChapterScreen/LanguageSelector.js`)
- Language selector → Translation lookup: finds translation (evidence: `src/components/screens/ChapterScreen/LanguageSelector.js`)
- Language selector → Gatsby link adapter: links chapters (evidence: `src/components/screens/ChapterScreen/LanguageSelector.js`)
- Chapter resources → Card link: renders (evidence: `src/components/screens/ChapterScreen/ChapterLinks.js`)
- Chapter contents → TOC entry mapping: uses headings (evidence: `src/components/screens/ChapterScreen/Sidebar.js`)
- Guide contributors → Contributor profile: renders profiles (evidence: `src/components/screens/GuideScreen/Contributors.js`)
- Social proof → Contributor profile: renders profiles (evidence: `src/components/screens/IndexScreen/SocialValidation.js`)
- Application layout → Site header: renders (evidence: `src/components/composite/AppLayout.js`)
- Application layout → Site footer: renders (evidence: `src/components/composite/AppLayout.js`)
- Gatsby page layer → Site configuration: uses configuration (evidence: `gatsby-node.js`)
- Gatsby page layer → DX data source: sources data (evidence: `gatsby-node.js`)
- DX data source → DX data service: fetches metrics (evidence: `src/utils/source-dx-data.js`)
- Not-found route → Not-found screen: renders (evidence: `src/pages/404.js`)
