commit 49c8584c8c86d1a5220153547f21a60c980f6028 Author: Me Here Date: Sun May 24 14:25:42 2026 -0500 Add stackable metronome mockup and Caddy deploy script index.html: single-file browser mockup of the polymetric groove trainer — stackable meter lanes, subdivisions, odd-meter grouping, per-beat patterns, GM percussion voices, true ratio polyrhythm (poly toggle), presets, set lists with a recordable practice log, and keyboard shortcuts. deploy.sh: copies index.html into the Caddy web root that serves https://metronome.varasys.io (no restart needed). Co-Authored-By: Claude Opus 4.7 (1M context) diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..09cec67 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash +# Deploy the metronome mockup to the Caddy web root that serves +# https://metronome.varasys.io +# +# Caddy config: /var/lib/caddy/Caddyfile (metronome.varasys.io:8443 block) +# Bind-mount: /etc/containers/systemd/caddy.container +# +# The web root is bind-mounted read-only into the Caddy container and +# served by file_server, which picks up changes immediately — so a plain +# file copy is all that's needed (no container restart). +set -euo pipefail + +SRC_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +DEST_DIR="/var/lib/caddy/www/metronome" + +[[ -f "$SRC_DIR/index.html" ]] || { echo "error: $SRC_DIR/index.html not found" >&2; exit 1; } +[[ -d "$DEST_DIR" ]] || { echo "error: web root $DEST_DIR is missing — is Caddy set up?" >&2; exit 1; } + +cp "$SRC_DIR/index.html" "$DEST_DIR/index.html" +echo "deployed index.html ($(stat -c '%s' "$DEST_DIR/index.html") bytes) -> $DEST_DIR" + +# If real audio samples are added later (see the plan's GM-sample note), +# sync that directory too. +if [[ -d "$SRC_DIR/samples" ]]; then + rsync -a --delete "$SRC_DIR/samples/" "$DEST_DIR/samples/" + echo "synced samples/ -> $DEST_DIR/samples" +fi + +# Smoke test: Caddy serves on :8443 with tls internal; resolve the host +# to localhost so SNI matches the site block. +if command -v curl >/dev/null 2>&1; then + code=$(curl -sk --resolve metronome.varasys.io:8443:127.0.0.1 \ + https://metronome.varasys.io:8443/ -o /dev/null -w '%{http_code}' || echo "??") + echo "smoke test: metronome.varasys.io -> HTTP $code" +fi diff --git a/index.html b/index.html new file mode 100644 index 0000000..46d89c7 --- /dev/null +++ b/index.html @@ -0,0 +1,810 @@ + + + + + +Stackable Metronome — Mockup + + + + +
+
+

Stackable Metronome mockup

+
+ Space play · T tap · ↑↓ tempo (⇧×10) · A add · R set lists · N next · ? help + +
+
+ + +
+
+
+
+
+
120
+
 
+
+
+
+ +
+
+ +
+ + +
+
+
+
+
+ +
+
+
+ + +
+
+
+ + +
+
+
+
+
+ +
+

Meter lanes

+ Click a beat pad to toggle it (rest) — e.g. snare on 2 & 4 + +
+
+ + + +
+
Stopped.
+
+ + + + + + + + + +