0% found this document useful (0 votes)
32 views51 pages

Overview Merged

The project report presents the 'Smart City Complaint System with AI Study Assistant,' aimed at addressing civic issues and enhancing educational support in rural areas. It features a complaint management system that allows citizens to report issues online and an AI study assistant that provides various academic tools. Built using the MERN stack, the platform promotes digital literacy and efficient governance, making it a scalable solution for smart villages.

Uploaded by

golukr7643
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views51 pages

Overview Merged

The project report presents the 'Smart City Complaint System with AI Study Assistant,' aimed at addressing civic issues and enhancing educational support in rural areas. It features a complaint management system that allows citizens to report issues online and an AI study assistant that provides various academic tools. Built using the MERN stack, the platform promotes digital literacy and efficient governance, making it a scalable solution for smart villages.

Uploaded by

golukr7643
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 51

A Project Report On

“SMART CITY COMPLAINT SYSTEM WITH AI STUDY ASSISTANT”


A project submitted in partial fulfillment of the requirements for the award of degree
of

BACHELOR OF TECHNOLOGY
In
COMPUTER SCIENCE AND ENGINEERING

Submitted by

SUDHIR KUMAR 21105128005


RAM BHOLA KUMAR 21105128004
SATISH KUMAR 21105128008
Under the supervision of
Prof. AMIT KIUMAR
(Assistant Professor)

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


B.P. MANDAL COLLEGE OF ENGINEERING MADHEPURA - 852113

MAY – 2025

i
CERTIFICATE

This is to certify that the dissertation titled “SMART CITY COMPLAINT SYSTEM WITH
AI ASSISTANT” which is being submitted by Sudhir Kumar (21105128005), Ram Bhola Kumar
(21105128004), Satish Kumar (21105128008) for the partial fulfillment of the requirements for the
award of degree of Bachelor of Technology (B. Tech.) in Computer Science and Engineering
Department iis a record of the student’s own work carried out at Department of in Computer Science
and Engineering, B.P. Mandal College of Engineering Madhepura, Bihar, under my supervision and
guidance. The matter embodied in this thesis has not been submitted elsewhere for the award of any
other degree.

Prof. Amit Kumar


(Project Guide)
Department of Computer Science and Engineering
B.P.Mandal College of Engineering ,Madhepura

Prof. Murlidhar Prasad Singh


(Head of the Department)
Department of Computer Science and Engineering,
B.P. Mandal College of Engineering, Madhepura

Date : ……………………

Place : …………………...

ii
DECLARATION

We certify that,
a. The work contained in this project report is original and has been done by us the final year
students of Computer Science and Engineering under the general supervision of our professor.
b. The work has not been submitted to any other Institute for degree.
c. We have followed the Institute norms and guidelines and abide by the regulation as given
code of conduct of the Institute.
d. Whenever I have used materials (data, theory and text) from other sources, we have given
due credit to them by citing them in the text of the thesis and giving their details in the
reference section.

SUDHIR KUMAR 21105128005


RAM BHOLA KUMAR 21105128004
SATISH KUMAR 21105128008

iii
ACKNOWLEDGEMENTS

We feel immense pleasure and privilege to express my deep sense of gratitude, indebtedness
and thankfulness towards my supervisor, Prof. Amit Kumar (Assistant Professor), Department of in
Computer Science and Engineering, for his invaluable guidance, constant supervision, continuous
encouragement and support throughout this work. His suggestions and critical views have greatly
helped us in successful completion of this work.

We also take the opportunity to acknowledge the contribution of Prof. Murlidhar Prasad
Singh, HOD of Computer Science and Engineering, B.P Mandal College of Engineering, Madhepura
for his support and guidance during the development of project.

We also wish to record our profound gratitude to Prof. Arbind Kumar Amar, the Principal of
B.P Mandal College of Engineering, Madhepura for his love, motivation and encouragement which he
shows towards us throughout our work.

We feel most obliged to our parents and all our family members for their affection and constant support
for our education and overall well-being.

Lastly, We express thanks to the Almighty for his generous blessings and giving us courage to
complete the project with great satisfaction.

SUDHIR KUMAR
(21101128005)
RAM BHOLA KUMAR
(21105128004)
SATISH KUMAR
(21105128008)

iv
CERTIFICATE OF APPROVAL

The project work entitled "SMART CITY COMPLAINT SYSTEM WITH AI ASSISTANT"
submitted by Sudhir Kumar (21105128005), Ram Bhola Kumar (21105128004), Satish Kumar
(21105128008) has been examined by us and is hereby approved for the completion of 8th Semester,
B. Tech (COMPUTER SCIENCE AND ENGINEERING.), for which it has been submitted. It is
understood that by this approval the undersigned does not necessarily endorse or approve any
statement made, opinion expressed or conclusion drawn therein, but approve the project work only for
the purpose for which it has been submitted.

Prof. Amit Kumar


(Project Guide)
Department of Computer Science and Engineering
B.P.Mandal College of Engineering ,Madhepura

Internal Examiner

Prof. Murlidhar Prasad Singh


External Examiner (Head of the Department)
Department of Computer Science and Engineering,
B.P. Mandal College of Engineering, Madhepura

Date : ……………………

Place : …………………...

v
ABSTRACT

In many rural and underdeveloped areas, citizens face significant challenges in reporting local civic
issues such as broken roads, water shortages, or faulty electricity lines. Simultaneously, students in
these areas often lack access to quality educational resources and personalized academic support.
This project presents a unified web-based solution titled “Smart City Complaint System with AI
Study Assistant”, designed specifically to address both these challenges.

