{"id":20810560,"url":"https://github.com/devfle/in-stock-check","last_synced_at":"2026-01-22T14:36:49.825Z","repository":{"id":156058309,"uuid":"509164119","full_name":"devfle/in-stock-check","owner":"devfle","description":"Helps you to search for specific DOM elements on web pages and then send a notification to your own Discord server","archived":false,"fork":false,"pushed_at":"2024-09-27T21:49:22.000Z","size":278,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T23:13:18.769Z","etag":null,"topics":["discord","discord-bot","docker","nodejs","notification-service","shopping","typescript"],"latest_commit_sha":null,"homepage":"","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/devfle.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}},"created_at":"2022-06-30T16:59:08.000Z","updated_at":"2024-09-27T21:49:25.000Z","dependencies_parsed_at":"2024-02-07T20:25:45.223Z","dependency_job_id":"224ff719-8763-4fc6-9722-5277a7aa0ec4","html_url":"https://github.com/devfle/in-stock-check","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devfle/in-stock-check","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devfle%2Fin-stock-check","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devfle%2Fin-stock-check/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devfle%2Fin-stock-check/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devfle%2Fin-stock-check/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devfle","download_url":"https://codeload.github.com/devfle/in-stock-check/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devfle%2Fin-stock-check/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28664656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T14:01:31.714Z","status":"ssl_error","status_checked_at":"2026-01-22T13:59:23.143Z","response_time":144,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["discord","discord-bot","docker","nodejs","notification-service","shopping","typescript"],"created_at":"2024-11-17T20:26:03.015Z","updated_at":"2026-01-22T14:36:49.810Z","avatar_url":"https://github.com/devfle.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# In Stock Check\n\nWelcome to the Stock Check tool. This tool allows you to search for specific DOM elements on web pages and then send a notification to your own Discord server.\n\n\u003cimg width=\"70%\" alt=\"01\" src=\"https://github.com/devfle/in-stock-check/assets/52854338/9337120c-2c46-4313-82c1-cbc6e877400a\"\u003e\n\nThe tool was originally built to send a notification when a certain product is back in stock in a store.\n\n## How to setup\n\n1. Clone the repo\n2. `run npm ci` with node 18.X (if you have installed nvm, run \"nvm use\")\n3. create a `.env` file in project root\n4. create a `shop-list.json` file in /src folder\n5. build the project with `npm run build`command\n\n### .env file\n\nTo protect sensitive information like API keys the project uses env files.\n\n```text\nDISCORD_API_KEY=\"YOUR DISCORD BOT API KEY\"\nCHANNEL_ID=\"THE ID OF THE DISCORD CHANNEL WHERE YOU WANT TO BECOME THE NOTIFICATION\"\nLOGIN_MSG=\"OPTIONAL: A CUSTOM LOGIN MESSAGE\"\n```\n\n### shop-list.json\n\nAll metadata for the web pages that are to be analyzed are listed here.\n\n```json\n[\n  {\n    \"shopName\": \"NAME OF THE WEBSITE\",\n    \"productEndpoint\": \"URL TO THE WEBSITE\",\n    \"searchQuery\": \"THE SELECTOR YOU WANT TO SEARCH\",\n    \"showProductLink\": false\n  }\n]\n```\n\nMultiple web pages can also be configured:\n\n```json\n[\n  {\n    \"shopName\": \"NAME OF THE WEBSITE\",\n    \"productEndpoint\": \"URL TO THE WEBSITE\",\n    \"searchQuery\": \"THE SELECTOR YOU WANT TO SEARCH\",\n    \"showProductLink\": false\n  },\n  {\n    \"shopName\": \"NAME OF THE WEBSITE\",\n    \"productEndpoint\": \"URL TO THE WEBSITE\",\n    \"searchQuery\": \"THE SELECTOR YOU WANT TO SEARCH\",\n    \"showProductLink\": false\n  }\n]\n```\n\n## Docker\n\nThe NodeJs script can also run in a Docker environment:\n\n1. Navigate into project dir\n\n```bash\ncd in-stock-check\n```\n\n2. Compile the script:\n\n```bash\nnpm run build\n```\n\n3. Create .env file with necessary data and pass it as a secret:\n\n```bash\ndocker build -t \"in-stock-check\" --secret id=in-stock-env,src=.env .\n```\n\n## Contributing\n\nPlease follow the Prettier, ESLint and TypeScript rules included in this project.\nYou can check your code with the following commands:\n\nRun ESLint:\n```bash\nnpm run lint\n```\n\nRun Prettier:\n```bash\nnpm run prettier\n```\n\nCompile TypeScript:\n```bash\nnpm run build\n```\n\nWhile commiting, please use one of the following types:\n\n```javascript\n['build', 'chore', 'ci', 'docs', 'feat', 'fix', 'perf', 'refactor', 'revert', 'style', 'test']\n```\n\nExample:\n```bash\ngit commit -m \"chore: update packages\"\n```\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevfle%2Fin-stock-check","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevfle%2Fin-stock-check","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevfle%2Fin-stock-check/lists"}