CLAUDE.md 2.0 KB

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 because go tool templ generate targets 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 proxy
  • just build — generate + build binary to bin/jamtrack
  • just testgo 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.