# employee451/postpost architecture

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

- Interactive diagram: https://gitdiagram.com/employee451/postpost
- Repository: https://github.com/employee451/postpost

## Overview

##### Project type and purpose
- This is a static-site codebase (“post-post.dk”) built with Telepater (a Deno-based static-site generator).
- It drives a content-rich site: pages are authored in “.vto” templates, augmented with small “.page.js” scripts, plus CSS, images, audio/video assets.
- Continuous build/deploy is handled by a GitHub Actions workflow (`.github/workflows/telepater.yml`).

##### File structure
– Top-level config & orchestrator
- `_config.ts` – main site configuration for Telepater
- `_cms.ts` – CMS plug-in or data hooks
- `deno.json` / `deno.lock` – Deno runtime & dependency locking
- `.github/workflows/telepater.yml` – CI/CD pipeline
– Source folder (`src/`)
- `_data.yml` – global site data (metadata, navigation)
- `_components/` – low-level UI components (`.vto` snippets)
- `_includes/` – reusable layouts, page templates, OG-image generators (`.vto`, `.jsx`)
- Content directories (`kunstnere/`, `opslag/`, `musik/`, `videoer/`, etc.) each with `._data.yml` and per-item `.vto` files
- Page controllers: `index.page.js`, `nyt.page.js`
- Static assets: images in `billeder/`, audio in `musik/`, video in `videoer/`
– Output staging (implicit): Telepater compiles everything into a `dist/` or similar folder (static HTML/CSS/JS).

##### README
- Confirms: “This is the code for our website – feel free to borrow!”
- No other architecture notes; structure must be inferred from files.

##### Main components & interactions
a. Components
- Telepater SSG engine (Deno process)
- Configuration layer (`_config.ts`, `_cms.ts`, `deno.json`)
- Global data sources (`_data.yml`, per-folder data)
- Template layer
– UI components (`src/_components/*.vto`)
– Layout includes & OG generators (`src/_includes/*.vto`, `.jsx`)
- Content layer (page templates `.vto`, page scripts `.page.js`)
- Asset library (images, audio, video)
- CI/CD pipeline (GitHub Actions)
- Deployment target (static-hosting service)
b. Relationships & data flow
1. GitHub Actions triggers Telepater build
2. Telepater reads site config + global data
3. It recursively loads content folders, applies templates & page scripts
4. Assets (images/audio/video) are copied or processed
5. Output: static HTML, CSS, JS bundles, plus optimized assets
6. Deployment step pushes output to hosting
c. Architectural patterns & principles
- Static Site Generator (SSG)
- Content-driven design: data YML + templates → pages
- Reusable component-based templating (single-responsibility `.vto` snippets)
- Build-time data injection (no runtime backend)
d. Key technologies & libraries
- Deno (runtime)
- Telepater (SSG)
- YAML for data
- Custom template engine (.vto) + JSX snippets for OG images
- JavaScript page controllers (`.page.js`)
- GitHub Actions for CI/CD

– Blue = configuration & data
– Green = templates & components
– Yellow = content files
– Orange = CI/CD workflow
– Gray = final output / hosting

## Diagram (Mermaid)

