[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-1337":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":13,"stars7d":13,"stars30d":14,"stars90d":13,"forks30d":13,"starsTrendScore":13,"compositeScore":15,"rankGlobal":8,"rankLanguage":8,"license":8,"archived":16,"fork":16,"defaultBranch":17,"hasWiki":18,"hasPages":16,"topics":19,"createdAt":8,"pushedAt":8,"updatedAt":20,"readmeContent":21,"aiSummary":22,"trendingCount":13,"starSnapshotCount":13,"syncStatus":23,"lastSyncTime":24,"discoverSource":25},1337,"vtu-autopilot","vikas-bhat-d\u002Fvtu-autopilot","vikas-bhat-d",null,"HTML",303,16,1,0,10,3.69,false,"main",true,[],"2026-06-12 02:00:26","# VTU Autopilot 🚀\r\n\r\n> Auto-complete VTU online courses. Because 166 lectures is not it.\r\n\r\n**VTU Autopilot** automates marking VTU online course lectures as complete — parallel processing, smart retries, real-time progress, and a clean web UI.\r\n\r\n[![View Live](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FView%20Live-https%3A%2F%2Fvtu--autopilot.up.railway.app-blue?style=for-the-badge&logo=railway)](https:\u002F\u002Fvtu-autopilot.up.railway.app\u002F)\r\n\r\n---\r\n\r\n## Table of Contents\r\n\r\n- [VTU Autopilot 🚀](#vtu-autopilot-)\r\n  - [Table of Contents](#table-of-contents)\r\n  - [Features ✨](#features-)\r\n  - [🏠 Run It Yourself (Service down? No problem.)](#-run-it-yourself-service-down-no-problem)\r\n    - [Requirements](#requirements)\r\n    - [Steps](#steps)\r\n    - [No Redis needed](#no-redis-needed)\r\n  - [How It Works](#how-it-works)\r\n    - [Skip reasons](#skip-reasons)\r\n  - [Usage](#usage)\r\n    - [Which mode should I use?](#which-mode-should-i-use)\r\n    - [Web UI *(recommended)*](#web-ui-recommended)\r\n    - [CLI *(requires `.env`)*](#cli-requires-env)\r\n    - [Dev mode (auto-reload)](#dev-mode-auto-reload)\r\n  - [Configuration Reference](#configuration-reference)\r\n  - [REST API](#rest-api)\r\n  - [Troubleshooting](#troubleshooting)\r\n  - [Admin Endpoints](#admin-endpoints)\r\n  - [Project Structure](#project-structure)\r\n  - [Tech Stack](#tech-stack)\r\n  - [Security](#security)\r\n  - [License](#license)\r\n  - [Contributing](#contributing)\r\n- [Summary](#summary)\r\n  - [Run Locally (3 Commands)](#run-locally-3-commands)\r\n  - [License](#license-1)\r\n\r\n---\r\n\r\n## Features ✨\r\n\r\n- ⚡ **Parallel Processing** — Multiple lectures at once (configurable batch size)\r\n- 🔄 **Intelligent Retry Logic** — Auto session refresh; failed lectures are retried with clear reasons\r\n- 📊 **Real-Time Progress** — Server-Sent Events (SSE) for live updates\r\n- 🎯 **Job Queue** — Multiple jobs queued and processed with concurrency control\r\n- 🔐 **Session Management** — Auto re-authentication on 401\u002F419\u002F403\r\n- 📈 **Statistics** — Redis-backed analytics (optional)\r\n- 🖥️ **Web UI + CLI + REST API**\r\n\r\n---\r\n\r\n## 🏠 Run It Yourself (Service down? No problem.)\r\n\r\n> **The hosted service has limited capacity and may occasionally be unavailable.**  \r\n> If it's down — don't wait. You have Git and Node. Run it locally in under 2 minutes.\r\n\r\n### Requirements\r\n\r\n- [Git](https:\u002F\u002Fgit-scm.com\u002Fdownloads) (to clone)\r\n- [Node.js 18+](https:\u002F\u002Fnodejs.org\u002F) (LTS recommended)\r\n- Your VTU account credentials\r\n\r\n### Steps\r\n\r\n**1. Clone and install**\r\n```bash\r\ngit clone https:\u002F\u002Fgithub.com\u002Fvikas-bhat-d\u002Fvtu-course-automation.git\r\ncd vtu-course-automation\r\nnpm install\r\n```\r\n\r\n**2. Start the local server**\r\n```bash\r\nnpm run serve\r\n```\r\n\r\n**3. Open in browser**\r\n```\r\nhttp:\u002F\u002Flocalhost:3000\r\n```\r\n\r\nThat's it. The web UI is identical to the hosted version — enter your credentials, paste your course slug, and hit go. Nothing is stored anywhere; credentials are only used in memory for the duration of the job.\r\n\r\n> **Finding your course slug:** Go to your VTU course page. The slug is the last part of the URL, e.g. `https:\u002F\u002Fonline.vtu.ac.in\u002Fcourses\u002F1-social-networks` → slug is `1-social-networks`.\r\n\r\n### No Redis needed\r\n\r\nRedis is only used for the public hosted statistics counter. Running locally works perfectly without it — just skip any `KV_REST_API_*` env vars.\r\n\r\n---\r\n\r\n## How It Works\r\n\r\n```\r\n1. Login          → Authenticates with VTU, stores session cookie\r\n2. Fetch Course   → Lists all lectures across all modules\r\n3. Batch Process  → Sends progress updates in parallel batches\r\n4. Retry Pass     → Re-attempts any lectures that failed or hit the attempt cap\r\n5. Report         → Counts completed vs skipped, explains every skip with a reason\r\n```\r\n\r\n### Skip reasons\r\n\r\nEvery skipped lecture now tells you exactly why:\r\n\r\n| Status | Reason | Retried? |\r\n|--------|--------|----------|\r\n| `skip` | VTU returned zero duration — no video content exists for this lecture | No — permanent data issue on VTU's side |\r\n| `maxed` | Didn't reach 100% within the attempt limit | Yes — retried once |\r\n| `error` | Network or server error during request | Yes — retried once |\r\n\r\n---\r\n\r\n## Usage\r\n\r\n### Which mode should I use?\r\n\r\n| Mode | Use When | Privacy | Setup Needed |\r\n|------|----------|---------|-------------|\r\n| **Web UI** ✨ *(Recommended)* | You want the easiest experience | Credentials in memory only, never stored | Just run `npm run serve` |\r\n| **CLI** | Scripting or automating locally | Credentials stored in `.env` file | Need to create `.env` file |\r\n| **Dev mode** | Contributing to the project | N\u002FA | For developers only |\r\n\r\n### Web UI *(recommended)*\r\n```bash\r\nnpm run serve\r\n# Open http:\u002F\u002Flocalhost:3000\r\n```\r\nFill in email, password, course slug → submit → watch the live log.\r\n\r\n**Finding your course slug:**\r\n1. Login to https:\u002F\u002Fonline.vtu.ac.in\r\n2. Go to \"My Courses\" and open a course\r\n3. Look at the URL: `https:\u002F\u002Fonline.vtu.ac.in\u002Fcourses\u002F1-social-networks`\r\n4. The slug is the part after `\u002Fcourses\u002F`: **`1-social-networks`**\r\n\r\nCommon mistakes:\r\n- ❌ `Social Networks` (spaces, wrong format)\r\n- ❌ `1` (incomplete)\r\n- ✅ `1-social-networks` (correct)\r\n\r\n### CLI *(requires `.env`)*\r\n```bash\r\ncp .env.example .env   # fill in VTU_EMAIL, VTU_PASSWORD, VTU_COURSE_SLUG\r\nnpm start\r\n```\r\n\r\n### Dev mode (auto-reload)\r\n```bash\r\nnpm run dev\r\n```\r\n\r\n---\r\n\r\n## Configuration Reference\r\n\r\n| Variable | Default | Required For | Description |\r\n|----------|---------|--------------|-------------|\r\n| `VTU_EMAIL` | — | CLI only | VTU account email |\r\n| `VTU_PASSWORD` | — | CLI only | VTU account password |\r\n| `VTU_COURSE_SLUG` | `1-social-networks` | CLI only | Course URL slug |\r\n| `VTU_API_BASE_URL` | `https:\u002F\u002Fonline.vtu.ac.in\u002Fapi\u002Fv1` | Optional | VTU API base URL |\r\n| `VTU_BATCH_SIZE` | `10` | Optional | Lectures processed in parallel per batch |\r\n| `VTU_MAX_ATTEMPTS` | `50` | Optional | Max progress-push attempts per lecture |\r\n| `PORT` | `3000` | Optional | Server port |\r\n| `CORS_ORIGIN` | `*` | Optional | Allowed CORS origin for frontend |\r\n| `GITHUB_URL` | — | Optional | GitHub repo URL shown in UI |\r\n| `KV_REST_API_URL` | — | Optional | Upstash Redis URL (statistics only) |\r\n| `KV_REST_API_TOKEN` | — | Optional | Upstash Redis token (statistics only) |\r\n| `DEFAULT_BATCH_SIZE` | `10` | Optional | Server default batch size (1-50) |\r\n| `DEFAULT_MAX_ATTEMPTS` | `50` | Optional | Server default max attempts (1-500) |\r\n| `RETRY_DELAY_MS` | `2000` | Optional | Retry delay in milliseconds (0-30000) |\r\n| `REQUEST_DELAY_MS` | `500` | Optional | Request delay in milliseconds (0-10000) |\r\n| `MAX_RETRIES` | `10` | Optional | Max retry attempts for errors (1-30) |\r\n| `MAX_CONCURRENT` | `2` | Optional | Max concurrent jobs (1-10, hosted only) |\r\n| `ADMIN_PASSWORD` | — | Optional | Enable admin endpoints for runtime config |\r\n| `NODE_ENV` | `development` | Optional | Set to `production` for stricter rate limiting |\r\n\r\n> **Web server \u002F REST API:** credentials are passed in the request body — no `.env` needed.  \r\n> **CLI:** credentials must be in `.env`.\r\n\r\n---\r\n\r\n## REST API\r\n\r\n**POST** `\u002Fapi\u002Fsubmit` — Submit a job\r\n```json\r\n{\r\n  \"email\": \"you@gmail.com\",\r\n  \"password\": \"yourpassword\",\r\n  \"courseSlug\": \"1-social-networks\",\r\n  \"batchSize\": 10,\r\n  \"maxAttempts\": 50\r\n}\r\n```\r\n\r\n**Response:**\r\n```json\r\n{\r\n  \"success\": true,\r\n  \"jobId\": \"uuid-here\",\r\n  \"message\": \"Job queued\"\r\n}\r\n```\r\n\r\n**GET** `\u002Fapi\u002Fstatus\u002F:jobId` — SSE stream (real-time events)\r\n```\r\nevent: phase\r\ndata: {\"message\":\"Sneaking past VTU's login page...\"}\r\n\r\nevent: lecture_done\r\ndata: {\"idx\":12,\"total\":166,\"title\":\"Introduction\",\"status\":\"skip\",\"reason\":\"VTU reported zero duration — no video content available for this lecture\",\"completed\":11,\"skipped\":1}\r\n\r\nevent: done\r\ndata: {\"completed\":120,\"skipped\":46,\"total\":166}\r\n\r\nevent: failed\r\ndata: {\"message\":\"Invalid credentials\"}\r\n```\r\n\r\n---\r\n\r\n## Troubleshooting\r\n\r\n| Problem | Fix |\r\n|---------|-----|\r\n| `Login failed` | Check your VTU credentials — same ones you use on the website |\r\n| `Course not found` | Verify the slug from the VTU URL (e.g. `1-social-networks`) |\r\n| Lectures stuck at `maxed` | VTU API may be throttling — try a smaller `batchSize` (e.g. `5`) or increase `maxAttempts` |\r\n| `Network error` \u002F `ECONNRESET` | Transient VTU outage — these are auto-retried; if persistent, try again later |\r\n| Port 3000 already in use | **macOS\u002FLinux\u002FWSL:** `PORT=3001 npm run serve`\u003Cbr>**Windows (PowerShell):** `$env:PORT=3001; npm run serve`\u003Cbr>**Or** create `.env` file with: `PORT=3001` |\r\n| Hosted site down | **Run it locally** — see [Run It Yourself](#-run-it-yourself-service-down-no-problem) above |\r\n\r\n---\r\n\r\n## Admin Endpoints\r\n\r\nIf you set `ADMIN_PASSWORD` in `.env`, you can modify server behavior at runtime without restarting:\r\n\r\n**GET** `\u002Fapi\u002Fadmin\u002Fconfig?password=\u003Cpw>&key=value...` — View\u002Fupdate runtime settings\r\n\r\nAvailable configuration keys:\r\n- `maxConcurrent`: Max concurrent jobs (1-10, default: 2)\r\n- `batchSize`: Lectures per batch (1-50, default: 10)\r\n- `maxAttempts`: Max retry rounds (1-500, default: 50)\r\n- `retryDelay`: Backoff delay in ms (0-30000, default: 2000)\r\n- `requestDelay`: Request spacing in ms (0-10000, default: 500)\r\n- `maxRetries`: Max retry attempts (1-30, default: 10)\r\n\r\nExamples:\r\n```bash\r\n# View current config\r\ncurl 'http:\u002F\u002Flocalhost:3000\u002Fapi\u002Fadmin\u002Fconfig?password=yourpass'\r\n\r\n# Update batch size and max attempts\r\ncurl 'http:\u002F\u002Flocalhost:3000\u002Fapi\u002Fadmin\u002Fconfig?password=yourpass&batchSize=20&maxAttempts=100'\r\n```\r\n\r\n**GET** `\u002Fapi\u002Fadmin\u002Fmonitor?password=\u003Cpw>` — Live queue inspector\r\n\r\nShows all queued jobs, running jobs, and current server configuration.\r\n\r\n**GET** `\u002Fapi\u002Fadmin\u002Fnotification?password=\u003Cpw>&message=...&disabled=...` — Global notification banner\r\n\r\nSet a maintenance message shown to all users on the web UI:\r\n```bash\r\n# Enable a notification\r\ncurl 'http:\u002F\u002Flocalhost:3000\u002Fapi\u002Fadmin\u002Fnotification?password=yourpass&message=Maintenance%20in%2010%20mins'\r\n\r\n# Disable notification\r\ncurl 'http:\u002F\u002Flocalhost:3000\u002Fapi\u002Fadmin\u002Fnotification?password=yourpass&disabled=true'\r\n```\r\n\r\n---\r\n\r\n## Project Structure\r\n\r\n```\r\nvtu-course-automation\u002F\r\n├── automation.js          # Core automation engine\r\n├── server.js              # Express server + job queue + SSE\r\n├── index.js               # CLI entry point\r\n├── lib\u002F\r\n│   └── redis.js           # Redis client & statistics helpers\r\n├── frontend\u002F\r\n│   └── index.html         # Web dashboard (served at \u002F)\r\n├── public\u002F\r\n│   └── index.html         # Static fallback\r\n├── package.json\r\n└── stats.json             # Local stats cache\r\n```\r\n\r\n---\r\n\r\n## Tech Stack\r\n\r\n| Layer | Technology |\r\n|-------|-----------|\r\n| Runtime | Node.js |\r\n| Server | Express |\r\n| HTTP Client | Axios + tough-cookie |\r\n| Real-Time | Server-Sent Events (SSE) |\r\n| Rate Limiting | express-rate-limit |\r\n| Stats (optional) | Upstash Redis |\r\n\r\n---\r\n\r\n## Security\r\n\r\n- Never commit your `.env` file — it's in `.gitignore` for a reason\r\n- Credentials passed to the web UI are held in memory only for the duration of the job and never persisted\r\n- Use HTTPS in any production\u002Fhosted deployment\r\n\r\n---\r\n\r\n## License\r\n\r\nMIT © Vikas Bhat D\r\n\r\n---\r\n\r\n## Contributing\r\n\r\nPRs and issues welcome.  \r\n**GitHub**: [vikas-bhat-d\u002Fvtu-course-automation](https:\u002F\u002Fgithub.com\u002Fvikas-bhat-d\u002Fvtu-course-automation)\r\n   Summary\r\n========================================\r\nProcessed: 166\r\nSkipped: 0\r\nTotal: 166\r\n\r\n✓ All done!\r\n```\r\n\r\n## Troubleshooting\r\n\r\n**Error: Missing credentials in .env file**\r\n- Ensure `.env` file exists and has `VTU_EMAIL` and `VTU_PASSWORD` set\r\n\r\n**Error: Login failed**\r\n- Check your email and password in `.env`\r\n- Make sure your VTU account is active\r\n\r\n**Progress stuck at lower percentage**\r\n- Increase `VTU_MAX_ATTEMPTS` in `.env`\r\n- Check your internet connection\r\n\r\n## Security\r\n\r\n⚠️ **Never commit `.env` to version control!**\r\n\r\nThe `.gitignore` file already excludes:\r\n- `.env` - Your actual credentials\r\n- `credentials.json` - Legacy credentials file\r\n- `oec-pec-automation-data.json` - Legacy config file\r\n\r\n## Other Scripts\r\n\r\n### Diary Automation\r\n```bash\r\nnpm run start:dairy\r\n```\r\n\r\nUses `index.js` for internship diary automation.\r\n\r\n## Run Locally (3 Commands)\r\n\r\nAlready have **Git** and **Node.js** installed? Run VTU Autopilot on your own system in 3 commands — no external servers needed. This saves resources for other students.\r\n\r\n```bash\r\ngit clone https:\u002F\u002Fgithub.com\u002Fvikas-bhat-d\u002Fvtu-course-automation && cd vtu-course-automation && npm install\r\nnpm run serve\r\n```\r\n\r\nThen open **http:\u002F\u002Flocalhost:3000** in your browser. That's it!\r\n\r\n**Why run locally?**\r\n- 🔒 Your credentials stay on your machine\r\n- ⚡ Faster processing (no server queue)\r\n- 🌍 Saves bandwidth for students using the web UI\r\n- 📴 Works even with intermittent internet (local retries)\r\n\r\n## License\r\n\r\nISC\r\n","VTU Autopilot 是一个自动化工具，用于自动标记 VTU 在线课程为已完成。其核心功能包括并行处理、智能重试机制和实时进度更新，并提供了一个简洁的网页界面。项目使用了服务器发送事件（SSE）来实现实时更新，并支持多任务队列和并发控制。此外，它还具备自动会话管理和可选的 Redis 支持的统计分析功能。适合需要快速完成大量在线课程学习任务的学生或教育工作者使用。",2,"2026-06-11 02:43:08","CREATED_QUERY"]