# fossnss/website architecture

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

- Interactive diagram: https://gitdiagram.com/fossnss/website
- Repository: https://github.com/fossnss/website

## Overview

##### Main Components

a) Build-time Components:
- Gatsby Build System
- Content Sources
- Markdown Files (blogs, events, members)
- Static Assets (images)
- GraphQL Data Layer
- Template Engine

b) Runtime Components:
- Client-side React Application
- Browser Runtime
- Static Assets Server

**┌─ Content Layer ─────────────────────┐**
- Markdown Files                   │
- Blog Posts                    │
- Events                        │
- Member Profiles               │
- Static Assets                    │
- ┘

**┌─ Build Layer ──────────────────────┐**
- Gatsby Build System             │
- GraphQL Data Layer          │
- Template Processing         │
- SCSS Processing            │
- Static Site Generation         │
- ┘

**┌─ Runtime Layer ────────────────────┐**
- React Components               │
- Pages                      │
- Templates                  │
- Shared Components         │
- Browser Runtime              │
- ┘

##### Key Relationships to Highlight

- How content flows from Markdown files through the GraphQL layer
- Template application to content
- Demonstrate component composition
- Build-time vs. runtime boundaries

##### Implementation Details

- The src/components directory structure
- The content organization (blog, events, members)
- The templates system
- The styling system with SCSS modules

##### Component Relationships

Relationships between:
- Pages and their templates
- Components and their styles
- Content and its presentation layer

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Content
        MD["Markdown Files"]
        MD --> |Contains| BP["Blog Posts"]
        MD --> |Contains| EV["Events"]
        MD --> |Contains| MP["Member Profiles"]
        SA["Static Assets"]:::assets
    end

    subgraph Build
        GBS["Gatsby Build System"]:::gatsby
        GQL["GraphQL Data Layer"]
        TE["Template Engine"]:::templates
        SCSS["SCSS Processing"]:::styles
        
        GBS --> GQL
        GQL --> TE
        SCSS --> TE
    end

    subgraph Runtime
        RC["React Components"]
        PC["Pages"]:::pages
        TC["Templates"]:::templates
        SC["Shared Components"]:::components
        BR["Browser Runtime"]
        
        RC --> PC
        RC --> TC
        RC --> SC
        RC --> BR
    end

    %% Content to Build relationships
    MD --> GQL
    SA --> GBS
    
    %% Build to Runtime relationships
    TE --> TC
    GBS --> RC
    
    %% Component relationships
    SC --> |Uses| LC["Layout Components"]:::components
    LC --> |Contains| HD["Header"]:::components
    LC --> |Contains| FT["Footer"]:::components
    LC --> |Contains| SEO["SEO"]:::components

    %% Style relationships
    SCSS --> |Styles| HD
    SCSS --> |Styles| FT
    
    %% Click events for file/directory mapping
    click BP "https://github.com/fossnss/website/tree/master/src/content/blog/"
    click EV "https://github.com/fossnss/website/tree/master/src/content/events/"
    click MP "https://github.com/fossnss/website/tree/master/src/content/members/"
    click SA "https://github.com/fossnss/website/tree/master/src/images/"
    click GBS "https://github.com/fossnss/website/blob/master/gatsby-config.js"
    click TE "https://github.com/fossnss/website/blob/master/src/templates/blogTemplate.js"
    click SCSS "https://github.com/fossnss/website/tree/master/src/styles/"
    click SC "https://github.com/fossnss/website/tree/master/src/components/"
    click PC "https://github.com/fossnss/website/tree/master/src/pages/"
    click HD "https://github.com/fossnss/website/blob/master/src/components/header.js"
    click FT "https://github.com/fossnss/website/blob/master/src/components/footer.js"
    click SEO "https://github.com/fossnss/website/blob/master/src/components/seo.js"

    %% Styling classes
    classDef gatsby fill:#663399,color:#fff
    classDef templates fill:#FF6B6B,color:#fff
    classDef components fill:#4ECDC4,color:#fff
    classDef pages fill:#45B7D1,color:#fff
    classDef assets fill:#96CEB4,color:#fff
    classDef styles fill:#FF9F1C,color:#fff

    %% Legend
    subgraph Legend
        L1["Gatsby System"]:::gatsby
        L2["Templates"]:::templates
        L3["Components"]:::components
        L4["Pages"]:::pages
        L5["Assets"]:::assets
        L6["Styles"]:::styles
    end
```
