{"id":16402032,"url":"https://github.com/muhammadhasham23/price-checker","last_synced_at":"2025-07-01T09:07:27.349Z","repository":{"id":247046024,"uuid":"824622331","full_name":"MuhammadHasham23/price-checker","owner":"MuhammadHasham23","description":"Price checker for Ecommerce websites","archived":false,"fork":false,"pushed_at":"2024-07-06T08:13:11.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-23T15:46:11.122Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MuhammadHasham23.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-07-05T14:30:37.000Z","updated_at":"2024-07-06T08:13:14.000Z","dependencies_parsed_at":"2024-07-06T09:28:47.459Z","dependency_job_id":"6aab0d94-1e3f-47c6-8c25-e1eeddf30992","html_url":"https://github.com/MuhammadHasham23/price-checker","commit_stats":null,"previous_names":["muhammadhasham23/price-checker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MuhammadHasham23/price-checker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuhammadHasham23%2Fprice-checker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuhammadHasham23%2Fprice-checker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuhammadHasham23%2Fprice-checker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuhammadHasham23%2Fprice-checker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MuhammadHasham23","download_url":"https://codeload.github.com/MuhammadHasham23/price-checker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuhammadHasham23%2Fprice-checker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262933316,"owners_count":23386784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-11T05:44:49.166Z","updated_at":"2025-07-01T09:07:27.321Z","avatar_url":"https://github.com/MuhammadHasham23.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Price Tracker Application\n\nA Node.js application that tracks prices of Amazon products and sends email notifications when prices drop. Built with Express, TypeScript, MongoDB, and Cheerio.\n\n## Features\n\n- **Track Prices**: Monitor prices of products from various e-commerce websites.\n- **Email Notifications**: Receive email alerts when the price of a tracked product drops.\n- **Scheduled Price Checks**: Regularly check the prices of tracked products using cron jobs.\n- **Request Validation**: Ensure valid request data using AJV (Another JSON Schema Validator).\n\n## Features to be added\n\n- **Monitoring**: Adding monitoring for cron job and API health\n- **Support for other stores**: Adding support for other stores as well.\n\n## Prerequisites\n\n- Node.js\n- MongoDB\n- A Gmail account for sending email notifications\n\n## Installation\n\n1. **Clone the repository:**\n\n    ```bash\n    git clone https://github.com/your-username/price-tracker.git\n    cd price-tracker\n    ```\n\n2. **Install dependencies:**\n\n    ```bash\n    npm install\n    ```\n\n3. **Create a `.env` file in the root directory with the following content:**\n\n    ```env\n    MONGODB_URI=mongodb://localhost:27017/price-tracker\n    EMAIL_USER=your-email@gmail.com\n    EMAIL_PASS=your-email-password\n    PORT=3000\n    BASE_URL=http://localhost:3000\n    ```\n\n4. **Build the project:**\n\n    ```bash\n    npm run build\n    ```\n\n5. **Start the application:**\n\n    ```bash\n    npm start\n    ```\n\n## Development\n\n1. **Start the application in development mode:**\n\n    ```bash\n    npm run dev\n    ```\n\n2. **Lint the code:**\n\n    ```bash\n    npm run lint\n    ```\n\n## API Endpoints\n\n### Track Product\n\n- **URL**: `/api/track`\n- **Method**: `POST`\n- **Description**: Start tracking a product's price.\n- **Request Body**:\n\n    ```json\n    {\n      \"url\": \"https://example.com/product\",\n      \"email\": \"user@example.com\"\n    }\n    ```\n\n- **Response**:\n\n    ```json\n    {\n      \"message\": \"Tracking started\",\n      \"price\": 29.99\n    }\n    ```\n\n### Check Prices\n\n- **URL**: `/api/check`\n- **Method**: `GET`\n- **Description**: Manually trigger a price check for all tracked products.\n- **Response**:\n\n    ```json\n    {\n      \"message\": \"Prices checked\"\n    }\n    ```\n\n## Project Structure\n\n```plaintext\nsrc/\n  ├── jobs/\n  │   └── priceChecker.ts\n  ├── middleware/\n  │   └── validateRequest.ts\n  ├── models/\n  │   └── Product.ts\n  ├── routes/\n  │   └── index.ts\n  ├── schemas/\n  │   └── product.ts\n  ├── services/\n  │   ├── notifier.ts\n  │   └── scraper.ts\n  ├── app.ts\n  └── server.ts\n```\n# Contributing\n1. Fork the repository\n2. Create a new branch: git checkout -b feature/your-feature\n3. Commit your changes: git commit -am 'Add some feature'\n4. Push to the branch: git push origin feature/your-feature\n5. Create a new Pull Request","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuhammadhasham23%2Fprice-checker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuhammadhasham23%2Fprice-checker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuhammadhasham23%2Fprice-checker/lists"}