Major Project: Product Management System with MongoDB Integration
Problem Statement:
You are tasked with developing a Product Management System (PMS) backend using
Express, connected to MongoDB. The PMS will allow users to perform CRUD
operations on products, view products by category, search products by name, sort
products by rating, add/remove products to/from favorites, and view detailed
product information. Additionally, you need to implement server-side rendering
using EJS templates for the home page, product detail page, and favorites page.
You should also provide a create view for adding new products.
Scenario:
1. MongoDB Integration:
● Connect your Express application to MongoDB using Mongoose for data
storage and retrieval.
● Define a schema for the product model with validation rules to ensure
data integrity. Required fields include:
● Product name
● Description
● Category
● Price
● Rating (1-5)
● Use Mongoose validation to ensure that all required fields are
provided and that rating falls within the specified range.
2. CRUD Operations:
● Implement CRUD functionality for managing products.
● Users should be able to create, read, update, and delete products.
3. Server-side Rendering with EJS:
● Create EJS templates for the home page, product detail page,
favorites page, and create view.
● Use EJS syntax to dynamically render product information and handle
user interactions.
4. Navigation and Filtering:
● Design a navbar for easy navigation with links to different categories.
● Implement functionality to filter products by category, search
products by name, and sort products by rating
(ascending/descending).
5. Favorites Functionality:
● Allow users to add/remove products to/from their favorites list.
● Provide a separate page to view all favorite products.
6. Error Handling with Express Validator:
● Use Express-validator middleware to handle form validation and error
messages.
● Ensure proper error handling for all CRUD operations and user inputs.
7. Image Upload with Multer:
● Implement image upload functionality using Multer middleware.
● Allow users to upload product images during product creation/editing.
8. Responsive Design with Bootstrap/CSS:
● Use Bootstrap or custom CSS to make your application responsive
across different devices.
● Ensure proper styling and layout for a seamless user experience.
Deliverables:
● Complete Express backend codebase with MongoDB integration and CRUD
operations.
● EJS templates for home page, product detail page, favorites page, and
create view.
● Screenshots captured from Postman showing successful CRUD operations
and output views.
● Zip file of the codebase, excluding the node_modules folder.
Mini Project: Blog Management System with Authentication
Problem Statement:
Your task is to develop a simple backend system for managing a blog platform using
Express. You'll start by implementing basic CRUD (Create, Read, Update, Delete)
operations for blog posts. Then, you'll enhance the application by adding
authentication using both session-based and JWT-based methods. Finally, you'll
test the authenticated endpoints using Postman. Optionally, you can connect your
application to MongoDB for persistent data storage.
Scenario:
1. Create Operation:
● Users should be able to create new blog posts by sending a POST
request to the /posts endpoint with post details in the request body.
Required fields include:
● Title
● Content
● Ensure that both title and content are provided.
2. Read Operation:
● Users should be able to retrieve all blog posts by sending a GET
request to the /posts endpoint.
● Users should also be able to retrieve a specific blog post by its ID
using a GET request to /posts/:id.
3. Update Operation:
● Users should be able to update an existing blog post by sending a PUT
request to /posts/:id with updated post details.
4. Delete Operation:
● Users should be able to delete an existing blog post by sending a
DELETE request to /posts/:id.
Authentication:
● Implement authentication using both session-based and JWT-based
methods.
● Provide login and register routes for user authentication.
Deliverables:
● Complete Express backend codebase with CRUD operations and
authentication.
● Screenshots captured from curl and Postman showing successful CRUD
operations.
● Zip file of the codebase, excluding the node_modules folder.