How therealparmesh/go-htmx-boilerplate works
Main Components
a) Frontend Layer:
• HTMX Client (represented by main.js and main.css)
• HTML Templates (main.gohtml)
• How HTMX handles partial page updates
b) Backend Layer:
• Go Web Server (main.go)
• Template Engine (Go's built-in template system)
c) Development Tools:
• Air (hot-reload capability, indicated by .air.toml)
• Bun (JavaScript runtime/package manager)
• Make (build system)
┌─────────────────────────────────────────────┐
• Client Browser │
• ┘
• ↑ ↓
• HTMX Requests │
┌─────────────────────────────────────────────┐
• Go Web Server │
• ┤
• Template Engine │
• Route Handlers │
• HTMX Response Generation │
• ┘
• ↑ ↑
┌──────────────────┐ ┌──────────────────────┐
• Static Assets │ │ HTML Templates │
• (CSS/JS) │ │ (.gohtml) │
• ┘ └──────────────────────┘
Development Environment Flow
┌─────────────────┐
• Make │
• ┬────────┘
• ↓
┌─────────────────┐ ┌─────────────────┐
• Air │←───│ Go Build │
• ┬────────┘ └─────────────────┘
• ↓
┌─────────────────┐ ┌─────────────────┐
• Bun │←───│ JS/CSS Assets │
• ┘ └─────────────────┘
Key Aspects to Highlight
• HTMX Architecture:
• How HTMX requests flow from client to server
• Partial page update mechanisms
• Server-side HTML generation
• Development Workflow:
• Demonstrate how Air handles hot-reloading
• Bun's role in asset management
• Make's orchestration of the build process
Important Notes
• Version information for major components
• Development vs production flow differences
• How the template engine integrates with the main server
• Where static assets are served from