Skip to content
blitzictPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

CLNKR - Campus Life Next-gen Knowledge & Resources

A comprehensive, modern web application that serves as an AI-powered campus management system for Khalifa University. CLNKR (Campus Life Next-gen Knowledge & Resources) provides a complete solution for room booking, course registration, event scheduling, maintenance requests, and administrative oversight.

Features

Core Functionalities

  • AI Chatbot: Interactive assistant that helps with all campus needs through natural language processing
  • Room Booking System: Browse and book library study rooms with real-time availability, conflict detection, and administrative approval workflow
  • Professor Directory: Comprehensive directory with search functionality, contact information, office locations, and office hours
  • Course Registration: Browse available courses, view enrollment status, and register with one-click functionality
  • Event Scheduling: Create and manage campus events with calendar views (requires admin approval for all users)
  • Maintenance Requests: Submit and track facility maintenance requests with status tracking (pending, in_progress, completed)
  • Personal Dashboard: Track bookings, registrations, study hours, and recent activity
  • Schedule View: Calendar interface showing course schedules and bookings in list, week, and month views
  • User Profile Management: Update personal information, change password, and manage account settings

Administrative Features

  • Admin Panel: Comprehensive administrative interface for user management
  • User Management: View all users, edit user information (first name, last name, birthday, gender, role), manage passwords, and delete accounts
  • Approval System: Approve or reject pending bookings, events, and maintenance requests
  • Faculty Approval: Review and approve faculty account registrations
  • Analytics Dashboard: View booking trends

User Roles and Permissions

  • Students: Can book rooms, register for courses, create events (pending approval), submit maintenance requests
  • Faculty: Same as students, with additional title field and email auto-generation (firstname.lastname@ku.ac.ae). Requires admin approval before login
  • Administrators: Full access including user management, approval workflows, and analytics
  • Facility Staff: Can handle maintenance requests and view analytics

Design Features

  • Modern glass morphism effects
  • Animated gradient backgrounds
  • Smooth transitions and hover effects
  • Responsive design for all devices
  • Dark theme with vibrant accents
  • Interactive chat interface
  • Golden aura effect for special instructors (Dina Atia and Sani Umar)

Quick Start

Prerequisites

  • Python 3.8 or higher
  • pip (Python package manager)

Installation

  1. Clone or download this project to your local machine

  2. Install Python dependencies:

pip install -r requirements.txt
  1. Run the application:
python app.py
  1. Open your browser and navigate to:
http://localhost:5000
  1. For admin access, navigate to:
http://localhost:5000/admin
  • Username: Blitz
  • Password: COSC336

Features Overview

Chat Assistant

  • LLM-Powered: Uses OpenAI GPT models for natural language understanding (API key is hardcoded)
  • Rule-Based Fallback: Falls back to pattern matching if LLM initialization fails
  • Natural language processing for understanding student queries
  • Quick action buttons for common tasks
  • Context-aware responses with access to rooms, courses, bookings, and registrations
  • Typing indicators and smooth animations
  • Supports room booking, course registration, and profile updates via chat
  • Intelligent intent recognition and action execution

Room Booking

  • Real-time availability status
  • Filter by availability, capacity, or type
  • One-click booking with modal form
  • Edit and delete bookings through dropdown menu
  • Feature tags (Whiteboard, Projector, etc.)
  • Automatic room release when booking period ends
  • Conflict detection and approval workflow

Professor Directory

  • Search by name, department, or email
  • Contact information display
  • Office hours and locations
  • Beautiful card-based layout
  • Special golden aura styling for distinguished professors

Course Registration

  • Browse all available courses
  • View professor, credits, and schedule
  • See enrollment counts and available spots
  • One-click registration
  • Success notifications

Event Scheduling

  • Create events with title, description, date/time, and location
  • Calendar views (list, week, month)
  • All events require admin approval
  • Edit and manage created events