The platform provides two key modules:

1. Smart Complaint Management System – Enables villagers to register public complaints


online, complete with location tagging via Google Maps API. The admin panel offers tools
to track, filter, and resolve issues efficiently, bringing transparency and speed to civic
governance.

2. AI Study Assistant Module – Empowers students with tools like AI Chatbot, Notes
Summarizer, MCQ Generator, and Code/Concept Explainer, all powered by Google
Gemini API. These features help bridge the academic gap in rural communities by offering
on-demand, intelligent educational support.

The system is built using the MERN stack (MongoDB, Express.js, React.js, Node.js) and ensures
a secure user experience with JWT authentication. The user interface is kept simple and responsive,
ensuring accessibility even in low-resource environments.

By combining civic engagement with educational empowerment, this project delivers a unique,
scalable, and impactful solution tailored for the needs of rural populations. It represents a significant
step toward digitally inclusive Smart Villages, where both governance and learning are accessible
at one click.

vi
TABLE OF CONTENTS
Chapter Title Page
Overview i
Certificate ii
Declaration iii
Acknowledgements iv
Certificate of Approval v
Abstract vi
Table of Contents vii
List of Figures ix
1 Introduction 1-4
1.1 General 1
1.2 Research Goal and Objectives 2
1.3 Scope of Work 3
1.4 Organization of Thesis 4

2 Literature Review 5-9


2.1 Related Work on Smart City Portals 5
2.2 AI Assistants in Public Complaint Systems 6
2.3 Smart Study Tools & EdTech Trends 7
2.4 Summary 8

3 Methodology of Work 10-16


3.1 Problem Analysis (Village-Focused) 10
3.2 Functional & Non-functional Requirements 11
3.3 Non-Functional Requirements 13
3.4 Tools and Technologies Used 14
3.5 AI Model Integration Approach 15

4 System Design and Implementation 17-28


4.1 Introduction to System Architecture 17
4.2 ER Diagram, Use Cases & Wireframes 20

vii
4.3 Complaint Module Implementation 25
4.4 Smart Study Tools: Key Feature Implementation 27

5 Results and Testing 29-35


5.1 Functional Testing Summary 29
5.2 Sample Screenshots (Collage Format) 31

6 Conclusions and Future Scope of Work 36-37


7 References 38-39
8 Appendix 40-42

viii
LIST OF FIGURES
Figure Figure Caption Page
1 ER Diagram 20

2 Access Control Diagram 22

3 Login Page 23

4 Registration Page 23

5 New Complaint Page 24

6 Complaint View 33

7 Admin Panel 34

8 Study Features 34

9 More Study Features 35

10 Quick Task Section 36

ix
Chapter 1: Introduction

1.1 General
The rapid advancement of digital technologies has transformed the way cities function and
how students approach learning. As urbanization accelerates, the need for efficient,
transparent, and responsive civic management has become paramount. At the same time, the
rise in competition, academic pressure, and online learning has made it necessary to provide
students with smart, AI-driven tools to support their educational journey. This project bridges
these two significant domains—smart governance and smart learning—into a single,
accessible platform.

The Smart City Complaint Management System is a digital interface that allows city
residents to raise civic complaints such as sanitation issues, road damage, water leakage,
streetlight faults, and more. It removes the barrier of physical visits to municipal offices and
replaces it with a streamlined, online workflow. Users can register, log in, and submit
complaints, while an admin panel enables authorized officials to monitor, filter, prioritize,
and update complaint statuses in real-time.

Parallel to this, the AI Study Assistant module is designed to empower students through
artificial intelligence. It combines a variety of learning and productivity tools in one
interface—ranging from summarizing handwritten or typed notes, explaining complex code
snippets, solving math problems, generating flashcards and MCQs, and even helping students
prepare for careers. These tools leverage modern AI APIs (like Gemini or OpenAI) to offer
instant, intelligent support to students, thereby improving learning outcomes and reducing
the cognitive load during preparation.

This dual-purpose system not only demonstrates the versatility of web development and AI
integration but also promotes digital literacy, productivity, and responsive administration.
The project showcases a role-based access system where:

● Users can file civic complaints and access all AI educational tools.

1
● Admins have additional privileges to manage and act on complaints from the
dashboard.

The fusion of these two modules in a single platform exemplifies the potential of smart
solutions for smart citizens and smart learners. From a software engineering perspective,
the system incorporates essential components like user authentication, database integration,
RESTful APIs, responsive design, and secure data handling, making it a scalable and
practical solution for real-world deployment.

This thesis explores the conceptualization, design, implementation, and evaluation of this
integrated platform, addressing both technological and societal needs through a seamless web
application.

1.2 Research Goals and Objectives


The goal of this project is to build a robust, role-based web application that serves both urban
management and educational enhancement purposes. The specific objectives are:

● To develop a Smart City portal for citizens to submit, view, and track complaints
efficiently.
● To enable Admins to view, filter, and resolve complaints through a dedicated
dashboard.
● To integrate a fully-functional AI Study Assistant equipped with:
○ AI Chat Assistant for academic queries
○ Notes Summarizer and Flashcards Generator
○ Personalized Study Planner and To-do List
○ MCQ Generator and Concept Comparison tools

Code Explainer and Math Solver

Career Assistant and Slide Generator

● To provide a seamless user experience with a responsive, intuitive interface using


modern frontend frameworks.
● To ensure data privacy, authentication, and secure storage of complaints and study
data.

2
1.3 Scope of Work
The scope of this project encompasses two key domains:

