🚀 GOTH Stack Complete Setup

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.

✨ Features

  • 📜 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

🚀 Quick Start

Prerequisites

  • Go v1.23.2 or higher
  • npm v10.9.0
  • node v23.2.0
  • Air v1.61.1
  • Templ CLI v0.2.778

Installation

Install dependencies:

npm install

Running Locally

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>

Running as Container

  1. Build the container:

    docker build -t <image-tag> .
    
  2. Run the container: ```bash docker run --rm \

--env-file .env
-p :
-t


Access the containerized application at:
```bash
http://localhost:<local-port>

Note: The <app-port> should match the APP_PORT in your .env file.

In detail explanation

There is an in detail explanation of how the hot reloading works in this article.

Top categories

tailwind logo

Need a Tailwind website built?

Hire a professional TailwindCSS developer today.
Loading Svelte Themes