metadata
title: Hostel Management System
emoji: π
colorFrom: indigo
colorTo: purple
sdk: docker
app_port: 7860
pinned: false
license: mit
short_description: Hostel MS with admin/student portals & C PDC benchmarks
π Hostel Management System
Parallel & Distributed Computing Lab Project
University of Central Punjab (UCP) Β· BSAI
Authors: Ch Hamza Younas (L1F23BAI0089) Β· Muhammad Abdullah (L1F23BSAI0063)
Instructor: Ma'am Khadija
A modern Streamlit web application for complete hostel operations β with real OpenMP and POSIX Threads performance benchmarks compiled in C.
π Live App: Hostel-Management_System
π Demo Logins
| Role | Credentials |
|---|---|
| Admin / Warden | admin / admin123 |
| Student | UCP-BSAI-1001 / student123 |
β¨ Features
Admin Portal
- π Live Dashboard β KPIs, charts, activity feed & room grid
- ποΈ Room Management β add, view, delete, CSV export
- π Student Management β enroll, search, assign rooms
- π° Fee & Finance β challans, payments, defaulters, history
- π½οΈ Mess & Complaints β weekly menu, ticket tracking, announcements
- πͺ Gate & Attendance β IN/OUT logs, bulk roll call
- π Analytics Hub β rent collection, floor occupancy
- π Reports β JSON/CSV export, reset demo data
- β‘ PDC Benchmark β Sequential, OpenMP, POSIX Threads (C)
Student Portal
- Profile, fees, complaints, mess menu, announcements
- π My Activity β personal gate logs & attendance history
- β‘ PDC performance test access
β‘ PDC Performance Test
| Method | Workers | Engine |
|---|---|---|
| Sequential | 1 | Single-threaded C loop |
| OpenMP | 2 / 4 | #pragma omp parallel for |
| POSIX Threads | 4 | pthread_create() workers |
True parallel speedup β not Python GIL-limited threads.
π Run Locally
pip install -r requirements.txt
cd c_backend
gcc -O2 -fopenmp -pthread search_bench.c hostel_mock_data.c -o search_bench -lm
cd ..
streamlit run app.py
π³ Docker (Hugging Face Spaces)
This Space uses the Docker SDK on port 7860. The Dockerfile compiles the C benchmark automatically.
docker build -t hostel-ms .
docker run -p 7860:7860 hostel-ms
π οΈ Tech Stack
- Frontend: Streamlit, Plotly, custom dark indigo theme
- Backend logic: Python session state + C benchmark binary
- Parallel C: OpenMP (
-fopenmp) + POSIX Threads (-pthread)