Skip to content

duske953/Ecommerce-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tech-freak: Server for Tech-Freak E-Commerce Web App

1. Project Description:

This repository serves as the backend for the Tech Freak e-commerce web application. It handles functionalities like:

  • User authentication and management (signup, login, password reset)
  • Product data management (CRUD operations)
  • Order processing
  • Email notifications

2. Technologies:

3. Security Features:

  • Rate limiting: Implemented to prevent malicious overuse of the API and protect against denial-of-service attacks.
  • CORS (Cross-Origin Resource Sharing) handling: Ensures secure communication between the frontend and backend, preventing unauthorized cross-origin requests.
  • Robust error handling: Provides informative error messages for troubleshooting and prevents unexpected application crashes.
  • CSRF (Cross-Site Request Forgery) protection: Mitigates the risk of unauthorized actions being performed on a user's account by an attacker.

4. Frontend:

This backend is designed to work seamlessly with the corresponding frontend repository: https://github.com/duske953/ecommerce-frontend.

Prerequisites:

  • Node.js and npm (or yarn) installed on your machine.

Installation:

  1. Clone this repository.
  2. Navigate to the project directory.
  3. Run npm install (or yarn install) to install all required dependencies.

Configuration:

  1. Create a .env file in the project root directory.
  2. Add environment variables for sensitive information like:
    • Database connection details (URI, username, password)
    • JWT secret key
    • Stripe API keys

6. Important Note:

  • This project is intended solely for demonstration purposes. Please note that while Stripe integration is included, it is not intended for real-world transactions and should not be used in a production environment.

7. Additional Notes:

  • Refer to the official documentation of each technology listed above for detailed usage and configuration information.
  • The backend architecture utilizes:
    • Express.js for building the RESTful API.
    • Mongoose for interacting with the MongoDB database.
    • JWT for user authentication and authorization.
    • Nodemailer for sending email notifications.
    • Stripe for payment processing