Get started
Getting started
Create a GOTTH+ project, run it locally and make your first change.
What you need
- Go 1.27.4 or newer (the template's go.mod sets the version).
- templ, at the same version as the template's go.mod. Install it with go install github.com/a-h/templ/cmd/templ@<version>.
- The Tailwind CSS v4 standalone CLI on your PATH as tailwindcss. No Node and no npm are needed.
- git, curl and make. Optional: air, for live reload instead of templ's proxy.
create-gotth-plus-app checks these tools before it writes anything. A missing or wrong version is a warning with install steps, and the project is still created.
Create a project
The generator asks for anything you don't pass as a flag, shows a summary, and writes nothing if you cancel.
go run github.com/owenwexler/create-gotth-plus-app@latest my-app
cd my-appIt then runs make setup for you: Go modules, the JavaScript libraries, Chromium for the browser tests, and a first build. Pass --setup=false to skip that.
Run it
make dev # live reload, open http://localhost:7331
make run # no live reload, on the Port in .env (3000 by default)make dev runs the Tailwind watcher and templ's watcher, which starts the server and reloads the browser. make help lists every target.
Make your first change
The splash page is internal/view/pages.templ. Edit it, save, and the browser reloads. Components live beside it in internal/view, and Tailwind picks up any class you write there, as long as it is a complete literal string.
When you're ready for your own data, read Data: SQLite, Postgres or MySQL, and remove the example pieces the README lists under "Removing the example app".
Official sites and documentation
These docs cover how GOTTH+ uses each part of the stack. For everything else, go to the source:
- Go : the language, downloads and the standard library
- Go documentation : the tour, Effective Go, the language spec and tutorials
- templ : the templ guide: syntax, components and the CLI
- htmx : the htmx home page, essays and examples
- htmx documentation : attributes, events, configuration and the reference
- htmx preload extension : preloading links and fragments on mousedown or hover
- hx-optimistic : the optimistic-update extension: its README documents the data-optimistic config
- Alpine.js : directives, magics and the global store
- Alpine.js CSP build : the build GOTTH+ uses, and what it can't evaluate
- Tailwind CSS : the Tailwind home page and the full class reference
- Tailwind CSS standalone CLI : the single binary GOTTH+ uses instead of Node and npm
- Tailwind CSS: styling with utility classes : the core concepts: utilities, variants such as hover: and data-*, and theme values
- GORM : the Go ORM GOTTH+ uses for every database
- GORM documentation : models, queries, associations, migrations and the database drivers
- SQLite : the default database: a single file, no server
- SQLite documentation : SQL syntax, pragmas such as WAL mode, and limits
- PostgreSQL : the Postgres project, downloads and news
- PostgreSQL documentation : the manual for every supported version
- MySQL : the MySQL home page and downloads
- MySQL documentation : the reference manual and connector guides
- Redis : the Redis home page and downloads
- Redis documentation : commands, data types, ACLs and TLS
- Memcached : the Memcached home page and downloads
- Memcached documentation : configuration, the protocol and running it safely
- go-redis : the Redis client a --cache=redis project uses (github.com/redis/go-redis/v9)
- gomemcache : the Memcached client a --cache=memcached project uses (github.com/bradfitz/gomemcache)
Was this page helpful?
1 of 1 readers found this page helpful.