a) Smart City Complaint Management System

● Registration and login for users and admins.


● Complaint submission, tracking, and status updates.
● Admin dashboard to manage all complaints and update resolution status.

b) AI Study Assistant Module

● Integration of AI-based services using external APIs like Google Gemini or OpenAI.
● Tools for summarization, flashcards, MCQ generation, and academic support.
● Role-based access for users to interact with only permitted modules.

Tech Stack Scope:

● Frontend: React.js, Tailwind CSS


Backend: Node.js/Express (if applicable)
● Database: MongoDB/Firebase (for storing users, complaints)
Authentication: JWT/Firebase Auth
● AI Integration: Gemini/OpenAI API for educational tools

1.4 Organization of Thesis


This thesis is organized as follows:

● Chapter 1: Introduction – Presents the background, objectives, scope, and outline


of the thesis.
● Chapter 2: Literature Review – Reviews existing systems and related technologies
in the fields of smart governance and AI in education.
● Chapter 3: System Design and Architecture – Discusses the architecture, data flow
diagrams, and technology stack used in the system.

3
● Chapter 4: Implementation and Results – Explains the coding strategies, modules
developed, and screenshots with system functionality.
● Chapter 5: Conclusion and Future Scope – Summarizes the achievements,
limitations, and potential improvements of the project.

4
Chapter 2: Literature Review

2.1 Related Work on Smart City Portals

Smart city portals are integrated platforms designed to enhance urban governance, streamline
civic services, and improve citizen engagement. Several Indian cities, such as Pune, Bhopal,
and Surat, have implemented smart city dashboards and portals for public utilities, traffic
monitoring, and complaint redressal.

● Pune Smart City Portal introduced real-time dashboards, but lacked integration
with AI-based query handling.
● Bhopal Smart Governance Portal centralized grievance redressal but relied on
manual ticket management.
● Academic papers (e.g., Sharma et al., 2020) emphasize that most existing systems
lack personalization and predictive analytics.

This project advances the concept by merging smart portals with AI-assisted complaint
logging and education modules, making it both civic- and student-friendly.

2.2 AI Assistants in Public Complaint Systems


In the realm of e-governance, Artificial Intelligence (AI) assistants are revolutionizing
public service delivery and citizen interaction. Governments worldwide are leveraging
chatbots and AI-driven helpdesks to respond to queries, resolve complaints, and offer 24/7
digital support.

Global Examples

Countries like Singapore, Estonia, and the UAE have adopted AI-powered civic assistants
for real-time issue tracking, traffic queries, and complaint management. For instance,
Singapore’s virtual assistant “Ask Jamie” handles citizen inquiries across various
departments. According to a 2021 report by GovTech Singapore, Jamie reduced response
wait times by over 70% and successfully resolved over 85% of first-level queries without
human intervention.

5
India-Specific Use Cases

In India, platforms like:

● UMANG App
● MyGov Helpdesk on WhatsApp
● e-Nagarsewa portals

have adopted semi-intelligent bots to handle basic tasks like status checking, form-filling
guidance, and complaint logging. However, these assistants are often rule-based and lack
context awareness, natural language understanding (NLU), and multilingual support.

A research study by Patel et al. (2021) indicated that AI integration in municipal services led
to:

● 35% faster complaint resolution


● 40% fewer repeat complaints
● Enhanced user trust and engagement.

Despite these benefits, challenges remain:

● Lack of continuous learning in chatbots


● Minimal use of AI for analyzing complaint trends
● No personalization or sentiment analysis

Our Contribution

The proposed system addresses these gaps by:

● Using an AI assistant trained on civic FAQs


● Guiding users through complaint logging and follow-ups
● Supporting multilingual inputs and contextual question handling
● Providing proactive suggestions for common issues (e.g., garbage disposal, water
leaks)

This makes the platform citizen-centric, fast, and smart, especially for areas where tech
literacy is low.

6
2.3 Smart Study Tools & EdTech Trends
The global EdTech market has undergone rapid transformation due to advancements in
Artificial Intelligence, Natural Language Processing, and Machine Learning. Students
are no longer passive recipients of information but active participants in personalized, AI-
assisted learning ecosystems.

Notable Tools & Platforms

Several tools have gained popularity among students and educators:

● Google Socratic: Uses image and voice recognition to solve math and science
problems.
● Khanmigo by Khan Academy: GPT-powered tutor that helps explain complex
STEM subjects interactively.
● Quizlet and EdPuzzle: Support AI-generated flashcards and interactive quizzes.
● ChatGPT & Gemini AI: Used for summarizing topics, answering questions, and
creating study plans.

These tools help in:

● Reducing cognitive overload


● Increasing concept retention
● Automating time-consuming tasks like note-taking and test preparation

A study by Singh & Rao (2022) found that students using AI-based study companions
performed 23% better in memory recall tests and spent 30% less time preparing for exams
compared to traditional methods.

Trends in AI-Based Education

● Microlearning: Small, AI-curated content chunks


● Gamification: Learning with points, badges, and leaderboards
● Auto-grading and Feedback Systems: Powered by AI to save teacher effort
● Adaptive Learning Paths: Where content adjusts dynamically based on user
performance

Integration in Our System

7
Unlike standalone EdTech apps, our platform integrates 12 AI tools directly within a civic
portal. These include:

● AI Notes Summarizer
● MCQ Generator from Text
● AI Chatbot for Study Help
● YouTube Transcript Summarizer
● Flashcard Generator
● Essay Writer
● Plagiarism Checker with AI Explanation

