E-Commerce Web Application Report
E-Commerce Web Application Report
Scenario:
A start-up wants a basic e-commerce platform for selling their products online. The student is
assigned to
Key Skills Used: React (UI), Node.js & Express (API), MongoDB (database)
AIM
To build a basic e-commerce web application using the MERN stack (MongoDB, Express, React,
Node.js)
that allows users to register, browse products, add items to the cart, and checkout. The app includes
role-based access for admin and customers to manage products and orders.
PROCEDURE
- Initialize separate projects for backend (Node.js + Express) and frontend (React.js).
2. Backend Development:
- Configure Express server and establish connection with MongoDB.
- Implement REST API routes for user authentication, product CRUD operations, and order
processing.
3. Frontend Development:
- Create React components/pages for Home (product listing), Product Details, Login/Register,
4. Styling:
- Apply Bootstrap classes and custom CSS for a responsive and user-friendly interface.
- Test the application for functionalities such as user login, product browsing, cart actions, and
- Optionally deploy backend and frontend on platforms like Heroku, Netlify, or Vercel.
MAIN CODE
----------------------------
app.use(express.json());
name: String,
price: Number,
image: String,
category: String,
});
res.json(products);
});
---------------------------------
function ProductList() {
useEffect(() => {
axios.get('http://localhost:5000/api/products')
return (
<div className="container">
<h2>Products</h2>
<div className="row">
{products.map(p => (
<div className="card-body">
<h5>{p.name}</h5>
<p>Price: Rs.{p.price}</p>
</div>
</div>
))}
</div>
</div>
);
OUTPUT
On launching the app, users can view a list of available products with images, names, and prices.
Customers can register/login, add products to their cart, and proceed to checkout. Admins can
RESULT
The e-commerce web application successfully demonstrates core functionalities including user
authentication, product browsing, cart management, and order processing. The system supports
role-based access and provides a responsive UI for both customers and admins.