Skip to content

Afzal-Mia/E-Commerce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

E-commerce Web App πŸ›’

Screenshots πŸ“Έ

Hero Section ✨

Hero Section

Women Clothes πŸ‘—

Women Clothes

Men Clothes πŸ‘•

Men Clothes

Admin πŸ‘©β€πŸ’»

Admin


You can view and interact with the live app here: E-commerce Web App

This e-commerce web app is built using various web technologies, including Express.js, MongoDB, and JWT Authentication. It allows users to manage products, user registration, login, and cart functionalities. The app provides endpoints for adding, removing, and retrieving products, as well as managing user data.

Skills and Technologies Used πŸ› οΈ

  • Express.js: A web framework for building RESTful APIs and server-side logic.
  • MongoDB: A NoSQL database for storing user and product data.
  • Mongoose: ODM (Object Document Mapping) library for interacting with MongoDB.
  • JWT Authentication: Secure user authentication using JSON Web Tokens for verifying and managing sessions.
  • Multer: Middleware for handling file uploads, such as product images.
  • CORS: Middleware to handle Cross-Origin Resource Sharing for allowing requests from different domains.
  • dotenv: For managing environment variables securely.
  • Node.js: JavaScript runtime for the server-side logic.
  • File System Operations: Handling product image storage and serving them from the server.

Features 🌟

  • User Registration and Login: Users can sign up and log in to the app using email and password.
  • Product Management: Admins can add, remove, and view products.
  • Cart Management: Users can add and remove items from their shopping cart.
  • Image Upload: Products can have images uploaded through the app.

Setup Instructions βš™οΈ

  1. Clone the repository.
  2. Install dependencies:
    npm install
  3. Set up a .env file to store your environment variables, including database credentials and JWT secret.
  4. Run the server:
    npm start

API Endpoints πŸš€

  • POST /signup: Register a new user.
  • POST /login: User login and JWT token generation.
  • POST /addproduct: Admin endpoint to add a new product.
  • POST /removeproduct: Admin endpoint to remove a product.
  • POST /upload: Upload product images.
  • POST /addtocart: Add an item to the user's cart.
  • POST /removefromcart: Remove an item from the user's cart.
  • POST /getcart: Retrieve the user's cart data.
  • GET /allproducts: Retrieve all products.
  • GET /newcollection: Retrieve the latest products for a new collection.
  • GET /popularinwomen: Retrieve popular products in the women category.

License πŸ“œ

This project is open-source under the MIT License.

About

E-commerce Web App

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published