A modern, fully configured starter template for building fast, type-safe web applications using Go, HTMX, Tailwind CSS, Alpine.js, and Templ. This stack provides an incredible developer experience with type safety from your database all the way to your HTML.
- 📜 Type-Safe Templates: Using Templ for compile-time checked templates
- 🔥 Hot Reload: Using Air for instant feedback during development
- 🎨 HTMX + Tailwind: Modern, interactive UIs without complex client-side JavaScript
- 🛠️ Modern JS Utilities: Alpine.js for lightweight interactivity
- 📱 Responsive Design: Mobile-first approach with Tailwind CSS
- Go v1.23.2 or higher
- npm v10.9.0
- node v23.2.0
- Air v1.61.1
- Templ CLI v0.2.778
Install dependencies:
npm install
Start the development server:
make run
This will:
- Start the Templ proxy server on the value of TEMPL_PROXY_PORT defined in the .env file.
- Start the Go server on the value of APP_PORT, also defined in the .env file.
- Enable hot reloading for all file changes.
Access the application at:
http://localhost:<TEMPL_PROXY_PORT>
- Build the container:
docker build -t <image-tag> .
- Run the container:
docker run --rm \
--env-file .env \
-p <local-port>:<app-port> \
-t <image-tag>
Access the containerized application at:
http://localhost:<local-port>
Note: The <app-port>
should match the APP_PORT
in your .env
file.
There is an in detail explanation of how the hot reloading works in this article.