An opinionated, modern Go web starter kit featuring Fiber v3, HTMX, Tailwind CSS v4, and Templ with live reloading.
Thanks to RevanchistX & Skopsgo for this wonderful rendition.
- 🚀 Go 1.24 - Latest Go version with modern language features
- 🌐 Fiber Framework v3 - High-performance HTTP web framework built on Fasthttp
- ⚡ HTMX - Modern web interactivity without complex JavaScript
- 🎨 Tailwind CSS v4 - Latest utility-first CSS framework
- 📄 Templ - Type-safe Go templating
- 🔄 Live Reload - Hot reloading with Air for seamless development
- 🐳 Docker Ready - Complete containerization support
- 📦 pnpm - Fast, disk space efficient package manager
- 🛠️ Make Integration - Simplified build and development commands
- 🔒 Built-in Middleware - Compression, logging, recovery, and CORS support
This starter kit addresses the need for a modern, batteries-included Go web development setup that combines the best of server-side rendering with modern frontend tooling. Perfect for developers who want the performance of Fiber with the interactivity of HTMX and the styling power of Tailwind CSS.
-
Clone and setup
git clone https://github.com/cloudparallax/parallax.git cd parallax
-
Install dependencies and setup environment
make setup cp .env.example .env
-
Start development server
make dev
-
Open your browser Navigate to
http://localhost:8080
to see the welcome page with the interactive counter demo.
-
Build the container
docker build --rm -t parallax .
-
Run the container
docker run -p 8080:8080 parallax
Command | Description |
---|---|
make help |
Show all available commands |
make setup |
Complete first-time development setup |
make dev |
Start development server with live reload |
make build |
Build production binary |
make run |
Run the application |
make test |
Run test suite |
make clean |
Clean build artifacts |
make css-build |
Build CSS with Tailwind |
make templ-generate |
Generate Go code from Templ templates |
make install |
Install all dependencies |
parallax/
├── cmd/parallax/ # Application entry point
├── internal/
│ ├── config/ # Configuration management
│ ├── handlers/ # HTTP request handlers
│ └── middleware/ # Custom middleware
├── web/
│ ├── app/ # Main application logic
│ ├── static/ # Static assets (CSS, JS, images)
│ └── templates/ # Templ template files
├── .air.toml # Air live reload configuration
├── Dockerfile # Container configuration
├── Makefile # Build automation
└── package.json # Frontend dependencies
After running the setup, you'll see a splash screen with an example HTMX counter to verify everything works correctly.
- Create a new template in
web/templates/
- Add a handler in
internal/handlers/
- Register the route in your handler setup
- Style with Tailwind classes
When ready to start your project, you can safely remove:
- Demo splash page templates in
web/templates/
- Counter demo handlers in
internal/handlers/
- Demo route registrations in your handlers
Update the module name throughout your project:
go mod edit -module your-new-module-name
Then update references in:
Makefile
(APP_NAME variable)cmd/
directory structure- Import paths in Go files
Copy .env.example
to .env
and configure:
SERVER_PORT=8080
# CORS Configuration
CORS_ALLOW_ORIGINS=*
CORS_ALLOW_METHODS=GET,POST,HEAD,PUT,DELETE,PATCH,OPTIONS
CORS_ALLOW_HEADERS=Origin,Content-Type,Accept,Authorization,X-Requested-With
CORS_EXPOSE_HEADERS=Content-Length
CORS_ALLOW_CREDENTIALS=false
CORS_MAX_AGE=86400
Run the test suite:
make test
make build
This creates an optimized binary in ./bin/parallax
with:
- Minified CSS
- Generated templates
- Compressed binary (using
-ldflags="-s -w"
)
The included Dockerfile uses multi-stage builds for optimal production images:
docker build -t parallax:production .
docker run -p 8080:8080 parallax:production
This starter kit is built on:
- Fiber v3: High-performance web framework built on Fasthttp
- Templ: Type-safe HTML templating for Go
- HTMX: Modern web interactions without heavy JavaScript
- Tailwind CSS v4: Utility-first CSS framework
- Air: Live reloading for development
This is a personal starter template, but contributions are welcome! Feel free to:
- Submit bug reports
- Propose new features
- Submit pull requests
This project is open source and available under the MIT License.