https://github.com/paologaleotti/blaze
Simple and minimal Go template for building fast and mantainable HTTP services
https://github.com/paologaleotti/blaze
api backend go golang golang-api http scaffold template
Last synced: about 1 month ago
JSON representation
Simple and minimal Go template for building fast and mantainable HTTP services
- Host: GitHub
- URL: https://github.com/paologaleotti/blaze
- Owner: paologaleotti
- License: mit
- Created: 2023-08-15T15:38:55.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2025-04-07T20:02:25.000Z (about 1 month ago)
- Last Synced: 2025-04-09T15:03:05.082Z (about 1 month ago)
- Topics: api, backend, go, golang, golang-api, http, scaffold, template
- Language: Go
- Homepage: https://goblaze.netlify.app/
- Size: 218 KB
- Stars: 78
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# blaze

Minimal Go template for building fast, simple and mantainable web services and backend applications.
You can find the **full documentation** with examples [here](https://github.com/paologaleotti/blaze/wiki).
## Features
- Very minimal and zero overhead
- Production ready
- Simple and conventional structure, no black magic
- Separation of business logic and API logic
- Fully compatible and based on standard [net/http](https://pkg.go.dev/net/http)
- Strict linting with [golangci-lint](https://golangci-lint.run/)
- Custom HTTP error handling and error mapping (separate service errors from API errors)
- Request payload validation
- Structured logging with [zerolog](https://github.com/rs/zerolog)
- Full AWS Lambda support (see [serverless](https://github.com/paologaleotti/blaze/tree/feature/serverless) branch)All utilities are implemented in the `httpx` and `util` package.
This repo contains a more real world example of a CRUD API with:
- sqlite3 storage
- Embedded sql migrations
- Apply migrations on startup with goose## Base dependencies
- **chi**: HTTP router (std net/http compatible)
- **chi/middleware**: default middlewares and utils
- **validator/v10**: request body struct validation
- **zerolog**: structured logging## Get started
You can start by reading the small [wiki](https://github.com/paologaleotti/blaze/wiki) with examples.
To get started, simply run:
```bash
make
```This will build the project, you just need Go installed and nothing else.
To run the server:
```bash
./bin/api/main
```This will create a sqlite3 file in the root of the project, run migrations and start the server on port 3000.