Giter Club home page Giter Club logo

goarcc's Introduction

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

GitHub CI PkgGoDev Go Report Card Project Layout GitHub last commit GitHub go.mod Go version

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).

Read more about GoArcc

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:
  • 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

Build from source

  1. Clone the repo:
git clone [email protected]:deqode/GoArcc.git
  1. After cloning the repo, review config.yml and update for your system as needed
  2. Build to create GoArcc binary
make build
  1. Run unit tests with
make test

Run

You can find all the running servers at:

Jaeger UI:

http://localhost:16686

Health Trace:

http://localhost:8083/health/

Prometheus UI:

http://localhost:9090

Prometheus UI Metrics:

http://localhost:9090/metrics

Grpc Server:

http://localhost:8080

Graphql Server:

http://localhost:8081

Rest Server:

http://localhost:8082

License

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

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

goarcc's People

Contributors

tanuj-deqode avatar atul161 avatar rjoshi-deq avatar shivang-saxena avatar prateek105 avatar shubhamdeqode avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.