Skip to content

Latest commit

 

History

History
45 lines (35 loc) · 1.71 KB

README.md

File metadata and controls

45 lines (35 loc) · 1.71 KB

E-Commerce Backend with Passport.js

This repository contains the backend for an e-commerce website, built using Node.js and Express.js. The backend is designed to handle user authentication, product management, and order processing, leveraging Passport.js for secure and flexible user authentication.

Features

  • User Authentication: Secure user login and registration using Passport.js.
  • Product Management: APIs for adding, updating, deleting, and retrieving products.
  • Order Processing: APIs for managing user orders, including order creation, status updates, and order history.
  • Role-Based Access Control: Different access levels for admins and regular users.
  • Database Integration: Uses MongoDB for data storage and Mongoose for object data modeling.

Technologies Used

  • Node.js: JavaScript runtime for building scalable server-side applications.
  • Express.js: Web application framework for Node.js.
  • Passport.js: Middleware for authentication.
  • MongoDB: NoSQL database for data storage.
  • Mongoose: ODM library for MongoDB and Node.js.

Getting Started

Prerequisites -Node.js -MongoDB Installation

Clone the repository: git clone https://github.com/your-username/ecommerce-backend-passportjs.git cd ecommerce-backend-passportjs

Install dependencies: npm install Set up environment variables: Create a .env file in the root directory and add the following variables: DATABASE_URL= SECRET_KEY=

Start the server:npm start API Documentation The API documentation is available at API Documentation.

Contributing

Contributions are welcome! Please read the contributing guidelines before getting started.

License

This project is licensed under the MIT License - see the LICENSE file for details.