This hybrid model makes the platform highly useful for college students and school-goers,
especially in underdeveloped regions where access to premium EdTech tools is limited.

2.4 Summary
This literature review highlighted:

● Smart City Portals: Existing portals are useful but often static, lacking AI-driven
interactivity and personalization.
● AI in Complaint Systems: Proven to improve response time and satisfaction, but
still in early stages of deployment in India.
● Smart Study Tools: Transforming education by enabling personalized, fast, and
efficient learning, but are usually offered in standalone apps.

Gap Identified

No current system combines civic service management and AI-based educational support
on a single platform. Existing portals focus on either governance or education—but not both.

Project Uniqueness

Our proposed platform stands out by:

● Bridging the civic and academic domains


● Enhancing digital governance with AI

8
● Supporting students with smart, accessible study tools

9
Chapter 3: Methodology of Work

This chapter discusses the structured approach undertaken in developing the integrated web-based
solution that combines a Smart City Complaint Management System with an AI-powered Study
Assistant. It presents the problem analysis, defines the system requirements, outlines the tools and
technologies used, and elaborates on the AI model integration strategy that empowers the
educational modules of the platform.

3.1 Problem Analysis (Village-Focused)

Background

In rural and remote areas of India and many developing countries, citizens face severe challenges in
accessing basic civic services and educational tools. Unlike urban centers, villages lack digital
infrastructure, smart governance systems, and modern educational platforms. As a
result, both civic complaints and academic struggles go unaddressed.

Identified Problems in Villages:

Civic Issues:

● No digital medium to report water, road, electricity, or health complaints.


● Complaints are often made verbally to local panchayat or officials, with no tracking
or accountability.
● Corruption and negligence thrive due to lack of transparency.

Educational Issues:

● Village students have limited access to quality learning resources.


● No digital libraries, AI tools, or modern classrooms.
● Students cannot afford coaching or private tutors.

Proposed Solution (Digital Transformation for Villages)

10
We propose a single web application designed with simplicity and low bandwidth usage in
mind. It provides:

● Smart City Complaint Portal for villages with easy submission and tracking.
● AI Study Assistant for students in rural areas to understand topics, ask questions,
summarize notes, and generate MCQs without a teacher.

3.2 Functional & Non-functional Requirements


To ensure that the system addresses the specific challenges faced by rural areas in both civic
and educational domains, the requirements are classified into functional and non-
functional. These requirements serve as the foundation for design, development, and testing
of the system.

3.2.1 Functional Requirements

Functional requirements define the specific behaviors, services, and functionalities that the
system must perform. These are directly aligned with user expectations and project goals.

For Village Users (Citizens/Students)

1. User Registration & Login


○ Users should be able to register with basic details (name, phone/email,
village).
○ Login via password or OTP for easy rural access.

2. Submit Complaint
○ Users can file a complaint by selecting:
■ Category (Water, Road, Power, Sanitation, etc.)
■ Description
■ Optional Image Upload
○ Complaint gets stored in the database and status is set to Pending.

3. Track Complaint Status

11
○ Users can view the real-time status of their submitted complaints (Pending →
In Progress → Resolved).

4. View Complaint History


List all past complaints filed by the user along with timestamps and admin responses.

5. Use AI Study Tools

○ Summarize Notes: Paste long text and receive summarized bullet points.
○ Generate MCQs: Upload or paste notes to receive auto-generated multiple-
choice questions.
○ AI Chatbot: Ask academic questions in English/Hindi and get instant
responses.
○ Code/Math Explainer: Submit code or equations to get line-by-line
explanations.

For Admin (Village Officer/Sarpanch)

1. Admin Login
○ Secure login panel for the admin to manage system operations.

2. View All Complaints


○ Admin can see all submitted complaints sorted by date or category.

3. Update Complaint Status


○ Admin can update the complaint status to “In Progress” or “Resolved”.

4. Respond to User
○ Admin can send remarks or a message while updating complaint status (e.g.,
“Team visiting tomorrow”).

5. Manage AI Tools Feedback

12
○ (Optional) Admin can review AI tool usage and provide feedback on student
engagement.

3.3 Non-Functional Requirements


The system is designed with usability in mind, ensuring a clean and simple interface that
supports regional languages like Hindi for rural users. It offers fast performance with page
loads under 3 seconds and AI responses within 5 seconds, even on low-speed networks. The
platform is fully responsive, working seamlessly across mobile devices and tablets.

Security is ensured through JWT-based authentication and bcrypt password hashing. The
system is scalable, allowing easy addition of new complaint categories or AI tools.
Maintainability is achieved using modular, reusable code structures. It supports testing with
tools like Jest to ensure stability.

Reliability is a priority, with 99% uptime and proper error handling. The system also features
weekly database backups with a 24-hour recovery option. Lastly, localization support allows
users to switch the interface language, making it accessible to villagers who speak different
regional languages.

3.4 Tools and Technologies Used


To build a robust, scalable, and user-friendly system suitable for rural areas, a combination
of modern frontend, backend, database, and AI technologies has been used. These tools were
chosen for their simplicity, performance, and ease of integration.

Frontend Technologies

● React.js: A powerful JavaScript library used to build a dynamic and responsive user
interface.

13
● Tailwind CSS: A utility-first CSS framework used to design clean, mobile-friendly
layouts quickly.
Axios: For sending HTTP requests from frontend to backend APIs.

Backend Technologies

● Node.js: Used to run the backend server with high performance and event-driven
architecture.
● Express.js: A lightweight framework that simplifies API creation and routing.
● bcrypt.js: For hashing user passwords securely.
● JWT (JSON Web Token): For secure user authentication and session management.

