This is my work during learning backend web development.
This is an e-commerce-Node.js application built with Express.js, Mongoose, and MongoDB, following the MVC (Model-View-Controller) design pattern.
-
User Accounts: Enable users to create accounts and log in to the platform.
-
Contact Information: Allow users to store personal details like their name, email, and phone number.
-
Address Management: Provide users with the ability to add multiple addresses to their account.
-
Payment Methods: Enable users to add and manage multiple payment methods.
-
Product Catalog: Develop a system capable of handling a wide range of products.
-
Categorization: Implement a category structure for products, allowing items to belong to one or more categories.
-
Inventory Tracking: Keep track of product availability by monitoring stock levels.
-
Shopping Cart: Facilitate users' shopping experience by letting them add items to a cart. Carts can be saved for logged-in users.
-
Order Placement: Require users to provide both payment and address details when placing an order.
-
Shipping Options: Provide users with a selection of shipping methods, each associated with a fixed price.
-
Order Progress: Implement an order processing system with stages such as order processing, delivery in progress, and order delivered.
-
Customer Reviews: Allow users to leave reviews for purchased products, including a rating and written feedback.
-
Promotions: Enable the platform to run promotions, allowing discounts on specific product categories.
-
Image:
- _id => ObjectId (Automatically generated primary key)
- secure_url => String
- public_id => String
-
Category:
- _id => ObjectId (Automatically generated primary key)
- name => String
- slug => String
- image => Embedded Image document
-
Subcategory:
- _id => ObjectId (Automatically generated primary key)
- name => String
- slug => String
- category_id: ObjectId (Reference to Category)
-
Brand:
- _id => ObjectId (Automatically generated primary key)
- name => String
- slug => String
- image => Embedded Image document
-
Product:
- _id => ObjectId (Automatically generated primary key)
- name => String
- slug => String
- mainImage => Embedded Image document
- images => [Embedded Image documents]
- description => String
- price => Number
- discount => Number
- priceAfterDiscount => Number
- ratingAvg => Number
- rateCount => Number
- stock => Number
- soldItems => Number
- category_id: ObjectId (Reference to Category)
- subcategory_id: ObjectId (Reference to Subcategory)
- brand_id: ObjectId (Reference to Brand)
- createdBy: ObjectId (Reference to User)
- updatedBy: ObjectId (Reference to User)
-
Review:
- _id => ObjectId (Automatically generated primary key)
- title => String
- content => String
- rate => Number
- product_id: ObjectId (Reference to Product)
- customer_id: ObjectId (Reference to User)
-
Address:
- _id => ObjectId (Automatically generated primary key)
- street => String
- city => String
- zipCode => Number
- country => String
- defaultAddress => Boolean
-
User:
- _id => ObjectId (Automatically generated primary key)
- firstName => String
- lastName => String
- slug => String
- email => String
- password => String
- phone => String
- addresses: [Embedded Address documents]
- role => String
- verifiedEmail => Boolean
- blocked => Boolean
- deactivated => Boolean
- wishlist: [ObjectID] (References to Products)
-
Cart:
- _id => ObjectId (Automatically generated primary key) More attributes will be added later
-
Coupon:
- _id => ObjectId (Automatically generated primary key)
- code => String
- expiresAt => Date
- discount => Number
- active => Boolean
- customerIds: [ObjectID] (References to Users)
-
Order:
- _id => ObjectId (Automatically generated primary key) More attributes will be added later
- GitHub - IMostafaR
- Linkedin - @imostafarh