# fronteers/website architecture

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

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

## Overview

##### Project Type and Purpose
- This is a Jamstack‐style static site built with Eleventy (11ty).
- It generates a content‐driven website (Fronteers.nl) by converting Markdown, JSON, and Liquid templates into static HTML, CSS, and JS.
- Deployed on Netlify and served via CDN with CI provided by GitHub Actions.

##### High‐Level Architecture Components
a. Developer Environment
- Local file system: `src/` (Markdown, templates, assets), `utils/`, `package.json`, Eleventy config `.eleventy.js`.
- Node.js/Elevnty CLI that reads content, data, and templates.
b. Version Control & Collaboration
- Git repository hosted on GitHub (`.github/` workflows, issue templates).
- Contributors push feature branches, open PRs.
c. Continuous Integration
- GitHub Actions (`.github/workflows/`) runs linting, formatting (Prettier), link checks, and Eleventy builds.
d. Build Process
- Eleventy reads:
– `src/_data/` JSON/JS data
– `src/_includes/` Liquid layout & partials
– `src/_components/` paired JavaScript/CSS components
– `src/_assets/` CSS/JS/images/fonts
– Markdown under `src/en/`, `src/nl/`, etc.
- Applies transforms (`utils/transforms.js`) and filters (`utils/filters.js`)
- Outputs to `_site/` (static HTML/CSS/JS)
e. Deployment & Hosting
- Netlify (`netlify.toml`) picks up the build, runs `npm run build` (Eleventy), and deploys output.
- Static assets served from CDN with instant cache invalidation.
f. External Services
- GitHub (source, PRs, actions)
- Netlify (build, deploy, hosting)
- Slack (community link)

##### Relationships & Data Flow
1. Developer edits source files → commits to GitHub.
2. Push/PR triggers GitHub Actions workflow → runs lint/build tasks.
3. Eleventy build → transforms content + templates + assets → produces static site.
4. Netlify receives built artifacts → deploys to CDN.
5. End users request pages → served from CDN.

##### Architectural Patterns & Principles
- Jamstack: Pre‐built markup, decoupled frontend, CDN delivery.
- Content‐as‐Code: Markdown/JSON under version control.
- Modular components: CSS/JS under `src/_components/` for reusability.
- Separation of concerns: Data (`src/_data`), templates (`src/_includes`), assets (`src/_assets`).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Developer Environment
    subgraph "Developer Environment" 
        Dev["Developer"]:::developer
        subgraph "Local Filesystem"
            Source["Content & Config"]:::developer
            EleventyConfig["Eleventy Config (.eleventy.js)"]:::developer
            click EleventyConfig "https://github.com/fronteers/website/blob/main/.eleventy.js"
            Package["package.json"]:::developer
            click Package "https://github.com/fronteers/website/blob/main/package.json"
        end
    end

    %% Version Control
    subgraph "Version Control (GitHub)" 
        GitHub["GitHub Repo"]:::versioncontrol
        Templates["Issue & PR Templates (.github/ISSUE_TEMPLATE/)"]:::versioncontrol
        click Templates "https://github.com/fronteers/website/tree/main/.github/ISSUE_TEMPLATE/"
    end

    %% Continuous Integration
    subgraph "CI - GitHub Actions" 
        CI["GitHub Actions"]:::ci
        click CI "https://github.com/fronteers/website/tree/main/.github/workflows/"
        Lint["Lint & Formatting (Prettier)"]:::ci
        Deadlink["Dead‐link Checker (deadlinks.sh)"]:::ci
        click Deadlink "https://github.com/fronteers/website/blob/main/deadlinks.sh"
    end

    %% Build Process
    subgraph "Build - Eleventy (Node.js)" 
        Eleventy["Eleventy Build Process"]:::build
        Data["Data Layer (src/_data/)"]:::build
        click Data "https://github.com/fronteers/website/tree/main/src/_data/"
        Includes["Template Includes (src/_includes/)"]:::build
        click Includes "https://github.com/fronteers/website/tree/main/src/_includes/"
        Paired["JS/CSS Components (src/_components/paired/)"]:::build
        click Paired "https://github.com/fronteers/website/tree/main/src/_components/paired/"
        Shortcodes["Shortcode Components (src/_components/shortcodes/)"]:::build
        click Shortcodes "https://github.com/fronteers/website/tree/main/src/_components/shortcodes/"
        Assets["Static Assets (src/_assets/)"]:::build
        click Assets "https://github.com/fronteers/website/tree/main/src/_assets/"
        EN["English Content (src/en/)"]:::build
        click EN "https://github.com/fronteers/website/tree/main/src/en/"
        NL["Dutch Content (src/nl/)"]:::build
        click NL "https://github.com/fronteers/website/tree/main/src/nl/"
        Transforms["Transforms (utils/transforms.js)"]:::build
        click Transforms "https://github.com/fronteers/website/blob/main/utils/transforms.js"
        Filters["Filters (utils/filters.js)"]:::build
        click Filters "https://github.com/fronteers/website/blob/main/utils/filters.js"
        Collections["Collections (utils/collections.js)"]:::build
        click Collections "https://github.com/fronteers/website/blob/main/utils/collections.js"
        Helpers["Helpers (utils/helpers.js)"]:::build
        click Helpers "https://github.com/fronteers/website/blob/main/utils/helpers.js"
        Site["Static Site Output (_site/)"]:::build
    end

    %% Deployment & Hosting
    subgraph "Deploy & Host" 
        Netlify["Netlify Deploy"]:::deploy
        click Netlify "https://github.com/fronteers/website/blob/main/netlify.toml"
        CDN["CDN"]:::cdn
    end

    %% End User
    User["End User (Browser)"]:::enduser

    %% Connections
    Dev -->|edits & commits| GitHub
    GitHub -->|push/PR triggers| CI
    CI -->|runs build tasks| Eleventy
    Eleventy --> Data
    Eleventy --> Includes
    Eleventy --> Paired
    Eleventy --> Shortcodes
    Eleventy --> Assets
    Eleventy --> EN
    Eleventy --> NL
    Eleventy --> Transforms
    Eleventy --> Filters
    Eleventy --> Collections
    Eleventy --> Helpers
    Eleventy --> Site
    Site -->|deploy| Netlify
    Netlify -->|serves| CDN
    CDN -->|delivers| User

    %% Styles
    classDef developer fill:#e0f7fa,stroke:#006064,color:#006064
    classDef versioncontrol fill:#e3f2fd,stroke:#0d47a1,color:#0d47a1
    classDef ci fill:#fff3e0,stroke:#e65100,color:#e65100
    classDef build fill:#f3e5f5,stroke:#6a1b9a,color:#6a1b9a
    classDef deploy fill:#e0f2f1,stroke:#004d40,color:#004d40
    classDef cdn fill:#e1f5fe,stroke:#01579b,color:#01579b
    classDef enduser fill:#fffde7,stroke:#f9a825,color:#f9a825
```
