# emptymu/jasper-wang architecture

> Architecture diagram of the GitHub repository emptymu/jasper-wang, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-09-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/emptymu/jasper-wang
- Repository: https://github.com/emptymu/jasper-wang

## Overview

##### Project type and purpose
- This is a Gatsby-based static site (React + GraphQL) serving as a personal/portfolio website (see pages like index.js, 404.js, using-typescript.tsx)
- It builds at compile-time into HTML/CSS/JS and is deployed (e.g., GitHub Pages) to serve a resume/portfolio

##### File structure
- Top-level config files: gatsby-config.js, gatsby-node.js, gatsby-browser.js, gatsby-ssr.js
- src/
- components/: reusable React UI pieces (header, intro, portfolio, education, experience, SEO, layout)
- components/styles/: theme/config.js, global.js (CSS-in-JS styling setup)
- components/svg/: any inline SVG React components
- images/: static assets
- pages/: top-level routes (index, 404, using-typescript)
- package.json: dependencies (gatsby, react, plugins), build scripts
- .prettierrc/.prettierignore: code formatting
- .nvmrc: Node version

##### README
- Minimal project description, live demo URL

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Developer Workflow
    Dev["Developer"]:::external
    GitHub["GitHub Repository"]:::external
    CI["CI/CD Pipeline"]:::external

    Dev -->|"push code"| GitHub
    GitHub -->|"trigger build"| CI

    %% Build Environment
    subgraph "Build Environment"
        CLI["Gatsby CLI & Node.js"]:::runtime
        subgraph "Gatsby Config Files"
            GC1["gatsby-config.js"]:::runtime
            GN["gatsby-node.js"]:::runtime
            GB["gatsby-browser.js"]:::runtime
            GS["gatsby-ssr.js"]:::runtime
        end
    end
    CI -->|"runs gatsby build"| CLI
    CLI --> GC1
    CLI --> GN
    CLI --> GB
    CLI --> GS

    %% Data Layer
    GraphQL["GraphQL Layer"]:::data
    CLI -->|"executes queries"| GraphQL

    %% Source Code
    subgraph "Source Code" 
        subgraph "React Components" 
            Header["header.js"]:::code
            Intro["intro.js"]:::code
            Portfolio["portfolio.js"]:::code
            Education["education.js"]:::code
            Experience["experience.js"]:::code
            ItemTitle["itemTitle.js"]:::code
            ItemSubTitle["itemSubTitle.js"]:::code
            ImageComp["image.js"]:::code
            SEO["seo.js"]:::code
            Layout["layout.js"]:::code
        end
        subgraph "CSS-in-JS Styles"
            ThemeConfig["config.js"]:::code
            GlobalStyles["global.js"]:::code
        end
        SVG["SVG Components"]:::code
        Images["Static Assets (images)"]:::code
        subgraph "Page Routes"
            Index["index.js"]:::code
            NotFound["404.js"]:::code
            TSPage["using-typescript.tsx"]:::code
        end
        subgraph "Project Config & Metadata"
            PKG["package.json"]:::code
            PKGLOCK["package-lock.json"]:::code
            NVM[".nvmrc"]:::code
            PRETTIERRC[".prettierrc"]:::code
            PRETTIERIG[".prettierignore"]:::code
            GITIGNORE[".gitignore"]:::code
            README["README.md"]:::code
            LICENSE["LICENSE"]:::code
        end
    end

    %% Build Flow
    CLI -->|"reads source"| Source_Code["Source Code"]:::code
    Source_Code --> GraphQL
    GraphQL -->|"provides data to"| React_Comp["React Components"]:::code
    ThemeConfig -->|"injects styles into"| React_Comp
    GlobalStyles -->|"global styles applied"| React_Comp
    SVG -->|"inline SVGs used by"| React_Comp
    Images -->|"copied to build"| Public
    React_Comp -->|"renders HTML/JS"| Public

    %% Build Output & Deployment
    Public["public/ Build Output"]:::deploy
    CLI --> Public
    Public -->|"deploy to"| GitHubPages["GitHub Pages / CDN"]:::deploy
    GitHubPages -->|"serves static site to"| Browser["Client Browser"]:::external

    %% Click Events
    click GC1 "https://github.com/emptymu/jasper-wang/blob/master/gatsby-config.js"
    click GN "https://github.com/emptymu/jasper-wang/blob/master/gatsby-node.js"
    click GB "https://github.com/emptymu/jasper-wang/blob/master/gatsby-browser.js"
    click GS "https://github.com/emptymu/jasper-wang/blob/master/gatsby-ssr.js"
    click Header "https://github.com/emptymu/jasper-wang/blob/master/src/components/header.js"
    click Intro "https://github.com/emptymu/jasper-wang/blob/master/src/components/intro.js"
    click Portfolio "https://github.com/emptymu/jasper-wang/blob/master/src/components/portfolio.js"
    click Education "https://github.com/emptymu/jasper-wang/blob/master/src/components/education.js"
    click Experience "https://github.com/emptymu/jasper-wang/blob/master/src/components/experience.js"
    click ItemTitle "https://github.com/emptymu/jasper-wang/blob/master/src/components/itemTitle.js"
    click ItemSubTitle "https://github.com/emptymu/jasper-wang/blob/master/src/components/itemSubTitle.js"
    click ImageComp "https://github.com/emptymu/jasper-wang/blob/master/src/components/image.js"
    click SEO "https://github.com/emptymu/jasper-wang/blob/master/src/components/seo.js"
    click Layout "https://github.com/emptymu/jasper-wang/blob/master/src/components/layout.js"
    click ThemeConfig "https://github.com/emptymu/jasper-wang/blob/master/src/components/styles/config.js"
    click GlobalStyles "https://github.com/emptymu/jasper-wang/blob/master/src/components/styles/global.js"
    click SVG "https://github.com/emptymu/jasper-wang/tree/master/src/components/svg/"
    click Images "https://github.com/emptymu/jasper-wang/tree/master/src/images/"
    click Index "https://github.com/emptymu/jasper-wang/blob/master/src/pages/index.js"
    click NotFound "https://github.com/emptymu/jasper-wang/blob/master/src/pages/404.js"
    click TSPage "https://github.com/emptymu/jasper-wang/blob/master/src/pages/using-typescript.tsx"
    click PKG "https://github.com/emptymu/jasper-wang/blob/master/package.json"
    click PKGLOCK "https://github.com/emptymu/jasper-wang/blob/master/package-lock.json"
    click NVM "https://github.com/emptymu/jasper-wang/blob/master/.nvmrc"
    click PRETTIERRC "https://github.com/emptymu/jasper-wang/blob/master/.prettierrc"
    click PRETTIERIG "https://github.com/emptymu/jasper-wang/blob/master/.prettierignore"
    click GITIGNORE "https://github.com/emptymu/jasper-wang/blob/master/.gitignore"
    click README "https://github.com/emptymu/jasper-wang/blob/master/README.md"
    click LICENSE "https://github.com/emptymu/jasper-wang/tree/master/LICENSE"

    %% Styles
    classDef runtime fill:#ADD8E6,stroke:#000,stroke-width:1px
    classDef code fill:#90EE90,stroke:#000,stroke-width:1px
    classDef data fill:#FFFF99,stroke:#000,stroke-width:1px
    classDef deploy fill:#FFA500,stroke:#000,stroke-width:1px
    classDef external fill:#ffffff,stroke:#000,stroke-width:1px,stroke-dasharray: 5 5
```
