- Go 1.21 or later
- templ CLI tool
- Docker (optional, for containerization)
-
Clone this repository
-
Copy the
.env.example
file to.env
:cp .env.example .env
-
Install dependencies:
go mod tidy
-
Install Air for live reload:
go install github.com/air-verse/air@latest alias air="~/go/bin/air"
-
Install templ CLI tool:
go install github.com/a-h/templ/cmd/templ@latest
-
Install tailwind dependencies:
npm install
-
Run the development server:
air
.
├── assets
│ └── css
│ └── favicon
│ └── images
├── components
├── handlers
├── models
├── services
├── main.go
├── Dockerfile
├── go.mod
├── go.sum
└── README.md
└── .air.toml
└── .env
- Use
air
to start the development server with live reload. - Add new routes in
main.go
. - Create handlers in the
/handlers
directory. - Add templ components in the
/components
directory.
-
Build the binary:
go build -o bin/server
-
Run the production server:
./bin/server
Build the Docker image:
docker compose build
Run the container:
docker compose up
This project is licensed under the MIT License - see the LICENSE file for details.