# json-schema-org/website architecture

> Architecture diagram of the GitHub repository json-schema-org/website, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/json-schema-org/website
- Repository: https://github.com/json-schema-org/website

## Overview

##### Main Components Identification

a) Frontend Layer:
- Next.js Application (pages/, components/)
- Static Site Generation (SSG) components
- Client-side components (React components)
- Styling (Tailwind CSS)

b) Content Management Layer:
- Markdown files (pages/)
- JSON/YAML data files (data/)
- Static assets (public/)

c) Build & Deployment Layer:
- Netlify deployment
- GitHub Actions workflows
- Build process

**┌─────────────────────────────────────────────────────────────┐**
- Client Browser                          │
- ┬─────────────────────────────┘

**┌───────────────────────────────▼─────────────────────────────┐**
- Netlify CDN Layer                       │
- ┬─────────────────────────────┘

**┌───────────────────────────────▼─────────────────────────────┐**
- Next.js Application                      │
- ┬─────────────────────┬────────────────┤
- Page Components   │  Shared Components  │    Utilities   │
- Blog           │  - Layout          │   - Lib         │
- Documentation  │  - Navigation      │   - Helpers     │
- Tools          │  - UI Elements     │   - Config      │
- ┴─────────────────────┴────────────────┘

**┌───────────────────────────────▼─────────────────────────────┐**
- Content Sources                          │
- ┬─────────────────────┬────────────────┤
- Markdown Files    │    Data Files       │  Static Assets │
- Documentation  │    - JSON           │   - Images     │
- ┴─────────────────────┴────────────────┘

**┌───────────────────────────────▼─────────────────────────────┐**
- Build & Deploy Pipeline                  │
- ┬─────────────────────┬────────────────┤
- GitHub Actions    │    Next.js Build    │    Netlify     │
- CI/CD          │    - SSG            │   - Hosting    │
- Validations    │    - Optimization   │   - Deploy     │
- ┴─────────────────────┴────────────────┘

##### Data Flow Indicators

- Content compilation flow during build
- Static asset serving
- API calls (if any)
- Deployment processes

##### Additional Elements

A section for:
- Development tools (.husky/, cypress/)
- Configuration files (next.config.js, tailwind.config.js)
- Documentation structure (_includes/, pages/docs/)

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Client["Client Layer"]
        Browser["Web Browser"]
    end

    subgraph CDN["CDN Layer"]
        Netlify["Netlify CDN"]:::cdn
    end

    subgraph NextApp["Next.js Application"]
        Pages["Page Components"]:::frontend
        SharedComp["Shared Components"]:::frontend
        Utils["Utilities"]:::utils
        
        subgraph Components["Frontend Components"]
            Layout["Layout Components"]:::frontend
            Nav["Navigation Components"]:::frontend
            UI["UI Elements"]:::frontend
        end
        
        subgraph Styling["Styling Layer"]
            Tailwind["Tailwind CSS"]:::styling
            GlobalCSS["Global Styles"]:::styling
        end
    end

    subgraph Content["Content Sources"]
        MarkdownFiles["Documentation & Blog Posts"]:::content
        DataFiles["Data Files"]:::content
        Assets["Static Assets"]:::content
    end

    subgraph Pipeline["Build & Deploy Pipeline"]
        GHActions["GitHub Actions"]:::pipeline
        NextBuild["Next.js Build"]:::pipeline
        NetlifyDeploy["Netlify Deploy"]:::pipeline
    end

    subgraph Dev["Development Tools"]
        Husky["Husky Hooks"]:::dev
        Cypress["Cypress Testing"]:::dev
        Config["Build Configuration"]:::dev
    end

    Browser --> Netlify
    Netlify --> Pages
    Pages --> Layout
    Pages --> Nav
    Layout --> UI
    Nav --> UI
    UI --> Tailwind
    UI --> GlobalCSS
    Pages --> Utils
    SharedComp --> Utils
    MarkdownFiles --> NextBuild
    DataFiles --> NextBuild
    Assets --> NextBuild
    GHActions --> NextBuild
    NextBuild --> NetlifyDeploy
    NetlifyDeploy --> Netlify

    %% Click Events
    click Pages "https://github.com/json-schema-org/website/tree/main/pages/"
    click SharedComp "https://github.com/json-schema-org/website/tree/main/components/"
    click Utils "https://github.com/json-schema-org/website/tree/main/lib/"
    click Layout "https://github.com/json-schema-org/website/blob/main/components/Layout.tsx"
    click Nav "https://github.com/json-schema-org/website/blob/main/components/NavigationButtons.tsx"
    click GlobalCSS "https://github.com/json-schema-org/website/blob/main/styles/globals.css"
    click DataFiles "https://github.com/json-schema-org/website/tree/main/data/"
    click Assets "https://github.com/json-schema-org/website/tree/main/public/"
    click GHActions "https://github.com/json-schema-org/website/tree/main/.github/workflows/"
    click Husky "https://github.com/json-schema-org/website/tree/main/.husky/"
    click Cypress "https://github.com/json-schema-org/website/tree/main/cypress/"
    click Config "https://github.com/json-schema-org/website/blob/main/next.config.js"
    click MarkdownFiles "https://github.com/json-schema-org/website/tree/main/pages/docs/"

    %% Styling
    classDef frontend fill:#2563eb,color:white
    classDef content fill:#16a34a,color:white
    classDef pipeline fill:#ea580c,color:white
    classDef cdn fill:#6b7280,color:white
    classDef styling fill:#8b5cf6,color:white
    classDef utils fill:#0891b2,color:white
    classDef dev fill:#db2777,color:white

    %% Legend
    subgraph Legend
        Frontend["Frontend Components"]:::frontend
        ContentMgmt["Content Management"]:::content
        BuildDeploy["Build/Deploy"]:::pipeline
        CDNService["CDN Services"]:::cdn
        StyleSystem["Styling System"]:::styling
        Utilities["Utilities"]:::utils
        DevTools["Development Tools"]:::dev
    end
```
