Project KNOT – System Milestones & Documentation

University Resource & Maintenance Management Platform
Faculty of Engineering, University of Peradeniya
Final Evaluation (2nd Year Project - 4th Milestone)


Team

Supervisor


🌐 Live Production Deployment


📚 Complete System Guides


Table of Contents

  1. Introduction
  2. Milestone Progress & Implemented Features
  3. Solution Architecture
  4. Software Designs
  5. Testing & System Validation
  6. Conclusion & Future Work
  7. Links

Introduction

The Problem

Universities and large educational institutions often suffer from highly fragmented administrative systems. Currently, the processes for booking academic resources (such as lecture halls, labs, and seminar rooms) and reporting infrastructure faults are disconnected. This leads to severe coordination issues between students, academic staff (lecturers), administrative registries (AR), and maintenance technicians. The real-world consequences include double-booked lecture halls, untracked maintenance requests that take weeks to resolve, ghost bookings, and a general lack of transparency regarding request statuses.

The Solution

Project KNOT is a unified, centralized resource and maintenance management platform. It solves this fragmentation by offering a single, Role-Based Access Control (RBAC) ecosystem with specialized workflows for Students, Lecturers, Booking Admins, Maintenance Admins, and Field Technicians, supported by automated 2-step attendance verification, Nodemailer email dispatch, multi-container Docker infrastructure, and Cloudflare zero-trust edge hosting.


Milestone Progress & Implemented Features

🔹 Milestone 1: Core Foundation & Architecture

  1. Multi-Role Authentication & Role-Based Access Control (RBAC):
    • Built a secure login framework supporting Students, Lecturers, Booking Admins, Maintenance Admins, and Technicians.
  2. Resource Database Schema Normalization:
    • Initial database design for lecture halls, labs, and seminar rooms with capacity metrics and operational status tracking.
  3. UI Dashboard Framework:
    • Developed responsive Single Page Application (SPA) layouts using React.js and Tailwind CSS with glassmorphic elements and dark/light modes.

🔹 Milestone 2: Academic Booking Workflow & Maintenance Reporting

  1. Multi-Tier Academic Approval Workflow:
    • Implemented 3-stage reservation approval chain: Student Request ➡️ Lecturer Endorsement ➡️ Booking Admin Final Approval.
  2. Basic Fault Reporting Module:
    • Implemented issue submission features allowing campus users to report infrastructure faults with category tags and priority levels.

🔹 Milestone 3: Real-Time Availability Grid, Worker Portal, Bulk Schedule Import & System Integration

  1. Bulk Semester Schedule Import Implementation (Dean’s Requirement):
    • Master Timetable Ingestion Engine: Implemented specifically per the Dean’s requirement to handle pre-booked master semester timetables.
    • Automated Validation & Ingestion: Parses semester schedule files, extracts day/time/hall/lecturer attributes, automatically verifies conflicts against existing database reservations, skips overlapping slots, and bulk-populates recurring semester lectures into the system.
  2. Interactive Real-Time Hall Availability Grid:
    • Visual hourly slot selection grid (08:00 AM – 06:00 PM) replacing static dropdowns.
    • Real-time database queries displaying booked status badges (Available, Booked: [Purpose], Already Passed) and preventing double-booking over occupied ranges.
  3. Maintenance Worker Portal Integration & Admin Task Assignment:
    • Admin Task Assignment & Dispatch: Maintenance Admins review fault reports, assign specific technicians (Alex Johnson, Sam Carter), set priority levels, and attach technical directives.
    • Technician Task Queue (TechnicianDashboard): Technicians access a personal, real-time job queue filtering tickets assigned specifically to their ID.
    • Interactive Task Modal & Evidence Inspector: Technicians inspect location info, map coordinates, reporter notes, and user evidence photos.
    • Status Progression & Work Logs: Technicians update jobs in real-time (Open ➡️ In Progress ➡️ Resolved), add maintenance resolution notes, and upload proof-of-work photos upon completion.
  4. Booking Admin Portal Automated Approval System & Multi-Criteria Filtering:
    • Automated Reservation Approval Engine: Implemented an automated booking approval system in the Booking Admin Portal. When enabled (auto_booking: true), routine conflict-free hall booking requests are automatically validated against existing reservations and instantly approved (Approved) without administrative delay.
    • Configurable Control Panel: Configurable toggle in Booking Admin System Settings with persistent MySQL database state (settings table) allowing admins to toggle between automated approvals and manual AR office reviews.
    • Multi-Criteria Search & Filter: Filter by Search Text (matching room, lecturer name, user role, or purpose), Multi-Select Room badges (e.g., EOE Hall, DO1, Lecture Hall 1), Quick Date Presets (Today, Tomorrow, This Week, Future), Custom Date Ranges, and Status (Approved, Pending AR, Pending, Rejected).
    • Flexible Sorting: Sort table rows by Date (Newest/Oldest), Lecture Hall Name, or Status.
  5. Semester Timetable Calendar Enhancements:
    • Native HTML5 datepicker calendar integration.
    • Datepicker-filtered Agenda View displaying lectures strictly for selected dates.
    • Dedicated single-room grid timeline view when filtering by a specific hall.
    • Standardized 10 uniform lecture hall names across all UI elements and database schemas (EOE Hall, DO1, DO2, Lecture Hall 1, Lecture Hall 2, Seminar Room 1, Seminar Room 2, Computer Lab 1, Computer Lab 2, Main Auditorium).
  6. Maintenance Reporting & Admin Evidence Viewer:
    • Integrated OpenStreetMap (Leaflet) with reverse geocoding (Nominatim API) and map pin dropping.
    • High-resolution photo evidence upload support with 50MB JSON payload limits.
    • Maintenance Admin Ticket Details view with a dedicated Evidence Photo Viewer.

