{"id":24441742,"url":"https://github.com/harshalkatakiya/version-radar","last_synced_at":"2026-02-22T02:02:50.466Z","repository":{"id":264207120,"uuid":"892697100","full_name":"Harshalkatakiya/version-radar","owner":"Harshalkatakiya","description":"Version Radar is a dynamic Node.js (TypeScript) application that monitors a software's webpage for version updates.","archived":false,"fork":false,"pushed_at":"2024-12-24T05:54:26.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-24T00:55:11.317Z","etag":null,"topics":["cheerio","cron","cronjob","version-radar","version-tracker","web-scraper"],"latest_commit_sha":null,"homepage":"https://version-radar.onrender.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Harshalkatakiya.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-22T15:48:45.000Z","updated_at":"2024-12-24T05:54:30.000Z","dependencies_parsed_at":"2024-11-22T16:37:55.774Z","dependency_job_id":"41f1323a-5fca-45c7-bbc8-a38ab07da8fb","html_url":"https://github.com/Harshalkatakiya/version-radar","commit_stats":null,"previous_names":["harshalkatakiya/version-radar"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Harshalkatakiya/version-radar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Harshalkatakiya%2Fversion-radar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Harshalkatakiya%2Fversion-radar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Harshalkatakiya%2Fversion-radar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Harshalkatakiya%2Fversion-radar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Harshalkatakiya","download_url":"https://codeload.github.com/Harshalkatakiya/version-radar/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Harshalkatakiya%2Fversion-radar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29703254,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T23:35:04.139Z","status":"online","status_checked_at":"2026-02-22T02:00:08.193Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cheerio","cron","cronjob","version-radar","version-tracker","web-scraper"],"created_at":"2025-01-20T21:19:26.983Z","updated_at":"2026-02-22T02:02:50.441Z","avatar_url":"https://github.com/Harshalkatakiya.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Version Radar 📡\n\nVersion Radar is a dynamic Node.js (TypeScript) application that monitors a software's webpage for version updates. It:\n\n- **Web-scrapes** the specified URL to extract the software version.\n- **Stores** the version information in a MongoDB database.\n- **Schedules** the scraping task to run 3 times a day.\n- **Updates** the database if a new version is detected.\n- **Sends email notifications** when a new version is available.\n- **Provides an API** to access the current version\n\n---\n\n## Table of Contents\n\n- [Features](#features)\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [Usage](#usage)\n- [Troubleshooting](#troubleshooting)\n- [Project Structure](#project-structure)\n- [Contributing](#contributing)\n- [License](#license)\n- [Acknowledgements](#acknowledgements)\n- [Contact](#contact)\n- [Disclaimer](#disclaimer)\n\n---\n\n## Features\n\n- **Dynamic Web Scraping**: Uses Cheerio to scrape dynamic elements from a webpage.\n- **Version Detection**: Extracts and identifies software version numbers using regular expressions.\n- **Database Storage**: Stores and updates version information in MongoDB.\n- **Email Notifications**: Sends an email alert when a new version is detected.\n- **Scheduling**: Runs the scraping task at specified times using `node-cron`.\n- **Express Server with API Endpoints**: Provides an API to access the current version.\n- **Configuration via Environment Variables**: Easily adjust settings without changing the code.\n\n---\n\n## Prerequisites\n\n- **Node.js** (v12 or higher)\n- **npm** (Node Package Manager)\n- **MongoDB** database (local or hosted, e.g., MongoDB Atlas)\n- **Email Account** (for sending notifications, e.g., Gmail)\n\n---\n\n## Installation\n\n1. **Clone the Repository**\n\n   ```bash\n   git clone https://github.com/Harshalkatakiya/version-radar.git\n   cd version-radar\n   ```\n\n2. **Install Dependencies**\n\n   ```bash\n   npm install\n   ```\n\n---\n\n## Configuration\n\n### 1. Environment Variables\n\nCreate a `.env` file in the root directory and configure the following variables:\n\n```dotenv\n# Application Configuration\nPORT=3000\nSOFTWARE_URL=https://example.com/software-page\nSOFTWARE_NAME=SoftwareName\nSOFTWARE_SELECTOR=.your-css-selector\nVERSION_REGEX=\\d+(\\.\\d+)+\nVERSION_FORMAT=X.Y\n\n# Database Configuration\nMONGODB_URI=your_mongodb_connection_string\n\n# Email Configuration\nEMAIL_USER=your_email@example.com\nEMAIL_PASS=your_email_password\nRECIPIENT_EMAIL=recipient_email@example.com\n```\n\n- **`PORT`**: The port on which the server will run (default is `3000`).\n- **`SOFTWARE_URL`**: The URL of the software page to scrape.\n- **`SOFTWARE_NAME`**: Name of the software you're tracking.\n- **`SOFTWARE_SELECTOR`**: CSS selector to target elements containing version numbers.\n- **`VERSION_REGEX`**: Regular expression to match version numbers.\n- **`VERSION_FORMAT`**: Expected version format (`X.Y`, `X.Y.Z`, etc.).\n- **`MONGODB_URI`**: Connection string for your MongoDB database.\n- **`EMAIL_USER` and `EMAIL_PASS`**: Credentials for the email account used to send notifications.\n- **`RECIPIENT_EMAIL`**: Email address to receive notifications.\n\n### 2. Email Account Setup\n\nFor Gmail accounts:\n\n- Enable Less Secure Apps or use an App Password.\n- Ensure that 2-Step Verification is set up if using App Passwords.\n\n---\n\n## Usage\n\n### 1. Start the Application\n\n```bash\nnpm start\n```\n\nThe will compile the TypeScript code and start the server. It will start on the specified `PORT` (default `3000`).\n\n### 2. Scheduling\n\nThe application uses `node-cron` to schedule the scraping task. By default, it runs at `00:00`, `08:00`, and `16:00` every day. You can adjust the schedule in `src/index.ts`:\n\n```typescript\ncron.schedule(\"0 0,8,16 * * *\", () =\u003e {\n  console.log(\"⏳ Running scheduled task...\");\n  scrapeVersion();\n});\n```\n\n---\n\n## API Endpoints\n\n### 1\\. Home Route\n\n- **URL**: `/`\n- **Method**: `GET`\n- **Description**: Returns a welcome message.\n- **Response**:\n\n  ```css\n  Welcome to Version Radar 📡\n  ```\n\n### 2\\. Current Version Route\n\n- **URL**: `/current-version`\n- **Method**: `GET`\n- **Description**: Retrieves the current version information from the database.\n- **Response**:\n\n  - **Success (200)**:\n\n    ```json\n    {\n      \"data\": {\n        \"_id\": \"60f7f0b4c2a1a45b6c8e4d1a\",\n        \"softwareName\": \"SoftwareName\",\n        \"version\": \"2.10\",\n        \"updatedAt\": \"2024-11-22T12:34:56.789Z\",\n        \"createdAt\": \"2024-11-22T12:34:56.789Z\",\n        \"__v\": 0\n      }\n    }\n    ```\n\n  - **Not Found (404)**:\n\n    ```json\n    {\n      \"message\": \"Version information not found.\"\n    }\n    ```\n\n  - **Error (500)**:\n\n    ```json\n    {\n      \"message\": \"Error fetching version information.\"\n    }\n    ```\n\n---\n\n## Troubleshooting\n\n### Common Issues\n\n#### 1. No Version Detected\n\n- **Cause**: The version number is not being correctly extracted.\n- **Solution**:\n  - Check the `SOFTWARE_SELECTOR` to ensure it's targeting the correct elements.\n  - Adjust the `VERSION_REGEX` to match the version format on the webpage.\n  - Use console logs to debug the elements and text being processed.\n\n#### 2. Email Not Sent\n\n- **Cause**: Incorrect email configuration or authentication issues.\n- **Solution**:\n  - Verify `EMAIL_USER`, `EMAIL_PASS`, and `RECIPIENT_EMAIL` in your `.env` file.\n  - Ensure that your email account allows SMTP access.\n  - Check for any security notifications from your email provider.\n\n#### 3. MongoDB Connection Fails\n\n- **Cause**: Incorrect MongoDB URI or network issues.\n- **Solution**:\n  - Verify the `MONGODB_URI` in your `.env` file.\n  - Ensure that your MongoDB instance is running and accessible.\n  - Check for any IP whitelist or network restrictions in MongoDB Atlas.\n\n---\n\n## Project Structure\n\n```bash\nversion-radar/\n├── src/\n│   ├── models/\n│   │   └── version.ts\n│   ├── index.ts\n│   └── scraper.ts\n├── .env\n├── .gitignore\n├── LICENSE\n├── package.json\n├── README.md\n└── tsconfig.json\n```\n\n---\n\n## Contributing\n\nContributions are welcome! Please follow these steps:\n\n1. **Fork the Repository**\n\n   Click on the 'Fork' button at the top right corner of the repository page.\n\n2. **Clone Your Fork**\n\n   ```bash\n   git clone https://github.com/Harshalkatakiya/version-radar.git\n   ```\n\n3. **Create a New Branch**\n\n   ```bash\n   git checkout -b feature/your-feature-name\n   ```\n\n4. **Make Your Changes**\n5. **Commit Your Changes**\n\n   ```bash\n   git commit -m 'Add new feature'\n   ```\n\n6. **Push to the Branch**\n\n   ```bash\n   git push origin feature/your-feature-name\n   ```\n\n7. **Create a Pull Request**\n\n   Go to the original repository and click on 'New Pull Request'.\n\n---\n\n## License\n\nThis project is licensed under the [MIT](LICENSE) License.\n\n---\n\n## Acknowledgements\n\n- **Node.js**: Runtime environment for executing JavaScript code server-side.\n- **TypeScript**: Typed superset of JavaScript that compiles to plain JavaScript.\n- **Express**: Fast, unopinionated, minimalist web framework for Node.js.\n- **Cheerio**: Fast, flexible, and lean implementation of core jQuery designed specifically for the server.\n- **Mongoose**: Elegant MongoDB object modeling for Node.js.\n- **Node-Cron**: Task scheduler for Node.js.\n- **Nodemailer**: Module for Node.js applications to allow easy email sending.\n- **dotenv**: Module that loads environment variables from a `.env` file.\n\n---\n\n## Contact\n\nFor any questions or suggestions, please open an issue or contact [Harshal Katakiya](https://github.com/Harshalkatakiya).\n\n---\n\n## Disclaimer\n\nThis project is intended for educational and personal use. Please ensure that you have the right to scrape the target website and comply with their terms of service.\n\n---\n\n### Thank you for using Version Radar! If you find this project useful, please give it a star on GitHub. ⭐\n\nHappy coding! 🚀\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharshalkatakiya%2Fversion-radar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharshalkatakiya%2Fversion-radar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharshalkatakiya%2Fversion-radar/lists"}