- Fixed song add form (3 HTMX bugs: reset on typeahead, wrong query param, artist-only find-or-create) - Added Played checkbox to add form; inline edit (✎/Save/Cancel) for setlist rows - View fixes: date format, location name instead of ID in jam list, notes on location detail, song count column, location name links to detail - Title typeahead + cross-filtering (artist↔title filter each other) - Fixed datalist accumulation bug: HTMX 2.0 inherits hx-swap from parent; added explicit hx-swap="innerHTML" on both inputs - Setlist sort by id (ULID = insertion order); created rejected by PocketBase - Location delete guard: OnRecordDelete hook blocks if jams exist; FK enforcement is app-level not SQLite-level Loose ends to pick up: - Focus-after-add not user-confirmed yet (setTimeout approach) - jams.participants and setlist.position still in DB schema but unused in UI (optional migration to clean up) - Logout flow and dashboard ranking not browser-tested
2 KiB
2 KiB
jamtrack — Project Guidelines
Inherits all preferences from ~/.claude/CLAUDE.md.
Project overview
jamtrack is a PocketBase-backed web application for tracking jam sessions.
It uses templ for type-safe HTML templates and modernc.org/sqlite (via PocketBase) for persistence.
Package layout
Current structure (do not reorganise without discussion):
main.go — single binary entry point; no /cmd/ subdirectory
views/ — templ templates and generated *_templ.go files (root-level package)
internal/query/ — domain query/ranking logic
internal/web/ — HTTP handlers, middleware, static asset embedding
migrations/ — PocketBase migration files (blank-import side-effect package)
pb_data/ — PocketBase runtime data (not committed)
bin/ — build output (not committed)
- Internal packages are domain-driven under
internal/. views/lives at the root becausego tool templ generatetargets it directly.- Do not apply the "Go standard layout" (the popular GitHub template). Follow official guidance from the Go blog, Go wiki, and go.dev instead.
Tooling
just gen— regenerate templ templates (go tool templ generate)just dev— live-reload dev server with templ watch proxyjust build— generate + build binary tobin/jamtrackjust test—go test -race ./...go tool staticcheck ./...— static analysis
Dependencies already approved
These are in use and do not require further vetting:
| Module | Role |
|---|---|
github.com/pocketbase/pocketbase |
Backend framework (auth, DB, admin UI, router) |
github.com/a-h/templ |
Type-safe HTML templating |
modernc.org/sqlite |
SQLite driver (pulled in by PocketBase) |
github.com/spf13/cobra |
CLI framework (pulled in by PocketBase) |
honnef.co/go/tools (staticcheck) |
Static analysis (go tool) |
golang.org/x/... |
Extended stdlib |
Any module not in this list requires explicit approval before being added.