https://github.com/vishnuprasad2004/escrow-system
https://github.com/vishnuprasad2004/escrow-system
backend-api escrow-transfer nestjs
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/vishnuprasad2004/escrow-system
- Owner: vishnuprasad2004
- Created: 2025-01-23T13:51:56.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-01-24T09:53:37.000Z (4 months ago)
- Last Synced: 2025-04-11T00:59:25.519Z (about 2 months ago)
- Topics: backend-api, escrow-transfer, nestjs
- Language: TypeScript
- Homepage:
- Size: 120 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Escrow System with NestJS + MongoDB
## Description
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## Project setup
```bash
$ npm install
```## Compile and run the project
```bash
# development
$ npm run start# watch mode
$ npm run start:dev# production mode
$ npm run start:prod
```Check the Postman Collections: Postman Workspace Link
## Endpoints
### Login
#### POST `/v1/api/auth/login`
**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
---
### Get all Users
#### GET `/v1/api/users/`
**Description**: Retrieves the information all the users.
---
### Get a User by Name
#### GET `/v1/api/users/:name`
**Description**: Retrieves the information all the users.
**Parameters**:- `name` (string, required): The name of the user to be retrieved.
---### Add funds to the User's Wallet
#### PUT `/v1/api/users/addFunds/:userId`
**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.
---
### Get the User's Wallet Balance
#### GET `/v1/api/users/balance/:userId`
**Description**: Gets the amount of money in the wallet of the user
**Parameters**:
- `userId` (string, required): The name of the user to be retrieved.
---