{"id":26923074,"url":"https://github.com/alikuru/ami-restocked","last_synced_at":"2025-06-23T08:37:07.733Z","repository":{"id":175816470,"uuid":"645908093","full_name":"alikuru/ami-restocked","owner":"alikuru","description":"A Node.js script that tracks the availability of the Citroën AMI in Turkey and sends an email alert when it is in stock.","archived":false,"fork":false,"pushed_at":"2023-06-24T19:40:17.000Z","size":114,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T12:54:45.963Z","etag":null,"topics":["citroen","citroen-ami","electric-vehicles","ev","stock-tracker","turkey"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/alikuru.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}},"created_at":"2023-05-26T18:19:21.000Z","updated_at":"2023-07-18T09:29:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"ae196403-e35f-43ed-8cf6-c83c3d8e5c80","html_url":"https://github.com/alikuru/ami-restocked","commit_stats":{"total_commits":12,"total_committers":2,"mean_commits":6.0,"dds":0.08333333333333337,"last_synced_commit":"4d28baf79ba778948ac381d2302fc080fc31169b"},"previous_names":["alikuru/ami-restocked"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alikuru%2Fami-restocked","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alikuru%2Fami-restocked/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alikuru%2Fami-restocked/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alikuru%2Fami-restocked/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alikuru","download_url":"https://codeload.github.com/alikuru/ami-restocked/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246735363,"owners_count":20825223,"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":["citroen","citroen-ami","electric-vehicles","ev","stock-tracker","turkey"],"created_at":"2025-04-02T00:38:50.973Z","updated_at":"2025-04-02T00:38:51.437Z","avatar_url":"https://github.com/alikuru.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Citroën AMI Stock Tracker\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"300\" height=\"204\" alt=\"Citroën AMI orange\" src=\"files/image/citroen-ami-orange.png?raw=true\"\u003e\n\u003c/p\u003e\n\n\n[Citroën AMI](https://en.wikipedia.org/wiki/Citro%C3%ABn_Ami_(electric_vehicle)) is a L6e class electric vehicle that looks like a microcar but is essentially a quadricycle. In most countries, it's sold exclusively online, but there are a few exceptions where it's also available offline. Unfortunately, Turkey is not one of these countries, and sales here are limited to online only. AMI is restocked only once a month in limited quantities, which usually run out on the same day. That leaves you with a very narrow window if you want to buy one. The Citroen Turkey website suggests following their social media accounts to track availability, but I was unable to find any related posts on their Twitter or Instagram feeds. Therefore, I came up with my own solution.\n\nThis is a simple Node.js script that tracks the availability of the Citroën AMI in Turkey through an undocumented API on the website used for online sales. The script sends an email alert to a predefined address in the `.env` file when the AMI is in stock. Please see the `.env.example` file for the full set of options.\n\n## Installation\n\nScript is tested with Node.js v18.12.0 (LTS), which you can download from the [official website](https://nodejs.org/en/download). Or, you may also use [NVM](https://github.com/nvm-sh/nvm).\n\nOnce you have Node.js installed, clone the repository using the following command:\n\n```\ngit clone https://github.com/alikuru/ami-restocked.git\n```\n\nThen, navigate to the project directory and install the dependencies using the command below:\n\n```\nnpm install\n```\n\n## Usage\n\nBefore using the script, you need to set up the environment variables in the `.env` file. Please see `.env.example` for details.\n\nTo run the script, use the following command. You might want to use a terminal multiplexer like [screen](https://en.wikipedia.org/wiki/GNU_Screen) or [tmux](https://github.com/tmux/tmux/wiki) for leaving the app running in the background. There is also [PM2](https://github.com/Unitech/pm2) but it might be an overkill for a script like this.\n\n```\nnode app.js\n```\n\nRegardless of the color option you set in the `.env`, script will send an email summarizing the status of general availability. However, the message will include your favorite color's stock and reservation status.\n\n## YMMV\n\nPlease note that this script started off with a ChatGPT prompt, which I refactored according to my needs. I am not a professional sofware developer, that's why this script guarantees nothing. Also, don't forget that Citroën Turkey might change the code on their website and render this script useless at any time. So, like with the AMI itself, your mileage may vary.\n\n## Trademarks\n\n\"Citroën\" and \"AMI\" are registered trademarks of Stellantis N.V. Neither me nor this script are affiliated in any manner with, or otherwise endorsed by, Stellantis N.V. Terms \"Citroën\" and \"AMI\" here merely used for describing a fan project.\n\n## License\n\nis script is MIT licensed. See the [LICENSE](LICENSE) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falikuru%2Fami-restocked","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falikuru%2Fami-restocked","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falikuru%2Fami-restocked/lists"}