🌟 Milestone 4: 2-Step Verification, Email Dispatch, Profile Management, Docker & Cloudflare Production Deployment (Final Evaluation)

  1. Automated 2-Step Booking Verification & Background Anti-No-Show Engine:
    • Attendance Verification Workflow: Built a 2-step verification system to eliminate ghost bookings and unverified hall reservations.
    • 60-Second Background Cron Worker: Runs continuous minute-by-minute checks (server.js) scanning for unverified pending holds, auto-expiring unconfirmed reservations, and releasing room allocations back to the public pool.
  2. Nodemailer Automated Email Notification Dispatcher:
    • SMTP Email Service Integration: Integrated Nodemailer with responsive HTML templates for all key system events.
    • Real-Time Transactional Alerts: Automatic dispatch of email alerts for booking status changes (Approved/Rejected), verification reminders, fault ticket filings, technician task dispatches, and ticket resolution logs.
  3. Flexible Dual-Credential Authentication (Username or Email):
    • Multi-Credential Login Engine: Enhanced authentication endpoints (/api/auth/login) allowing users across all 5 user roles to log in using either their Registration Number / Username (e.g., e22237) or their verified Email Address (e22237@eng.pdn.ac.lk).
  4. User Profile & Credentials Management Module:
    • Profile Settings Panel: Added user profile management across all dashboards allowing users to view/edit display names, phone numbers, addresses, employee/student IDs, avatar graphics, and securely update passwords with instant MySQL persistence.
  5. Production Multi-Container Docker & Docker Compose Environment:
    • Containerized Micro-Services: Built a production stack using docker-compose.yml, multi-stage Dockerfiles, Nginx proxy, persistent MySQL volume mounts, and automated schema migration scripts (setup_db.js).
  6. Cloudflare Zero-Trust Edge Tunnel & Production Hosting Architecture:
    • Live Production Deployment: Hosted live at https://foe.knotpdn.tech and https://backend.knotpdn.tech.
    • Zero-Trust Edge Proxy: Secured with Cloudflare Edge Tunnel (cloudflared), PM2 process management, and SSL/TLS encryption for 24/7 uptime.
  7. Comprehensive System Testing & Code Coverage Suite:
    • Automated Validation Suite: Test runner (test_runner.js) achieving 100% test pass rate across unit and API integration suites and 95.1% code coverage.
    • Full Documentation Artifacts: Complete Developer Guide, User Manual, Docker Deployment Guide, and System Testing & Validation Report (both Markdown and Microsoft Word .docx formats).

Solution Architecture

Project KNOT utilizes a modern, decoupled Client-Server Architecture to ensure scalability and maintainability.


Software Designs

3.1 User Interface (UI) Design

The system employs a “View-Based Navigation” architecture. Dashboards utilize dynamic component rendering and RBAC authentication guards to seamlessly mount appropriate interfaces for Students, Lecturers, Booking Admins, Maintenance Admins, and Technicians.

3.2 Database Schema Design

Normalized relational schema:

3.3 Business Logic & Workflow Designs

  1. 2-Step Booking Verification & Auto-Expiration: Booking created ➡️ Verification code generated ➡️ Student verifies attendance ➡️ Background cron auto-purges expired unverified holds.
  2. Dean’s Bulk Timetable Ingestion: Booking Admin uploads master schedule file ➡️ Backend parses slots & validates conflicts ➡️ Bulk inserts valid semester lectures into database.
  3. Multi-Criteria Booking Filter & Sort: Booking Admin toggles room badges, date ranges, and status pills ➡️ Dynamic client-side filter engine updates “All Bookings” table instantly.
  4. Worker Task Assignment: Maintenance Admin assigns fault ticket ➡️ Assigned Technician views task on Worker Portal, updates status (In Progress ➡️ Resolved), logs work, and uploads proof photo.

Testing & System Validation

Testing was conducted across all system tiers to validate Milestones 1, 2, 3, and 4 requirements:


Conclusion & Future Work

What Was Achieved

We successfully designed, developed, integrated, containerized, hosted, and validated all four Milestones of Project KNOT for the final 2nd year project evaluation. The platform provides a complete academic resource booking system, Dean’s bulk semester timetable import, 2-step attendance verification engine, Nodemailer automated email alerts, dual-credential login, user profile management, maintenance worker portal with task assignment, Leaflet GIS fault reporting, photo evidence inspection, multi-container Docker stack, and live Cloudflare Zero-Trust production hosting.

Future Developments