Quick Credit is an online lending platform that provides short term soft loans to individuals. This helps solve problems of financial inclusion as a way to alleviate poverty and empower low income earners.
Features Implemented
- User sign up.
- User sign in.
- User can apply for a loan.
- User can view all loan repayment history.
- User can reset password
- Admin can mark a client as verified after confirming the client’s work or home address.
- Admin can view all loan applications.
- Admin can view a specific loan application.
- Admin can view current loans (not fully repaid).
- Admin can view all repaid loans.
- Admin can approve or reject a client’s loan application.
- Admin can post loan repayment transaction in favour of a client.
UI Templates for this application are live on Github Pages
- Node.js - A runtime environment based off of Chromes's V8 Engine for writing Javascript server-side applications.
- Express.js - Web application framework based on Node.js.
- ESLint - A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript.
- Airbnb style guide was followed.
- Mocha - A JavaScript test framework.
- Chai - A test assertion library for JavaScript.
- Chai-Http - A module that provides high-level abstraction for HTTP testing.
The API endpoints are hosted on Heroku - Quick Credit
| METHOD | DESCRIPTION | ENDPOINT |
|---|---|---|
| POST | Sign Up | /api/v1/auth/signup |
| POST | Sign In | /api/v1/auth/signin |
| PATCH | Mark a user as verified | /api/v1/users/:email/verify |
| DELETE | Delete a user | /api/v1/users/:email |
| POST | Send a password reset link | /api/v1/reset-password |
| GET | Reset password view | /api/v1/users/:email/:token/reset-password |
| PATCH | Reset password | /api/v1/users/:email/:token/reset-password |
| POST | Create a loan application | /api/v1/loans |
| GET | Get a specific loan application | /api/v1/loans/:id |
| GET | Get all current loans that are not fully repaid | /api/v1/loans?status=approved&repaid=false |
| GET | Get all repaid loans | /api/v1/loans?status=approved&repaid=true |
| GET | Get all loan applications | /api/v1/loans |
| GET | View loan repayment history | /api/v1/loans/:id/repayments |
| PATCH | Approve or reject a loan application | /api/v1/loans/:id |
| POST | Create a loan repayment record | /api/v1/loans/:id/repayment |
| DESCRIPTION | REQUIRED FIELDS |
|---|---|
| Sign Up | firstname, lastname, email, password, address |
| Sign In | email, password |
| Mark a user as verified | status |
| Send a password reset link | |
| Reset password | password |
| Create a loan application | firstname, lastname, email, tenor, amount |
| Approve or reject a loan application | status |
| Create a loan repayment record | paid_amount |
You will need to have POSTMAN app installed on your computer.
- Launch POSTMAN
- Click the dropdown menu to the left of the URL bar and select POST as a method.
- To access the Sign In endpoint, at the end of Quick Credit's URL attach the sign in endpoint to it as seen in step 4
- https://quickycredit.herokuapp.com/api/v1/auth/signin
- Then paste the full URL in the URL bar.
- Click 'Body' tab below the URL, then select x-www-form-urlencoded radio button.
- Fill in the required fields correctly.
- Click the blue Send button to the right of the URL bar.
- And wait for a response below.
- On the terminal of your computer, navigate into the cloned repo's folder
- Click npm and Node.js to get npm and node respectively.
- Clone Quick Credit repo
https://github.com/joaquinto/QuickCredit.giton your local machine. - Run
$ npm installto install All of Quick Credit's dependencies. - Run
$ npm startto power up the server. - The procedure for using POSTMAN here is the same as when accessing the endpoint remotely except that you make use of http://localhost:3000 as the full URL's prefix in place of the app's URL on heroku e.g To access Sign In endpoint you will have a full URL like http://localhost:3000/api/v1/auth/signin
You can locally run the test by running npm test in the cloned repo directory opened in a new terminal window while the server runs on the first window. It is important that the server is running for the tests to pass.