Database

● MongoDB Atlas: A NoSQL cloud database used to store user data, complaints, and
AI tool history in a flexible and scalable structure.

Development Tools

● Visual Studio Code (VS Code): The primary code editor used for writing and
debugging code.
● Postman: Used for testing and validating REST API endpoints during development.
● Git & GitHub: Version control tools used for managing and tracking source code
changes.
● Figma (optional): Used for UI planning and wireframing.

Deployment Tools

● Vercel / Render: Used for deploying the frontend and backend to the cloud with free
hosting options.
● MongoDB Compass: Provides cloud-hosted database with auto-backup and
scalability support.

3.5 AI Model Integration Approach

14
The system integrates modern AI and geolocation technologies to enhance both the student
learning experience and the efficiency of complaint tracking in rural areas. This section
explains how the Gemini API and Google Maps API are utilized in the project.

1. Google Gemini API Integration

The Google Gemini API is used to power the AI features in the Study Assistant module. It
helps rural students by generating intelligent content in response to their input.

Use Cases:

● Note Summarization: Long handwritten or typed class notes can be summarized into
short, simple explanations.
● MCQ Generator: Automatically generates multiple-choice questions based on user-
provided study material.
● Doubt Solver (Chatbot): Students can ask any question (math, science, coding, etc.)
and receive instant AI explanations.
● Code/Concept Explainer: Input a code snippet or technical topic, and Gemini
explains it in simple terms.

Integration Steps:

1. Collect user input (notes, questions, code, etc.) through React forms.
2. Send the prompt to Gemini API using a POST request.
3. Receive and display the AI response to the student in a readable format.

2. Google Maps API Integration

To improve the Complaint Management System, the Google Maps API is integrated to
collect and display geolocation data for complaints submitted by villagers.

Use Cases:

● User Location Auto-Detection: Automatically detects and stores the user's location
when they file a complaint.
● Map Visualization (Admin Panel): Admin can view complaint locations on a map
to understand problem areas visually.

15
Integration Steps:

1. Use the Geolocation API in the browser to fetch user coordinates.


2. Embed Google Maps in the admin dashboard to show complaint locations as pins.
3. Store location data (latitude, longitude) in MongoDB along with the complaint details

16
4. System Design and Implementation
4.1 Introduction to System Architecture

The System Architecture is like a blueprint of your project. It shows how all the parts of
your application (frontend, backend, database, authentication, etc.) work together and
communicate with each other.
Your project uses the MERN Stack (MongoDB, Express.js, React.js, Node.js), which is a
popular full-stack JavaScript technology.

High-Level Architecture of the Project

Your system is divided into two main parts:

1. Frontend (Client Side)

● Built using React.js


● It is the part that users interact with directly.
● Citizens and admins can:
○ Register/Login
○ File complaints
○ Track complaint status
○ View dashboard

2. Backend (Server Side)

● Built using Node.js and Express.js


● Handles:
○ Business logic
○ API endpoints
○ Complaint data processing
○ User authentication and role checking

3. Database

● Uses MongoDB
● Stores:

17
○ User information (name, email, password, role)
Complaint details (title, description, date, status, etc.)

4. Authentication System

● Uses JWT (JSON Web Tokens)


● Ensures only authenticated users can access their respective dashboards
● Admins have different access than citizens (role-based access control)

Flow of Data in the System

Here's how everything works together step by step:

1. User Interaction (Frontend)

● A citizen opens the application (React frontend).


● They register or login using their email and password.

2. Request Sent to Backend (API Calls)

● When a user logs in or submits a complaint, the frontend sends an HTTP request to
the Express backend.
● Example:

○ POST /api/auth/login – login request


○ POST /api/complaints – file a complaint

3. Server Side Processing (Express)

● The backend receives the request.


● It authenticates the user using JWT.
● Then it saves or fetches data from MongoDB.
● For complaints, it validates the data and saves it in the complaint collection.

4. Database Operations (MongoDB)

● MongoDB stores:
○ Each user as a document in the users collection.
○ Each complaint as a document in the complaints collection.
● Complaints are linked to users by their userID.

18
5. Response Back to Frontend

● Once data is saved or fetched, the server sends a JSON response back.
● The React app then updates the screen with:

○ Complaint status
○ Success/failure messages
○ Dashboard updates

Component-Level View

Frontend (React):

● Components: LoginPage, RegisterPage, ComplaintForm, Dashboard


● Pages are designed using Tailwind CSS for responsiveness

Backend (Node + Express):

● Routes: /api/auth, /api/complaints


● Controllers: authController, complaintController
● Middleware: authMiddleware (for JWT checking)

Database (MongoDB):

● Collections: users, complaints

Security & Access Control

● JWT tokens are used to verify users.


● Citizens can only view their own complaints.
● Admins can:
○ View all complaints
○ Change complaint status (Pending → In Progress → Resolved)

Deployment & Environment

● Environment variables like MongoDB URI and JWT secret are stored in .env

19
● The application runs on:
○ Port 3000 (React frontend)
Port 5000 (Express backend)

4.2 ER Diagram, Use Cases & Wireframes

1. ER Diagram (Entity-Relationship Diagram)

What is an ER Diagram?

An ER Diagram (Entity-Relationship Diagram) shows the main entities (tables) in your


project and how they are related to each other. It helps in designing the database structure.

Entities in Our System:

● User
● Complaint

ER Diagram Structure:

20
Fig 1 (ER Diagram)

Explanation:

