Giter VIP home page Giter VIP logo

django-ledger's Introduction

Steps to Run Project:


  1. Clone this Git repo
  2. Make sure you have installed docker and docker-compose
  3. Build docker-compose docker-compose build
  4. Run docker container docker-compose up -d
  5. Now, server is up and available at http://0.0.0.0:8000/

API endpoints:


Postman collection is available in Repo for testing

APIs are were live at http://0.0.0.0:8000/

  1. /api/login : It accepts username and password and returns true if exists
  2. /api/get_transactions : fetches all the transactions for the user (he can be either borrower or lender).
  3. /api/add_transaction : it accepts { user_id, transaction_id (random hash), transaction_type (borrow/lend), transaction_amount (negative, positive), transaction_date, transaction_status (paid/unpaid), transaction_with (user_id) }
  4. /api/mark_paid : it accepts transaction id and changes transaction status.
  5. api/credit_score : it sends the user’s credit score based on his/her transaction history.

Users details for testing


Name Username Password
John john john
Bob bob bob
Adam adam adam
  • Use theses creds in login API and you will get user ids. You can use user id to add transaction, get transactions and get the credit score.
  • You can get transaction id from get transaction API response and use transaction id to mark transaction paid using API.

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.