GithubHelp home page GithubHelp logo

wallet's Introduction

Wallet Service

Wallet Service provides RESTful API to add and list account balances as well as making transfers between the accounts and view them

How to run

To run Wallet Service you have to set SITE_HOST, POSTGRES_HOST, POSTGRES_PASSWORD, POSTGRES_USER, POSTGRES_DB env variable and run docker-compose up or simple modify dev.sh with current and run ./bin/dev.sh up

SITE_HOST is the allowed host value that you must access the service with. To run locally, please set 127.0.0.1 <SITE_HOST> to your /etc/hosts file to access the service

API documentation

There are two ways to check API documentation

Enhancements

  • I have linked double-entry bookkeeping rows with the timestamp but it's hard to track with naked eye. so I believe it would've been better to use a Journal model and the two transfer rows in Tranfer model should be related to a row in Journal. so it can be easier to track with

For example Journal Entry would be like below

    id: 1

and the transfer rows would be

    primary_account: "bob",
    direction: "outgoing",
    amount: 10,
    secondary_account: "jack",
    journal_id: 1,

    primary_account: "jack",
    direction: "ingoing",
    amount: "10",
    secondary_account: "bob",
    journal_id: 1,

This is the simplest for I can do this. It can also be done with a pregenerated ids bucket for each transfer in order to avoid concurrency problems.

wallet's People

Contributors

khaledkbadr avatar

Stargazers

 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.