You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Smart Campus Facility Booking System
GIK Institute of Engineering Sciences & Technology
Overview
OptiSpace is a full-stack web application for managing facility bookings across the GIK Institute campus. It enables students, faculty, and society heads to discover available facilities, submit booking requests, and receive approvals — while giving administrators a centralized dashboard to manage users, facilities, and booking workflows.
Key Features
Role-Based Access Control — 4 roles: Admin, Faculty, Student, Society Head
Real-Time Conflict Detection — prevents double-booking with overlapping time checks
Transactional Approval System — ACID-compliant approve/reject with BEGIN/COMMIT/ROLLBACK
Smart Recommendations — least-used facilities, best time slots, similar alternatives
Usage Analytics — department-wise usage tracking with automated analytics via triggers
Campus-Specific — facilities mapped to real GIK departments (FCSE, FME, FMCE, BB, FBS, NAB)
BEGIN;
-- Re-check for time conflicts (prevents race conditions)-- Update booking_requests status → 'Approved'-- Insert into approved_bookings-- Insert approval record with admin remarksCOMMIT;
T2: Reject Booking
BEGIN;
-- Update booking_requests status → 'Rejected'-- Insert approval record with rejection remarksCOMMIT;
Both transactions use ROLLBACK on any failure, ensuring atomicity.
Setup & Installation
Prerequisites
Node.js v18+
PostgreSQL 16
npm
1. Database Setup
# Create database in pgAdmin or psql
CREATE DATABASE optispace;# Run schema (creates tables, views, indexes, trigger)\i database/schema.sql
# Run seed data\i database/seed.sql
2. Backend Setup
cd backend
npm install
# Create .env file
cp .env.example .env
# Edit .env with your DB credentials:# DB_HOST=localhost# DB_PORT=5432# DB_NAME=Optispace# DB_USER=postgres# DB_PASSWORD=your_password# JWT_SECRET=optispace_secret_key_2026# PORT=5000
npm run dev
3. Frontend Setup
cd frontend
npm install
npm run dev
4. Access
Frontend: http://localhost:5173
Backend API: http://localhost:5000/api
Default Admin: admin@giki.edu.pk / GIK@12345
Team
Member
Role
Responsibilities
Reyan Kashif (2024538)
Backend & Database Developer
API development, database design, server architecture
Admin pages, auth context, state management, database queries
Course Information
Course
CS232 — Database Management Systems
Semester
Spring 2026
Institute
GIK Institute of Engineering Sciences & Technology
Department
Department of Cyber Security
License
This project is developed as an academic assignment for CS232 at GIK Institute. Not intended for production use.
About
Smart Campus Facility Booking System for GIK Institute — Role-based booking management with conflict detection, transactional approvals, and usage recommendations. Built with PostgreSQL, Node.js/Express, and React. (CS232 - DBMS Spring 2026)