● One User can file many complaints.


● user_id in the Complaint table is a foreign key that connects each complaint to the
user who filed it.

2. Use Case Diagram

What is a Use Case Diagram?

A Use Case Diagram shows what different types of users (called actors) can do in your
system. It helps to understand the functional requirements.

👥 Actors:

● Citizen (User)
● Admin

📄 Main Use Cases:

For Citizen:

● Register/Login
● File a Complaint
● View Own Complaints
● Track Complaint Status

For Admin:

● Login
● View All Complaints
● Change Complaint Status
● Delete Complaints (if needed)

21
📐 Simple Use Case Diagram (Text View):

Fig 2 (Access Control Diagram)

3. Wireframes (UI Design Prototypes)

🧾 What are Wireframes?

Wireframes are basic sketches of how your web pages look and what each screen contains.
These are not the final designs but a layout of components like buttons, input fields, and
dashboards.

Key Wireframes in Your Project:

1. Login Page

● Email Field
● Password Field
● Login Button

22
● Link to Register Page

Fig 3 (Login Page)

2. Register Page

● Name
● Email
● Password
● Confirm Password
● Submit Button


● Fig 4 (Registration Page)

23
3. Citizen Dashboard

● Welcome User

● Button: "File New Complaint"

● Table of Complaints with:

○ Title
○ Status
○ Date Filed
○ View Details

4. Complaint Form

● Title
● Description
● Category Dropdown
● Submit Button


Fig 5 (New Complaint Page)

5. Admin Dashboard

24
● List of All Complaints
● Filter by Status
● Update Status Button (Dropdown: Pending/In Progress/Resolved)
● Delete Option

Summary of 4.2:

● The ER Diagram defines how data is stored and related (User ↔ Complaints).
● The Use Case Diagram explains the roles and activities of citizens and admins.
● The Wireframes help in designing a user-friendly frontend interface for both types of
users.

4.3 Complaint Module Implementation

The Complaint Module is an essential part of the system that allows users to register and
track their complaints effectively. This module is designed to provide a simple interface for
users to submit complaints and for the admin or concerned staff to view and manage those
complaints.

Objectives

● To enable users to submit complaints related to the system or services.


● To allow the system administrators to view, update, and resolve complaints.
● To maintain a record of complaints for future reference and analysis.

Features

● Complaint Submission: Users can fill a complaint form by providing details such as
their name, contact information, complaint category, description, and date of
complaint.
● Complaint Tracking: After submission, users get a unique complaint ID to track the
status.
● Admin View: Admin can view all complaints in a list format.
● Complaint Status Update: Admin can change the status of complaints (e.g.,
Pending, In Progress, Resolved).
● Notifications: Optionally, the system can notify users about status changes via email
or SMS (if implemented).

Implementation Details

1. User Interface:

25
○ A complaint submission form with input fields:
■ Name
■ Contact Number or Email
■ Complaint Category (dropdown)
■ Description (text area)
■ Date (auto-filled or user-selected)

Backend Processing:

○ When a user submits the form, the complaint details are validated for
completeness and correctness.
○ Valid data is then saved into the complaints database table.
○ A unique complaint ID is generated for each complaint entry.
2. Database Design:
○ Table name: complaints
○ Fields include:
■ complaint_id (Primary Key)
■ user_name
■ contact_info
■ category
■ description
■ date_submitted
■ status (default to 'Pending')
■ admin_comments (optional for admin updates)
3. Admin Module:
○ Admin dashboard displays a list of complaints with key details and current
status.
○ Admin can click on a complaint to view full details.
○ Admin can update the complaint status and add comments.
○ Changes are saved back to the database.
4. Complaint Tracking:
○ Users can enter their complaint ID in a tracking interface.
○ The system retrieves and displays the current status and any admin remarks.

Technologies Used

● Frontend: HTML, CSS, JavaScript (or your chosen framework)


● Backend: PHP/Node.js/Java/Python (based on your project)
● Database: MySQL/PostgreSQL/NoSQL
● Optional: Email/SMS service integration for notifications

Testing and Validation

26
● Multiple test complaints were submitted to check the system's response.
● Verified complaint status updates and retrieval accuracy.
● Checked for security to avoid SQL injection and ensure data privacy.

4.4 Smart Study Tools: Key Feature Implementation

The Smart Study Tools module is designed to enhance the learning experience by providing
intelligent features that help users study more effectively and efficiently. This module
integrates several key tools that assist in organizing study material, creating quizzes, setting
reminders, and tracking progress.

Objectives

● To provide interactive and intelligent tools for better study management.


● To motivate and engage users with personalized study aids.
● To improve learning outcomes through smart features.

Key Features Implemented

1. Flashcard Generator:
○ Allows users to create digital flashcards for quick revision.
○ Users can input questions and answers, which are saved in their personal
study sets.
○ Flashcards can be shuffled and reviewed repeatedly for better retention.
2. Quiz Creator and Tester:
○ Users can create quizzes based on their study material.
○ Quizzes support multiple-choice questions, true/false, and short answers.
○ The system provides immediate feedback and scoring after quiz completion.

3. Study Scheduler and Reminders:


○ Users can set study schedules and receive automated reminders.
○ Reminders help maintain consistent study habits.
○ The schedule can be customized by subject, date, and duration.
4. Progress Tracker:
○ Tracks the user’s study activity and quiz performance.
○ Displays progress reports with graphs and statistics.
○ Helps users identify strong and weak areas to focus on.

Implementation Details

1. User Interface:

