This is a starter template for building web applications using Go, Pocketbase, and HTMX. It provides a simple and efficient setup to get you started quickly.
- Pocketbase: A powerful backend service for your application.
- HTMX: A modern library for building dynamic web applications with minimal JavaScript.
- Tailwind CSS: A utility-first CSS framework for rapid UI development.
Before you begin, ensure you have the following installed on your system:
- Air: A live reload tool for Go applications.
- Go: The Go programming language.
- Node.js: JavaScript runtime for building and running frontend tools.
Follow these steps to set up the project:
-
Install the Tailwind CSS CLI globally:
npm install -g @tailwindcss/cli
-
Download Go dependencies:
go mod tidy
To start the development server, run the following command:
airOnce the server is running, open your browser and navigate to:
http://127.0.0.1:8090/hello/yourname
-
HTMX Configuration: Use
htmx:configto set the authentication header on the client side. For more details, check out this Reddit discussion. -
Echo Middleware: Use Echo middleware to handle claims and set cookies. Learn more in this example project.