go-app-template

module
v0.0.0-...-a974e34 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2024 License: Apache-2.0

README

Go App Template

GitHub tag (latest SemVer) Go Reference License

Tests CodeQL Analysis GolangCI Lint Go Report Card

A full-stack app template based on Golang and featuring TailwindCSS for styling, HTMX for dynamic UIs, Postgres/SQLite/TursoDB (libSQL) for efficient data management, and Templ for component-style templating (similar to ReactJs), streamlining web development workflows.

Motivaton

The main goal of this project is to provide a simple and efficient way to build web applications using Golang. The project is designed to be a starting point for building full-stack web applications, providing a basic structure and a set of tools to help you get started.

Why HTMX?

HTMX stands out by simplifying web development compared to JavaScript frameworks like React, Angular, Vue, or Svelte. Its main advantage lies in its ease of use and integration, allowing developers to add interactive features using familiar HTML, without extensive JavaScript expertise. This results in quicker development times and potentially better performance due to less code being sent to the browser. HTMX's server-centric approach also simplifies state management, making it an efficient choice for enhancing traditional multi-page applications with dynamic elements, without the complexity of full-scale SPA frameworks.

Features / Roadmap

  • Go-chi router with pre-configured middleware and graceful shutdown
  • TailwindCSS for styling
  • HTMX for dynamic UIs
  • Postgres/SQLite/TursoDB (libSQL) for efficient data management
  • Templ for component-style templating (similar to ReactJs)
  • Session management (using alexedwards/scs)
  • Hot-reloading for development (using air)
  • Static file serving
  • Jobs and workers for background tasks (using asyncer)
  • Cron jobs for scheduled tasks (using asyncer too)
  • Migration tool for database schema changes (using rubenv/sql-migrate)
  • SQLC for type-safe SQL queries
  • Websockets for real-time communication (using melody)
  • Sub-domain routing
  • Multi-language support (using i18n)
  • File uploads and storage in the s3-compatible object storage
  • Testing and benchmarking
  • Continuous integration and deployment to DigitalOcean App Platform
  • Monitoring and logging via betterstack
  • Authentication and authorization via Email/Password, OAuth2 (Google, Facebook, Twitter, GitHub, etc.).
  • Forgot password and email verification
  • Two-factor authentication

Getting Started

Prerequisites

// TODO: Add prerequisites

Installation

// TODO: Add installation

Usage

// TODO: Add usage

License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

Directories

Path Synopsis
cmd
app
db
pg
pkg
web
templates/views
templ: version: v0.2.543
templ: version: v0.2.543

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL