Coder Social home page Coder Social logo

roy7077 / e-commerce-website Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 46.57 MB

A full-featured e-commerce application built with the MERN (MongoDB, Express.js, React.js, Node.js) stack. It includes secure user authentication, product search, cart management, and order handling with refunds. The application is fully responsive, providing an optimal experience across all devices.

Home Page: https://payment-gateway-lilac.vercel.app

HTML 2.31% JavaScript 76.84% CSS 20.85%
ecommerce ecommerce-website react css expressjs mongodb mongodb-atlas mongoose node-js razorpay-payment razorpay-payment-gateway reactjs redux-toolkit responsive-design

e-commerce-website's Introduction

E-Commerce Web Application

This is an e-commerce web application built with the MERN (MongoDB, Express.js, React.js, Node.js) stack. The application includes features like user authentication, product search, cart management, and handling of ordered and refunded products.

Features

  • User Authentication: Secure login and signup functionality.

  • Product Search: Search products and view product details.

  • Cart Management: Add and remove products from the cart.

  • Order Management: View ordered and refunded products.

  • Responsive Design: Fully responsive layout for all devices.

Tech Stack

  • Frontend: React.js

  • Backend: Node.js, Express.js , Razorpay

  • Database: MongoDB

  • Styling: CSS, CSS Modules

Getting Started

Prerequisites

  • Node.js

  • npm or yarn

  • MongoDB

Installation

  1. bashCopy codegit clone https://github.com/roy7077/payment-gateway.gitcd ecommerce-app

  2. bashCopy codecd servernpm install

  3. bashCopy codecd ../clientnpm install

Environment Variables

Create a .env file in the server directory and add the following environment variables:

MONGO_URI=your_mongodb_connection_string  
JWT_SECRET=your_jwt_secret  
RAZORPAY_KEY_ID=your_razorpay_key_id  
RAZORPAY_KEY_SECRET=your_razorpay_key_secret   `

Running the Application

  1. bashCopy codecd server npm start

  2. bashCopy codecd ../client npm start

API Endpoints

Authentication

  • POST /api/v1/signup - Register a new user

  • POST /api/v1/login - Authenticate user and get token

Payment

  • GET /api/v1/getkeyid - Get Razorpay Key ID

  • POST /api/v1/capturepayment - Capture payment

  • POST /api/v1/refundpayment - Refund payment

  • GET /api/v1/fetchallpayments - Fetch all payments

  • GET /api/v1/getpaymentdetails/:id - Get payment details by ID

  • GET /api/v1/fetchcarddetails - Fetch card details

  • POST /api/v1/paymentverification - Verify payment

POSTMAN LINK - https://www.postman.com/roy707/workspace/shop-cart/collection/32632569-0177389f-3ffc-4d24-a8bb-9c869782bc67?action=share&creator=32632569

Cart Management

  • POST /api/v1/addtocart - Add product to cart

  • DELETE /api/v1/removefromcart - Remove product from cart

  • POST /api/v1/showcartitems - Show all cart items

Order Management

  • POST /api/v1/orderedproducts - Show all ordered products

  • POST /api/v1/refundedproducts - Show all refunded products

DB Schema

Ecommerce_DB

Contribution

Feel free to submit issues or pull requests if you have suggestions or improvements.

License

This project is licensed under the MIT License.

e-commerce-website's People

Contributors

roy7077 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.