Bank-End Master Class [ Golang, Postges, Docker ]

Simple Bank

This repository contains the codes of the Backend master class course by TECH SCHOOL.

Backend master class

In this backend master class, we’re going to learn everything about how to design, develop, and deploy a complete backend system from scratch using Golang, PostgreSQL, and Docker.

Course videos

Simple bank service

The service that we’re going to build is a simple bank. It will provide APIs for the frontend to do following things:

  1. Create and manage bank accounts, which are composed of owner’s name, balance, and currency.
  2. Record all balance changes to each of the account. So every time some money is added to or subtracted from the account, an account entry record will be created.
  3. Perform a money transfer between 2 accounts. This should happen within a transaction, so that either both accounts’ balance are updated successfully or none of them are.

Setup local development

Install tools

Setup infrastructure

  • Create the bank-network

    make network
  • Start postgres container:

    make postgres
  • Create simple_bank database:

    make createdb
  • Run db migration up all versions:

    make migrateup
  • Run db migration up 1 version:

    make migrateup1
  • Run db migration down all versions:

    make migratedown
  • Run db migration down 1 version:

    make migratedown1

How to generate code

  • Generate SQL CRUD with sqlc:

    make sqlc
  • Generate DB mock with gomock:

    make mock
  • Create a new db migration:

    migrate create -ext sql -dir db/migration -seq <migration_name>

How to run

  • Run server:

    make server
  • Run test:

    make test

Deploy to kubernetes cluster

  • Install nginx ingress controller:

    kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.48.1/deploy/static/provider/aws/deploy.yaml
  • Install cert-manager:

    kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.4.0/cert-manager.yaml
Owner
anousone worlakoumman
Golang, Flutter, Vim
anousone worlakoumman
Similar Resources

Generate random, pronounceable, sometimes even memorable, "superhero like" codenames - just like Docker does with container names.

Codename an RFC1178 implementation to generate pronounceable, sometimes even memorable, "superheroe like" codenames, consisting of a random combinatio

Dec 11, 2022

Workaround for running ubuntu:21.10, fedora:35, and other glibc = 2.34 distros on Docker = 20.10.9

clone3-workaround: Workaround for running ubuntu:21.10, fedora:35, and other glibc = 2.34 distros on Docker = 20.10.9 Old container engines such as

Dec 1, 2022

Monitoring Go application inside docker container by InfluxDB, Telegraf, Grafana

Monitoring Go application inside docker container by InfluxDB, Telegraf, Grafana

REST API for TreatField app Docker compose for TIG and Golang simple app: https://github.com/tochytskyi/treatfield-api/blob/main/docker-compose.yml Gr

Nov 6, 2021

With Docker and Go, Mysql, Redis, Selenium.

golang-app Go, Mysql, Redis, Selenium. To run locally Have docker & docker-compose installed on your operating system. cp .env.example .env && docker-

Aug 31, 2022

Temporal Server docker-compose files

Temporal Server docker-compose files This repository provides docker-compose fil

Dec 24, 2021

Curso Docker desde cero

Curso Docker desde cero Según la última encuesta realizada por Stack OverFlow, publicada en febrero de 2020, Docker se posiciona en la casilla número

Aug 29, 2022

Golang CS:GO external base. Development currently halted due to compiler/runtime Golang bugs.

gogo Golang CS:GO External cheat/base. Also, my first Golang project. Wait! Development momentarily halted due to compiler/runtime bugs. Disclaimer Th

Jun 25, 2022

Belajar Golang Install Golang

Golang belajar Golang Install Golang = download di https://golang.org/dl/ = pilih yg Zip = extract file zipnya = buka foldernya - copy folder go = pas

Nov 15, 2021

Golang-module-references - A reference for how to setup a Golang project with modules - Task Management + Math Examples

Golang Module Project The purpose of this project is to act as a reference for setting up future Golang projects using modules. This project has a mat

Jan 2, 2022
A Simple Bank Web Service implemented in Go, HTTP & GRPC, PostgreSQL, Docker, Kubernetes, GitHub Actions CI

simple-bank Based on this Backend Master Class by TECH SCHOOL: https://youtube.com/playlist?list=PLy_6D98if3ULEtXtNSY_2qN21VCKgoQAE Requirements Insta

Dec 9, 2021
simple bank which is implemented using Golang

Banker The service that we’re going to build is a simple bank. It will provide APIs for the frontend to do following things: Create and manage bank ac

Nov 15, 2021
Simplebank - A simple bank with golang

Simple-Bank The service that we’re going to build is a simple bank. It will prov

Feb 1, 2022
http-theft-bank-LiujJian created by GitHub Classroom

http-theft-bank-start-template 木犀银行抢劫游戏模版 hope this can help you http-theft-bank-start-template To begin with Tips 附录 http URL http 工作流程 http 协议方法 HTT

Dec 2, 2021
Teste prático para vaga de back-end Python / Go na Stone.

Stone_GitHub_API_Golang Teste prático para vaga de back-end Python / Go na Stone. Nota 1: Utilizar a branch Release Nota 2: É necessário adicionar o T

Jun 26, 2021
Desafio 1 da trilha de estágio em back end go da Stone

desafio_estagio_1 Desafio 1 da trilha de estágio em back end go da Stone. Neste desafio as entradas são uma lista de items e uma lista de e-mails. Cri

Jan 11, 2022
Docker CE

Docker CE ⚠️ This repository is now deprecated and will be archived ⚠️ Starting with the Docker 20.10 release, packages for the Docker Engine and Dock

Jan 6, 2023
Gorsair hacks its way into remote docker containers that expose their APIs
Gorsair hacks its way into remote docker containers that expose their APIs

Gorsair Gorsair is a penetration testing tool for discovering and remotely accessing Docker APIs from vulnerable Docker containers. Once it has access

Dec 31, 2022
TUI Client for Docker
TUI Client for Docker

docui - TUI Client for Docker Written in Go About docui docui is a TUI Client for Docker. It can do the following: image search/pull/remove save/impor

Dec 28, 2022
Experimental code execution microservice based on Docker containers.
Experimental code execution microservice based on Docker containers.

ranna ランナー - Experimental code runner microservice based on Docker containers. ⚠ PLEASE READ BEFORE USE First of all, this project is currently work i

Dec 9, 2022