Skip to content
/ bank Public
forked from NXRSE/bank

Modern banking infrastructure using Golang

Notifications You must be signed in to change notification settings

thiesa/bank

 
 

Repository files navigation

Bank logo

Banking infrastructure built using Go

Core banking in Golang

Join the chat at https://gitter.im/ksred/bank

Overview

Bank is an answer to the question “What would banking infrastructure look like if it were built today?”

The financial industry is well known for using outdated technology, some still relying on systems from the 1970s written using languages like COBOL. This project aims to bring that infrastructure through to current technological levels.

A secondary aim of this project is to lift the curtain on the financial industry. This is one of the most closed off industries, and finding out how it works has proven to be very difficult. As more is discovered, the possibilities open up. Bringing light to this industry will surely help other fintech developers and upstarts.

This project’s development is documented.

Standards (WIP)

Functionality (WIP)

  • Payments
  • Securities
  • Trade Services
  • FX
  • Cards

Installation

Coming soon: There will soon be a public facing instance of this server to build and test against.

This project is built using Go 1.6, but may work against older versions.

Software Dependencies:

  • MySQL
  • Redis

In order to develop against this project, clone it using git clone https://github.com/ksred/bank.git. Make sure you have all dependencies the project uses:

  • go get github.com/go-sql-driver/mysql
  • go get github.com/satori/go.uuid
  • go get gopkg.in/redis.v3
  • go get github.com/gorilla/mux

You can then go build.

Install certs

Either create your own self-signed certs, or purchase them, and place them in the certs/ directory. There is a script generateCerts.sh to assist with this. These certs must keep the same naming convention:

  • server.key
  • server.pem
  • client.key
  • client.pem

Running the HTTP API

Once built, you can run the HTTP API:

  • Secure: ./bank http
  • Insecure: There is no insecure mode implemented

The API will then be available at the FQDN and port specified.

Running the CLI server

You can run the CLI server:

  • Secure: ./bank server
  • Insecure: ./bank serverNoTLS

Running the CLI client

The program comes with a CLI client. A TLS client can only connect to a TLS server, so the modes must match. The server accepts commands from the CLI separated by new lines. A detailed explanation will be placed in the wiki.

You can run the client:

  • Secure: ./bank client
  • Insecure: ./bank clientNoTLS

Example flow

The following illustrates an example flow for using the server through the CLI client.

Create account

0~acmt~1~Kyle~Redelinghuys~19700101~197001011234098~55512340987~~email@domain.com~Physical Address 1~~~1000

This call responds with the user_id:

1~52d27bde-9418-4a5d-8528-3fb32e1a5d69

Create account login

0~appauth~3~52d27bde-9418-4a5d-8528-3fb32e1a5d69~TestPassword

Log into account

0~appauth~2~52d27bde-9418-4a5d-8528-3fb32e1a5d69~TestPassword

This responds with a token:

1~cb485f9d-0a24-4385-a358-61ea0d44fdea

This token is valid for 60 minutes by default.

Make a payment, here the payment amount is 20

cb485f9d-0a24-4385-a358-61ea0d44fdea~pain~1~52d27bde-9418-4a5d-8528-3fb32e1a5d69@~137232cc-142e-474c-aaaa-43393f9b7c4c@~20

A full wiki and documentation will be added.

License

Q Public License 1.0 (QPL-1.0)

Copyright Kyle Redelinghuys

About

Modern banking infrastructure using Golang

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 99.0%
  • Shell 1.0%