https://github.com/pace/bricks
A standard library for microservices.
https://github.com/pace/bricks
bricks docker http jaeger json json-api kubernetes logging metrics microservices mongodb openapi3 pace postgres prometheus redis restful-api sentry tracing
Last synced: 15 days ago
JSON representation
A standard library for microservices.
- Host: GitHub
- URL: https://github.com/pace/bricks
- Owner: pace
- License: mit
- Created: 2019-01-21T08:41:32.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-03-21T22:13:32.000Z (about 1 month ago)
- Last Synced: 2025-04-02T03:17:49.435Z (23 days ago)
- Topics: bricks, docker, http, jaeger, json, json-api, kubernetes, logging, metrics, microservices, mongodb, openapi3, pace, postgres, prometheus, redis, restful-api, sentry, tracing
- Language: Go
- Homepage:
- Size: 22.2 MB
- Stars: 170
- Watchers: 9
- Forks: 21
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# PACE Bricks [](https://github.com/pace/bricks/actions/workflows/golang-ci.yml) [](https://coveralls.io/github/pace/bricks?branch=master)

Opinionated microservice kit to help developers to build microservices with go.
## Opinions
A pace/bricks microservice is:
* built as a **docker container**
* deployed into a **kubernetes cluster**
* support for the **termination log**
* configured using **environment variables** ([TWELVE-FACTOR APP](https://12factor.net/))
* monitored using **prometheus**
* reports errors to **sentry**
* samples traces to **sentry**
* **logs** to stdout using json deployed **kubernetes** otherwise human readable
* offers **health** endpoints
* built-in redaction of JWTs and card schemes
* connects to backend services
* **postgres** (logging, metrics, tracing, health)
* **redis** (logging, metrics, tracing, health)
* **queue** via redis (logging, metrics, tracing, health)
* **http** (logging, metrics, tracing, retries)
* **s3** via http (logging, metrics, tracing, health)
* **couchdb** via http (logging, metrics, tracing, retries, health)
* **grpc** (logging, metrics, tracing, retries)
* provides two commands **control** and **daemon**
* provides a **RESTful** API
* code is generated from the **OpenAPIv3** spec
* authenticated via **OAuth2**
* encoded using **[json:api](https://jsonapi.org/)**
* that supports **logging**, **tracing** and **metrics**
* optionally provides a **GRPC** API
* code is generated from the **protoc** spec
* that supports **logging**, **tracing** and **metrics**## Install
go get github.com/pace/bricks/cmd/pb
## Usage
pb -h
## Contributing
Read our [contributors guide](CONTRIBUTING.md).## Requirements
* A working go installation
* A working git installation## Testing
* Use `make test` to test without dependencies
* Use `docker-compose run testserver make integration` to test with dependencies
* Use `make testserver` to start a testserver that will be started with dependencies. In order to update the server one need to `docker-compose restart testserver`## Environment variables for the pb command
| Variable | Description |
|-|-|
| `PACE_BRICKS_EDITOR` | The path to the editor that should be used for opening a project. Defaults to `$EDITOR`. |
| `PACE_BRICKS_PATH` | The path where new project should be created. Defaults to `$HOME/PACE`. |