@behindthemusictree/app-kit — shared transport, auth, popup, UI, player, and genre-tree
plumbing consumed by grow-the-music-tree-frontend and hear-the-music-tree-frontend. Nothing
in packages/app-kit/src should import from either consuming app; all app-specific behavior
(data hooks, routes, popups) is passed in via props/callbacks.
- TypeScript (strict), React — no framework of its own; consumers are Next.js apps
- Build: tsup (ESM + CJS +
.d.ts) — multi-entry, one output per subpath - Package manager: pnpm workspaces (
packages/app-kit,apps/playground) - Registry: GitHub Packages (
https://npm.pkg.github.com, scope@behindthemusictree)
Full module map, cross-module coupling, and build rationale: architecture.md.
Docs (architecture.md, README.md, CONTRIBUTING.md, CLAUDE.md itself) describe the
current state of the repo only — no origin story, migration history, or "extracted from"/"used
to be" framing. History belongs in git log and CHANGELOG.md, not in reference docs.
packages/app-kit/src/{transport,auth,popup,ui,player,genre-tree}/— one folder per subpath export; each has its ownindex.tsbarrelpackages/app-kit/src/index.ts— root barrel re-exporting every modulepackages/app-kit/tsup.config.ts— entry map; keep in sync withsrc/*/index.tsand theexportsfield inpackages/app-kit/package.jsonapps/playground/— manual Vite harness for exercising exported components; not published. Its backend proxy (/api/grow-prototype-proxy,vite.config.ts) only exists in Vite's dev server — the Vercel-hosted PR preview build has no equivalent, so preview builds 404 on that path and render with no real genre-tree datascripts/release.sh+.github/workflows/publish.yml— version bump → tag → publish pipelineCHANGELOG.md— update[Unreleased]for every user-facing changepnpm-workspace.yaml— catalog pin for@behindthemusictree/genre-tree-view, the separately published D3 tree component thatgenre-tree's Wheel/Pop-Core views wrap; bump it here to pick up a new release of that package
- Adding a module: export it from the module's own barrel AND
src/index.ts, then add a matching entry totsup.config.tsandpackages/app-kit/package.json'sexportsmap - Keep modules decoupled from any one consumer: inject data loaders and callbacks (see
PlayerProvider'sloadTrackprop andAuthCallbackHandler's callback props) rather than importing a specific app's hooks or routes genre-treeis scope-parameterized ("me" | "reference") — do not hardcode either scope's assumptions into shared components
main— released code only, every commit taggedvX.Y.Z. Never branch from or PR into it directly; it only receives merges fromrelease/*andhotfix/*.develop— GitHub default branch, integration branch for all in-progress work. Branchfeature/*,fix/*,chore/*from here; PR back into here.release/*— cut fromdevelopbypnpm release -- <bump>(scripts/release.sh), which also pushes it and opens PRs into bothmainanddevelop. After themainPR merges, runpnpm tag-releaseonmainto tag and trigger the publish workflow.hotfix/*— cut frommainfor urgent production fixes; PR'd into bothmainanddevelop, tagged the same way viapnpm tag-releaseafter themainPR merges.- Full detail:
CONTRIBUTING.md§ Branching (Gitflow).
- Importing anything from
grow-the-music-tree-frontendorhear-the-music-tree-frontend— dependencies flow the other way - Notable changes without a
CHANGELOG.mdentry under[Unreleased] - Opening PRs against
mainfrom anything other thanrelease/*orhotfix/*— targetdevelop(see Branching above) - Merging or pushing directly to
mainordevelop, including fromrelease/*/hotfix/*— always go through a PR, even with branch-protection bypass rights - Publishing directly with
npm publish— always go throughpnpm release -- <bump>(scripts/release.sh) followed bypnpm tag-release, which also updates the changelog and lockfile
This project has a knowledge graph at graphify-out/ with god nodes, community structure, and cross-file relationships.
Rules:
- For codebase questions, first run
graphify query "<question>"when graphify-out/graph.json exists. Usegraphify path "<A>" "<B>"for relationships andgraphify explain "<concept>"for focused concepts. These return a scoped subgraph, usually much smaller than GRAPH_REPORT.md or raw grep output. - If graphify-out/wiki/index.md exists, use it for broad navigation instead of raw source browsing.
- Read graphify-out/GRAPH_REPORT.md only for broad architecture review or when query/path/explain do not surface enough context.
- After modifying code, run
graphify update .to keep the graph current (AST-only, no API cost).