$ show vikas-bhat-d/vtu-autopilot
The VTU Autopilot is a tool designed to automate the completion of online courses offered by the Visvesvaraya Technological University (VTU). It provides a web interface, a command-line interface, and a REST API for users to submit their VTU credentials and course slug, after which the system automatically logs in, retrieves the course structure, and attempts to mark each lecture as complete by sending progress updates to the VTU API. The system handles retries, network errors, and edge cases such as lectures with zero duration (which are skipped permanently). The architecture consists of a Node.js/Express server that manages a job queue with concurrency control, ensuring that only a limited number of jobs run simultaneously to avoid overloading the VTU servers. Each job is processed by the automation engine, which encapsulates the logic for interacting with the VTU API. The server also provides real-time progress updates to the client via Server-Sent Events (SSE) and persists job state and queue information in Redis (with an in-memory fallback) to survive restarts. The frontend is a single-page application that presents a user-friendly interface for submitting credentials, tracking job progress, and viewing completion statistics. Two key components stand out for their reusability and craftsmanship: the automation engine (automation.js) and the Redis-based persistence layer (lib/redis.js). The automation engine is a self-contained module that handles the entire process of logging in, fetching course data, and processing lectures with intelligent retry logic and duration caching. The persistence layer provides a generic solution for job queue management and state persistence with Redis, complete with deduplication and graceful fallback to in-memory storage. Both components demonstrate non-obvious skill in handling the specific challenges of the VTU API and the requirements of a reliable job processing system.
The LLM identified 2 files worth highlighting for reuse:
The core automation engine that handles login, course structure fetching, and lecture completion with retry logic, duration caching, and batch processing. It is self-contained and only depends on external HTTP and cookie libraries. Demonstrates skill in handling API quirks (zero-duration lectures, retries, and efficient batching).
A Redis-backed job and queue persistence layer with graceful fallback to in-memory storage. Handles job state, queue management, deduplication, and statistics. Designed for fault tolerance and clean separation of concerns. Demonstrates skill in designing a persistence layer that works with or without Redis and manages TTLs for different job states.