Skip to content

Repository files navigation

🏫 HostelSync

A Web-Based Hostel Management System for Academic Institutions

Live Demo React Supabase PostgreSQL TailwindCSS Vite


HostelSync digitizes hostel operations β€” replacing paper registers with a secure, real-time, role-based platform for managing outing approvals, attendance, student movement, and more.



πŸ“Έ Screenshots

Login Page
πŸ” Login Page β€” Student / Staff / Admin
Principal Dashboard
πŸ“Š Principal Dashboard β€” System-wide Overview
Student Database
πŸŽ“ Student Database β€” 47 Students with Filters
Attendance Overview
πŸ“… Attendance Overview β€” Boys & Girls Hostel
Approval History
πŸ“‹ System-wide Approval History β€” Full Audit Trail

πŸ’‘ To display screenshots: Create a screenshots/ folder in your repo root and upload the 5 images with these filenames: login.png, principal-dashboard.png, student-database.png, attendance-overview.png, approval-history.png


πŸ“Œ Overview

HostelSync is a production-ready, full-stack hostel management system built for St. Peter's College of Engineering and Technology. It eliminates paper-based hostel workflows by providing a centralized platform where students, staff, and administrators can manage hostel operations digitally β€” with real-time data, role-specific dashboards, and automated notifications.

πŸ”‘ Key Highlights

  • βœ… Live & Production Deployed at hostelsync.me
  • πŸ” 5-Role RBAC with database-level Row-Level Security (RLS)
  • πŸ”„ Multi-Stage Outing Approval β€” Student β†’ Advisor β†’ HOD β†’ Warden
  • πŸ“ Real-Time Movement Tracking β€” Inside / Outside / Overdue
  • πŸ“Š Attendance Analytics β€” Daily, Weekly, Monthly views
  • πŸ“§ Guardian Notifications via Email & SMS on outing decisions
  • πŸ“₯ Excel Export for approval history and reports

✨ Features

πŸ‘₯ Role-Based Dashboards

Role Access & Capabilities
πŸŽ“ Student Submit outing requests, track status, view profile & attendance
πŸ§‘β€πŸ« Advisor Stage 1 approval/rejection, filter students by dept/year
πŸ›οΈ HOD Stage 2 approval/rejection, download Excel reports
🏠 Warden Final approval, attendance marking, room management, movement monitoring (hostel-scoped)
πŸŽ–οΈ Principal System-wide monitoring, analytics, full approval chain, all reports

🧾 Multi-Stage Outing Approval Workflow

 Student ──► Advisor ──► HOD ──► Warden ──► βœ… Approved
               β”‚           β”‚        β”‚
               └── ❌ Reject (with comments at any stage)
  • Two outing types: Local Outing and Hometown Visit
  • Each stage independently approves or rejects with comments
  • Full audit trail stored β€” approver name, role, action, timestamp
  • Guardian notified via Email/SMS on final decision

🚢 Real-Time Student Movement Tracking

Status Indicator Condition
Inside 🟒 Green No active approved outing
Outside πŸ”΄ Red Within approved outing window
Overdue ⚠️ Orange Past return time, not yet back

Filter by Department, Year, or Status β€” summary cards show live counts.


πŸ“… Attendance Management

  • Wardens mark daily attendance per student
  • Three states: Present, Absent, Not Marked
  • Daily / Weekly / Monthly analytics views
  • Boys & Girls hostel split with system-wide totals for Principal
  • Date-range filtering and export support

🏠 Room Management

  • Assign and manage room allocations per hostel
  • Composite key (room_number + hostel_type) β€” identical room numbers can exist in Boys and Girls hostels without conflict
  • Warden-scoped: each warden only sees their hostel's rooms

πŸ§‘β€πŸŽ“ Student Management

  • Centralized student database with avatar, hostel badge (Boys/Girls), and profile tooltips
  • Advanced filters: Name, Register No., Department, Year, Hostel Type, Room
  • Role-scoped: Advisors see their dept, Wardens see their hostel, Principal sees all

πŸ“₯ Data Export & Notifications

  • Export approval history to Excel (.xlsx) β€” respects active filters
  • Email & SMS alerts to guardians via Supabase Edge Functions
  • Triggered automatically on final outing approval or rejection

🧾 Complaint Management

  • Students submit complaints with optional file attachments
  • Role-based visibility β€” Warden sees hostel complaints, Principal sees all
  • Structured, trackable grievance handling

πŸ› οΈ Tech Stack

Layer Technology Purpose
Frontend React.js + Vite Component-based UI, fast HMR
Styling Tailwind CSS Utility-first responsive design
UI Components ShadCN UI Accessible, consistent component library
Backend Supabase (BaaS) Auth, real-time queries, RLS, storage
Database PostgreSQL Relational data with RLS policies
Serverless Supabase Edge Functions Guardian notifications, background logic
Export SheetJS (xlsx) Excel report generation
Hosting Vercel + Supabase Cloud Global CDN, managed DB

πŸ—οΈ Project Structure

