Developed a custom API using Node.js.
- Node.js
- Express.js
- Postman
- MongoDB
- mongoose
- JWT tokens
- React
These APIs are tested using Postman, and some of them are consumed in the frontend for testing purposes. Here is what each API is responsible for:
- Users can register on the application using their username, email and password.
- The backend generates a hash of the password using CryptoJS and stores it in the database.
- Users can log in using their credentials, with backend verification using JWT authentication.
- Upon successful verification, an authentication token is assigned to the user and stored in the browser's local storage.
- The Product API is responsible for storing the title, image, categories, and price of products in the database.
- This API is responsible for adding new products, getting a list of all products, or retrieving a single product from the database.
- The Order API is responsible for storing the userID, products, amount, and status of the order.
- This API is responsible for adding a new order of the user to the database.
- The Cart API is responsible for storing products and the quantity of each product.
- This API is responsible for storing the items in the cart to the database.