- Python
- Django and Django rest framework
- Clone repo
fit clone https://github.com/esiebomaj/wafi-test.git
- create virtual enviroment
python3 -m venv /path/to/new/virtual/environment
- activate virtual env
path\to\venv\Scripts\Activate
- Install requirements
pip install -r requirements.txt
- start django server
python manage.py runserver
api/add_user
to add a user to the systemapi/deposit
deposit money into a users walletapi/withdraw
withdraw money into a users walletapi/transfer
transfer money from one user to another
- I used serializers in drf (to be able to quickly validate request body)
- I used drf function views so that we can clearly visuaize the logic, since this is a test
- To achieve an InMemory solution, I used a dictionary to represent the users db. In a real world senario this would be table of a relational db