metronome/CLAUDE.md
Me Here 5ab2096fc4 PolyMeter — slim main: landing chooser + mobile app + notation editor
Clean, dependency-light front page. Only three things ship here:
- index.html  — two-button landing: Mobile -> mobile.html, Desktop -> pm_e-2.html
- mobile.html — touch-first PWA (+ mobile-sessions.html practice journal)
- pm_e-2.html — engraved-notation editor

build.sh/deploy.sh trimmed to just these; deploy mirrors dist/ to the web root
with rsync --delete. README/CLAUDE.md rewritten for the slim scope.

The full project (PM_E-1 editor, embeddable widget, all hardware form-factor
pages, Pico firmware editions, the Rust port, and the KiCad/SPICE hardware
design) is preserved on the `concepts` branch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 11:44:45 -05:00

48 lines
2.3 KiB
Markdown

# CLAUDE.md
This file guides Claude Code (claude.ai/code) when working in this repository.
This is the **slim `main` branch** of VARASYS PolyMeter — a polymetric groove-trainer /
metronome. Only three things ship here:
- `index.html` — the landing chooser: two buttons, **Mobile**`mobile.html` and
**Desktop**`pm_e-2.html`.
- `mobile.html` — the touch-first phone/tablet **PWA** (+ `mobile-sessions.html`, its practice
journal). Installable, works offline via `mobile-sw.js` + `manifest.webmanifest`.
- `pm_e-2.html` — the engraved-notation editor.
The **full project** (the PM_E-1 editor, the embeddable widget, every hardware form-factor page,
the Pico **firmware** editions, the **Rust** port, and the **KiCad/SPICE hardware** design) lives
on the **`concepts`** branch. Pull anything back from there if it needs to return to the front page.
## Commands
```sh
./build.sh # assemble the self-contained pages into dist/ (git-ignored)
./deploy.sh # build, stamp version, mirror dist/ to the Caddy web root, smoke-test
```
There's no test suite on this branch (the track-format conformance suite lives on `concepts`).
## Build system
Every deployed page is **one self-contained `.html` file, zero runtime dependencies** — no
framework, no CDN, no audio samples (all voices are synthesized in Web Audio). Pages share code
through build markers that `build.sh` resolves:
- `/*@BUILD:include:src/<file>@*/` inlines a shared partial (`engine.js`, `setlists.js`,
`base.css`, `chrome.js`, `header.html`/`footer.html`, `notation.js`, `midiout.js`).
- `@BUILD:favicon@` / `@BUILD:logo-*@` / `@BUILD:bravura@` inline base64 blobs from `assets/`.
`build.sh` asserts no `@BUILD:` markers survive. **`dist/` is generated and git-ignored — never
edit it by hand.** Edit the source `*.html` in the repo root and the partials in `src/`;
`deploy.sh` always builds first, then mirrors `dist/` to the web root with `rsync --delete`
(so anything no longer built is removed from the live site).
State (set lists, practice log, theme) lives in `localStorage`; nothing is uploaded — share
links encode everything in the URL hash (`#p=` patch, `#sl=` base64url set list). Source files
keep an `APP_VERSION` placeholder; only the deployed copy is stamped (from `VERSION`).
## License
GNU AGPL v3 (`LICENSE`).