# btholt/complete-intro-to-react-v9 architecture

> Architecture diagram of the GitHub repository btholt/complete-intro-to-react-v9, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/btholt/complete-intro-to-react-v9
- Repository: https://github.com/btholt/complete-intro-to-react-v9

## Overview

##### Project type and purpose
- From the README and file tree, this is a full-stack, content-driven, static-site application built with Next.js and React. Its primary purpose is to serve as a workshop/course website (“Complete React v9”), rendering lesson content (Markdown), providing navigational components, and running ancillary Node.js scripts (CSV import, summary generation).

##### File structure
- Top-level config and scripts
- next.config.js, package.json, .github/workflows/next.yaml – configure the Next.js build & CI/CD.
- summary/ and csv/ folders – custom Node.js scripts for generating AI-driven summaries and ingesting CSV data.
- Frontend code
- pages/ – Next.js page routes: index.js, dynamic lesson routes ([section]/[slug].js), and the global _app.js.
- context/ – React Context providers for global state (courseInfoContext, headerContext).
- styles/ – CSS modules for layout and theming.
- Content and data
- lessons/ – Markdown files organized by section, each with meta.json where applicable.
- data/ – JS modules abstracting course and lesson metadata (data/course.js, data/lesson.js).
- course.json – top-level content manifest.

##### README for additional insights
- Confirms this is the “course website,” open-source, licensed CC-BY-NC for content and Apache 2.0 for code.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "CI/CD & Build Time"
        CI["CI/CD Pipeline (GitHub Actions)"]:::ci
        NextConfig["Next.js Configuration"]:::config
        CSV["CSV Ingestion Script"]:::script
        Summary["Summary Generator Service"]:::script
        SummaryGP["Prompt Generator Module"]:::script
        ContentStore["Markdown Content Store"]:::content
        DataLayer["Data Layer Modules & Manifest"]:::data
        BuildServer["Next.js Build Server"]:::build
        StaticFiles["Pre-rendered Static Files"]:::static
    end

    subgraph "Runtime / Client"
        Browser["User Browser"]:::external
        CDN["CDN / Static Host"]:::external
        subgraph "React Application"
            Pages["Pages (SSG Routes)"]:::frontend
            Components["UI Components & Social Icons"]:::frontend
            Contexts["React Context Providers"]:::frontend
            Styles["Global Styles & Theming"]:::styles
            PublicAssets["Public Assets (Images)"]:::external
        end
    end

    CI -->|"triggers build"| BuildServer
    BuildServer -->|"reads config"| NextConfig
    BuildServer -->|"executes"| CSV
    BuildServer -->|"executes"| Summary
    BuildServer -->|"imports"| SummaryGP
    BuildServer -->|"reads content"| ContentStore
    BuildServer -->|"reads data"| DataLayer
    BuildServer -->|"outputs"| StaticFiles
    StaticFiles -->|"deployed to"| CDN
    Browser -->|"requests page"| CDN
    CDN -->|"serves static"| Browser
    Browser -->|"hydrates to React"| Pages
    Pages --> Components
    Pages --> Contexts
    Pages --> Styles
    Pages --> PublicAssets

    click NextConfig "https://github.com/btholt/complete-intro-to-react-v9/blob/main/next.config.js"
    click CI "https://github.com/btholt/complete-intro-to-react-v9/blob/main/.github/workflows/next.yaml"
    click CSV "https://github.com/btholt/complete-intro-to-react-v9/blob/main/csv/index.js"
    click Summary "https://github.com/btholt/complete-intro-to-react-v9/blob/main/summary/index.js"
    click SummaryGP "https://github.com/btholt/complete-intro-to-react-v9/blob/main/summary/getSystemPrompt.js"
    click ContentStore "https://github.com/btholt/complete-intro-to-react-v9/tree/main/lessons/"
    click DataLayer "https://github.com/btholt/complete-intro-to-react-v9/blob/main/data/course.js"
    click DataLayer "https://github.com/btholt/complete-intro-to-react-v9/blob/main/data/lesson.js"
    click DataLayer "https://github.com/btholt/complete-intro-to-react-v9/blob/main/course.json"
    click Pages "https://github.com/btholt/complete-intro-to-react-v9/blob/main/pages/_app.js"
    click Pages "https://github.com/btholt/complete-intro-to-react-v9/blob/main/pages/index.js"
    click Pages "https://github.com/btholt/complete-intro-to-react-v9/blob/main/pages/lessons/[section]/[slug].js"
    click Components "https://github.com/btholt/complete-intro-to-react-v9/blob/main/components/header.js"
    click Components "https://github.com/btholt/complete-intro-to-react-v9/blob/main/components/footer.js"
    click Components "https://github.com/btholt/complete-intro-to-react-v9/blob/main/components/layout.js"
    click Components "https://github.com/btholt/complete-intro-to-react-v9/blob/main/components/bluesky.js"
    click Components "https://github.com/btholt/complete-intro-to-react-v9/blob/main/components/twitter.js"
    click Components "https://github.com/btholt/complete-intro-to-react-v9/blob/main/components/linkedin.js"
    click Components "https://github.com/btholt/complete-intro-to-react-v9/blob/main/components/github.js"
    click Components "https://github.com/btholt/complete-intro-to-react-v9/blob/main/components/corner.js"
    click Contexts "https://github.com/btholt/complete-intro-to-react-v9/blob/main/context/courseInfoContext.js"
    click Contexts "https://github.com/btholt/complete-intro-to-react-v9/blob/main/context/headerContext.js"
    click Styles "https://github.com/btholt/complete-intro-to-react-v9/blob/main/styles/courses.css"
    click Styles "https://github.com/btholt/complete-intro-to-react-v9/blob/main/styles/footer.css"
    click Styles "https://github.com/btholt/complete-intro-to-react-v9/blob/main/styles/variables.css"
    click PublicAssets "https://github.com/btholt/complete-intro-to-react-v9/tree/main/public/images/"

    classDef ci fill:orange,stroke:#333,stroke-width:1px
    classDef config fill:lightblue,stroke:#333,stroke-width:1px
    classDef script fill:yellow,stroke:#333,stroke-width:1px
    classDef content fill:lightgreen,stroke:#333,stroke-width:1px
    classDef data fill:lightgreen,stroke:#333,stroke-width:1px
    classDef build fill:blue,stroke:#333,stroke-width:1px
    classDef static fill:grey,stroke:#333,stroke-width:1px
    classDef external fill:grey,stroke:#333,stroke-width:1px
    classDef frontend fill:lightblue,stroke:#333,stroke-width:1px
    classDef styles fill:violet,stroke:#333,stroke-width:1px
```
