Skip to content
This repository was archived by the owner on Jul 7, 2022. It is now read-only.

vikram-ray/splitwise-clone

Repository files navigation

coding round solution for a FinTech startup

To start the project using docker (recommended)

  • docker-compose up

To start the project directly

  1. create virtual env python -m venv .venv
  2. activate source .venv/bin/activate then install dependency pip install -r requirements.txt
  3. python manage.py runserver

Overview

Features

  • user can login and get token
  • Get all expensed added by him
  • Create expense
  • create group
  • get all groups
  • create friends
  • get friend
  • update friend
  • get expense for type: friend
  • Get overall expense in splitwise
  • settleup payment with a friend

Authorization

  • Token Based Authentication

API Endpoints

Unauthenticated APIs

  • POST - localhost:8000/api/users/token/ - create or get token
    • payload { "username": "admin", "password": "password" }

Token

  • Token 5121c747ea3ee0dff961cafcf812ac567800efb7

Authenticated API - send (Authorization: in header)

  • GET - localhost:8000/api/expense/ - to get all Expenses added by you
  • GET - localhost:8000/api/expense/ - Get all expensed
  • POST - localhost:8000/api/expense/ - Create Expense
    • payload { "amount": 200, "payer": 1, "payee": 2 }
  • POST - localhost:8000/api/group/ - create group
    • payload { "name": "Family", "users": [ 1,2 ] }
  • GET - localhost:8000/api/group/ - get all groups
  • POST - localhost:8000/api/friend/ - create friends
  • GET - localhost:8000/api/friend/ - get friends
  • PUT - localhost:8000/api/friend/1/ - update friend
  • GET - localhost:8000/api/expense/friend/ - get expense for type: friend
  • GET - localhost:8000/api/expense/overall/ - your overall expense in splitwise
  • POST - localhost:8000/api/expense/settleup/ - to settleup payment with a friend

Some Screenshots!!

image

image

image

image

From POSTMAN

image image image image

About

Holds API for spliwise clone!!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors