Lab Architecture Guide

Lab Architecture Guide — Personal Site / Living Lab

This guide documents the complete architecture of Badluck’s Bane lab. It covers our philosophy, technology stack, services, infrastructure, and build order. Everything here is designed to be inspectable, forkable, and versioned by default.


Core Philosophy

Static content + git as source of truth, with small decoupled services for anything interactive.


Core Site (Writing, Lab Notebook, Versioned Ideas)

Stack: Hugo (Static Site Generator)

Math / LaTeX Rendering

Hugo now includes a built-in transform.ToMath function using an embedded KaTeX engine. This renders LaTeX to HTML/MathML server-side at build time, with zero JavaScript and zero client-side dependency.

Setup:

Delimiter Recommendation:

Alternative: If client-side rendering is ever needed, KaTeX is generally faster, while MathJax has historically broader LaTeX feature coverage — the same delimiter guidance applies either way.

Markdown-Adjacent Tooling

ToolPurposeNotes
ChromaSyntax highlightingHugo’s built-in highlighter, zero setup, covers Python/bash/C code blocks automatically
GoldmarkMarkdown engineHugo’s engine, supports footnotes/citations natively — useful for physics writing with references
PandocDocument conversionWorth having for converting existing LaTeX physics papers to markdown/Hugo content

Diagrams-as-Text

ToolUse CaseNotes
MermaidFlowcharts, sequence diagrams, state machinesWritten as plain text in markdown, rendered to SVG. Fits documenting Aurora’s architecture or media stack data flow without maintaining separate image files
Graphviz/DOTDependency graphsLower-level, more control; good fit for visualizing Aurora’s tool-registry dependency graph programmatically

Content Structure & UX

Feeds & Syndication

Images

Citations & Bibliography

/content/notebook/     — raw dated lab-notebook entries (unpolished, timestamped)
/content/physics/      — Horizon Leak writeups, papers, data notes
/content/aurora/       — Aurora dev log
/content/philosophy/   — theology/philosophy pieces

Navigation principle: No hard category walls in nav — let cross-linking do the work.

Versioning as a Feature

Deployment


Interactive Services (Decoupled from Core Site)

Each interactive service is its own small app, embedded via iframe or fetch — never part of the static build.

Aurora Live Dashboard

Prediction Ledger

Horizon Leak / Math Sandbox

Options ranked by effort:

  1. Lowest effort: Observable notebook (hosted externally, embedded via iframe) — parameter sliders, live-updating charts against SPARC data, zero backend needed
  2. More control: custom JS frontend (Plotly/D3) hitting a small Python backend running the existing horizon_leak_test.py logic as an API endpoint

Given the existing test script, wrapping it in a Flask endpoint that takes params and returns a fit result is probably a weekend, not a project.

Open Questions Board


Comments & Discussion

Don’t build this yourself — not the interesting part, easy to get wrong (spam/moderation). Decide per-content-type: notebook entries might not need comments at all; physics claims probably do.

  1. Giscus (top pick)

    • Uses GitHub Discussions/Issues as the storage + auth backend
    • Zero hosting/moderation burden
    • Filters commenters toward people who already have GitHub accounts — exactly the audience for fork/build-on-it
    • Natural pairing with the git-forward angle
    • Note: Requires external GitHub accounts (external dependency, cannot be self-hosted) for login
    • See: GitHub to Gitea Mapping for external dependency documentation
  2. Remark42

    • Go, single binary or Docker, no tracking, social login support
    • Best fully-self-hosted option if you want comments independent of GitHub
    • Actively maintained, low overhead, good VPS fit
  3. Cusdis

    • ~5kb gzipped, privacy-first, self-hosted on your own database
    • Simplest to stand up if you want minimal footprint
  4. Waline / Valine

    • More built-in features (moderation UI, richer config)

Skip: Disqus (tracking/ads), Commento (heavier setup, paid tier), older/thinly-maintained options (Statique, e-comments).


Satellite Services (Own Subdomains, Decoupled from Main Site)

Grouped by purpose — add incrementally, not all at once.

Extends the Commons / Fork-and-Build Theme

Useful Personally, Low Effort, On-Theme

Extends the “Watch a System Run” Theme