Hostelsync/
β”œβ”€β”€ public/                     # Static assets
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/             # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ ui/                 # ShadCN base components
β”‚   β”‚   β”œβ”€β”€ dashboards/         # Role-specific dashboard views
β”‚   β”‚   β”œβ”€β”€ outing/             # Outing request components
β”‚   β”‚   β”œβ”€β”€ attendance/         # Attendance management
β”‚   β”‚   β”œβ”€β”€ movement/           # Student movement tracking
β”‚   β”‚   β”œβ”€β”€ rooms/              # Room management
β”‚   β”‚   └── complaints/         # Complaint system
β”‚   β”œβ”€β”€ pages/                  # Route-level pages
β”‚   β”‚   β”œβ”€β”€ Login.jsx
β”‚   β”‚   β”œβ”€β”€ StudentDashboard.jsx
β”‚   β”‚   β”œβ”€β”€ AdvisorDashboard.jsx
β”‚   β”‚   β”œβ”€β”€ HODDashboard.jsx
β”‚   β”‚   β”œβ”€β”€ WardenDashboard.jsx
β”‚   β”‚   └── PrincipalDashboard.jsx
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   └── supabaseClient.js   # Supabase client initialization
β”‚   β”œβ”€β”€ hooks/                  # Custom React hooks
β”‚   β”œβ”€β”€ utils/                  # Helper functions & export logic
β”‚   β”œβ”€β”€ App.jsx                 # Root component & routing
β”‚   └── main.jsx                # Entry point
β”œβ”€β”€ .env.example                # Environment variable template
β”œβ”€β”€ package.json
β”œβ”€β”€ tailwind.config.js
β”œβ”€β”€ vite.config.js
└── README.md

πŸš€ Getting Started

Prerequisites

  • Node.js >= 18.x
  • npm >= 9.x
  • A Supabase project (free tier works)

1. Clone the Repository

git clone https://github.com/Kadhiravan2002/Hostelsync.git
cd Hostelsync

2. Install Dependencies

npm install

3. Configure Environment Variables

cp .env.example .env

Edit .env and fill in your Supabase credentials:

VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your-anon-key-here

πŸ”‘ Find these in your Supabase project under Settings β†’ API

4. Run the Development Server

npm run dev

Open http://localhost:5173 in your browser.

5. Build for Production

npm run build

πŸ—„οΈ Database Setup

This project uses Supabase PostgreSQL with Row-Level Security. The core tables are:

-- Core Tables
students          -- Student profiles, dept, year, room, hostel type, guardian
outing_requests   -- Request details, type (local/hometown), dates, status
approval_history  -- Audit log: approver, role, action, comments, timestamp
attendance        -- Daily records: Present / Absent / Not Marked
rooms             -- Room allocation with hostel isolation
complaints        -- Student grievances with attachment support

πŸ“Œ SQL migration files are located in supabase/migrations/ (if included) or set up tables manually via the Supabase dashboard.


πŸ”’ Security

Feature Implementation
Row-Level Security PostgreSQL RLS policies on all tables
Hostel Isolation Wardens can only access their own hostel's data
Role-Based Auth Role claims validated server-side per API request
Admin Control Role assignment managed by administrators only
Data Separation Boys/Girls hostel data isolated via hostel_type column

🌐 Deployment

The live application is deployed at hostelsync.me

  • Frontend β†’ Deployed on Vercel with global CDN
  • Backend/DB β†’ Hosted on Supabase Cloud (managed PostgreSQL)
  • Edge Functions β†’ Deployed via Supabase for guardian notifications

To deploy your own instance:

# Install Vercel CLI
npm install -g vercel

# Deploy
vercel --prod

🀝 Contributing

Contributions are welcome! Here's how to get started:

Steps

  1. Fork the repository
  2. Create a feature branch
    git checkout -b feature/your-feature-name
  3. Commit your changes with a clear message
    git commit -m "feat: add your feature description"
  4. Push to your branch
    git push origin feature/your-feature-name
  5. Open a Pull Request against the main branch

Commit Message Convention

Use conventional commits for clarity:

Prefix Usage
feat: New feature
fix: Bug fix
docs: Documentation changes
style: Formatting, no logic change
refactor: Code restructuring
chore: Build/config changes

Guidelines

  • Keep PRs focused β€” one feature or fix per PR
  • Test your changes locally before submitting
  • Update documentation if adding new features
  • Follow the existing code style (ESLint + Prettier)

πŸ‘¨β€πŸ’» Authors

A. Kadhiravan
@Kadhiravan2002
Y. Sanjay
Developer

Project Guide: Ms. D. Jayanthi, Assistant Professor β€” Dept. of Information Technology Institution: St. Peter's College of Engineering and Technology, Avadi, Chennai Academic Year: 2025 – 2026 | Final Year B.Tech (Information Technology)


πŸ“„ License

This project is developed as a Final Year B.Tech Project at St. Peter's College of Engineering and Technology.

Β© 2026 A. Kadhiravan & Y. Sanjay β€” All Rights Reserved.


⭐ If you found HostelSync useful, please star the repository!

GitHub stars

Built with ❀️ at St. Peter's College of Engineering and Technology

About

HostelSync is a modern hostel management app designed for SPCT Hostel. Manage residents, rooms, and activities with ease.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages