Development
buzz is written in Go. This page covers building from source, running tests, and the project’s contribution conventions.
Prerequisites
Section titled “Prerequisites”- Go 1.24 or later
Building from source
Section titled “Building from source”Build the application locally:
go buildThis creates a buzz executable in the current directory.
Run it in development mode without building first:
go run main.goInstall and update dependencies:
go mod tidyTesting
Section titled “Testing”The project has test coverage for business logic and utility functions.
go test # Run all testsgo test -v # Verbose outputgo test -cover # With coverageKey test files include beeminder_test.go (API functions), handlers_test.go
(input validation and handlers), utils_test.go (utilities), config_test.go
(configuration), and model_test.go (application state and models). See
docs/TESTING.md in the repository for the full testing strategy.
Project structure
Section titled “Project structure”| File | Responsibility |
|---|---|
main.go | Entry point and Bubble Tea orchestration |
model.go | Application state models and initialization |
handlers.go | Keyboard input handlers |
grid.go | Grid rendering and modal UI |
styles.go | Lipgloss styling definitions |
beeminder.go | Beeminder API integration |
auth.go | Authentication handling |
config.go | Configuration management |
messages.go | Bubble Tea commands and messages |
utils.go | Helper functions |
Git hooks
Section titled “Git hooks”The project uses Conventional Commits for consistent commit messages. Install the commit-msg hook that enforces this format:
./scripts/setup-hooks.shValid commit types
Section titled “Valid commit types”feat, fix, docs, style, refactor, test, chore, perf, ci,
build, and revert.
feat: add user authentication systemfix(api): handle nil pointer in user servicedocs: update README with installation stepsrefactor(db): simplify connection poolingRelease process
Section titled “Release process”Releases are automated based on conventional commits. When changes are merged to
main, the Release workflow:
- Analyzes commit messages for conventional commit types
- Calculates the next semantic version (patch, minor, or major)
- Builds cross-platform binaries
- Creates a GitHub release with the new version tag
Manual releases
Section titled “Manual releases”You can also trigger a release with a specific version:
- Go to the Actions tab.
- Click Run workflow.
- Optionally enter a version override (e.g.
v1.2.3). If left empty, the version is auto-calculated from conventional commits. - Click Run workflow to start the release.
This is useful for hotfix releases, manually controlling version numbers, or releasing when conventional commits aren’t sufficient.
Contributing
Section titled “Contributing”- Fork the repository.
- Create a feature branch.
- Make your changes.
- Ensure commit messages follow the Conventional Commits format.
- Submit a pull request.
Documentation site
Section titled “Documentation site”This documentation site lives in the website/
directory of the repository and is built with
Starlight. To work on the docs locally:
cd websitepnpm installpnpm dev # Start the dev server at http://localhost:4321pnpm build # Build the production site into website/distThe site auto-deploys to https://buzz.nathanarthur.com on every push to main.
buzz is built by Nathan Arthur and Pine Peak Digital.