Your digital pet that grows by listening to music. herzies.app
Day-to-day work in this repo centres on the desktop app (Tauri, macOS and Windows): it is the main product surface we ship and extend. Everything else supports it: the database and game loop, the multiplayer Town, and the website.
Download the latest Herzies Desktop build for macOS or Windows from the latest GitHub release. The app updates itself.
Important
Beta — Herzies Desktop is still in beta. If you run into errors or bugs, please report them as GitHub issues.
desktop app ──sync, chat, events…──▶ Supabase edge functions ──▶ Postgres
│ ▲
│ town-ticket (signed pass) │ town-vitals (HP, bench rest)
▼ │
Town server (Cloudflare Worker + Durable Objects) ◀──watch── website
- Supabase holds everything persistent: the Postgres database (
supabase/migrations) and the edge functions the app calls (supabase/functions). - The Town server is the real-time multiplayer Town: a Cloudflare Worker with one Durable Object per room (
herzies-town). It has no database access. It trusts the passtown-ticketsigns, and reports health back throughtown-vitals. - The website (Next.js on Vercel) is the landing page, sign-in, the store, and a few API routes. Its front page watches the Town live, read-only, with stand-in bodies.
- Shared rules live once in
@herzies/shared. The edge functions get a vendored copy (pnpm vendor:shared;pnpm checkfails when it's stale).
| Package | Description |
|---|---|
herzies-desktop |
The desktop app (Tauri + React). Music detection, the herzie, the 3D Town. Also builds the website's Town showcase (build:showcase) |
@herzies/shared |
Game rules, item catalog, types, the sync game loop (game-server.ts), and the WebGL herzie renderer (gl/) |
@herzies/town-server |
The multiplayer Town: Cloudflare Worker + Durable Objects. Rooms, combat, the boss cave and the Tower |
@herzies/web |
Website, sign-in, store (Stripe) and the remaining API routes, on Vercel |
| Function | What it does |
|---|---|
sync |
The game loop: listening becomes XP, drops, streaks, events. Called every few seconds by each active app |
chat |
Town chat, read and send |
events-active |
What's on now (song hunts, bosses, visitors), polled by the app |
trade-pending |
Incoming trade requests, polled by the app |
collect-drop |
Picks up a drop off the ground |
town-ticket |
Signs the pass into the Town server |
town-vitals |
Where herzie HP is written, by the Town server and the app |
attune-crystal |
Cashes in the Crystal: XP and drops |
upgrade-crystal |
Spends Crystal Shards on a bigger Crystal |
debug-spawn-drop |
Dev builds only: spawns a drop on demand |
Needs Node, pnpm 10, Rust (for Tauri) and Docker (for the local Supabase).
pnpm install
scripts/local.sh up # local Supabase + edge functions, web on :3101, Town on :8797
scripts/local.sh desktop # the desktop app against all of that (quit the installed beta first)Nothing in local.sh touches prod. Sign in with any email. Run scripts/local.sh with no arguments for the rest (level a herzie, open the boss cave or the Tower, reset the database).
Other useful commands:
pnpm check # typecheck everything + vendored-shared staleness
pnpm test # unit tests
npx biome ci . # lint + format, as CI runs it
pnpm --filter herzies-desktop sandbox # Town sandbox in the browser
pnpm --filter herzies-desktop map-editor # the Town map editorpnpm --filter @herzies/web test:integration runs the integration tests against the local database (scripts/local.sh reset first).
Server first, then the app:
- Migrations go to prod one at a time through the Supabase MCP
apply_migration, neversupabase db push. - Edge functions:
npx -y supabase@2 functions deploy <name> --project-ref ojqfqxolbjegorgoyond, one per call. CLI v3 rejects this repo'sconfig.toml. - Website: pushing
mainbuilds production on Vercel. - Town server:
pnpm --filter @herzies/town-server deploy(wrangler deploy), from a clean checkout ofmain, with shared built first. Redeploy it wheneverTOWN_PROTOCOLchanges, or every app is shut out of the Town. - Desktop: bump the version in
package.json,tauri.conf.jsonandCargo.toml, add the notes topackages/desktop/release-notes.json, and push adesktop-v<version>tag. CI builds macOS and Windows and publishes the release, which the in-app updater picks up.
- Add support for more platforms: now-playing detection uses MediaRemote (with AppleScript as a fallback) on macOS and System Media Transport Controls on Windows. Linux (e.g. MPRIS) is not supported yet.
- Add support for more music players: detection works for players that report to the system's now-playing feed. Players that don't are worth covering too.