fiery-hostel

byKRISH SIRSATH

# Smart Hostel Complaint & Maintenance System Build a medium-sized full-stack web application for managing hostel maintenance complaints. The goal is to allow students to report hostel problems and allow hostel administrators to manage, prioritize, assign, and resolve those complaints. Keep the project focused and do NOT add unnecessary hostel-management features such as rent payments, room allocation, visitor management, leave management, or complex staff management. ## User Roles ### Student Students can: * Register and login * View their dashboard * Submit a complaint * Upload an optional image * Select or receive an AI-suggested category * View complaint priority * View complaint status * View complaint history * Open complaint details * Add comments to their complaints * Receive notifications when complaint status changes ### Admin Admins can: * Login * View an analytics dashboard * View all complaints * Search and filter complaints * View complaint details * Change complaint status * Assign complaints * Change priority * Add admin comments * Mark complaints as resolved * View basic analytics ## Complaint Categories Support: * Electrical * Plumbing * Cleaning * Internet * Furniture * Security * Other ## Complaint Priority Support: * Low * Medium * High * Emergency ## Complaint Status Use: Submitted → Assigned → In Progress → Resolved → Closed ## AI Feature Add an AI-powered complaint analyzer. When a student writes a complaint, analyze the text and suggest: * Category * Priority * Short summary Example: Input: "The fan in room 204 is not working and there is a strange noise." Output: Category: Electrical Priority: High Summary: Fan malfunction in room 204. The student must be able to review and change the AI suggestion before submitting. Keep the AI integration configurable through an environment variable. ## Student Dashboard Show: * Total complaints * Pending complaints * In-progress complaints * Resolved complaints * Recent complaints Use clean cards and a simple complaint-status chart. ## Admin Dashboard Show: * Total complaints * Pending complaints * In-progress complaints * Resolved complaints * Emergency complaints Add charts for: * Complaints by category * Complaints by status * Complaints by priority ## Complaint Details Display: * Complaint title * Description * Category * Priority * Status * Student * Room number * Image * Assigned person * Created date * Updated date * Comments/history Provide appropriate actions based on the user's role. ## Authentication Implement: * Registration * Login * Logout * JWT authentication * Password hashing * Protected routes * Role-based authorization There are only two roles: STUDENT ADMIN Students must only be able to access their own complaints. Admins can access all complaints. ## Database Use MongoDB with Mongoose. Keep the database simple. Main models: * User * Complaint * Comment * Notification Use proper relationships and timestamps. ## Tech Stack Frontend: * React * Vite * Tailwind CSS * React Router * Recharts Backend: * Node.js * Express.js Database: * MongoDB * Mongoose Authentication: * JWT * bcrypt AI: * Configurable LLM API through environment variables File upload: * Use Cloudinary if needed; otherwise provide a simple configurable upload implementation. ## UI/UX Create a modern, clean SaaS-style interface. Requirements: * Responsive design * Sidebar dashboard * Professional cards * Tables * Status badges * Forms * Modal dialogs where useful * Toast notifications * Loading states * Empty states * Error states * Confirmation dialogs Use a consistent design system throughout the application. ## Seed Data Create demo data including: * 1 admin * 5–10 students * 15–20 complaints * Different categories * Different priorities * Different statuses * Comments * Notifications ## Project Structure Keep frontend and backend separated and maintainable. Use: Frontend: components/ pages/ services/ hooks/ context/ Backend: controllers/ routes/ models/ middleware/ services/ utils/ Do not put the entire application into a few large files. ## Important Scope Constraint This is intentionally a medium-sized project. DO NOT implement: * Rent/payment management * Room allocation * Visitor management * Leave management * Hostel property management * Complex staff management * Real payment gateway * Complex messaging system Focus on making the complaint and maintenance workflow polished and production-quality. ## Development Process Before coding, generate only: 1. Requirements 2. User flows 3. Database schema 4. API endpoints 5. Screen list 6. Implementation plan Then implement in phases. Phase 1: Authentication + database + basic project structure Phase 2: Student complaint workflow Phase 3: Admin complaint management Phase 4: AI complaint analyzer Phase 5: Dashboards + analytics + notifications After each phase, test the implemented functionality before continuing. Do not implement all phases at once.

Admin DashboardComplaint DetailsComplaint SubmissionStudent Dashboard
Admin Dashboard

Comments (0)

No comments yet. Be the first!

Complaint Details design preview
1. Login Form: submit admin username and password
2. Express.js API Server: authenticate via JWT and bcrypt
Admin Dashboard: 3. Decision: authentication result
Admin Dashboard: view analytics and manage complaints
Complaint Details: view complaint information and role-based actions
Complaint Details: 4. Failure: access denied
Admin Dashboard design preview
1. Login Form: submit admin username and password
2. Express.js API Server: authenticate via JWT and bcrypt
Admin Dashboard: 3. Decision: authentication result
Admin Dashboard: view analytics and manage complaints
Complaint Details: view complaint information and role-based actions
Complaint Details: 4. Failure: access denied