-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/Dheelyte/flite into main
- Loading branch information
Showing
1 changed file
with
82 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,84 @@ | ||
# Flite | ||
|
||
#TODO: update readme for local development | ||
### Project Setup | ||
To run the project locally, make sure you have docker installed on your machine, thn run the following command: | ||
|
||
``` | ||
docker-compose up | ||
``` | ||
|
||
### Endpoints Usage | ||
- ``` | ||
users/:user_id | ||
``` | ||
Request method: GET | ||
|
||
Request JSON body: Empty | ||
|
||
- ``` | ||
users/ | ||
``` | ||
Request method: GET | ||
|
||
Request JSON body: Empty | ||
|
||
- ``` | ||
users/:user_id/deposits | ||
``` | ||
Request method: POST | ||
|
||
Request JSON body: | ||
``` | ||
{ | ||
"amount": int | ||
} | ||
``` | ||
|
||
- ``` | ||
users/:user_id/withdrawals | ||
``` | ||
Request method: POST | ||
|
||
Request JSON body: | ||
``` | ||
{ | ||
"amount": int | ||
} | ||
``` | ||
|
||
- ``` | ||
account/:sender_account_id/transfers/:recipient_account_id | ||
``` | ||
Request method: POST | ||
|
||
Request JSON body: | ||
``` | ||
{ | ||
"amount": int | ||
} | ||
``` | ||
|
||
- ``` | ||
account/:account_id/transactions | ||
``` | ||
Request method: GET | ||
|
||
Request JSON body: Empty | ||
|
||
- ``` | ||
account/:account_id/transactions/:transaction_id | ||
``` | ||
Request method: GET | ||
|
||
Request JSON body: Empty | ||
|
||
### Testing | ||
To run the integration tests, use the command below: | ||
|
||
``` | ||
docker-compose exec django python manage.py test flite.users.test.test_views | ||
``` | ||
|
||
### Assumptions made during the project | ||
- I assumed that every user has sufficient balance before making a P2P transfer. | ||
- I created a transaction record for Deposits, Withdrawal and P2P transfers. |