A tiny Node.js app to help automate the search for a COVID-19 vaccine
COVID-19 vaccines are (understandably) in high demand. Many distributors offer web portals to check for availability, those these are frustrating to use and require frequent manual checking.
This app automates the process by running in the background and polling H-E-B Pharmacy every 20 seconds to check for appointment availabilities. If one is found, the travel time + distance is calculated with the Google Maps API and a SMS alert is sent with Twilio.
Some additional features:
- Availabilities are cached to prevent sending duplicate alerts
- Multiple SMS recipients are supported (see environment variable)
You will need Node.js 13+ and Yarn. You can also install Volta to automatically use the pinned Node + Yarn versions.
Install dependencies:
yarn
Copy .env.example
to a new file .env
and complete with valid environment variable values.
Start the app:
yarn start
Start the app in development mode (will need to create .env.development
):
yarn dev
Lint with ESLint:
yarn lint
Format with Prettier:
yarn format
An API key for a Google Cloud project with the Distance Matrix API enabled
The SID for your Twilio account. This should be available on your dashboard.
The auth token for your Twilio account (see above).
The Twilio number which SMS alerts will be sent from. This must be owned by your Twilio account (see manage numbers) and in E.164 format.
Phone number(s) for the receipients of SMS alerts. These must be in E.164 format and comma separated.
Location used as the origin for any travel time calculations. Must in a valid Google Maps API format.
- Proper error handling! The current implementation is very scrappy and will likely throw an error if an unexpected API response is received
- Maximum travel time threshold for sending alerts