# daangn/websites architecture

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

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

## Overview

##### High-Level Architecture Components

a. Core Components Layer:
- Shared Gatsby themes (@karrotmarket/gatsby-theme-*) at the center
- Common components like website-team, post, prismic, and seed-design themes

b. Website Implementation Layer:
- Individual websites as separate modules:
- about.daangn.com
- careers.ca.karrotmarket.com
- careers.jp.karrotmarket.com
- careers.en.karrotmarket.com
- ir.daangn.com

c. Infrastructure Layer:
- Cloudflare Workers (_workers directory)
- greenhouse-proxy-worker
- websites-integration
- Deployment and integration flows

##### Component Relationships

- Theme inheritance and composition
- Data flow between components
- Integration points with external services

##### Key Architectural Elements

a. Content Management:
- Prismic integration (gatsby-theme-prismic)
- Job posting management (gatsby-transformer-job-post)
- Blog post handling (gatsby-transformer-post)

b. UI Components:
- Shared layouts and templates
- Common components (Header, Footer, etc.)
- Theme-specific components

##### Detailed Subsystems

- Theme composition and inheritance
- Content transformation pipeline
- Deployment workflow
- Internationalization structure

##### Integration Points

Clearly mark:
- API endpoints
- Worker interfaces
- Content management system connections
- Deployment hooks

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Core ["Core Gatsby Themes"]
        Website["Website Theme"]:::core
        Post["Post Theme"]:::core
        Prismic["Prismic Theme"]:::core
        SeedDesign["Seed Design Theme"]:::core
        WebsiteTeam["Website Team Theme"]:::core
    end

    subgraph Content ["Content Management"]
        PrismicInt["Prismic Integration"]:::cms
        JobTransform["Job Post Transformer"]:::cms
        BlogTransform["Blog Post Transformer"]:::cms
    end

    subgraph Infra ["Infrastructure Layer"]
        GreenProxy["Greenhouse Proxy Worker"]:::infra
        WebInt["Websites Integration Worker"]:::infra
    end

    subgraph UI ["UI Components"]
        Header["Header Component"]:::ui
        Footer["Footer Component"]:::ui
        DefLayout["Default Layout"]:::ui
        JobLayout["Job Post Layout"]:::ui
    end

    subgraph Sites ["Websites"]
        About["about.daangn.com"]:::site
        CareersCA["careers.ca.karrotmarket.com"]:::site
        CareersJP["careers.jp.karrotmarket.com"]:::site
        IR["ir.daangn.com"]:::site
    end

    %% Core Theme Relationships
    Website --> Post
    Website --> Prismic
    Website --> SeedDesign
    WebsiteTeam --> Website

    %% Content Management Flow
    Prismic --> PrismicInt
    PrismicInt --> WebsiteTeam
    JobTransform --> WebsiteTeam
    BlogTransform --> Post

    %% Infrastructure Integration
    GreenProxy --> WebsiteTeam
    WebInt --> Sites

    %% UI Component Integration
    Website --> Header
    Website --> Footer
    WebsiteTeam --> DefLayout
    WebsiteTeam --> JobLayout

    %% Website Dependencies
    About --> WebsiteTeam
    CareersCA --> WebsiteTeam
    CareersJP --> WebsiteTeam
    IR --> WebsiteTeam

    %% Styling
    classDef core fill:#2374ab
    classDef cms fill:#ff7f50
    classDef infra fill:#ffa500
    classDef ui fill:#98fb98
    classDef site fill:#dda0dd

    %% Click Events
    click Website "https://github.com/daangn/websites/tree/main/_packages/@karrotmarket/gatsby-theme-website/"
    click Post "https://github.com/daangn/websites/tree/main/_packages/@karrotmarket/gatsby-theme-post/"
    click Prismic "https://github.com/daangn/websites/tree/main/_packages/@karrotmarket/gatsby-theme-prismic/"
    click SeedDesign "https://github.com/daangn/websites/tree/main/_packages/@karrotmarket/gatsby-theme-seed-design/"
    click WebsiteTeam "https://github.com/daangn/websites/tree/main/_packages/@karrotmarket/gatsby-theme-website-team/"
    click PrismicInt "https://github.com/daangn/websites/tree/main/_packages/@karrotmarket/gatsby-theme-prismic/"
    click JobTransform "https://github.com/daangn/websites/tree/main/_packages/@karrotmarket/gatsby-transformer-job-post/"
    click BlogTransform "https://github.com/daangn/websites/tree/main/_packages/@karrotmarket/gatsby-transformer-post/"
    click GreenProxy "https://github.com/daangn/websites/tree/main/_workers/greenhouse-proxy-worker/"
    click WebInt "https://github.com/daangn/websites/tree/main/_workers/websites-integration/"
    click About "https://github.com/daangn/websites/tree/main/about.daangn.com/"
    click CareersCA "https://github.com/daangn/websites/tree/main/careers.ca.karrotmarket.com/"
    click CareersJP "https://github.com/daangn/websites/tree/main/careers.jp.karrotmarket.com/"
    click IR "https://github.com/daangn/websites/tree/main/ir.daangn.com/"
    click Header "https://github.com/daangn/websites/blob/main/_packages/@karrotmarket/gatsby-theme-website/src/components/Header.tsx"
    click Footer "https://github.com/daangn/websites/blob/main/_packages/@karrotmarket/gatsby-theme-website/src/components/Footer.tsx"
    click DefLayout "https://github.com/daangn/websites/blob/main/_packages/@karrotmarket/gatsby-theme-website-team/src/layouts/DefaultLayout.tsx"
    click JobLayout "https://github.com/daangn/websites/blob/main/_packages/@karrotmarket/gatsby-theme-website-team/src/layouts/JobPostLayout.tsx"
```
