Skip to content

This is an online shop web application built with Node.js. It provides a platform for users to browse and purchase products.

Notifications You must be signed in to change notification settings

maryamalsadat-tabatabaei/Node.js-Online-Shop-Web-App

Repository files navigation

Node.js Online Shop Web App

This is an online shop web application built with Node.js. It provides a platform for users to browse and purchase products. The application uses Mongoose for data models, Express for routing and handling requests and responses, and EJS as the view engine. It follows the Model-View-Controller (MVC) architectural pattern.

Admin Products Page Shop Products Page Add Product Page Edit Product Page Product Detail Page Cart Page Order Page Invioce PDF Download Page Invioce PDF Download Page Sigup Page Login Page

Table of Contents

Installation

  1. Clone the repository: git clone https://github.com/maryamalsadat-tabatabaei/Node.js-Online-Shop-Web-App.git
  2. Navigate to the project directory: cd Node.js-Online-Shop-Web-App
  3. Install dependencies: npm install
  4. Start the application: npm start
  5. Open your browser and visit http://localhost:3000

Configuration

To configure the project, create .env file and add the following variables:

  • DB_PASSWORD
  • MONGO_DB_PASSWORD
  • MONGO_DB_USER
  • MONGO_DB_COLLECTION
  • MONGO_DB_PORT
  • SENDGRID_API_KEY
  • SRRIPE_API_KEY

Features

  • The online shop web app provides the following features:

    • User Authentication: Users can log in to their accounts to access personalized features.
    • Product Browsing: Users can view all products available in the shop.
    • Product Details: Users can access detailed information about each product.
    • Cart Functionality: Users can add products to their cart for later purchase.
    • Ordering: Users can place orders for the products in their cart and receive an invoice.
  • Admin users have additional capabilities:

    • Product Management: Admins can add, edit, and delete products from the shop.

API Documentation

GET /admin/products: Get all the admin products.
GET /admin/add-product: Get the add product page.
POST /admin/add-product: Save a product.
GET /admin/edit-product/:productId: Retrieve the product.
POST /admin/edit-product: Update the product.
POST /admin/delete-product: Delete product.
GET /product-list: Get all the products.
GET /: Get all the products.
GET /product-list/:productId: Get the product details.
GET /cart: Get the cart products.
POST /cart: Delete the products from the card and put them in the order list.
POSt /cart-delete-item: Delete the product from the cart.
GET /orders: Get the ordered products.
POST /create-order: Order the products.
GET /checkout: Checkout the product order.

Dependencies

The following dependencies are used in this application:

  • express: Fast, unopinionated, minimalist web framework for Node.js.
  • mongoose: Elegant MongoDB object modeling for Node.js.
  • ejs: Embedded JavaScript templates for rendering views.
  • body-parser: Node.js body parsing middleware.

Project Background

This project is based on Maximilian Schwarzmüller's tutorial on Udemy Complete Node.js. I have made modifications and I built upon that foundation to extend the project's functionality and address specific requirements. However, the core concept and initial implementation were inspired by the course and the work of the original author.

About

This is an online shop web application built with Node.js. It provides a platform for users to browse and purchase products.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published