```mermaid
flowchart TB
  %% CI/CD Pipeline
  subgraph "CI/CD Pipeline" 
    GH["GitHub Actions Workflow"]:::orange
  end

  %% Telepater Engine
  TE["Telepater SSG Engine"]:::blue

  %% Configuration & Data Layer
  subgraph "Config & Data Layer"
    MC["_config.ts"]:::blue
    CMS["_cms.ts"]:::blue
    DENO["deno.json/deno.lock"]:::blue
    subgraph "Global Data Sources"
      GD1["src/_data.yml"]:::blue
      GD2["src/billeder/kunstnere/_data.yml"]:::blue
      GD3["src/billeder/musik/_data.yml"]:::blue
      GD4["src/kunstnere/_data.yml"]:::blue
      GD5["src/opslag/_data.yml"]:::blue
    end
  end

  %% Templating Layer
  subgraph "Template Layer"
    subgraph "UI Components"
      UC["src/_components/"]:::green
    end
    subgraph "Includes & OG Generators"
      INC["src/_includes/"]:::green
    end
  end

  %% Content Layer
  subgraph "Content Layer"
    subgraph "Page Controllers"
      PC1["src/index.page.js"]:::yellow
      PC2["src/nyt.page.js"]:::yellow
    end
    subgraph "Root Pages"
      RP1["hvad-er-det-her.vto"]:::yellow
      RP2["indsend.vto"]:::yellow
      RP3["korrespondance.vto"]:::yellow
      RP4["kunstnere.vto"]:::yellow
    end
    subgraph "Content Directories"
      CD1["src/kunstnere/"]:::yellow
      CD2["src/opslag/"]:::yellow
      CD3["src/musik/"]:::yellow
      CD4["src/videoer/"]:::yellow
    end
  end

  %% Asset Library
  subgraph "Asset Library"
    A1["src/billeder/"]:::yellow
    A2["src/musik/"]:::yellow
    A3["src/videoer/"]:::yellow
  end

  %% Output & Hosting
  subgraph "Output & Hosting"
    OUT["Static Output (HTML/CSS/JS)"]:::gray
    HOST["Static Hosting Service"]:::gray
  end

  %% Connections
  GH -->|"triggers"| TE
  TE -->|"reads"| MC
  TE -->|"reads"| CMS
  TE -->|"reads"| DENO
  TE -->|"loads data"| GD1
  TE -->|"loads data"| GD2
  TE -->|"loads data"| GD3
  TE -->|"loads data"| GD4
  TE -->|"loads data"| GD5
  TE -->|"processes templates"| UC
  TE -->|"processes templates"| INC
  TE -->|"executes controllers"| PC1
  TE -->|"executes controllers"| PC2
  TE -->|"compiles pages"| RP1
  TE -->|"compiles pages"| RP2
  TE -->|"compiles pages"| RP3
  TE -->|"compiles pages"| RP4
  TE -->|"compiles content dirs"| CD1
  TE -->|"compiles content dirs"| CD2
  TE -->|"compiles content dirs"| CD3
  TE -->|"compiles content dirs"| CD4
  TE -->|"copies assets"| A1
  TE -->|"copies assets"| A2
  TE -->|"copies assets"| A3
  TE -->|"outputs"| OUT
  OUT -->|"deploys"| HOST

  %% Click Events
  click GH "https://github.com/employee451/postpost/blob/main/.github/workflows/telepater.yml"
  click TE "https://github.com/employee451/postpost/blob/main/deno.json"
  click MC "https://github.com/employee451/postpost/blob/main/_config.ts"
  click CMS "https://github.com/employee451/postpost/blob/main/_cms.ts"
  click GD1 "https://github.com/employee451/postpost/blob/main/src/_data.yml"
  click GD2 "https://github.com/employee451/postpost/blob/main/src/billeder/kunstnere/_data.yml"
  click GD3 "https://github.com/employee451/postpost/blob/main/src/billeder/musik/_data.yml"
  click GD4 "https://github.com/employee451/postpost/blob/main/src/kunstnere/_data.yml"
  click GD5 "https://github.com/employee451/postpost/blob/main/src/opslag/_data.yml"
  click UC "https://github.com/employee451/postpost/tree/main/src/_components/"
  click INC "https://github.com/employee451/postpost/tree/main/src/_includes/"
  click PC1 "https://github.com/employee451/postpost/blob/main/src/index.page.js"
  click PC2 "https://github.com/employee451/postpost/blob/main/src/nyt.page.js"

  %% Styles
  classDef blue fill:#cce5ff,stroke:#004085,color:#004085;
  classDef green fill:#d4edda,stroke:#155724,color:#155724;
  classDef yellow fill:#fff3cd,stroke:#856404,color:#856404;
  classDef orange fill:#ffeeba,stroke:#856404,color:#856404;
  classDef gray fill:#e2e3e5,stroke:#6c757d,color:#6c757d;
```
