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!

System Requirements

System Requirement Document
Page 1 of 7

fiery-hostel System Requirements Document

1. Introduction

The "fiery-hostel" project is a medium-sized full-stack web application designed to manage hostel maintenance complaints. The system allows students to report issues and enables hostel administrators to manage, prioritize, assign, and resolve these complaints efficiently. The focus is on creating a streamlined complaint and maintenance workflow without incorporating additional hostel-management features.

2. System Overview

Page 2 of 7

2a. Product Interpretation and Delivery Boundary

  • Domain Descriptor: Complaint Management System

    • Source Evidence: The system focuses on managing and resolving hostel maintenance complaints.
    • Confidence: High
  • Project Scope:

    • Included: Student complaint submission, AI-powered complaint analysis, admin complaint management, dashboards, and analytics.
    • Excluded: Rent/payment management, room allocation, visitor management, leave management, hostel property management, complex staff management, real payment gateway, complex messaging system.
  • Custom Pages:

    • Student Login
    • Student Dashboard
    • Complaint Submission
    • Admin Dashboard
    • Complaint Details
  • Access: Application-owned identity with JWT authentication and role-based authorization.

  • Behavior Contracts:

    • Student Login: Students login to access the system.
    • Submit Complaint: Students submit complaints with optional images and receive AI suggestions.
    • Manage Complaints: Admins manage complaints and update statuses.
    • View Complaint Details: Both students and admins view complaint details and history.
    • Show Role-Based Actions: Display actions based on user roles in complaint details.
    • Authenticate User with JWT and bcrypt: Secure user authentication.
Page 3 of 7

2b. Page Content and Component Coverage

  • Student Dashboard:

    • Components: Complaint summary cards, status chart
    • States: Empty, loading, populated
    • Actions: View complaints, navigate to complaint submission
  • Complaint Submission:

    • Components: Complaint form, image upload, AI suggestion review
    • States: Draft, submitted, error
    • Actions: Submit complaint, edit AI suggestions
  • Admin Dashboard:

    • Components: Analytics charts, complaint list
    • States: Loading, populated, error
    • Actions: Filter complaints, view details
  • Complaint Details:

    • Components: Complaint information, comments section
    • States: Loading, error, resolved
    • Actions: Add comments, change status, assign complaint

3. Functional Requirements as Story Points

  • As a Student, I should be able to submit a complaint with an optional image and receive AI suggestions for category and priority. explicit
  • As a Student, I should be able to view my complaint history and details. explicit
  • As a Student, I should be able to add comments to my complaints and receive notifications on status changes. explicit
  • As an Admin, I should be able to login and access the admin dashboard to manage complaints. explicit
  • As an Admin, I should be able to search, filter, and view complaint details. explicit
  • As an Admin, I should be able to change complaint statuses, assign complaints, and add comments. explicit
  • As a User, I should be able to authenticate using JWT and bcrypt for secure access. required_inference
Page 4 of 7

4. User Personas

  • Student: Primary user who submits and tracks complaints.
  • Admin: User who manages and resolves complaints.

5. Core User Flows

Student Flow (Revised)

  1. Login to the system.
  2. Access the student dashboard to view complaint summaries.
  3. Submit a new complaint with optional image upload.
  4. Review and edit AI-suggested category and priority.
  5. View complaint details and add comments.
  6. Receive notifications on complaint status changes.

Admin Flow

  1. Login to the admin dashboard.
  2. View analytics and complaint summaries.
  3. Search and filter complaints.
  4. View detailed complaint information.
  5. Change complaint status, assign tasks, and add comments.
Page 5 of 7

6. Visuals Colors and Theme

  • Primary: #1A73E8
  • Primary Light: #E8F0FE
  • Secondary: #34A853
  • Accent: #EA4335
  • Highlight: #FBBC05
  • Background: #FFFFFF
  • Surface: #F1F3F4
  • Text: #202124
  • Text Muted: #5F6368
  • Border: #DADCE0

7. Signature Design Concept

The fiery-hostel application will feature a modern, clean SaaS-style interface with a focus on usability and clarity. The design will incorporate a sidebar navigation for easy access to different sections, professional cards for displaying complaint summaries, and a consistent color scheme to enhance the user experience. The student dashboard will prominently feature complaint status charts and summary cards, providing a clear overview of complaint progress. The admin dashboard will include analytics charts to help visualize complaint data by category, status, and priority.

Page 6 of 7

8. Interaction Model & Motion Direction

  • Interaction Model: Animated
    • Moderate scroll-triggered reveals and hover transitions will be used to enhance user interaction.
    • The student dashboard will feature animated complaint status charts for a dynamic user experience.

9. Non-Functional Requirements

  • JWT Authentication: Secure access with JWT and role-based authorization. explicit
  • Responsive Design: The application must be fully responsive to ensure usability across devices. explicit

10. 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: Cloudinary or simple configurable upload implementation

11. Assumptions and Constraints

  • The application will not include features such as rent/payment management, room allocation, visitor management, leave management, hostel property management, complex staff management, real payment gateway, or complex messaging systems.
  • The database will be kept simple with proper relationships and timestamps.
Page 7 of 7

12. Glossary

  • JWT: JSON Web Token, a compact, URL-safe means of representing claims to be transferred between two parties.
  • LLM: Large Language Model, used for AI-powered text analysis.
  • CRUD: Create, Read, Update, Delete, the four basic functions of persistent storage.
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
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