CaratLane is an Indian physical and online jewelry retailer, headquartered in Chennai, India Where you can purchase Rings , Earrings ect
A Full Stack , Collaborative project built by a team of 5 executed in 5 days.
- Deployed Link:- Enjoy the Experience
- React
- Redux
- Chakra -UI
- CSS
- MongoDB
- Mongoose _ MongoDb Atlas
- Landing page (Home page)
- Sign-In page
- Landing page (Rings page)
- Landing page (Earrings page)
- Single Product page
- Cart page
- Payment page
- Admin Signin page
*Admin page
Deployed link: https://cartlane.onrender.com/
- /rings
- /earrings
- /users
- /cart
- /search
NOTE:
* All user routes require token in the response header.
* All admin routes require token in the response header generated after loging in with an user account with the role of admin.
- Open routes:
GET /
: get all productsGET /:id
: get a product by its ID
- Admin Routes:
POST /add
: create a new productPATCH /update/:id
: update a product by its IDDELETE /delete/:id
: delete a product
page
andlimit
queries can be used for pagination.
https://cartlane.onrender.com/rings?page=1&limit=10
- Any key in the product schema can be used as a filter.
https://cartlane.onrender.com/rings?size=5
- For sorting by a field, pass the field in the query
type
. The querysort
takes asc or desc to sort in ascending or descending order respectively.
https://cartlane.onrender.com/rings?type=price&sort=asc
- For comparative operators in queries, use the suffix
from
andtill
after any query for greater than or equal to or less than or equal to respectively.
https://cartlane.onrender.com/rings?from=1&till=10000
- For full-text search, use
q
query to pass in the keyword.
https://cartlane.onrender.com/search/?q=duo
{
imageurl:{type: String,required:true},
image:{type: String,required:true},
price:{type: Number,required:true},
originalprice:{type: Number,required:true},
title:{type: String,required:true},
size:{type: Number,required:true},
}
- Open routes:
GET /
: get all productsGET /:id
: get a product by its ID
- Admin Routes:
POST /add
: create a new productPATCH /update/:id
: update a product by its IDDELETE /delete/:id
: delete a product
page
andlimit
queries can be used for pagination.
https://cartlane.onrender.com/earrings?page=1&limit=10
- Any key in the product schema can be used as a filter.
https://cartlane.onrender.com/earrings?size=5
- For sorting by a field, pass the field in the query
type
. The querysort
takes asc or desc to sort in ascending or descending order respectively.
https://cartlane.onrender.com/earrings?type=price&sort=asc
- For comparative operators in queries, use the suffix
from
andtill
after any query for greater than or equal to or less than or equal to respectively.
https://cartlane.onrender.com/earrings?from=1&till=10000
{
imageurl:{type: String,required:true},
image:{type: String,required:true},
price:{type: Number,required:true},
originalprice:{type: Number,required:true},
title:{type: String,required:true},
size:{type: Number,required:true},
}
- User Routes:
POST /register
: to register a new userPOST /login
: user login
- Admin Routes:
GET /all
: to get all usersPATCH /update/:id
: to update a user by their IDDELETE /delete/:id
: to delete a user by their ID
-
Attempting to register with the same email returns
{ message: "Email already exist" }
-
Successfull registration returns
{ message: "User successfully registered" }
-
Sending an unregistered email returns
{ message: "Email is not registered" }
-
Sending the wrong password returns
{ message: "Wrong Password" }
- Successfull login returns
{ message: "User successfully logged in", token }
where token is a randomly genererated string that can be used for authentication.
{
_id: ObjectId,
name: { type: String, required: true },
email: { type: String, required: true },
gender: { type: String, required: true },
password: { type: String,required: true },
}
- User routes:
GET /
: get all cart items of the logged in userPOST /add
: add item to cart (autogenerates userID and count). Increments the count if product already exists in cartPATCH /update/:id
: update a cart itemDELETE /delete/:id
: delete a cart item by id
productID
gets populated by product data including fields like_id
,title
,image
,price
,original_price
- On adding a product, if the product already exists, the count of that product increments in the cart (upto a quantity limit), otherwise it gets added. The response looks like
{ data, message: "Product successfully added to cart" }
, where data is the cart item after updation.
{
imageurl:{type: String,required:true},
image:{type: String,required:true},
price:{type: Number,required:true},
originalprice:{type: Number,required:true},
title:{type: String,required:true},
size:{type: Number,required:true},
quantity:{type: Number,required:true}
}
- userAuth: Verifies the token in header to check whether user is logged in. Applied on cart routes.
- adminAuth: Verifies the token in header to check whether admin is logged in. Applied on admin routes.
-
👤 Vivek Singh Tomar
-
Key-Responsibility -> Complete Admin Side
-
👤 Anubhav Dixit
-
Key-Responsibility -> Complete Backend
-
👤 Mrunali Gabhane
-
Key-Responsibility -> UI for Cartpage , Paymentpage , Addresspage
-
👤 Ritik Verma
-
Key-Responsibility ->Homepage , Login and Signup page
-
👤 Sumit Kolipyaka
-
Key-Responsibility ->Productspage , SingalProductpage
Throughout this project, I aimed to create a near-perfect replica of the original website by meticulously implementing its features and functionalities. This constructive experience has not only helped me gain confidence, but has also imparted valuable lessons that I can apply in real-world scenarios. As a result, I have successfully integrated most of the website's features and functionalities into my project.