Skip to content

mrvivekdev/E-commerce_Backend

Repository files navigation

E-COME BACKEND

The backend of your e-commerce site, built with Node.js and Express.js, uses MongoDB for data storage and Mongoose for CRUD operations. It implements JWT for authentication, bcrypt for password hashing, and Multer for handling file uploads. The code follows the MVC architecture, includes CORS for secure cross-origin requests, and integrates NodeMailer for OTP email verification. Security is ensured through user session management and error handling.

Authors

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

PORT=

MONGODB_URL=

JWT_KEY=

EMAIL_SENDER_MAIL=

EMAIL_APP_PASSWORD=

SERVER_IP=

BANNER_IMAGE_NAME=

Contributing

  1. Respect the Code of Conduct: Treat all contributors with respect and kindness. No harassment or inappropriate behavior.

  2. Write Clean, Maintainable Code: Ensure your code is well-organized, readable, and properly documented.

  3. Be Open to Feedback: Review comments are an opportunity to improve your code. Engage positively and be ready to make necessary changes.

Documentation

This is the backend API for the E-Commerce Platform. The backend is built using Node.js and Express.js, with MongoDB as the database and Mongoose for data modeling. The API handles authentication, product management, user management, and order processing.

Key Technologies

  • Node.js and Express.js for backend framework.
  • MongoDB for the database.
  • Mongoose for MongoDB object modeling.
  • JWT for authentication.
  • bcrypt for password hashing.
  • Multer for file upload handling.
  • CORS for handling cross-origin requests.
  • NodeMailer for OTP-based email verification.

Getting Started

To get a local copy up and running, follow these steps:

Prerequisites

  • Node.js installed on your machine.
  • MongoDB set up and running.

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/ecommerce-backend.git
    
  2. Entraing into Repo:

    cd ecommerce-backend
    
    
  3. installing dependencies:

    npm install
    
  4. Start the server:

    node index.js
    nodemon index.js
    
    

This version includes an "End" section at the end, which thanks the users and encourages them to report bugs or reach out if they encounter any issues. Let me know if you need any further adjustments!