Demo Credit is a mobile lending app that requires wallet functionality. This is needed as borrowers need a wallet to receive the loans they have been granted and also send the money for repayments.
NODEJS (Typescript) - Server framework
EXPRESS - Web framework
MYSQL (KNEX) - Database framework
https://documenter.getpostman.com/view/14158032/2s83zjtPNb (API DOCUMENTATION ON POSTMAN)
https://samuel-anozie-lendsqr-be-test.herokuapp.com/api (deployed to Heroku)
Rename .env.example to .env and add credetials
npm install
npm run migrate:production
npm build
npm start
npm run dev
npm run test
# Headers
Accept: application/json
# Public
POST /api/login
@body: email, password
POST /api/register
@body: name, email, password
# Protected (Needs Bearer Token)
-USER ROUTES
GET /api/users - get all users
GET /api/users/{user_id} - get user by id
PUT /api/users/{user_id} - update user
@body: email, name
-WALLET ROUTES
GET /api/wallet/{user_id} - get wallet details by user_id
PUT /api/wallet/fund/{user_id} - fund user_id wallet
@body: amount
PUT /api/wallet/transfer/{user_id} - transfer to another user
@body: to, amount
GET /api/wallet/{user_id} - get wallet transactions by user_id