Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/Dheelyte/flite into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Dheelyte committed Mar 29, 2024
2 parents aacc4f9 + eae1ddd commit a68fec1
Showing 1 changed file with 82 additions and 1 deletion.
83 changes: 82 additions & 1 deletion README.md
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.

0 comments on commit a68fec1

Please sign in to comment.