Golang service boilerplate using best practices

go-boilerplate

Golang service boilerplate using best practices.

Responsibility: Register (CRUD) and Login Users with JWT.

Dependencies

  • Gin-Gonic
  • Swaggo
  • go-redis
  • GORM
  • MySQL
  • jwt-go

Documentation (Swagger)

http://localhost:8000/auth/swagger/index.html

Composition

Pod = 1 Containers

  • Container 1 = API REST

Execution / Compilation

Set Env. variables of .env-sample:

Compile with:

make run

Update Swagger Doc:

make doc

Tests

make test

Path's Organization

  • cmd: binaries entrypoint
  • internal: private packages
    • configs: env. vars
    • controller: onde fica as regras/logicas
    • delivery: delivery layer -> http, grpc, messaging
    • domain: models / structs
    • service: external services call's
  • pkg: public packages
  • docs: Swagger Documentation
Owner
Filipe Alves
Software Engineer/Computer Scientist.
Filipe Alves
Similar Resources

A boilerplate for Go fiber versioning

A boilerplate for Go fiber versioning

Fiber Versioning Boilerplate Prerequisite Make sure you have the following installed outside the current project directory and available in your GOPAT

Nov 18, 2022

A boilerplate showing how to create a Pulumi component provider written in Go

xyz Pulumi Component Provider (Go) This repo is a boilerplate showing how to create a Pulumi component provider written in Go. You can search-replace

Mar 4, 2022

Boilerplate for building a monolighic Go and React application

Boilerplate for building a monolighic Go and React application

Monolithic Go and React Application Boilerplate This repository provides a simple and monolithic service with a server written in Go and frontend with

Dec 19, 2022

Go Clean Architecture Boilerplate

Go Clean-Architecture Simple Go Clean-Architecture Boilerplate Overview The purpose of the template is to show: How to organize a project and prevent

Nov 27, 2021

A boilerplate for building Gradescope autograders for Go projects.

go-autograder A boilerplate for building Gradescope autograders for Go projects. Getting started This autograder works by running all Go tests in a st

Nov 6, 2022

Go-fn Boilerplate for Web Functions

alya-go-fn-boilerplate Go-fn Boilerplate for Web Functions This projects aiming to create a deployment ready go skeleton webserver for fast developmen

Feb 5, 2022

⛑ Gatus - Automated service health dashboard

⛑ Gatus - Automated service health dashboard

A service health dashboard in Go that is meant to be used as a docker image with a custom configuration file. I personally deploy it in my Kubernetes

Dec 31, 2022

HTTP service to generate PDF from Json requests

pdfgen HTTP service to generate PDF from Json requests Install and run The recommended method is to use the docker container by mounting your template

Dec 2, 2022

Kratos Service Layout

Kratos Layout Install Kratos

Jan 1, 2023
A boilerplate/starter project for quickly building APIs using Golang with Clean Architechture
A boilerplate/starter project for quickly building APIs using Golang with Clean Architechture

A boilerplate/starter project for quickly building APIs using Golang with Clean Architechture

Mar 2, 2022
Golang Fiber boilerplate with MySQL resource.

Fibo - Go Fiber API Boilerplate A starter project with Golang, Fiber and Gorm Golang Fiber boilerplate with MySQL resource. Supports multiple configur

Nov 1, 2022
A golang boilerplate for Mixin Bot

go-boilerplate This is a golang boilerplate for Mixin Bot. run ./go-boilerplate -f YOUR_KEYSTORE_FILE help to see the help. It enables several widely

Nov 3, 2022
React + Golang boilerplate

React + Golang boilerplate Note: Optimized for running Docker in Linux where you can use port 80 without running docker-compose as root unless you mes

Feb 14, 2022
The best censorship API.

censor-api The best censorship API. Why choose this API? High quality. It could filter all sensitive words around the world. High performance. It coul

Nov 21, 2022
Best-effort CPU-local sharded values for Go
Best-effort CPU-local sharded values for Go

percpu Percpu is a Go package to support best-effort CPU-local sharded values. This package is something of an experiment. See Go issue #18802 for dis

Nov 9, 2022
Fishfindr - An application that is being developed to help me figure out the best places to fish based on my catch history

fishfindr Fishfindr is an application that is being developed to help me figure out the best places to fish based on my catch history. The front-end p

Feb 10, 2022
Input Geojson and utilize Dijkstra's formula to provide the best route between two sets of coordinates

Golang GeoJson Dijkstra Golang GeoJson Dijkstra utilizes GeoJson Feature Collections to find the best the shortest route between two points. Installat

Dec 27, 2022
Automatically generate Go test boilerplate from your source code.
Automatically generate Go test boilerplate from your source code.

gotests gotests makes writing Go tests easy. It's a Golang commandline tool that generates table driven tests based on its target source files' functi

Jan 3, 2023
A Visual Go REST API boilerplate builder.
A Visual Go REST API boilerplate builder.

A Visual Go REST API boilerplate builder. The boilerplate builder will export a Go web server with 0 dependencies, besides the ones you add.

Jul 8, 2022