A modern, full-stack web application for efficient hostel issue management. Built with React and Node.js, HostelFlow enables students to report issues, track their progress, and communicate with hostel administration in real-time.
Test the application with these accounts:
| Role | Password | |
|---|---|---|
| π¨βπΌ Admin | admin@example.com |
admin123 |
| π Student | student@example.com |
student123 |
π¨ IMPORTANT - Shared Demo Environment:
- This demo runs on Neon's free tier (500MB storage limit)
- Please do NOT upload large images or create excessive test data
- Be respectful - others are testing too!
- Demo data may be reset without notice if storage approaches limit
- For full testing, please deploy your own instance (see Deployment Guide below)
- Issue Reporting - Students can report hostel issues with descriptions, categories, and image attachments
- Real-time Tracking - Track issue status from reported β in-progress β resolved
- Role-based Access - Separate portals for students and administrators
- Comment System - Interactive discussion threads on each issue
- Lost & Found - Dedicated section for reporting lost and found items
- π¬ Real-time Chat - Direct messaging between students and administrators
- π Live Notifications - Instant alerts for issue updates and new messages
- Premium UI/UX - Modern glassmorphism design with smooth animations
- Dark Mode Support - Eye-friendly dark theme
- Responsive Design - Works seamlessly on desktop, tablet, and mobile
- News & Announcements - Keep students informed with important updates
- Search & Filter - Easily find issues by category, status, or keywords
- Notification Bell - Real-time notification badge with dropdown panel
- Issue Management Dashboard - Overview of all reported issues with statistics
- Staff Assignment - Assign maintenance staff to specific issues
- Status Updates - Update issue progress and add administrative notes
- User Management - Manage student and staff registrations
- Announcement Creation - Post news and updates for all users
- π₯ Student Management - View all registered students with search functionality
- π Student Detail View - See student profiles, hostel info, and complete issue history
- π¬ Direct Messaging - Chat with individual students in real-time
- ποΈ Unregister Students - Soft-delete students while preserving historical data
- Real-time Notifications - Get instantly notified when issues are resolved or updated
- Admin Chat - Dedicated messaging page to communicate with administration
- Message Alerts - Receive notifications for new messages from admin
- React 18.x - Modern UI library
- React Router - Client-side routing
- Framer Motion - Smooth animations
- Axios - HTTP client
- Lucide React - Beautiful icon set
- React Hot Toast - Elegant notifications
- Vite - Lightning-fast build tool
- Node.js - JavaScript runtime
- Express - Web application framework
- PostgreSQL - Relational database (Neon for cloud hosting)
- Socket.io - Real-time bidirectional communication
- JWT - Authentication and WebSocket auth
- bcrypt - Password hashing
- Multer - File upload handling
- CORS - Cross-origin resource sharing
- Node.js (v16 or higher)
- PostgreSQL (v12 or higher)
- npm or yarn
git clone https://github.com/adityajain-27/hostel_issue_tracking_system.git
cd hostel_issue_tracking_systemcd backend
# Install dependencies
npm install
# Create .env file
cp .env.example .env
# Edit .env with your database credentials and JWT secret
# Set up the database
# 1. Create a database in PostgreSQL
# 2. Run the schema file
psql -U your_username -d your_database -f database/schema.sql
# 3. Run the new features migration (chat, notifications, student management)
psql -U your_username -d your_database -f database/schema_updates.sql
# 4. (Optional) Run the seed file for demo data
psql -U your_username -d your_database -f database/seed.sql
# Start the development server
npm run devcd frontend
# Install dependencies
npm install
# Start the development server
npm run devThis project is optimized for deployment on Neon (Database), Render (Backend), and Vercel (Frontend).
- Create a free PostgreSQL project on Neon.tech.
- Copy the Connection String.
- Use the SQL Editor in Neon to run:
- First:
backend/database/schema.sql(creates base tables) - Then:
backend/database/schema_updates.sql(adds chat, notifications, student management)
- First:
- (Optional) Run
backend/database/seed.sqlto populate demo data.
- Create a new Web Service on Render.com.
- Connect your repository.
- Set Root Directory to
backend. - Add Environment Variables:
DATABASE_URL: (Paste Neon Connection String)JWT_SECRET: (Your secret key)NODE_ENV:production
- Import project into Vercel.
- Set Root Directory to
frontend. - Add Environment Variables:
VITE_API_URL: (Your Render Backend URL, e.g.,https://your-app.onrender.com/api)
- Deploy!
| Variable | Description | Local Example | Production Example |
|---|---|---|---|
PORT |
Server Port | 5000 |
(Auto-set by Render) |
DB_HOST |
Database Host | localhost |
(Not needed if using DATABASE_URL) |
DB_USER |
Database User | postgres |
(Not needed if using DATABASE_URL) |
DB_PASSWORD |
Database Password | password |
(Not needed if using DATABASE_URL) |
DB_NAME |
Database Name | hostel_db |
(Not needed if using DATABASE_URL) |
DATABASE_URL |
Full Connection String | (Optional) | postgres://user:pass@host.neon.tech/db |
JWT_SECRET |
Secret for Tokens | secret123 |
complex_production_secret |
| Variable | Description | Local | Production (Vercel) |
|---|---|---|---|
VITE_API_URL |
Backend API URL | http://localhost:5000/api |
https://your-app.onrender.com/api |
- Register/Login - Create an account using your hostel credentials
- Report Issues - Submit new issues with descriptions and images
- Track Progress - Monitor the status of your reported issues
- Engage - Comment on issues and communicate with admins
- π¬ Chat with Admin - Send direct messages via the Messages page
- π Notifications - Get real-time alerts when issues are resolved or receive messages
- Lost & Found - Report lost items or claim found items
- Default Admin Login:
admin@hostel.com/admin123(if seeded)
- Login - Access the admin portal with your credentials
- Dashboard - View all reported issues and statistics
- Manage Issues - Assign staff, update status, and add notes (triggers student notifications)
- π₯ Student Management - View list of all registered students, search by name/hostel
- π Student Details - View individual student profiles with issue history and chat
- π¬ Direct Chat - Message any student in real-time from their profile page
- ποΈ Unregister Students - Deactivate student accounts (preserves issue history)
- π Notifications - Receive alerts when students send messages
- Post Announcements - Keep students informed
- User Management - Create student and staff accounts
hostel_issue_tracking_system/
βββ backend/
β βββ src/
β β βββ controllers/ # Request handlers
β β βββ middleware/ # Authentication & validation
β β βββ routes/ # API routes
β β βββ index.js # Entry point
β βββ database/ # SQL schema and seed files
β βββ uploads/ # User-uploaded files
β
βββ frontend/
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ pages/ # Page components
β β βββ context/ # React context (Auth)
β β βββ services/ # API services
β β βββ index.css # Global styles
β β βββ App.jsx # Root component
β βββ public/ # Static assets
βββ README.md
- JWT-based authentication
- Password hashing with bcrypt
- Protected API routes
- Role-based authorization
- Input validation and sanitization
- CORS configuration
- Secure file upload handling
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Aditya Jain
- GitHub: @adityajain-27
- Role: Backend Development, Database Design, Deployment
Sweety
- GitHub: @Sweety3106
- Role: Frontend Development, UI/UX Design
- Icons by Lucide
- Design inspiration from modern SaaS applications
- Built with β€οΈ for improving hostel management
For support, email adityaalba27@gmail.com or create an issue in the repository.
β Star this repository if you find it helpful!