Maintenance Requests

  • Submit maintenance requests with priority levels
  • Track request status (pending, in_progress, completed)
  • View request history
  • Admin approval workflow

Dashboard

  • Live statistics tracking
  • Recent bookings display with edit/delete options
  • Course registration history
  • Study hours calculation
  • Quick access to all features

Admin Panel

  • User management with search functionality
  • Edit user information (first name, last name, birthday, gender, role, title)
  • Approve/reject faculty accounts
  • Manage user passwords
  • Delete user accounts
  • Approve/reject bookings, events, and maintenance requests
  • View all user bookings and course registrations

Tech Stack

Backend:

  • Python Flask - Web framework
  • Flask-CORS - Cross-origin resource sharing
  • RESTful API design
  • JSON file-based data persistence
  • Session-based authentication

Frontend:

  • Pure JavaScript (ES6+) with object-oriented design
  • CSS3 with animations and glass morphism effects
  • HTML5
  • Font Awesome icons
  • Google Fonts (Inter)

Project Structure

CLNKR/
│
├── app.py                      # Flask backend server
├── requirements.txt          # Python dependencies
├── README.md                  # This file
├── PROJECT_DOCUMENTATION.txt   # Detailed documentation
│
├── backend/                    # Backend modules
│   ├── __init__.py
│   ├── data_manager.py        # Data persistence
│   ├── validators.py          # Input validation
│   ├── user_manager.py        # User operations
│   ├── booking_manager.py     # Booking operations
│   ├── chat_processor.py       # Chat processing
│   ├── event_manager.py       # Event management
│   ├── maintenance_manager.py # Maintenance requests
│   └── analytics_manager.py   # Analytics and reporting
│
├── data/                       # Data files (JSON)
│   ├── users.json             # User accounts
│   ├── bookings.json          # Room bookings
│   ├── rooms.json             # Room definitions
│   ├── professors.json        # Professor data
│   ├── courses.json           # Course catalog
│   ├── events.json            # Campus events
│   └── maintenance.json       # Maintenance requests
│
├── templates/                  # HTML templates
│   ├── index.html             # Main application page
│   ├── login.html             # Login page
│   ├── signup.html            # Signup page
│   ├── admin_login.html       # Admin login page
│   └── admin_panel.html       # Admin panel
│
└── static/                     # Static assets
    ├── css/
    │   ├── styles.css         # Main stylesheet
    │   ├── auth.css           # Authentication styles
    │   └── admin.css          # Admin panel styles
    └── js/
        ├── core/              # Core JavaScript modules
        │   ├── App.js         # Main application class
        │   ├── UIManager.js   # UI management
        │   ├── ChatManager.js # Chat functionality
        │   ├── BookingManager.js # Booking operations
        │   ├── DashboardManager.js # Dashboard
        │   ├── ScheduleManager.js # Schedule/calendar
        │   ├── SearchManager.js # Global search
        │   ├── ProfileManager.js # Profile management
        │   ├── ProfessorManager.js # Professor directory
        │   ├── CourseManager.js # Course registration
        │   ├── EventManager.js # Event scheduling
        │   ├── MaintenanceManager.js # Maintenance
        │   ├── AnalyticsManager.js # Analytics
        │   └── BookingApprovalManager.js # Approvals
        ├── auth.js            # Authentication logic
        ├── admin_auth.js      # Admin authentication
        └── admin_panel.js     # Admin panel logic

Configuration

The application runs with default settings, but you can modify:

  • Port: Change port in app.py (default: 5000)
  • Debug Mode: Set to False in production
  • Data: Modify JSON files in data/ directory for rooms, professors, courses
  • Admin Credentials: Change in app.py (ADMIN_USERNAME and ADMIN_PASSWORD)
  • OpenAI API Key: Hardcoded in backend/chat_processor.py (line 53)
  • OpenAI Project ID: Hardcoded in backend/chat_processor.py (line 65 and 88)

API Endpoints