27
○ Interactive dashboards with access to all smart tools.
○ Simple and user-friendly forms to create flashcards and quizzes.
○ Calendar view for scheduling and reminders.
2. Backend Processing:
○ Data related to flashcards, quizzes, schedules, and progress is stored in the
database.
○ Logic implemented for quiz evaluation and scoring.
○ Reminder notifications triggered using scheduled tasks or background jobs.

3. Notification System:
○ Implemented to send reminders through email or in-app alerts.
○ Scheduler uses cron jobs or task queues to send timely notifications.

Technologies Used

● Frontend: React.js/Angular/Vue.js (or plain JavaScript)


● Backend: Node.js/Express, Python/Django, or similar
● Database: MySQL/PostgreSQL/MongoDB
● Additional tools: Cron jobs for scheduling, email APIs for notifications

Testing and Validation

● Tested flashcard creation and retrieval.


● Verified quiz creation, answering, and scoring functionalities.
● Checked scheduling and notification timings.
● Analyzed progress tracking accuracy with sample data.

28
5. Results and Testing

5.1 Functional Testing Summary

This section highlights the functional testing performed to ensure that all critical features of
the Smart City Complaint Management System work correctly as per the project
requirements. Each major feature was tested manually during the development phase and
validated through multiple user scenarios.

User Registration & Login

● The user registration module was tested with valid and invalid inputs.
● Validation was checked for empty fields, invalid email formats, and short passwords.
● On successful registration, the user data was securely stored in MongoDB, and a JWT
token was generated during login.

Complaint Filing Functionality

● Citizens could successfully file a complaint by entering a title, description, and


selecting a category.
● Form validation checks were tested for empty or missing fields.
● The complaint was correctly saved in the database, linked to the logged-in user's ID.

View & Track Complaints

● After filing, users could view a list of all complaints submitted by them.
● Complaints displayed correct information including status, title, and date.

29
● Each complaint’s status was fetched and updated in real-time from the database .

Admin Panel Functionality

● Admin login was tested with role-based access control.


● Admins could view all complaints submitted by users.
● Functionality to update the complaint status was successfully tested with dropdown
options.
● Admins could delete complaints, and the deleted entries were removed from the
database instantly.

Role-Based Access Control (RBAC)

● Citizens were restricted from accessing admin routes or features.


● Admin routes were protected using middleware and JWT verification.
● Direct API access to admin-only endpoints from the browser without a token was
denied.

API Response Validation

● All API routes returned correct HTTP status codes (200 OK, 401 Unauthorized, 404
Not Found, etc.).
● Errors were handled gracefully using middleware with proper error messages.

Frontend Testing (React Components)

● Each page and component was tested for loading, data rendering, and interaction.
● Conditional rendering based on login state and user role worked as expected.
● Navigation and routing through react-router-dom were smooth and bug-free.

Responsive Design Check

● The application was opened on various screen sizes (mobile, tablet, laptop).

30
● Tailwind CSS made all components adapt well to different screen widths.
● All features remained usable on both desktop and mobile browsers.

Security Testing (Basic)

● Passwords were stored using hashing (bcrypt) in the database.


● JWT tokens were stored in local storage and expired tokens were handled.
● Protected routes rejected unauthenticated access attempts.

Overall Result

The functional testing confirms that all primary features — user registration, complaint
management, admin handling, and smart study tools (optional) — are working as expected
under standard usage scenarios. No critical bugs were encountered during manual testing.

5.2 Sample Screenshots (Collage Format)


This section includes a collage of major interfaces from both the Citizen Side and the
Admin Side of the Smart City Complaint Management System. The screenshots provide a
visual understanding of the system's functionality and user interface .

Citizen Panel Interfaces

1. User Registration Page


2. User Login Page

The login interface allows registered users to log into the system using their email and
password.

31
Purpose: Authenticates the user and generates a JWT token for secure access .

3. Track Complaints Page

Here, users can see a list of complaints they’ve submitted, along with the status
(Pending, In Progress, Resolved).
Purpose: Allows users to monitor the status of their grievances.

Fig 6 (Complaint View)

32
Admin Panel Interfaces

4. Admin Login Page

The admin login is separate from citizen login and requires admin credentials.
Purpose: To ensure only authorized personnel access the admin dashboard.

5. Admin Dashboard

The dashboard gives a full view of complaints from all users, categorized by their current status.
Purpose: Helps the admin monitor and manage citizen complaints effectively.

Fig 7 (Admin Panel)

(Optional) Smart Study Tools Module

7. Al Study Assistant Dashboard (if implemented)

33
Displays learning resources, notes, or AI-based features like Q&A.
Purpose: Provides educational tools integrated within the citizen interface.

Fig 8 (Study Features)

AI Study Assistant – Short Overview

1. Chat Assistant – Answers your questions and study-related queries

2. Notes Summarizer – Converts study notes into concise, easy-to-understand points

3. Study Plan Generator – Creates personalized study plans based on subjects and time

Fig 9 (Study Features)

4. MCQ Generator – Generates multiple-choice questions for self-testing

5. Code Explainer – Explains code snippets in various programming languages

6. Flashcards – Creates and studies flashcards for better retention

34
7. Todo List – Manage study tasks and track your progress

8. Video Summarizer – Summarizes educational YouTube videos

Concept Comparison – Compares and contrasts two concepts side-by-side

🎓 Extra Utilities

Fig 10 (Study Features)

10. Career Assistant – Gives job and career preparation guidance

11. Math Solver – Solves math problems step-by-step

12. Slides Generator – Converts notes into presentation slides

⚡ Quick Tasks Section

