A virtual ecommerce website using Node js, Express js, and Mongoose.
NOTE: Please read the RUN section before opening an issue.
The website resembles a real store and you can add products to your cart and pay for them. If you want to try the checkout process, you can use the dummy card number with any expiration date, CVC, and zip codes. Please DO NOT provide real card number and data.
In order to access the admin panel on "/admin"
- MONGO_URI: this is the connection string of your MongoDB database.
Now you can run "npm start" in the terminal and the application should work.
The application is built with:
- Node.js version 12.16.3
- MongoDB version 4.2.0
- Express version 4.16.1
- Bootstrap version 4.4.1
- FontAwesome version 5.13.0
The application displays an online store that contains products.
Users can do the following:
- Create an account, login or logout
- Browse available products added by the admin
- Add products to the shopping cart, a user must be logged in
- Delete products from the shopping cart
- Display the shopping cart
- The profile contains all the orders a user has made
Admins can do the following:
- View all the information stored in the database. They can view/add/edit/delete orders, products and categories.
All the models can be found in the models directory created using mongoose.
- username (String)
- password (String)
- title (String)
- imagePath (String)
- description (String)
- price (Number)
- category (ObjectId - a reference to the category)
- createdAt (Date)
- items: an array of objects, each object contains:
~ productId (ObjectId - a reference to the product)
~ qty (Number)
~ price (Number)
~ title (String) - totalQty (Number)
- totalCost (Number)
- user (ObjectId - a reference to the user)
- createdAt
- Cash On Delivery
- Online Payment(Razorpay Payment Gateway)
- user (ObjectId - a reference to the user)
- cart (instead of a reference, we had to structure an object identical to the cart)
- address (String)
- paymentId (String)
- createdAt (Date)
- Delivered (Boolean)