Hello everyone, this is a Readme for my construct week project that has been completed successfully within the duration of 5 days. It was a solo project. I've made the website with reference from myntra.com . I've created Home page , Signup page , Login page, profile and upwear products page.
- Authentication: The project includes JWT-based authentication to secure user data.
- Authorization: The project includes role-based authorization to restrict access to certain routes or functionality.
- Cross-platform compatibility: The project is designed to be compatible across multiple platforms and devices.
- Hashing: User passwords are securely hashed to protect against unauthorized access.
- dotenv: The project uses
dotenv
to manage environment variables and sensitive configuration data. - Relationship: The project includes database schema relationships between collections to support complex data structures.
- Aggregation: The project uses MongoDB's aggregation framework to perform advanced queries and data manipulations.
- HTML/CSS/JavaScript
- Node.js
- Express.js
- MongoDB
HTTP Method | Endpoint | Description |
---|---|---|
POST | /user/register |
Register a new user |
POST | /user/login |
Login as an user |
POST | /admin/register |
Register a new admin |
POST | /admin/login |
Login as an admin |
GET | /products |
Retrieve all products |
GET | /products/:id |
Retrieve a specific product by its ID |
POST | /products |
Add a new product |
PUT | /products/:id |
Update a specific product by its ID |
DELETE | /products/:id |
Delete a specific product by its ID |
GET | /cart |
Retrieve all products in the cart for a specific user |
GET | /cart/verify |
Verify if the cart route is working |
POST | /cart |
Add a product to the cart |
DELETE | /cart/:id |
Remove a product from the cart by its ID |
DELETE | /cart |
Remove all products from the cart after placing an order |
GET | /order |
Retrieve the order history for a specific user |
POST | /order |
Place an order |
DELETE | /order/:id |
Delete a specific order by its ID |
PATCH | /order/:id |
Update the rating for a specific order by its ID |
Field Name | Data Type | Required |
---|---|---|
_id | ObjectId | Yes |
name | String | Yes |
String | Yes | |
password | String | Yes |
Field Name | Data Type | Required |
---|---|---|
_id | ObjectId | Yes |
userID | ObjectId | Yes |
productid | ObjectId | Yes |
Field Name | Data Type | Required |
---|---|---|
_id | ObjectId | Yes |
userID | ObjectId | Yes |
productid | ObjectId | Yes |
createdAt | Date | Yes |
rate | Number | No |
is_delivered | Boolean | No |
Field Name | Data Type | Required |
---|---|---|
_id | ObjectId | Yes |
category | String | Yes |
title | String | Yes |
subtitle | String | No |
discounted_price | Number | Yes |
strike_price | Number | Yes |
discount | String | No |
images | String | Yes |
size | Array | Yes |
rating | Number | No |
rating_count | String | No |
this is the home page of this website. navbar and footer are available across the website.
This is the Navbar of this website. the Navbar will show the respective Page.
Here we have a footer of our website where users can go on different pages and social media.
If the user is registered with the website, only then he/she can log in with their respective email id & password. After successful login, the user can add the product to the cart and see the profile page where user details and order history are present.
This is the Product page of our website, Users must be logged in on our website so he/she can able to add the product to the cart.
You can see the order summary and the product that is added to the cart and you can place an order from here.
- user can see their account details and order history on this page and also user can log out from here.
- user can cancel pending orders or rate the product if order is delivered.
So thanks for reading this. this is all about this project.