● Add and track mini tasks instantly with "Quick Tasks"

35
Chapter 6: Conclusion and Future Scope

6.1 General Conclusion


The development of the Smart City Complaint and AI Study Assistant Portal
marks a significant step toward empowering rural communities through
technology. The project successfully integrates two powerful modules: a
Complaint Management System for public issues and an AI-powered Study
Assistant for students—both tailored specifically for under-resourced village
areas.

Through this system, villagers can now easily register complaints related to
water, electricity, roads, and sanitation, while the admin side enables faster
redressal using tools like Google Maps for complaint location tracking. This
eliminates the need for physical visits to government offices and brings
transparency to the system.

On the educational side, the AI Study Assistant—powered by the Gemini API—


provides tools such as note summarization, MCQ generation, and code
explanation, helping students understand concepts better even in the absence of
proper coaching centers or internet resources.

In summary, this project solves real-life problems in rural areas by merging


governance and education into a single digital platform that is simple, scalable,
and efficient.

6.2 Limitations and Future Enhancements

Limitations

1. Internet Dependency: Both modules require internet access, which may


be limited in some remote villages.
2. No Offline Mode: The platform doesn’t support offline access or SMS-
based complaint registration.
36
3. Basic AI Output: Gemini API responses are generic and sometimes lack
subject-level depth.
4. Admin Overload: A single admin handling multiple complaint types may
result in delays.
5. No Push Notifications: Users don’t get real-time alerts about the status of
their complaints.

Future Enhancements

1. Multilingual Interface: Add full support for regional languages like


Bhojpuri, Marathi, and Bengali.
2. Offline Access & SMS Support: Enable complaint registration via SMS
and offline caching for study tools.
3. AI Feedback Loop: Allow users to rate AI responses to help improve
output relevance.
4. Mobile App Version: Create an Android/iOS app to improve accessibility
in low-bandwidth areas.
5. Real-Time Notifications: Integrate WhatsApp or Firebase notifications
for complaint updates.
6. Performance Dashboard: Add analytics for admins to track number of
complaints, resolution time, and student activity on AI tools.
7. AI Tutor Bot: Upgrade the chatbot into a voice-based AI tutor for
personalized learning sessions.

37
References

1. React Documentation
React – A JavaScript library for building user interfaces.
https://reactjs.org/docs/getting-started.html

2. Node.js Documentation
Node.js – JavaScript runtime built on Chrome’s V8 engine.
https://nodejs.org/en/docs

3. Express.js Guide
Express – Fast, unopinionated, minimalist web framework for Node.js.
https://expressjs.com/en/starter/installing.html

4. MongoDB Official Docs


MongoDB – NoSQL database for modern applications.
https://www.mongodb.com/docs/manual/

5. Google Gemini API


Google’s Generative AI Model for text-based AI integration.
https://ai.google.dev/

6. Google Maps JavaScript API


API to display maps and geolocation for web apps.
https://developers.google.com/maps/documentation/javascript/overview

7. Tailwind CSS Documentation


Utility-first CSS framework for rapidly building custom user interfaces.
https://tailwindcss.com/docs

8. JWT (JSON Web Token) Documentation


A compact, URL-safe means of representing claims between parties.
https://jwt.io/introduction

9. bcrypt.js GitHub Repository


Library for hashing and checking passwords securely.

38
https://github.com/dcodeIO/bcrypt.js

10. Axios Documentation


Promise-based HTTP client for the browser and Node.js.
https://axios-http.com/docs/intro

11. Postman Tool


Collaboration platform for API development.
https://www.postman.com/

12. Visual Studio Code


Code editor used for web and AI development.
https://code.visualstudio.com/

13. OpenAI GPT API (Optional Reference)


If used alongside Gemini for testing or comparison.
https://platform.openai.com/docs

39
Appendix

8.1 Code Structure Overview

Frontend (React.js)

● App.js: Main routing file connecting all pages.


● ComplaintForm.jsx: For submitting village complaints with location
capture.
● AIChatBot.jsx: Interface for AI-powered doubt clearing.
● NoteSummarizer.jsx: Allows students to paste and summarize notes using
Gemini API.
MCQGenerator.jsx: Converts study notes into MCQs.
● AdminDashboard.jsx: View, filter, and map user complaints.

Backend (Node.js + Express)

● server.js: Entry file setting up Express and middlewares.


● routes/authRoutes.js: Login and registration logic using JWT.
● routes/complaintRoutes.js: Post/get complaints to/from MongoDB.
routes/aiRoutes.js: Interfaces to Gemini AI for summarization, chat, and
MCQs.
● dbConnect.js: MongoDB Atlas cloud connection handler.

40
8.2 APIs Used

Google Gemini API

● Used for:

○ Summarizing class notes.


○ Generating MCQs from text.
Explaining code and academic topics.
○ Chatbot for doubt-solving.

● Endpoint Example:
https://generativelanguage.googleapis.com/v1beta/models/gemini-
pro:generateContent

Google Maps API

● Used for:
○ Capturing user's live location.
○ Showing complaints on maps for admin.

● Implementation: JavaScript Geolocation API + Google Maps Embed

JWT (JSON Web Token)

● Role-based secure login (admin, student).


● Protects routes and user session with tokens.
● Input: Notes or paragraphs
● Output: 3-5 multiple choice questions

41
8.3 GitHub Link & QR Code

GitHub Repository

https://github.com/sudhir-kumar999/project2.git

Replace with your real repo before submission.

QR Code to GitHub

Scan this with your mobile to view the source code:

42

You might also like