Bigger Commitment — Add Once There’s Real Demand

Skip for Now

Guiding filter: Any new service should either (a) directly serve the fork/build-on-it mechanic, or (b) be something you’d use yourself regardless of whether anyone else shows up. That keeps everything sustainable without becoming infrastructure-for-its-own-sake.


Infrastructure


Graphics, Media & Interactive Visualization

Principle: Add only where a visualization replaces an explanation with something manipulable (slider instead of paragraph, live render instead of screenshot). Where text already explains it clearly, skip — decoration competing with substance cuts against the “process over performance” theme.

Ready-Made, Near-Zero Code (Use These First)

ToolBest ForNotes
StreamlitPython interactive UIsWraps a function into a full interactive UI (sliders, live-updating plots) in ~20 lines. Best fit for Horizon Leak sandbox: wrap existing horizon_leak_test.py logic directly
GradioFunction → UISame category as Streamlit, even lower-code. Slightly less polished visually
ObservableHosted notebooksLarge library of existing forkable D3 visualizations, including galaxy rotation curve / orbital mechanics notebooks. Embeds via iframe, no backend needed
GrafanaSystem monitoringReady-made answer for “watch the system run.” Point at Aurora’s SQLite to get live graphs/gauges for memory growth, dream cycle activity, heartbeat — configuration, not code
OBS Screen RecordingsDemonstrationsZero new infrastructure. Aurora’s dream cycle firing, the SMB interceptor working, a live terminal session — cheapest and most honest way to “show the machinery”

Custom Visualization (Higher Effort)

Recommendation: Cover the physics sandbox and system dashboard with Streamlit/Gradio + Grafana, use screen recordings for anything “watch it run,” and deprioritize the fully-custom 3D/generative/sonification ideas unless/until there’s spare appetite. They’re the highest-effort, lowest-leverage items on the whole list.


Further Afield — Lesser-Known Options

Broader scope, not core recommendations — browse and pick what resonates rather than treating this as a to-do list.

Protocols / Philosophy Adjacent to the Project

Lesser-Known Ready-Made Interactive/Data Tools

Lesser-Known Infra/Ops

Annotation

Two worth prioritizing: Webmention/ActivityPub (fits “let it roam” at the protocol level) and Datasette (near-zero effort, directly serves the ledger/Aurora-data exposure goals).


Discoverability, Security & Polish

Lower-excitement but real — the stuff that bites later if skipped entirely.

VPS Security Hygiene

Workflow

Accessibility


Suggested Build Order

This phased approach ensures you have something public quickly while incrementally adding complexity.

  1. Core Hugo site live with a handful of notebook/physics/aurora/philosophy posts — get something public first
  2. Gitea up and content repo browsable — makes fork/build-on-it literal from day one
  3. Comments wired in (Giscus first — near-zero maintenance, filters toward the right audience)
  4. Prediction ledger (simplest custom interactive piece, clear schema, immediate content)
  5. Aurora read-only dashboard — Grafana pointed at Aurora’s SQLite (config, not custom code) rather than hand-built API + frontend
  6. Uptime Kuma / Miniflux (low-effort, useful regardless of external traffic — good to slot in whenever)
  7. Horizon Leak sandbox via Streamlit or Gradio wrapping horizon_leak_test.py — highest-value, lowest-code interactive piece
  8. Open-questions board, wiki, Matrix — add once there’s actually an audience to use them

Closing Notes


Historical Context

This architecture guide evolved from earlier thinking. For historical perspective:


This guide is a living document. It will evolve as the lab evolves.

Early Architecture Notes - Portfolio + Comments Stack

Portfolio + Comments Stack

Historical Architecture Document — Early Thinking on Site Structure

Static site (Astro) + federated comments (Cactus Comments, Matrix-backed) + reverse proxy (Caddy).

This fits comfortably on a 1–2GB VPS because only Caddy runs persistently on the box, serving static files. Astro only runs at build time, on your own machine — nothing Node-based stays running on the server.


Note

This document represents early architectural thinking from the project’s formative stages. The actual implementation evolved to use Hugo instead of Astro, and the comments system was reconsidered. It’s preserved here for historical context and to show the evolution of the lab’s technical decisions.

Read more...