module
Version:
v0.0.0-...-7921f57
Opens a new window with list of versions in this module.
Published: Apr 27, 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 Goose 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
/db - Database schema and migrations
/migrations - Goose SQL migrations
/queries - SQL queries for sqlc generation
/web - Frontend templates using templ
Development
Prerequisites
Build Commands
Directories
¶
|
|
|
|
|
|
|
|
|
|
|
|
templ: version: v0.3.1001
|
templ: version: v0.3.1001 |
Click to show internal directories.
Click to hide internal directories.