# sigpwny/websites architecture

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

- Interactive diagram: https://gitdiagram.com/sigpwny/websites
- Repository: https://github.com/sigpwny/websites

## Overview

##### Main Components

a. Website Applications
- sigpwny.com (Main club website)
- fallctf.com (Fall CTF event website)
- uiuc.tf (UIUCTF event website)
- As separate but connected containers

b. Shared Components Layer
- _global directory containing shared assets, components, and content
- Reusable nature of these components

c. Content Management System
- Static content structure (MDX and JSON)
- Git-based CMS integration
- Content types (meetings, events, profiles, publications)

d. Build and Deployment Pipeline
- GitHub Actions workflows
- Static site generation process
- Deployment targets

**┌─────────────────────────────────────────────────────────┐**
- GitHub Actions CI/CD                    │
- ┘
- ↓
**┌─────────────────────────────────────────────────────────┐**
- Shared Global Layer                     │
- ┌─────────────┐  ┌────────────┐  ┌────────────────┐   │
- Assets    │  │ Components │  │    Content     │   │
- ┘  └────────────┘  └────────────────┘   │
- ┘
- ↓
**┌─────────────────────────────────────────────────────────┐**
- Website Applications                    │
- ┌─────────────┐  ┌────────────┐  ┌────────────────┐   │
- sigpwny.com │  │fallctf.com │  │    uiuc.tf    │   │
- ┘  └────────────┘  └────────────────┘   │
- ┘
- ↓
**┌─────────────────────────────────────────────────────────┐**
- Static Site Output                      │
- ┘

##### Important Relationships
- Inheritance of shared components across websites
- Content flow from global layer to individual sites
- Build process flow from source to deployment
- Integration points between different systems

##### Key Architectural Patterns to Highlight
- Monorepo structure
- Component reusability
- Static-first approach
- Content-driven architecture
- Separation of concerns between sites

##### Technical Details
- Astro as the main framework
- MDX for content management
- GitHub Actions for CI/CD
- Netlify for deployment (implied by configuration)
- NPM for package management

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph CI ["CI/CD Pipeline"]
        GHA["GitHub Actions"]:::cicd
        BA["Build Actions"]:::cicd
        DW["Deploy Workflows"]:::cicd
    end

    subgraph SG ["Shared Global Layer"]
        direction TB
        subgraph SC ["Shared Components"]
            GC["Global Components"]:::shared
            GA["Global Assets"]:::shared
            SS["Shared Styles"]:::shared
            SU["Shared Utils"]:::shared
        end

        subgraph CMS ["Content Management"]
            direction TB
            CS["Content Schema"]:::cms
            MC["Meetings Content"]:::cms
            EC["Events Content"]:::cms
            PC["Profiles Content"]:::cms
            PUC["Publications Content"]:::cms
        end

        subgraph Config ["Configuration"]
            GCF["Global Config"]:::config
            CCF["Content Config"]:::config
            BCF["Build Config"]:::config
        end
    end

    subgraph WA ["Website Applications"]
        direction TB
        SPW["SIGPwny Website"]:::website
        FCW["FallCTF Website"]:::website
        UW["UIUCTF Website"]:::website
    end

    subgraph SO ["Static Output"]
        SSO["Static Site Output"]:::output
    end

    %% Relationships
    CI --> SG
    SG --> WA
    WA --> SO

    %% Click Events
    click GHA "https://github.com/sigpwny/websites/tree/main//.github/workflows/"
    click BA "https://github.com/sigpwny/websites/tree/main//.github/actions/"
    click DW "https://github.com/sigpwny/websites/blob/main//.github/workflows/deploy-fallctf.yml"
    click GC "https://github.com/sigpwny/websites/tree/main//_global/components/"
    click GA "https://github.com/sigpwny/websites/tree/main//_global/assets/"
    click SS "https://github.com/sigpwny/websites/tree/main//_global/styles/"
    click SU "https://github.com/sigpwny/websites/tree/main//_global/utils/"
    click CS "https://github.com/sigpwny/websites/tree/main//_global/schema/"
    click MC "https://github.com/sigpwny/websites/tree/main//_global/content/meetings/"
    click EC "https://github.com/sigpwny/websites/tree/main//_global/content/events/"
    click PC "https://github.com/sigpwny/websites/tree/main//_global/content/profiles/"
    click PUC "https://github.com/sigpwny/websites/tree/main//_global/content/publications/"
    click GCF "https://github.com/sigpwny/websites/blob/main//_global/configs.ts"
    click CCF "https://github.com/sigpwny/websites/blob/main//_global/content/config.ts"
    click BCF "https://github.com/sigpwny/websites/blob/main//.github/actions/build-astro/action.yml"
    click SPW "https://github.com/sigpwny/websites/tree/main//sigpwny.com/"
    click FCW "https://github.com/sigpwny/websites/tree/main//fallctf.com/"
    click UW "https://github.com/sigpwny/websites/tree/main//uiuc.tf/"

    %% Styling
    classDef cicd fill:#FFA500,stroke:#333,stroke-width:2px
    classDef shared fill:#3498DB,stroke:#333,stroke-width:2px
    classDef cms fill:#9B59B6,stroke:#333,stroke-width:2px
    classDef config fill:#F1C40F,stroke:#333,stroke-width:2px
    classDef website fill:#2ECC71,stroke:#333,stroke-width:2px
    classDef output fill:#E74C3C,stroke:#333,stroke-width:2px
```
