Control Room Omar
Menu

Case Study

Regnotify: Automated Course Monitoring & Scheduling Ecosystem

A multi-platform automated system providing real-time course availability alerts and algorithmic schedule generation for university students.

2023-10-27 Digital Tools & Analysis University
Cover for Regnotify: Automated Course Monitoring & Scheduling Ecosystem

My Role

Lead Systems Architect & Developer. Designed the end-to-end data pipeline, from automated web scraping to a backend notification engine and a frontend scheduling tool.

Outcome

Automated real-time monitoring for high-demand courses and a conflict-free scheduling algorithm.

Tools

Python FastAPI Flask Telegram Bot API BeautifulSoup4 Deta DB

TL;DR

Regnotify is an integrated ecosystem designed to eliminate the “registration race” common in AUC. By synthesizing a Telegram Bot for instant notifications, a Web Scraper to monitor university databases, and a Backtracking Algorithm to generate conflict-free schedules, the system removes the need for manual monitoring and provides students with an optimized path to course enrollment.

Problem

In many universities, high-demand courses have strictly limited seating. Students are often forced to manually refresh web portals repeatedly to secure a “dropped” seat—a high-friction experience where the primary barrier to entry is the lack of real-time information.

Existing solutions were either manual (repetitive page refreshing) or passive (static waitlists). There was a clear need for an active system that could:

  1. Monitor database changes in real-time.
  2. Notify users instantly via a mobile-friendly interface.
  3. Optimize the resulting schedule based on complex constraints, such as “Hidden Labs” and overlapping time blocks.

Design Iterations

The system architecture evolved through three distinct engineering phases:

1. The Data Acquisition Layer (Scraping & Parsing)

The foundation of the system is a robust scraper (Banner.py). Moving beyond standard HTTP requests, the system implements multi-pass logic to query the university’s backend. It parses complex HTML tables to extract critical metadata, including CRNs, instructor names, and—most importantly—real-time remaining seat counts.

2. The Notification Engine (Delta-Logic)

The Notifier module serves as the system’s “brain.” Rather than broadcasting raw data, it performs a differential analysis:

  • It compares the current state of the database against the previous scrape.
  • If a change in remaining_seats is detected, it triggers an asynchronous notification via the Telegram API.
  • This logic ensures that users are only alerted when actionable changes occur, significantly reducing “noise” while maintaining high-speed delivery.

3. The Scheduling Algorithm (Backtracking)

To navigate the complexities of scheduling multiple courses across varying days and times, I implemented a backtracking algorithm in schedule_builder.py.

  • Constraint Satisfaction: The algorithm ensures that no two courses overlap in time.
  • Dynamic Filtering: It accounts for “Hidden Labs” by adjusting logic for specific course sections.
  • Optimization: It generates multiple valid schedule permutations, allowing users to select the configuration that best aligns with their personal preferences.

Technical Details

Automated State Management

The Telegram bot utilizes a ConversationHandler to manage complex user workflows. This architecture allows the system to guide users through a multi-step onboarding process—selecting semesters, inputting CRNs, and confirming selections—while maintaining state across asynchronous interactions.

Data Persistence & Scalability

I utilized Deta DB for its low-latency performance and seamless integration with Python. The database schema is partitioned into three primary modules:

  • Banner: Current course availability data.
  • Users: Telegram IDs and personalized user preferences.
  • Stats: System health metrics (e.g., tracking the number of unique courses per semester).

Backend Architecture

The system employs a dual-backend architecture to optimize for different use cases:

  1. FastAPI: Powers the high-concurrency “Notifier” service, handling incoming webhooks and automated scraping tasks.
  2. Flask: Powers the user-facing web portal, providing a streamlined GUI for students to manage profiles and generate schedules.

Results & Key Metrics

  • Real-time Alerting: Reduced the latency between a seat becoming available and a student notification to under 10 minutes (depending on the scraping interval).
  • Automated Validation: The CourseDataExtractor validates CRNs against the master database before allowing a user to add them to their “watch list,” ensuring data integrity.
  • Conflict-Free Guarantee: The backtracking algorithm ensures that any generated schedule is mathematically guaranteed to have zero time-block overlaps.

Samples from the Bot’s Telegram Interface

1. Course Availability Notification

A sample Telegram notification alerting a user that a seat has become available in a high-demand course, including the CRN, instructor name, and remaining seat count.

2. Adding a Course to the Watchlist

A screenshot of the Telegram bot interface where a user inputs a CRN to add a course to their watchlist, triggering the system to monitor that course for seat availability.

3. Dropping a Course from the Watchlist

A screenshot of the Telegram bot interface where a user inputs a CRN to remove a course from their watchlist, ceasing further notifications for that course.

4. Finding Core Courses in certain Time Blocks

A screenshot of the Telegram bot interface where a user requests a list of core courses available within specific time blocks, allowing them to make informed scheduling decisions.

Current Status

Unfortunately, the system is currently not operational due to the university’s recent migration to a new registration platform as well as Deta has been discontinued. However, the system’s architecture and algorithms remain a strong foundation for future iterations, and I am actively exploring alternative hosting solutions and scraping methodologies to restore functionality.

Frameworks & Tooling