Skip to content

chrissantamaria/vaccine-finder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vaccine Finder

A tiny Node.js app to help automate the search for a COVID-19 vaccine

Context

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)

Setup

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

Dev Usage

Start the app in development mode (will need to create .env.development):

yarn dev

Lint with ESLint:

yarn lint

Format with Prettier:

yarn format

Environment Variables

GOOGLE_API_KEY

An API key for a Google Cloud project with the Distance Matrix API enabled

TWILIO_ACCOUNT_SID

The SID for your Twilio account. This should be available on your dashboard.

TWILIO_AUTH_TOKEN

The auth token for your Twilio account (see above).

TWILIO_NUMBER

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.

SMS_RECIPIENTS

Phone number(s) for the receipients of SMS alerts. These must be in E.164 format and comma separated.

START_LOCATION

Location used as the origin for any travel time calculations. Must in a valid Google Maps API format.

Todo

  • 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

About

Tiny Node.js app to help automate the search for a COVID-19 vaccine

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published