https://github.com/foveacentral/vaccinesignup
A Twitter bot that notifies users about available vaccine appointments
https://github.com/foveacentral/vaccinesignup
covid-19 ruby twitter-bot vaccine-appointments
Last synced: 4 months ago
JSON representation
A Twitter bot that notifies users about available vaccine appointments
- Host: GitHub
- URL: https://github.com/foveacentral/vaccinesignup
- Owner: FoveaCentral
- License: cc0-1.0
- Created: 2021-03-01T20:35:56.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-11-18T08:53:29.000Z (7 months ago)
- Last Synced: 2025-11-18T10:09:32.639Z (7 months ago)
- Topics: covid-19, ruby, twitter-bot, vaccine-appointments
- Language: Ruby
- Homepage: https://twitter.com/vaccinesignup
- Size: 630 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
# @vaccinesignup
[](https://github.com/FoveaCentral/vaccinesignup/actions/workflows/test.yml)
[](https://qlty.sh/gh/FoveaCentral/projects/vaccinesignup)[](https://coveralls.io/github/FoveaCentral/vaccinesignup?branch=main)
[](https://www.bestpractices.dev/projects/5405)
[](https://scorecard.dev/viewer/?uri=github.com/FoveaCentral/vaccinesignup)
This Twitter bot notifies users who DM their zip codes to [@vaccinesignup](https://twitter.com/vaccinesignup/) about available vaccine-appointment Locations in their area. Our current data source only supports LA County.
## Usage
### Users
1. Follow [@vaccinesignup](https://twitter.com/vaccinesignup/).
2. DM [@vaccinesignup](https://twitter.com/vaccinesignup/) a zip code only:

3. The bot will DM you available Locations in that zip:

4. To stop all notifications, DM `stop` to [@vaccinesignup](https://twitter.com/vaccinesignup/).
### Developers
#### Installation
1. Set your Twitter API keys as environment variables:
```bash
export POSTGRES_USER=[postgres user]
export POSTGRES_PASSWORD=[postgres password]
export TWITTER_CONSUMER_KEY=[your key]
export TWITTER_CONSUMER_SECRET=[your secret]
export TWITTER_ACCESS_TOKEN=[your access token]
export TWITTER_ACCESS_SECRET=[your access secret]
```
2. Install dependencies with Bundler:
```ruby
bundle install
```
#### Available Tasks
```bash
$ rake -T|grep vacc
rake vaccinesignup:back_up # Back-up production data and restore to the local environment
rake vaccinesignup:delete_real_users # Delete real (non-test) users from development environment
rake vaccinesignup:read_and_notify # Read DMs and, if there are subscribed zip codes, notify users
rake vaccinesignup:reset_staging # Back-up production, restore locally, and delete real users for testing
rake vaccinesignup:sync_and_notify # Sync Locations and, if there are changes, notify users
```
When configuring tasks for production, the timing on both should be optimized depending on how often Locations are updated and DMs are tweeted, respectively.
#### Mirror Production Locally
1. Configure environment variables:
```bash
export TWITTER_CONSUMER_KEY=[your key]
export TWITTER_CONSUMER_SECRET=[your secret]
export TWITTER_ACCESS_TOKEN=[your token]
export TWITTER_ACCESS_SECRET=[your access secret]
```
2. Reset local database to a known state:
```bash
bundle ex rake db:reset
```
3. Back-up production data and restore to the local environment:
```bash
bundle ex rake vaccinesignup:back_up
```
#### Release Testing
1. Reset local/staging environment:
```bash
bundle ex rake vaccinesignup:reset_staging
```
2. Test location syncing/notification:
```bash
bundle ex rake vaccinesignup:sync_and_notify
```
3. Test reading DMs/notification:
```bash
bundle ex rake vaccinesignup:read_and_notify
```
## [Contributing to @vaccinesignup](.github/CONTRIBUTING.md)
Copyright © 2021-2025 Roderick Monje. See [LICENSE](LICENSE) for further details.