# michaelcade/kollect-web architecture

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

- Interactive diagram: https://gitdiagram.com/michaelcade/kollect-web
- Repository: https://github.com/michaelcade/kollect-web

## Overview

##### Project type and purpose
- This is a **static web site** (hosted via GitHub Pages) that provides documentation for the Kollect tool and publishes downloadable release binaries.
- It is not a dynamic front-end/back-end application; instead it’s essentially a static site generator (Jekyll) + CI/CD pipeline + static file hosting.

##### File structure
- **.github/workflows/handle-sync.yml**: A GitHub Actions workflow that watches the main Kollect repo for new releases and syncs binaries into this repo’s `releases/` folder.
- **index.html**, **_config.yml**: Jekyll entry point and configuration for GitHub Pages.
- **assets/**: Front-end static assets (CSS, JS).
- **docs/**: Generated documentation pages (HTML).
- **releases/**: Folders per version containing `release-info.json` and downloadable binaries.
- **CNAME**, **README.md**: Repo metadata and project overview.

##### README for additional insights
- Confirms that this is a **GitHub Pages** site with Jekyll (`_config.yml`).
- Mentions **automated updates** triggered by GitHub Actions on the main Kollect repository’s releases.
- Describes user workflows for downloading binaries (Linux, Windows, macOS).

##### Main components
a. **Developer / Maintainer**
b. **Main Kollect GitHub Repository** (source of truth for releases)
c. **GitHub Actions Runner** (handle-sync workflow)
d. **This Repository** (kollect-web) with:
- Jekyll build (index, docs, assets)
- `releases/` folder (versioned binaries)
- GitHub Pages publishing
e. **GitHub Pages CDN** (static file hosting)
f. **End Users** (web browsers and CLI for downloads)

##### Architectural patterns & design principles
- **CI/CD pipeline**: Automated sync of release artifacts
- **Static site generation**: Jekyll → pre-render HTML, serve via CDN
- **Separation of concerns**:
- Build & sync (GitHub Actions)
- Content (docs, assets)
- Release binaries (versioned folders)
- Hosting (Pages)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% External Actors
    Dev["Developer / Maintainer"]:::external
    Users["End Users"]:::external

    %% Repositories
    subgraph "Source Repositories"
        MainRepo["Main Kollect GitHub Repository"]:::repo
        WebRepo["kollect-web Repository"]:::repo
    end

    %% CI/CD Pipeline
    subgraph "CI/CD Pipeline"
        Actions["GitHub Actions Runner\n(handle-sync)"]:::pipeline
    end

    %% Jekyll Build
    subgraph "Static Site Generation"
        Config["_config.yml"]:::pipeline
        Index["index.html"]:::pipeline
        AssetsStyle["assets/style.css"]:::pipeline
        AssetsScript["assets/script.js"]:::pipeline
        subgraph "Generated Documentation"
            Doc1["getting-started.html"]:::pipeline
            Doc2["api.html"]:::pipeline
            Doc3["configuration.html"]:::pipeline
            Doc4["troubleshooting.html"]:::pipeline
        end
    end

    %% Release Artifacts Storage
    subgraph "Release Artifacts Storage"
        ReleasesIndex["releases/index.json"]:::storage
        Versioned["releases/0.0.1/.../0.1.1/release-info.json"]:::storage
    end

    %% Additional Repo Files
    CNAMEfile["CNAME"]:::repo
    Readme["README.md"]:::repo

    %% Hosting
    Pages["GitHub Pages CDN"]:::hosting

    %% Relationships
    Dev -->|push code| WebRepo
    MainRepo -->|new release triggers| Actions
    Actions -->|sync binaries| ReleasesIndex
    Actions -->|sync binaries| Versioned
    Actions -->|commit & push| WebRepo
    WebRepo -->|Jekyll build| Config
    WebRepo --> Index
    WebRepo --> AssetsStyle
    WebRepo --> AssetsScript
    WebRepo --> Doc1
    WebRepo --> Doc2
    WebRepo --> Doc3
    WebRepo --> Doc4
    WebRepo --> CNAMEfile
    WebRepo --> Readme
    WebRepo -->|deploy static site| Pages
    Pages -->|HTTP GET| Users

    %% Click Events
    click Actions "https://github.com/michaelcade/kollect-web/blob/main/.github/workflows/handle-sync.yml"
    click Config "https://github.com/michaelcade/kollect-web/blob/main/_config.yml"
    click Index "https://github.com/michaelcade/kollect-web/blob/main/index.html"
    click AssetsStyle "https://github.com/michaelcade/kollect-web/blob/main/assets/style.css"
    click AssetsScript "https://github.com/michaelcade/kollect-web/blob/main/assets/script.js"
    click Doc1 "https://github.com/michaelcade/kollect-web/blob/main/docs/getting-started.html"
    click Doc2 "https://github.com/michaelcade/kollect-web/blob/main/docs/api.html"
    click Doc3 "https://github.com/michaelcade/kollect-web/blob/main/docs/configuration.html"
    click Doc4 "https://github.com/michaelcade/kollect-web/blob/main/docs/troubleshooting.html"
    click ReleasesIndex "https://github.com/michaelcade/kollect-web/blob/main/releases/index.json"
    click Versioned "https://github.com/michaelcade/kollect-web/blob/main/releases/0.0.1/release-info.json"
    click CNAMEfile "https://github.com/michaelcade/kollect-web/tree/main/CNAME"
    click Readme "https://github.com/michaelcade/kollect-web/blob/main/README.md"

    %% Styles
    classDef repo fill:#D0E4F5,stroke:#0366D6
    classDef pipeline fill:#DFF5D0,stroke:#228B22
    classDef hosting fill:#FFE5B4,stroke:#FF8C00
    classDef external fill:#F0F0F0,stroke:#CCCCCC
    classDef storage fill:#F5E1DA,stroke:#CD5C5C,stroke-dasharray: 5 5

    class MainRepo,WebRepo repo
    class ReleasesIndex,Versioned storage
```
