A full-stack web application for managing student complaints in educational institutions.
- Student Portal: Submit complaints with file attachments
- Admin Dashboard: View and resolve complaints with statistics
- Authentication: Role-based access (Student, Faculty, Admin)
- File Upload: Support for images and PDF attachments
- Real-time Updates: Dynamic complaint status management
Backend:
- Node.js with Express.js
- MongoDB with Mongoose
- JWT Authentication
- Multer for file uploads
- bcryptjs for password hashing
Frontend:
- HTML5, CSS3, JavaScript
- Responsive design
- Modern UI components
- Node.js (v14 or higher)
- MongoDB (local or cloud)
- Git
-
Clone the repository
git clone <repository-url> cd project_01
-
Install backend dependencies
cd complaint-portal npm install -
Environment Configuration Create a
.envfile in thecomplaint-portaldirectory:PORT=3000 DATABASE_URL=mongodb://localhost:27017/complaintDatabase JWT_SECRET=your_jwt_secret_key_here NODE_ENV=development
-
Start MongoDB Make sure MongoDB is running on your system.
-
Start the backend server
npm start # or for development npm run dev -
Open the frontend Open
index.htmlin your browser or serve it using a local server.
- Register/Login with institute email
- Navigate to student portal
- Select complaint category
- Fill out complaint form with optional file attachment
- Submit complaint
- Login with admin credentials
- View dashboard with complaint statistics
- Review unresolved complaints
- Mark complaints as resolved with notes
POST /api/auth/login- User loginPOST /api/auth/register- Student registrationPOST /api/auth/admin/create-user- Admin creates users
POST /api/complaints/submit- Submit new complaintGET /api/complaints/my-complaints- Get user's complaintsGET /api/complaints/admin/dashboard- Admin dashboard dataPATCH /api/complaints/:id/resolve- Resolve complaint
GET /api/users/profile- Get user profilePUT /api/users/profile- Update profileGET /api/users- Get all users (Admin only)
project_01/
├── complaint-portal/ # Backend application
│ ├── config/ # Database configuration
│ ├── controllers/ # Route controllers
│ ├── middleware/ # Custom middleware
│ ├── models/ # MongoDB models
│ ├── routes/ # API routes
│ ├── utils/ # Utility functions
│ ├── uploads/ # File upload directory
│ └── index.js # Server entry point
├── admin.html # Admin dashboard
├── student.html # Student portal
├── index.html # Login page
├── api.js # Frontend API client
├── form.js # Form handling
└── style.css # Styles
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the ISC License.