GoArcc: Boilerplate Setup for Go Projects

Atul Anand

Atul Anand

GoArcc - Go monolith with embedded microservices including GRPC,REST, graphQL and The Clean Architecture.

Description

When you start writing a Go project, GoArcc helps to set up all the initial code boilerplate for your project. Initial boilerplate code means how you should organize your codebase and how you can write multiple services. We have support for REST, Graphql as well as gRPC.
It supports logging, tracing, health check, Jaeger, etc so that any developer will come and write services within a minute.
In short, GoArcc is a boilerplate setup codebase for any monolithic(Architecture) based web/mobile applications which later converted into microservices(Architecture).

Structure of Go packages

client/* - clients for server dialing
grpcClient - grpcClient dials grpc server
cmd/* - main application(s)
config - application related configs
db - postgres DB connection and adapters
logger - global zap logger
modules/* - embedded microservices, with structure:
external-svc - exposed apis logic implementation
internal-svc - unexposed apis logic implementation
models - database models, operations using gorm
pb - autogenerated files from .proto file
protos - External required protos for internal protos
types - application related common proto types
servers - all running servers
graphql - ms graphql registration and server invoke
grpc - ms grpc registration and server invoke
rest - ms rest registration and server invoke

Features

Project structure (mostly) follows Standard Go Project Layout.
Easily testable code (thanks to The Clean Architecture).
Graceful shutdown support.
Example gRPC API:
External and internal APIs on different host/port.
gRPC services with and without token-based authentication.
Example graphQL API:
Example REST API:
Example tests, both unit and integration.
Production logging using zap.
Production metrics using Prometheus.
Docker and docker-compose support.
Smart test coverage report
CI/CD setup for GitHub Actions.

Development

Requirements

Go 1.16
Docker 19.03+

Build from source

Clone the repo:
git clone git@github.com:deqode/GoArcc.git

After cloning the repo, review config.yml and update for your system as needed
Build to create GoArcc binary
make build

Run unit tests with
make test

Run

You can find all the running servers at:
Jaeger UI:
Health Trace:
Prometheus UI:
Prometheus UI Metrics:
Grpc Server:
Graphql Server:
Rest Server:

License

Copyright 2021, DeqodeLabs (https://deqode.com/)

Licensed under the MIT License(the "License");


Like this project

Posted May 14, 2025

Developed GoArcc, a boilerplate setup for Go projects with microservices.

Likes

0

Views

1

Clients

Deqode