Two lockstep-versioned packages for BehindTheMusicTree React apps, consumed by
grow-the-music-tree-frontend and hear-the-music-tree-frontend:
@behindthemusictree/app-kit— headless: transport, auth, popup state, player, and genre-tree data and state hooks. No styling.@behindthemusictree/app-kit-ui— the styled BTMT components built on the hooks above, themed through CSS variables. See its README for the theme tokens.
Use app-kit alone to build a different design; add app-kit-ui for the BTMT one.
Published to GitHub Packages, with a subpath per module (also re-exported from the root):
import { useFetchWrapper } from "@behindthemusictree/app-kit/transport";
import { SessionProvider, useAuthCallback } from "@behindthemusictree/app-kit/auth";
import { PopupProvider, usePopup } from "@behindthemusictree/app-kit/popup";
import { PlayerProvider, type PlayerTrack } from "@behindthemusictree/app-kit/player";
import { useGenreTreeViewState, useGenreSearch } from "@behindthemusictree/app-kit/genre-tree";transport— fetch wrapper, query client, app-error types, subdomain base-URL builderauth— session context, code-exchange core, logout,useAuthCallbackpopup— popup context and state,useConnectivityErrorPopup,useTrackUploadplayer— genericPlayerTrack-based playback context (consumer suppliesloadTrack)genre-tree— scope-parameterized ("me" | "reference") schemas, data hooks, track-list providers, and theuseGenreTreeViewState/useGenreSearchhooks
Pieces are decoupled from any single app: PlayerProvider takes an injected loadTrack,
useAuthCallback takes injected pathnames and handlers, and track lists take an optional
renderArtistLink.
pnpm install
pnpm dev # builds the package in watch mode + runs apps/playgroundapps/playground is a small Vite app for manually exercising exported components against mock
data — not published.
Strict Gitflow: main is release-only (tagged), develop is the integration branch and default
branch for PRs. See CONTRIBUTING.md for the full model.
(For maintainers, run from a clean, up-to-date develop)
pnpm release patch # or minor / majorCuts a release/X.Y.Z branch off develop, bumps both package versions, moves CHANGELOG.md's
[Unreleased] section under the new version, then merges into both main (tagged) and
develop and pushes — the tag push triggers .github/workflows/publish.yml to build and
publish to GitHub Packages.
See CONTRIBUTING.md for the full workflow, including hotfixes.