Download api/README.md from Jessedbrown/warran: direct link, hf CLI and curl.
- Browser
- Download file 1.86 kB
-
https://huggingface.co/Jessedbrown/warran/resolve/main/api/README.md
- Command line
-
hf download hf://Jessedbrown/warran/api/README.md
-
curl -L -o README.md https://huggingface.co/Jessedbrown/warran/resolve/main/api/README.md
βοΈ API Node - Warren Code Challenge
π Challenge
Create an API that process deposits, payments and withdrawls
π¨π½βπ» Tech Stack
- Node.js
- Typescript
- Express
- Jest
- Docker
- Mongoose
- MongoDB
- React
- Javascript
π Functional Requirements
Get user statement
Make a deposit
Make a payment
Make a withdrawl
TODOMonetize the balanceTODOAdd transactions seed
π How to run this application
git cloneto download the repository;npm installto install the dependencies;migrate:upto seed the Docker database;cd api && npm run startto run the project locally;cd api && docker-compose build --no-cache && docker-compose up -d --force-recreateto run in Docker
π€ Endpoints
π Base URL: If the backend is running locally, the base url is: http://localhost:3000/, else it's http://localhost/ .
π Routes
GET /users/all This endpoint returns a list the users registered
GET /users/{id} This endpoint returns the details of a given user from it's id
POST /users/signup This endpoint registers an user
The body of the resquest must be:
{
"email": "warren@mail.com",
"password": "123456",
"name": "Warren"
}
**POST /wallet ** This is a generic endpoint to handle the user transactions. The transaction category must be deposit, payment or withdrawl.
{
"user_id": "602c982bba4ca81124ae0b2b",
"category": "payment",
"amount": 100
}
GET /wallet/{id} This endpoint returns the user statement from it's id. Also it must be provided the query parameters limit,skip and order_by for the pagination.
ππ½ How to reach me
LourenΓ§o Passos | Fullstack Software Engineer | lo.passos93@gmail.com | 55-51-996106010