This concept I used here is pretty Intuitive where I created 3 collections: User, Transaction, Escrow. User Collection, keeps all the user details,like money the user has, and transactions he/she has completed earlier. Transaction Collection, keeps all the transactions which happened Escrow Collection, keeps all the escrow transactions, whether they are ACTIVE, RELEASED, or REFUNDED
$ npm install
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
Check the Postman Collections: Postman Workspace Link
Description: Logins in the user with a generated token Request Body:
email
(string, required): The email of the user.password
(string, required): The Password of the user.
Returns a token which can be kept in the local storage in frontend
Description: Retrieves the information all the users.
Description: Retrieves the information all the users. Parameters:
name
(string, required): The name of the user to be retrieved.
Description: Adds some given amount to the wallet of the user
Parameters:
userId
(string, required): The id of the user to be retrieved.
Request Body:
amount
(number, required): The amount of funds to add.
Description: Gets the amount of money in the wallet of the user
Parameters:
userId
(string, required): The name of the user to be retrieved.