0% found this document useful (0 votes)
31 views3 pages

Student Feedback

The document outlines the development of a Student Feedback Management System using the MERN stack, enabling students to submit feedback and admins to view it. It details the setup process, backend and frontend development, and includes sample code for both. The system features role-based access, dynamic feedback retrieval, and a responsive interface with MongoDB storage.

Uploaded by

mythu1040
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)
31 views3 pages

Student Feedback

The document outlines the development of a Student Feedback Management System using the MERN stack, enabling students to submit feedback and admins to view it. It details the setup process, backend and frontend development, and includes sample code for both. The system features role-based access, dynamic feedback retrieval, and a responsive interface with MongoDB storage.

Uploaded by

mythu1040
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/ 3

Student Feedback Management System

AIM

To build a Student Feedback Management System using the MERN stack (MongoDB, Express, React, Node.js)
that allows students to submit course feedback and enables admins or faculty to view and filter the responses.

PROCEDURE

1. Setup Project

o Initialize backend with Node.js + Express

o Create frontend using React.js

o Connect to MongoDB database (local or Atlas)

2. Backend Development

o Create Mongoose model for feedback with fields: student name, course, faculty, comments,
and rating

o Setup API routes:

▪ POST /feedback – to submit feedback

▪ GET /feedback – to retrieve all feedback

▪ Optional: Add filters for course or faculty

3. Frontend Development

o Build student form for login and feedback submission

o Create admin page to display feedbacks in a table

o Use Axios to make API calls

o Implement conditional rendering based on user role

4. Styling

o Use Bootstrap for form layout and table responsiveness

5. Testing

o Test feedback submission and retrieval

o Check admin login and feedback filtering


MAIN CODE (Shortened for Exam)

Backend (Express + MongoDB):

const express = require('express');

const mongoose = require('mongoose');

const cors = require('cors');

const app = express();

app.use(cors());

app.use(express.json());

mongoose.connect('mongodb://localhost/feedbackDB');

const feedbackSchema = new mongoose.Schema({

student: String,

course: String,

faculty: String,

comments: String,

rating: Number,

});

const Feedback = mongoose.model('Feedback', feedbackSchema);

app.post('/feedback', async (req, res) => {

const newFeedback = new Feedback(req.body);

await newFeedback.save();

res.send("Feedback submitted");

});

app.get('/feedback', async (req, res) => {

const feedbacks = await Feedback.find();

res.json(feedbacks);

});

app.listen(5000, () => console.log('Server running'));

Frontend (React):

import React, { useState, useEffect } from 'react';

import axios from 'axios';

function FeedbackForm() {

const [form, setForm] = useState({ student: '', course: '', faculty: '', comments: '', rating: '' });
const handleSubmit = e => {

e.preventDefault();

axios.post('http://localhost:5000/feedback', form).then(() => alert('Submitted'));

};

return (

<form onSubmit={handleSubmit}>

<input placeholder="Student Name" onChange={e => setForm({ ...form, student: e.target.value })} />

<input placeholder="Course" onChange={e => setForm({ ...form, course: e.target.value })} />

<input placeholder="Faculty" onChange={e => setForm({ ...form, faculty: e.target.value })} />

<textarea placeholder="Comments" onChange={e => setForm({ ...form, comments: e.target.value


})}></textarea>

<input type="number" placeholder="Rating (1-5)" onChange={e => setForm({ ...form, rating: e.target.value
})} />

<button type="submit">Submit</button>

</form>

);

export default FeedbackForm;

OUTPUT

• Students can enter their name, course, faculty name, comments, and a rating.

• Admins can view all feedbacks in a table format.

• Feedback is stored in MongoDB and retrieved dynamically.

RESULT

The student feedback management system was successfully implemented using the MERN stack. It allows role-
based feedback submission and viewing with a responsive interface and persistent MongoDB storage.

You might also like