Skip to content

gobanking is simple banking system with a REST API that imitates banking system. It is boilerplate for my project

Notifications You must be signed in to change notification settings

haikalvidya/gobanking

Repository files navigation

Gobanking

Purpose of the project is for my template project that implement clean architecture, microservices, and monorepo. It is just simple banking system with a REST API. Gobanking is program that imitates banking system. It allows to create accounts, deposit and withdraw money, transfer money between accounts and check balance.

Tech Stack

The is built with the following technologies:

Endpoint list

Detail document of endpoint list can be found in the docs folder, there is a postman collection.

Method Endpoint Description
POST /auth/signup Create new user
POST /auth/signin Login to user
POST /auth/refresh Refresh access token
POST /auth/signout Logout from user
GET /user/me Get current user
GET /user/:id Get user by id
PUT /user/:id Update user by id
DELETE /:id Delete user by id
POST /account Create new account
GET /account/me Get all account by current user
GET /account/detail/:account_number Get account by account number by the owner
PUT /account/:account_number Update account by account number
DELETE /account/:account_number Delete account by account number
GET /account/:account_number Get account by account number by external
GET /currency Get all currency
GET /currency/:id Get currency by id
POST /transfer Transfer money between account
POST /deposit Deposit money to account
POST /withdraw Withdraw money from account

Money representation

Money is represented as integer as smallest unit of currency. For example, 1 USD is represented as 100 cents or 1 GBP is representation as 100 pence. This is to avoid floating point precision problem. The program is using this library https://github.com/Rhymond/go-money to handle money representation.

How To Run

Copy env file

cp .env.example .env

Run docker compose

make run-docker-all

About

gobanking is simple banking system with a REST API that imitates banking system. It is boilerplate for my project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages