Skip to content
Tutorial: build an issue tracker

Tutorial: build an issue tracker

Since v0.3.0

In this tutorial you build a small issue tracker: people sign up, open issues, comment on them, search them, and get an email when someone comments on theirs. Then you build it for production. Along the way you use most of what an Anetos app is made of: models and migrations, handlers and routes, templ views and forms, accounts, htmx, full-text search, events, queue jobs, email, and tests.

The whole tutorial takes about an hour. Short on time? Parts 1 to 3, then 7, take about 30 minutes and give you an app with accounts and issues, ready to deploy.

PartYou add
1. Create the appThe project, running with live reload
2. AccountsSign-up, sign-in, email verification, settings
3. IssuesA model, a migration, pages to list, open and edit issues, a test
4. The issue pageComments posted with htmx, closing issues, an event
5. SearchA full-text index and a search page
6. Email the authorA mail, and a queued listener that sends it
7. DeployThe production build, as a binary and an image

Before you start

  • Go 1.26 or later (go version).

  • The anetos tool:

    go install anetos.dev/anetos/cli/cmd/anetos@latest
  • Some Go: structs, methods, errors. You don’t need to know Anetos.

No database server is needed: the app uses SQLite, in a file.

Reading the code

Each block shows code to put in a file, and the text says where. A new file starts with its package line, named after its folder (package handlers in app/handlers), then the imports the tutorial shows with it. When a block replaces generated code, the text says which.

The finished code

examples/tutorial is the app at the end of part 6, compiled and tested with every change to Anetos. If something doesn’t work, compare your files with it.

When you’re done, examples/tracker is a bigger version of the same app: projects with members and roles, labels, files, an admin, a JSON API. It’s there to read when you build your own.