# ๐ŸŒ™ moonweb-site Monorepo for the **moonweb.org** homelab โ€” five static sites built with [Eleventy](https://www.11ty.dev/), deployed to [Cloudflare Pages](https://pages.cloudflare.com/). ``` hub.moonweb.org โ†’ ๐Ÿ  Central index & gateway infra.moonweb.org โ†’ ๐Ÿ—๏ธ Infrastructure overview (Proxmox, Synology, Docker) smarthome.moonweb.org โ†’ ๐Ÿก Smart home projects & dashboards code.moonweb.org โ†’ ๐Ÿ’ป Curated GitHub project catalog retro.moonweb.org โ†’ ๐Ÿ•น๏ธ Physical retro hardware collection stefankoelle.de โ†’ ๐Ÿ‘ค CV, career, personal site (LED Matrix docs) ``` > **Other sites** (not in this monorepo): [www.moonweb.org](https://www.moonweb.org) (2000s time capsule), [28k8.moonweb.org](https://28k8.moonweb.org) (90s BBS archive). --- ## ๐Ÿ“ Architecture ``` โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ GitHub Actions CI โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ build:hub โ”‚ โ”‚build:infra โ”‚ โ”‚ build:smart โ”‚ โ”‚ build:โ€ฆ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ–ผ โ–ผ โ–ผ โ–ผ โ”‚ โ”‚ dist/hub/ dist/infra/ dist/smarthome/ dist/โ€ฆ/ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ–ผ โ–ผ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Cloudflare Pages โ”‚ โ”‚ IONOS SFTP โ”‚ โ”‚ (5 sites) โ”‚ โ”‚ (stefankoelle) โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ–ผ โ–ผ hub / infra / ... stefankoelle.de ``` --- ## ๐Ÿ› ๏ธ Tech Stack | Layer | Technology | Why | |-------|-----------|-----| | **SSG** | [Eleventy 3.1.6](https://www.11ty.dev/) | Markdown/YAML-first, minimal JS, `_data` folders map directly to aggregator output, low maintenance for 5 sites | | **Templates** | [Nunjucks](https://mozilla.github.io/nunjucks/) | Shared `base.njk` layout with site-switcher header, `card-grid.njk` for index pages | | **Styling** | Custom CSS (variables-based) | `base.css` for shared layout, `theme-*.css` per domain accent color, no build step needed | | **Fonts** | [Lobster](https://fonts.google.com/specimen/Lobster) (Google Fonts) | Distinctive heading font across all sites | | **CI/CD** | [GitHub Actions](https://github.com/features/actions) | Matrix build for all 5 sites, artifact upload, parallel deploy | | **Deploy** | [Cloudflare Workers](https://workers.cloudflare.com/) | Static asset hosting via `wrangler pages deploy`, one worker per site | | **DNS** | Cloudflare | Already managing DNS โ€” zero additional setup for Pages custom domains | | **GitHub Catalog** | Python aggregator | Reads `.moonweb.yml` from each repo, outputs `repos.json` | | **Runtime** | Fully static | No server-side code, no containers, no database โ€” pure HTML/CSS/JS | --- ## ๐ŸŽจ Design System ### Header-consistent, content-flexible - **Header is identical** across all home-section sites: site-switcher (hub ยท infra ยท smarthome ยท code ยท retro ยท cv), domain accent color, Lobster title font. - **Index pages** use a shared card-grid layout with grouped sections. - **Detail pages** keep the same header but use a freer layout below it (e.g., pin tables, API docs, photos in free arrangement). ### Accent colors | Domain | Color | Hex | |--------|-------|-----| | hub | Neutral blue | `#3b6ea5` | | infra | Grey-blue | `#99333A` | | smarthome | Teal | `#1f8a8a` | | code | Violet | `#3E5098` | | retro | Warm brown | `#8a6d3b` | ### Emojis Each card on index pages has an emoji for visual navigation โ€” consistent across hub, infra, smarthome, code, and retro. --- ## ๐Ÿš€ Local Development ```bash npm install # install Eleventy + deps npm run dev:hub # http://localhost:8081 npm run dev:infra # http://localhost:8082 npm run dev:smarthome # http://localhost:8083 npm run dev:code # http://localhost:8084 npm run dev:retro # http://localhost:8085 npm run dev:stefankoelle # http://localhost:8086 npm run dev # all 6 in parallel ``` Each site has its own minimal Eleventy config (`/eleventy.config.js`). Live reload is built in. ### Build ```bash npm run prebuild # pre-build tasks (CV PDF) npm run build # builds all 5 โ†’ dist// npm run build:hub # build single site ``` --- ## ๐Ÿ“ฆ Project Structure ``` moonweb-site/ โ”œโ”€โ”€ hub/ # ๐Ÿ  Central index & gateway โ”œโ”€โ”€ infra/ # ๐Ÿ—๏ธ Infra overview + 3 detail pages โ”‚ โ”œโ”€โ”€ backup-strategy/ โ”‚ โ”œโ”€โ”€ monitoring/ โ”‚ โ””โ”€โ”€ dev-environment/ โ”œโ”€โ”€ smarthome/ # ๐Ÿก Smart home overview + 6 detail pages โ”‚ โ”œโ”€โ”€ homematic-mqtt/ โ”‚ โ”œโ”€โ”€ tasmota-energy/ โ”‚ โ”œโ”€โ”€ balkonpi/ โ”‚ โ”œโ”€โ”€ airplay-audio/ โ”‚ โ”œโ”€โ”€ octoprint/ โ”‚ โ””โ”€โ”€ tubearchivist/ โ”œโ”€โ”€ code/ # ๐Ÿ’ป GitHub catalog โ”‚ โ””โ”€โ”€ _data/repos.json # populated by the aggregator โ”œโ”€โ”€ retro/ # ๐Ÿ•น๏ธ Retro hardware (WIP) โ”œโ”€โ”€ stefankoelle/ # ๐Ÿ‘ค CV, career, personal site โ”‚ โ”œโ”€โ”€ eleventy.config.js โ”‚ โ”œโ”€โ”€ index.njk # Onepager (CV, Projects, Languages) โ”‚ โ”œโ”€โ”€ cv-print.njk # CV-only for PDF generation โ”‚ โ”œโ”€โ”€ ledmatrix/ # LED Matrix WebServer documentation โ”‚ โ””โ”€โ”€ assets/ # CSS, JS, images, favicons โ”œโ”€โ”€ shared/ # ๐Ÿ”ง Shared components โ”‚ โ”œโ”€โ”€ _includes/ โ”‚ โ”‚ โ”œโ”€โ”€ base.njk # base layout (header, site-switcher, footer) โ”‚ โ”‚ โ””โ”€โ”€ card-grid.njk # card-grid template with emoji support โ”‚ โ”œโ”€โ”€ base.css # shared CSS (layout, cards, typography) โ”‚ โ””โ”€โ”€ theme-*.css # accent colors per domain โ”œโ”€โ”€ scripts/ โ”‚ โ””โ”€โ”€ github-aggregator/ # ๐Ÿ Python: reads .moonweb.yml โ†’ repos.json โ”‚ โ”œโ”€โ”€ aggregate.py โ”‚ โ”œโ”€โ”€ example.moonweb.yml โ”‚ โ””โ”€โ”€ README.md โ”œโ”€โ”€ .github/workflows/ โ”‚ โ””โ”€โ”€ build-deploy.yml # โš™๏ธ CI/CD: build + deploy to Cloudflare โ”œโ”€โ”€ DESIGN.md # ๐Ÿ“‹ Initial concept (German) โ”œโ”€โ”€ SPEC.md # ๐Ÿ“‹ Full specification (English, 159 lines) โ”œโ”€โ”€ PLAN.md # ๐Ÿ“‹ Implementation plan โ”œโ”€โ”€ TODO.md # ๐Ÿ“‹ Open items & workflow โ””โ”€โ”€ package.json # npm scripts for dev/build ``` --- ## ๐Ÿ”„ CI/CD Pipeline ### Cloudflare Pages (moonweb sites) Defined in `.github/workflows/build-deploy.yml`: ``` push to main โ”‚ โ”œโ”€โ”€ Build (matrix: hub, infra, smarthome, code, retro) โ”‚ โ”œโ”€โ”€ checkout โ†’ setup-node (22) โ†’ npm ci โ”‚ โ”œโ”€โ”€ npm run build: โ”‚ โ”œโ”€โ”€ validate dist// exists & non-empty โ”‚ โ””โ”€โ”€ upload artifact (7-day retention) โ”‚ โ””โ”€โ”€ Deploy (matrix: 5 Cloudflare Workers) โ”œโ”€โ”€ download artifact โ”œโ”€โ”€ generate wrangler.toml โ””โ”€โ”€ wrangler pages deploy ``` **Required secrets:** - `CLOUDFLARE_API_TOKEN` โ€” Workers:Edit permission - `CLOUDFLARE_ACCOUNT_ID` โ€” Cloudflare account ID ### IONOS SFTP (stefankoelle.de) Defined in `.github/workflows/deploy-stefankoelle.yml`: ``` push to main (paths: stefankoelle/**) โ”‚ โ”œโ”€โ”€ Build stefankoelle โ”‚ โ””โ”€โ”€ npm run build:stefankoelle โ”‚ โ””โ”€โ”€ Deploy via SFTP โ””โ”€โ”€ lftp mirror โ†’ IONOS /deploy/stefankoelle/ ``` **Required secrets:** - `IONOS_SFTP_HOST` - `IONOS_SFTP_USER` - `IONOS_SFTP_PASSWORD` --- ## ๐Ÿ GitHub Aggregator (code.moonweb.org) `scripts/github-aggregator/aggregate.py` automatically builds the project catalog: 1. Fetches all **public repos** from `skoelle` via GitHub API 2. Reads `.moonweb.yml` from each repo root 3. Filters for `category: code` entries 4. Sorts by subcategory + title 5. Writes combined result to `code/_data/repos.json` ### `.moonweb.yml` schema ```yaml title: "MVG Departures" category: code # code | smarthome | infra subcategory: "Web Apps" # drives grouping on code.moonweb.org status: active stack: [Python, FastAPI] hosted_on: "Docker Host Debian (PVE)" summary: "Compact MVG/S-Bahn departure monitor with configurable stations." repo_url: "https://github.com/skoelle/mvg-departures" ``` ### Manual run ```bash export GITHUB_TOKEN=ghp_xxx python scripts/github-aggregator/aggregate.py ``` > **Deliberately manual** โ€” no scheduled CI job. The catalog is refreshed on demand, not on every push. --- ## ๐Ÿ“ Content Rules | Site | Detail pages? | Rule | |------|--------------|------| | smarthome | โœ… Yes | When enough content exists โ€” no placeholder cards | | infra | โš ๏ธ Rarely | Deliberately shallow โ€” sensitive data (IPs, keys, passwords) stripped | | code | โŒ Never | Overview cards + GitHub links only โ€” no README duplication | | retro | ๐Ÿ”จ Minimal | Still WIP โ€” honest minimal overview, no over-investment | **Infra redaction rule:** Architecture-level only (Proxmox, Synology, Docker, VLAN concept). No concrete IPs, WireGuard keys, passwords, internal hostnames. --- ## ๐ŸŒ Language All five sites are written **entirely in English**. German source documents are translated once during migration (AI-assisted). New content is authored in English from the start. --- ## ๐Ÿ“š Documentation | File | Purpose | |------|---------| | `DESIGN.md` | Initial concept and design decisions (German) | | `SPEC.md` | Complete specification โ€” what gets built (English) | | `PLAN.md` | Phased implementation plan | | `TODO.md` | Open items, workflow, and current status | | `README.md` | This file โ€” project overview for GitHub | --- ## ๐Ÿ“„ License [![CC BY-NC-SA 4.0](https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by-nc-sa/4.0/) This work is licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-nc-sa/4.0/). See [LICENSE](LICENSE) for the full text.