Skip to content

Clean architecture based on best practices (hexagon, Docker, gRPC/Protobuf, middleware, database etc...)

License

Notifications You must be signed in to change notification settings

alexgtn/supernova

Repository files navigation


Kudos to https://gopherize.me/ for the cute logo

Supernova

This repo provides:

  • boilerplate code based on best practices for kickstarting go projects
  • clean architecture based on hexagonal architecture
  • gRPC API, Protobuf, HTTP gateway, codegen with buf, API documentation, go-grpc-middleware logging w/ zap, message validation
  • Cobra and Viper integration
  • golang-ci linter
  • CI config for Gitlab (wake me up when september.. when Github Actions catches up)
  • Docker & docker-compose: traefik proxy, Postgres w/ auto-backup to S3, Datadog metrics, Watchtower auto-deploy
  • ent ORM, codegen, migrations

Start service

make main

gRPC gateway

make http

Protobuf

GRPC Requirements:

go install \
    github.com/bufbuild/buf/cmd/[email protected] \
    github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@latest \
    github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@latest \
    google.golang.org/protobuf/cmd/protoc-gen-go@latest \
    google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest \
    github.com/envoyproxy/protoc-gen-validate@latest

Generate ent db code

make gen-schema

Generate protobuf and API docs

make gen-buf

Migrations

make generate-migration
make execute-migration

Optional

make validate-migration
make rehash-migration

TODO


Oasis - Champagne Supernova

About

Clean architecture based on best practices (hexagon, Docker, gRPC/Protobuf, middleware, database etc...)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published