module
Version:
v0.0.0-...-3c69735
Opens a new window with list of versions in this module.
Published: Jan 19, 2026
License: MIT
Opens a new window with license information.
README
¶
Go Web Template
A lightweight, modern template for building web applications with Go, PostgreSQL, and templ.
Features
- Go Backend: Uses Gin for routing and API endpoints
- PostgreSQL Database: With Flyway migrations for schema management
- Type-safe Database Access: Generated with sqlc
- HTML Templating: Using the modern templ templating engine
- Docker Integration: Containerized for easy deployment
- API Ready: Pre-configured REST API structure
Quick Start
-
Clone this repository:
git clone https://github.com/dbut2/web-template.git
-
Run the application with Docker:
docker compose up
-
Visit http://localhost:8080 to see the application
Project Structure
/go - Backend Go code
/database - Database access with sqlc-generated code
/service - HTTP service with handlers and API endpoints
/schema - Database schema and migrations
/migrations - Flyway SQL migrations
queries.sql - SQL queries for sqlc generation
/web - Frontend templates using templ
Development
Prerequisites
Build Commands
Directories
¶
Click to show internal directories.
Click to hide internal directories.