Welcome to the README file for the E-commerce project, a comprehensive full-stack application crafted to streamline the online shopping experience. Leveraging a diverse array of technologies and frameworks, this project aims to provide a robust and scalable e-commerce website. Key features include product listings, efficient shopping cart management, secure user authentication, seamless order processing, integrated payment solutions, email notifications, encrypted password handling, and the implementation of web token authentication.
The project adopts a methodical and modularized approach to ensure ease of maintenance and extensibility. Here is an overview of the primary directories and files:
-
Frontend: Within this directory lies the React frontend code for the e-commerce website. It encompasses components, pages, styles, and files associated with the user interface. -
Server: The server directory hosts the Node.js and Express backend code. It covers routes, services, models, and middleware responsible for managing API requests and implementing the core business logic. -
Database: This directory houses the Mongoose schemas and models used to define the data structure and interact with the MongoDB database. -
src: This directory holds static assets such as images, stylesheets, and client-side JavaScript files. -
README.md: The primary README file providing essential information about the project.
To locally set up the project, follow the following steps:
- Clone the repository:
git clone https://github.com/ANMOLYADAV1402/Ecommerce.git - Navigate to the project directory:
cd Ecommerce-React-Project - Install dependencies for the client and server:
- For the client, run
cd Frontend/e-commerce-app && npm install - For the server, run
cd Backend/Server && npm install
- For the client, run
- Create a
.envfile in the server directory and input the required environment variables as specified in.env.example. - Set up a MongoDB database and update the connection details in the
.envfile. - Install necessary dependencies, navigate to the Server directory, and run
npm i express jwt ejs nodemailer bcrypt path mongoose stripe dotenv cors body-parser nodemon - Run the server and client separately:
- For the client, navigate to the e-commerce-app directory (
cd Frontend/e-commerce-app) and executenpm start. - For the database, navigate to the Backend directory (
cd Backend) and runmongod --dbpath "./Database". - For the server, navigate to the Server directory (
cd Backend/Server) and runnodemon index.js. - To set up the Stripe server, navigate to the Server directory (
cd Backend/Server) and runstripe login. - For payment processing, navigate to the Server directory (
cd Backend/Server) and executestripe listen --forward-to localhost:portNumber/webhook/webhook. - Connect the webhook by navigating to the Server directory (
cd Backend/Server) and runningstripe trigger payment_intent.succeeded.
- For the client, navigate to the e-commerce-app directory (
After successfully setting up and running the project, you can access the E-commerce website by navigating to http://localhost:3000 in your web browser. Upon reaching the homepage, you'll find a display of product listings. Feel free to explore various categories, add items to your cart, and proceed to the checkout process. Utilize user authentication to manage orders and access personalized features throughout your shopping experience.
The project incorporates the following technologies and frameworks:
- HTML: The standard markup language for creating web pages.
- CSS: A stylesheet language for styling HTML documents.
- JavaScript: A programming language for adding interactivity and functionality to web pages.
- Bootstrap: A popular CSS framework for building responsive and mobile-first websites.
- React: A JavaScript library for building user interfaces.
- Node.js: A JavaScript runtime environment for server-side development.
- Express: A flexible and minimal web application framework for Node.js.
- EJS: A templating engine for generating dynamic HTML pages.
- Mongoose: An object data modeling (ODM) library for MongoDB and Node.js.
- MongoDB: A popular NoSQL database for storing application data.
- Stripe: A payment processing platform for securely handling online transactions.
- Nodemailer: A module for sending email notifications from Node.js applications.
- bcrypt: A library for password hashing and encryption.
- JWT: JSON Web Tokens for secure authentication and authorization.
Payment
Order Summary
If mongoose is shutting down, run pkill mongod
I welcome contributions to the project! If you come across any bugs, have suggestions for enhancements, or wish to introduce new features, feel free to open an issue or submit a pull request.
When contributing, please maintain consistency with the existing code style, adhere to best practices, and ensure comprehensive testing of your modifications. Your attention to these guidelines will help maintain the project's integrity and facilitate the review process.












