--- 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](https://huggingface.co/spaces/Hamzavelous/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 ```bash 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. ```bash 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`)