Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: 6 days ago
JSON representation

Simple and minimal Go template for building fast and mantainable HTTP services

Awesome Lists containing this project

README

        

# blaze

![logo](https://github.com/paologaleotti/blaze/assets/45665769/a0c691df-b76b-4a4a-ac44-c622dd458352)

Simple and minimal Go template for building fast, simple and mantainable web services and backend applications.

> [!IMPORTANT]
> While blaze is already used and working flawlessly in production, it's still evolving and may have breaking changes in the future.

You can find the **full documentation** with examples [here](https://github.com/paologaleotti/blaze/wiki).

A full REST API example using SQLite, sqlx and Prometheus metrics can be found [here](https://github.com/paologaleotti/blaze-api-example).

## Features

- Minimal and low overhead
- Production ready
- Simple and conventional structure
- 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
- 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 `httpcore` and `util` package.

## Stack

- **chi**: HTTP router (std net/http compatible)
- **chi/middleware**: middleware and hooks
- **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 scaffold a new blaze project, simply run this command:

```bash
go run github.com/paologaleotti/blaze-cli@master
```

This will use the [blaze-cli](https://github.com/paologaleotti/blaze-cli) to scaffold the project. You can also use the GitHub template or simply clone the repo.