Development setup
Requirements: Go 1.27+, Task, golangci-lint v2, lefthook, goose and sqlc.
brew install go-task golangci-lint lefthook goose sqlcgit clone https://github.com/lukeskelhorn/ingle.gitcd ingletask setup # download modules and install the git hookstask run # build and start on http://localhost:8080The database goes in ./data/ingle.db. To start again from the setup page, stop Ingle and delete ./data. Settings go in .env (copy .env.example), which task loads.
Or with Docker:
task docker:run # or: docker run -p 8080:8080 -v ingle-data:/data ingle:devtask # list all taskstask check # sqlc diff, go mod tidy diff, formatting, lint, race teststask generate # regenerate sqlc code after editing queries or migrationstask check:all # check + amd64/arm64 Docker image build (run before merging)task fmt # gofmt -s, gofumpt and goimportstask migrate:create -- add_peopletask migrate:statusChanging the database
Section titled “Changing the database”task migrate:create -- short_nameadds a new file ininternal/store/migrations. Write theUpandDownSQL. Migrations run when Ingle starts, so never edit one that’s been released.- Add or change queries in
internal/store/queries. task generateregeneratesinternal/store/dbq. Don’t edit that by hand.
Checks are local
Section titled “Checks are local”There’s no CI for now. The lefthook pre-commit hook:
- formats the staged Go files and fails on any unformatted Go
- runs golangci-lint
- checks
go mod tidy - runs
sqlc diffwhen queries or migrations change
Run task check:all before merging, which also builds the Docker image for both architectures.