A Chrome extension to show important COVID-19 global and local information.
Available on the Chrome Store.
- Initialized with global stats and the top four countries with highest confirmed cases.
- Ability to curate the list of countries you want to keep an eye on.
- Data is refreshed each time extension is opened and can be refreshed manually with one click.
- Ability to sort the data by clicking on the headings.
- Panel to view data from all reporting countries at the same time.
- Your country data will persist between Chrome sessions by being stored in Chrome sync storage.
We are consuming the data from the Coronavirus Monitor API.
API information is updated on 10 minute intervals and consumes the data from Johns Hopkins or Worldometer depending on which one has the most up to date information at the time.
There are 2 ways to run the app locally, as a Chrome extension, and as a React web app. For development, the React web app way makes for a faster development process.
Our project uses an API that's hosted on Rapid API, because of this, our API requires a key to access the API data. We do not include the key in the repo to prevent abuse of the API.
-
If you would like to contribute to the project, create or respond to one of the issues letting us know, and we will share the API key with you.
-
If you just want to play around with the project locally, you can setup your own API key by following the instructions here. We are currently using the Coronavirus Monitor API.
Once you have your key, you need to create a headers.js
file within the '/src' folder and add your credentials like this:
export default {
"x-rapidapi-host": "coronavirus-monitor.p.rapidapi.com",
"x-rapidapi-key": "your-key"
};
- Make the code changes you need
- Run
npm run build
- In Chrome navigate to
chrome://extensions/
- Click load unpacked, and point to your
build
folder
Everytime you make code changes, you will need to rebuild the project and refresh the chrome extension to view your changes.
- Inside of
App.js
comment out all code that referenceschrome.storage
as Chrome storage is not available outside of the extension ecosystem. (Located in 3 places,initializeState
,addCountry
,removeCountry
) - In
App.js
look for the comment starting with// If running in react use the code...
and uncomment the 3 lines of code below. npm run start
will spin up a server onhttp://localhost:3000/
- Now when you make changes to the code, the server will auto refresh your browser with the changes, no need to build the project everytime.- When ready to push your changes, make sure to revert the Chrome storage changes. (Be sure not to uncomment
chrome.storage.sync.remove('userStorage');
otherwise the users chrome storage will be cleared everytime the app is run, this is there only for testing)
This was authored by Mariusz Dabrowski & Dulio Denis for a Hackathon presented on March 28th, 2020.
We hope it brings awareness to the dangers of pandemic events to human civilization and the need to prepare.
See TED Talk: The Next Pandemic, we are not ready (Bill Gates).