Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ajaen4/goth-complete-setup
Complete project setup for Go + Tailwind + HTMX with hot reloading
https://github.com/ajaen4/goth-complete-setup
alpinejs go hot-reload htmx tailwindcss
Last synced: 4 months ago
JSON representation
Complete project setup for Go + Tailwind + HTMX with hot reloading
- Host: GitHub
- URL: https://github.com/ajaen4/goth-complete-setup
- Owner: ajaen4
- Created: 2024-10-29T17:36:28.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-10-29T18:44:27.000Z (4 months ago)
- Last Synced: 2024-10-29T19:00:03.983Z (4 months ago)
- Topics: alpinejs, go, hot-reload, htmx, tailwindcss
- Language: Go
- Homepage:
- Size: 20.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🚀 GOTH Stack Complete Setup
[](https://golang.org/doc/go1.23)
[](https://htmx.org)
[](https://tailwindcss.com)
[](https://alpinejs.dev)
[](https://templ.guide)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](https://templ.guide) for compile-time checked templates
- **🔥 Hot Reload**: Using [Air](https://github.com/cosmtrek/air) for instant feedback during development
- **🎨 HTMX + Tailwind**: [Modern, interactive UIs](https://htmx.org) without complex client-side JavaScript
- **🛠️ Modern JS Utilities**: [Alpine.js](https://alpinejs.dev) for lightweight interactivity
- **📱 Responsive Design**: [Mobile-first approach](https://tailwindcss.com) with Tailwind CSS## 🚀 Quick Start
### Prerequisites
- Go v1.23.2 or higher
- npm v10.2.3
- Air v1.61.1
- Templ CLI v0.2.778### Installation
Install dependencies:
```bash
npm install
```### Running Locally
Start the development server:
```bash
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:
```bash
http://localhost:
```### Running as Container
1. Build the container:
```bash
docker build -t .
```2. Run the container:
```bash
docker run --rm \
--env-file .env \
-p : \
-t
```Access the containerized application at:
```bash
http://localhost:
```Note: The `` 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.