Coder Social home page Coder Social logo

divinsmathew / cowatch Goto Github PK

View Code? Open in Web Editor NEW
7.0 0.0 4.0 194 KB

COVID-19 Co-WIN Vaccine Tracker (India). Get pinged when a slot is available in your area.

Home Page: https://divinsmathew.github.io/cowatch

License: GNU General Public License v3.0

CSS 29.30% HTML 15.87% JavaScript 54.84%
cowin cowin-api covid-19 india vaccine-tracker vaccine-availability

cowatch's Introduction

Overview

Born out of necessity, this project helps you book your COVID-19 vaccination slot (if you live in India). Get pinged when a new vaccination slot becomes available in your area through sound alerts and browser notifications.

This program cannot book a vaccination slot for you, instead it uses the Co-WIN APIs to alert you when a new slot becomes available.

๐Ÿš€ Demo

Checkout a live version of CoWatch here.

cowatch.gif

The Co-WIN API

CoWatch makes use of the Indian Government's Co-WIN API, to fetch vaccination slot data. These APIs are publicly available for use by third party applications. However, they do limit the number of API calls to 100 per 5 minutes per IP. Consider this if you're planning to build something awesome on top of this project.

Setup

This project is written in vanilla Javascript and can be ran out of the box, without any dependencies.

Usage

Usage is pretty straight forward. The tool only works with Indian IP addresses so disconnect your VPN if needed.

  • Select your state and district.
  • Here you can browse through the available health centres and vaccination slots.
  • Press on Start Watching. Script will start to continuously query and refresh the data once at every specified interval. (15 seconds by default).
  • When a new slot becomes available, you'll be alerted by sounds and browser notifications.
  • Do not close the tab while watching.

Shareable URL

The URL can be configured to point to a specific district and display its slots. This can be done by providing corresponding districtId as a query parameter: /?districtId=xx

Example: https://divinsmathew.github.io/cowatch/?districtId=140

Refer districts.json for a list of valid district IDs. Invalid districtIds are ignored.

Configure Locally

To modify CoWatch:

  • Clone the repository. using ! Git Clone https://github.com/divinsmathew/cowatch.git
  • To modify the watching time interval, edit the refreshInterval variable here and set the value in milliseconds. Remember not to modify intervals to below 3000ms to remain compliant with the Co-WIN Public API regulations.
  • By default, CoWatch uses a cached version of state and district data for better load times. Now, this works fine, but if the back-end were to modify the district-id mappings, use buildAllDistrictIdMap method in districts.js to re-generate the updated district-id mappings. Or you can also uncomment this line instead, to prevent using cached data.

Contributions

Contributions are always welcome! Feel free to clone and improve the project.

cowatch's People

Contributors

divinsmathew avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cowatch's Issues

How to avoid cached data

Plz explain in detail what setting needs to b done to get only updated data instead of cached data. I m not very techy person so i couldnt understand the explanation given by u on page. Plz elaborate

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.