Authentication

  • POST /api/auth/signup - Create new user account (supports student and faculty)
  • POST /api/auth/login - User login
  • POST /api/auth/logout - User logout
  • GET /api/auth/check - Check authentication status
  • GET /api/auth/profile - Get user profile
  • PUT /api/auth/profile - Update user profile
  • POST /api/auth/change-password - Change password

Rooms and Bookings

  • GET /api/rooms - Get all rooms
  • POST /api/rooms/book - Book a room
  • GET /api/bookings - Get user bookings
  • PUT /api/bookings/<id> - Update booking
  • DELETE /api/bookings/<id> - Cancel booking
  • GET /api/bookings/pending - Get pending bookings (admin)
  • POST /api/bookings/<id>/approve - Approve booking (admin)
  • POST /api/bookings/<id>/reject - Reject booking (admin)

Professors

  • GET /api/professors - Get all professors
  • POST /api/professors/search - Search professors

Courses

  • GET /api/courses - Get all courses
  • POST /api/courses/register - Register for course
  • GET /api/registrations - Get user registrations

Events

  • GET /api/events - Get all events
  • POST /api/events - Create event (requires approval)
  • PUT /api/events/<id> - Update event
  • DELETE /api/events/<id> - Delete event
  • GET /api/events/pending - Get pending events (admin)
  • POST /api/events/<id>/approve - Approve event (admin)
  • POST /api/events/<id>/reject - Reject event (admin)

Maintenance

  • GET /api/maintenance - Get maintenance requests
  • POST /api/maintenance - Create maintenance request
  • PUT /api/maintenance/<id>/status - Update request status
  • GET /api/maintenance/pending - Get pending requests (admin)
  • POST /api/maintenance/<id>/approve - Approve request (admin)
  • POST /api/maintenance/<id>/reject - Reject request (admin)

Analytics

  • GET /api/analytics - Get analytics data (admin/facility staff)

Admin

  • POST /api/admin/login - Admin login
  • POST /api/admin/logout - Admin logout
  • GET /api/admin/check - Check admin authentication
  • GET /api/admin/users - Get all users
  • GET /api/admin/users/<email> - Get user details
  • PUT /api/admin/users/<email> - Update user
  • PUT /api/admin/users/<email>/password - Update user password
  • PUT /api/admin/users/<email>/approve - Approve faculty account
  • DELETE /api/admin/users/<email> - Delete user
  • DELETE /api/admin/bookings/<id> - Delete booking (admin)

Chat

  • POST /api/chat - Process chat messages

Usage Tips

  1. Chat First: Start with the chat interface for guided assistance
  2. Quick Actions: Use the quick action buttons for common tasks
  3. Search: Use the global search bar for quick lookups across rooms, courses, and professors
  4. Filters: Use room filters to find the perfect study space
  5. Dashboard: Check your dashboard regularly to track your activities
  6. Schedule: Use the schedule view to see all your bookings and courses in calendar format
  7. Admin Panel: Administrators can manage all users and approve pending requests from the admin panel

Browser Support

  • Chrome (recommended)
  • Firefox
  • Safari
  • Edge
  • Opera

Future Enhancements

  • Database integration (SQLite/PostgreSQL)
  • Real-time notifications
  • Email confirmations
  • Advanced scheduling features
  • Mobile app version
  • Enhanced analytics and reporting
  • Integration with university systems

Troubleshooting

If the application doesn't start:

  1. Ensure Python 3.8+ is installed:
python --version
  1. Ensure all dependencies are installed:
pip install -r requirements.txt
  1. Check if port 5000 is available:
lsof -i :5000  # On Mac/Linux
netstat -ano | findstr :5000  # On Windows
  1. Try a different port by modifying the last line in app.py:
app.run(debug=True, port=5001)  # Change to different port
  1. Ensure the data/ directory exists and contains the required JSON files

License

This project is open source and available for educational purposes.

Contributing

Feel free to fork this project and submit pull requests with improvements!


Built by Blitzict and co

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages