/go-proj

To be honest I don't know what's the purpose of this project, I'll just do what I feel like to do

Primary LanguageGoMIT LicenseMIT

GoProject

Releases

  • Alpha
    • First version
    • Simple Todo List
  • Master
    • Banking System

About

  • Random project for learning purposes
  • Expects a lot of comments

Running this App

  • $ git clone https://github.com/rafaelbreno/go-proj.git

  • $ cd go-proj

  • $ sudo ./start.sh

  • Update the generated .env
  • $ sudo ./start.sh

  •     Choose an option:
        1- Run Tests
        2- Run Prod
        3- Run Tests and Prod
        4- Purge All
    
  • $ 3

  • Hit enter and Enjoy

Packages

TODO:

Study:

  • Understanding of Design Patterns
  • SSO systems
  • Microservice architecture
  • Communication protocols
  • Virtualisation
  • Continuous integration (CI/CD)
  • Unit testing

Application

Structure

  • FOCUS ON GOROUTINES
  • WebServer
    • Nginx
  • Database
    • Choose one:
      • MySQL
      • PostgreSQL
      • MongoDB
    • Redis
    • Connection
      • Postgres
      • Redis
    • Migrations
    • Seeding

API

  • Database Connection
  • Banking App
    • TODO List
    • TODO Items
  • User CRUD
    • Sign Up (registration)
    • Sign In (login)
    • Sign off
    • Update
    • Delete
  • JWT
    • Creating Token
    • Deleting Token
    • Refreshing Token
  • Explode Functionalities into Microservices

Development Pattern

DevOps

CI/CD

  • Choose one
    • Jenkins
    • Gitlab CI
    • Github Actions
    • CircleCI
  • /.github

Container

  • Choose One

    • Docker
  • /.docker

  • Configuration Management

    • Ansible
  • Container Orchestration

    • Kubernetes
  • Infraestructure Provisioning

    • Terraform
  • Service Mesh

    • Istio

Monitoring Tools

  • Logs
    • Elastic Stack
  • Application Monitoring
    • Jaeger
    • New Relic
  • Implement monitoring system
    • Prometheus
    • Grafana
  • Cloud Providers
    • AWS
    • Digital Ocean
    • Linode

Project Folder Structure

.docker/

  • Here will be all Dockerfiles
  • go/
    • Go image
  • nginx/
    • Server image
  • postgresql
    • Database image
  • redis/
    • Key/Value Database image

app/

  • Here will be all Dockerfiles

cmd/

  • Functionalities globally accessible
  • E.G.
    • Database Connection
    • Helpers
    • Errors Handlers
    • Logging
    • etc.

domain/

  • Stores all App's Domain
  • I came from a MVC background, so I like to think Domain as a Model

domain.go

  • Retrieve DB connections
  • Redis, PostgreSQL
  • Run Migrations

user.go

  • Here is the User Domain("Model")
  • Here'll be the User main struct and Repository

userRepositoryDB.go

  • Almost like and extension for the User's Domain
  • Here'll be all methods/actions that this Domain will need to have

routes/

  • Here will be the routing file

service/

  • Here will be all Services from the App
  • Connecting Handler and Domain
  • Handler <-> Service <-> Domain


Liked what I'm doing? And want to support?

Buy Me A Coffee