Skip to content

Repository files navigation

GitHub repo size GitHub language count Contributors Stargazers MIT License LinkedIn Gmail


Logo

Online Shop Project

This project is a full-featured online shop application built with Node.js, Express.js, and MongoDB. It includes core features like user authentication, product management, shopping cart functionality, and order processing, providing a practical, real-world example of a Node.js application.

Visit the deployed application: Online Shop Deployment
Note: Due to free tier limitations, expect delays on first load due to app sleep mode.

Note: This project is derived from the Udemy course NodeJS - The Complete Guide (MVC, REST APIs, GraphQL, Deno) by Maximilian Schwarzmüller.

Table of Contents
  1. About The Project
  2. Key Components and Features
  3. Additional Concepts Covered
  4. Learning Objectives
  5. Build Requirements
  6. Getting Started
  7. Deployment
  8. Usage
  9. License
  10. Contributors
  11. Contact

About The Project

image

This online shop project simulates a functional e-commerce application where users can browse products, add items to a cart, and complete a checkout process. It covers the essential features of web development, including:

  • Product Management: Admins can add, edit, and delete products.
  • User Authentication: Users can sign up, log in, and manage their accounts.
  • Shopping Cart: Users can add products to the cart, update quantities, and proceed to checkout.
  • Order Management: Includes checkout process, order history, and payment processing.
  • Responsive Design: Ensures compatibility across devices.

Technologies Used

  • Node.js: Backend server to handle requests and data processing.
  • Express.js: Framework for creating server routes and API endpoints.
  • MongoDB: Database for storing user, product, and order information.
  • EJS: For rendering dynamic web pages.
  • Stripe: For payment processing.
  • SendGrid: For sending emails, including registration confirmations and password resets.
  • Render: For deploying the application, providing a seamless deployment process.

(back to top)

Key Components and Features

Product Management

  • View Products: Users can view a list of products with descriptions, prices, and images.
  • Admin Access: Admins can add, edit, and delete products, demonstrating CRUD operations.

User Authentication

  • Sign Up and Login: Users can create accounts and log in securely.
  • Access Control: Restricts certain actions to authenticated users only.
  • Email Confirmation: Sends confirmation emails upon registration using SendGrid.
  • Password Reset: Sends password reset links for account recovery.

Shopping Cart

  • Add to Cart: Users can add products, adjust quantities, and remove items from their cart.
  • Persisted Data: Cart data is stored in sessions or associated with user accounts.

Order Management

  • Checkout and Orders: Users can place orders and receive a summary; admins can view all orders.
  • PDF Invoices: Generates PDF invoices, demonstrating file generation and handling.

Database Integration

  • MongoDB & Mongoose: Stores data for products, users, carts, and orders, managed with Mongoose.
  • Data Modeling: Uses schema validation to structure data and ensure consistency.

Server-Side Rendering with EJS

  • Dynamic HTML Views: Renders dynamic HTML views with real-time data from the database.

SendGrid Integration

  • Email Confirmation: Sends a confirmation email upon user registration.
  • Password Reset: Sends password reset links, enhancing account security.

Additional Concepts Covered

  • Form Validation: Ensures proper validation of user inputs in registration and checkout forms.
  • Error Handling: Implements user-friendly error messages and error-handling best practices.
  • Responsive Design: Ensures compatibility with a range of devices.

(back to top)

Learning Objectives

By completing this project, you will:

  • Build a CRUD application with secure user authentication.
  • Implement the MVC pattern for organized code.
  • Integrate with a NoSQL database using Mongoose.
  • Generate files (PDF invoices) and handle file downloads in Express.
  • Manage user sessions and apply security practices with authentication.

(back to top)

Build Requirements

  • Node.js (v14.x or later)
  • MongoDB: Local or Atlas instance.
  • Stripe Account: For payment processing.

(back to top)

Deployment

This project is deployed using Render. Please note the following regarding the deployment:

  • Free Tier Limitations: Due to the limitations of the free tier on Render, the instance will spin down with inactivity, which can delay requests by 50 seconds or more.

Visit the deployed application: Online Shop Deployment

(back to top)

Getting Started

Installation

  1. Clone the repository
    git clone https://github.com/RamMichaeli17/Online-Shop.git
  2. Install NPM packages
    npm install
  3. Set up environment variables
    • Create a .env file and add your credentials:
      MONGO_DEFAULT_DATABASE=your_mongo_default_database
      MONGO_PASSWORD=your_mongo_password
      MONGO_USER=your_mongo_user
      NODE_ENV=your_node_env
      PORT=your_port
      SENDGRID_KEY=your_sendgrid_key
      STRIPE_KEY=your_stripe_key
  4. Start the server
    npm start

(back to top)

Usage

  • Admin Panel: Manage products (add, edit, delete).
  • User Registration and Login: Create an account and log in.
  • Shopping Cart: Add products to the cart and manage them.
  • Checkout Process: Complete the purchase with payment and view order history.

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contributors

Thanks to the following people who have contributed to this project:


Ram Michaeli

(back to top)

Contact

Ram Michaeli - ram153486@gmail.com

Project Link: https://github.com/RamMichaeli17/Online-Shop

(back to top)

About

A comprehensive e-commerce application built with Node.js, Express.js, and MongoDB. Features include user authentication, product management, shopping cart functionality, order processing, and responsive design. Derived from the Udemy course by Maximilian Schwarzmüller.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages