Objective:
Develop a simple web application that allows users to raise complaints, and administrators
to view and address those complaints. The application will use MongoDB for data storage,
Node.js with Next for the backend, and React for the frontend. The system will also include
email notifications when complaints are submitted or updated.
Requirements:
1. User Interface:
● Complaint Submission (User Interface):
○ Users should be able to submit complaints via a form that includes the
following fields:
■ Complaint Title (Text input)
■ Description (Text area)
■ Category (Dropdown selection) – predefined list (e.g., "Product",
"Service", "Support").
■ Priority (Radio buttons) – Options: "Low", "Medium", "High".
■ Submit Button – Submits the complaint to the backend.
● Complaint Management (Admin Interface):
○ Admins should be able to view all complaints in a table, which includes:
■ Complaint Title
■ Category
■ Priority
■ Date Submitted
■ Status (Dropdown: "Pending", "In Progress", "Resolved")
○ Admins can:
■ View complaint details.
■ Update the status of complaints (mark as "Resolved").
■ Filter complaints based on status or priority.
2. Backend & Database (Using MongoDB):
● MongoDB Setup:
○ Use MongoDB to store complaints with the following structure:
■ Complaint Schema:
■ title (String)
■ description (String)
■ category (String)
■ priority (String)
■ status (String: "Pending", "In Progress", "Resolved")
■ dateSubmitted (Date)
○ Implement the following CRUD operations:
■ Users: Create complaints (POST).
■ Admins: Read complaints (GET), Update complaints (PUT), Delete
complaints (DELETE).
● API Endpoints:
○ POST /complaints – For users to create new complaints.
○ GET /complaints – For admins to view all complaints.
○ PUT /complaints/
– For admins to update complaint status or details.
○ DELETE /complaints/
– For admins to delete complaints.
3. Email Notification Functionality:
● Integrate email functionality using NodeMailer (or an alternative email service like
SendGrid or Mailgun) to send email notifications in the following cases:
○ Email on New Complaint Submission:
■ When a user submits a new complaint, an email should be sent to the
admin notifying them about the new complaint.
■ The email should include details such as the complaint title, category,
priority, and description.
○ Email on Status Update:
■ When an admin updates the status of a complaint (e.g., marking it as
"Resolved"), an email should be sent to the admin confirming the
update.
■ The email should include the complaint title, the new status, and the
date it was updated.
4. Frontend (React):
● React UI for handling user interactions, including:
○ A form for submitting complaints.
○ A table for displaying complaint data with filtering options for status and
priority.
○ The application should be responsive and work across mobile and desktop
views.
Deliverables:
● Public GitHub repository with complete source code.
● README file that includes:
○ Setup instructions (how to install dependencies, run the app locally, etc.).
○ Description of how to use the application.
○ Information about the email functionality (how to configure SMTP or email
service).
○ MongoDB setup instructions.
● A live demo link of the application (preferably deployed using a service like Heroku
or Vercel).
Evaluation Criteria:
● Code quality and organization (clean, modular code).
● Correct implementation of CRUD operations with MongoDB.
● Functional email notifications: Admins should receive emails on new complaints
and status updates.
● UI/UX design – Clean and responsive interface.
● Use of Git and GitHub (commits, branches, PRs).
Brownie Points (Optional for further challenge):
● JWT Authentication: Implement a JWT-based authentication system to secure the
app, where users need to log in to submit complaints and admins need to log in to
manage complaints.
● Deploy the application on platforms like Heroku, Vercel, or AWS and provide a live
demo link.