Coder Social home page Coder Social logo

roshan-404 / bank Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 134 KB

This is a bank service where we will provide API to fronted for doing things such as CRUD operations on an account, cash transfer between two accounts and others things as well.

Makefile 1.47% Go 91.34% Shell 6.50% Dockerfile 0.70%
go docker sqlc bank banking-system

bank's Introduction

Simple-Bank

This is a bank service where we will provide API to fronted for doing things such as:

  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

  • Start postgres container:
    make postgres
  • Create simple_bank database:
    make createdb
  • Run db migration up all versions:
    make migrateup
  • Run db migration down all versions:
    make migratedown

How to generate code

  • Generate SQL CRUD with sqlc:
    make sqlc
  • Create a new db migration:
    migrate create -ext sql -dir db/migration -seq <migration_name>

How to run

  • Run test:
    make test

bank's People

Contributors

roshan-404 avatar

Stargazers

 avatar  avatar

Watchers

 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.