Home
Softono
GOTTH

GOTTH

Open source Go
680
Stars
117
Forks
5
Issues
12
Watchers
2 weeks
Last Commit

About GOTTH

GoTTH is a streamlined, modern development stack designed for building fast and efficient web applications. It combines four powerful technologies to create a cohesive backend and frontend environment without the complexity of traditional JavaScript heavy frameworks. The stack leverages Go for the backend logic, ensuring high performance and type safety. For styling, it utilizes Tailwind CSS to provide a utility-first approach to building custom user interfaces. Templating is handled by Templ, a dedicated tool that generates type-safe Go code from HTMX-friendly templates, bridging the gap between server-side logic and dynamic views. Finally, HTMX is integrated to add rich interactivity to the application, allowing developers to build dynamic user experiences using simple HTML attributes rather than writing complex JavaScript. The project structure includes a comprehensive Makefile to simplify common development tasks. This automation tool orchestrates the entire workflow, making it easy to manage building, wa ...

Platforms

Web Self-hosted

Languages

Go

GoTTH

A simple, modern stack for building fast web applications.

Watch walk-through video:

GoTTH stack walkthrough

  • Go - Backend
  • Tailwind - CSS
  • Templ - Templating
  • HTMX - Interactivity

Technologies

Tailwind

To generate the Tailwind style sheet, we use the Tailwind binary. To get started with TailWind CSS, make sure you have the correct binary in the root directory. follow the instructions in this guide. Make sure you download the correct binary for your operating system. https://tailwindcss.com/blog/standalone-cli

Templ

https://templ.guide/

Air

Air is required for hot reloading used in make dev https://github.com/cosmtrek/air

Makefile

This Makefile is designed to simplify common development tasks for your project. It includes targets for building your Go application, watching and building Tailwind CSS, generating templates, and running your development server using Air.

Development

make docker-dev will start everything in watch mode inside a Docker container.

Targets:

make tailwind-watch

This target watches the ./static/css/input.css file and automatically rebuilds the Tailwind CSS styles whenever changes are detected.

make tailwind-build

This target minifies the Tailwind CSS styles by running the tailwindcss command.

make templ-watch

This target watches for changes to *.templ files and automatically generates them.

make templ-generate

This target generates templates using the templ command.

make dev

This target runs the development server using Air, which helps in hot-reloading your Go application during development.

make build

This target orchestrates the building process by executing the tailwind-build, templ-generate, and go build commands sequentially. It creates the binary output in the ./bin/ directory.