# testsigmahq/testsigma-tutorials architecture

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

- Interactive diagram: https://gitdiagram.com/testsigmahq/testsigma-tutorials
- Repository: https://github.com/testsigmahq/testsigma-tutorials

## Overview

##### Main Components

a. Frontend Layer:
- Gatsby Static Site Generator
- React Components (src/components)
- Templates (src/templates)
- Pages Structure (src/pages)
- Search Functionality
- Styling (SCSS/Tailwind)

b. Build & Deployment:
- GitHub Actions Workflows
- Production/Staging Environments
- Static Site Hosting

c. Content Management:
- Markdown Files
- JSON Configuration
- Navigation Structure

**[Content Layer]**
- ↓
**[Build Layer]**
- ↓
**[Delivery Layer]**

##### Specific Component Details

Content Layer:
- Markdown files organization (/tutorials subdirectories)
- JSON configurations (left-nav-title.json, redirects.json)
- Static assets (images)

Build Layer:
- Gatsby build process
- Custom plugins (gatsby-plugin-ts-freshchat)
- Component structure
- Search integration

Delivery Layer:
- CI/CD pipelines (.github/workflows)
- Production/Staging environments
- Static hosting

##### Important Relationships to Highlight

- How markdown files are processed through Gatsby's build system
- Component hierarchy (Layout → Pages → Components)
- Demonstrate search functionality flow
- Deployment pipeline stages

**[Markdown Content] → [Gatsby Build Process] → [Static HTML/CSS/JS]**
- ↑                    ↑                         ↓
**[JSON Config Files]    [React Components]        [CDN/Hosting]**
- ↑                    ↑                         ↑
**[Static Assets]    [Custom Plugins/Config]    [CI/CD Pipeline]**

##### Additional Notes

- Keep the content organization structure visible but not overwhelming
- Relationship between templates and generated pages
- How the navigation structure is built
- Search functionality as a distinct feature

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Content
        MD[Markdown Files]
        JSON[JSON Configuration]
        ASSETS[Static Assets]
        MD --> |Content Source| BUILD
        JSON --> |Site Config| BUILD
        ASSETS --> |Media Files| BUILD
    end

    subgraph Build
        BUILD[Gatsby Build Process]
        PLUGINS[Custom Plugins]
        COMP[React Components]
        TEMP[Page Templates]
        SEARCH[Search System]
        STYLE[Styling System]
        NAV[Navigation System]
        
        BUILD --> |Generates| STATIC
        PLUGINS --> BUILD
        COMP --> BUILD
        TEMP --> BUILD
        SEARCH --> BUILD
        STYLE --> BUILD
        NAV --> BUILD
    end

    subgraph Deployment
        CICD[CI/CD Pipeline]
        STATIC[Static HTML/CSS/JS]
        HOST[Production/Staging]
        
        STATIC --> CICD
        CICD --> HOST
    end

    %% Component Mappings
    click COMP "https://github.com/testsigmahq/testsigma-tutorials/tree/dev/src/components/"
    click TEMP "https://github.com/testsigmahq/testsigma-tutorials/blob/dev/src/templates/page.jsx"
    click SEARCH "https://github.com/testsigmahq/testsigma-tutorials/blob/dev/src/components/SearchHits.jsx"
    click STYLE "https://github.com/testsigmahq/testsigma-tutorials/blob/dev/src/components/layout.scss"
    click CICD "https://github.com/testsigmahq/testsigma-tutorials/blob/dev/.github/workflows/ci.yml"
    click PLUGINS "https://github.com/testsigmahq/testsigma-tutorials/tree/dev/plugins/gatsby-plugin-ts-freshchat/"
    click MD "https://github.com/testsigmahq/testsigma-tutorials/tree/dev/src/pages/tutorials/"
    click NAV "https://github.com/testsigmahq/testsigma-tutorials/blob/dev/src/components/LeftNav.jsx"
    click JSON "https://github.com/testsigmahq/testsigma-tutorials/blob/dev/src/left-nav-title.json"
    
    %% Styling
    classDef content fill:#3498db,stroke:#2980b9,color:white
    classDef build fill:#2ecc71,stroke:#27ae60,color:white
    classDef deployment fill:#9b59b6,stroke:#8e44ad,color:white
    classDef search fill:#f1c40f,stroke:#f39c12,color:black
    
    class MD,JSON,ASSETS content
    class BUILD,PLUGINS,COMP,TEMP,STYLE,NAV build
    class CICD,STATIC,HOST deployment
    class SEARCH search
    
    %% Legend
    subgraph Legend
        L1[Content Components]:::content
        L2[Build Components]:::build
        L3[Deployment Components]:::deployment
        L4[Search System]:::search
    end
```
