CoTrack.JS Github: https://github.com/GeorgeShao/CoTrackJS/
CoTrack.JS Website: https://cotrackjs.online/
What it does
How I built it
How it works (detailed explanation - part 1) - Getting & securely storing user data
Every time a user visits a website that has CoTrack.JS enabled (meaning it has the 5 lines of code copied and pasted), even if the website has been loaded in the background and their phone is turned off, CoTrack.JS will frequently retrieve the user’s IP address, latitude, and longitude. All of this data is then fed through a simplified Locality Sensitive Hashing algorithm. The Locality Sensitive Hashing algorithm allows CoTrack.JS to securely store user data. The hashed data is then stored on a Firebase Realtime Database.
How it works (detailed explanation - part 2) - Checking if you have been in contact with a COVID-19 patient
Whenever a user goes onto the https://cotrackjs.online/ website (which is hosted by Firebase Hosting) and clicks the "check covid-19 contact" button to see if they have been in contact with someone with COVID-19, the website firsts verifies the human identity of the user with a Google reCAPTCHA. I used Firebase Cloud Functions as the node.js serverless backend for the reCAPTCHA. If the reCAPTCHA is successfully completed, the website retrieves data from the Firebase Realtime Database and uses the Locality Sensitive Hashing algorithm to efficiently compare large datasets in order to determine how close the user was to reported COVID-19 patients, and how likely it was that the user made contact with a patient.
How it works (detailed explanation - part 3) - Reporting yourself as having COVID-19
Whenever a user goes onto the https://cotrackjs.online/ website (which is hosted by Firebase Hosting) and clicks the "report case" button to tell the website that they have been verified to have COVID-19, the website firsts verifies the human identity of the user with a Google reCAPTCHA. I used Firebase Cloud Functions as the node.js serverless backend for the reCAPTCHA. If the reCAPTCHA is successfully completed, the website marks you as a COVID-19 patient in the Firebase Realtime Database.
Challenges I ran into
Accomplishments that I'm proud of
What I learned
- Firebase Hosting (it blew my mind that you could deploy a web app in 3 commands!)
- Firebase Cloud Functions (it was okay)
- Firebase Realtime Database (struggled a lot, but it was surprisingly relatively easy to work with)
- Google reCAPTCHA (very easy to work with, quite straightforward)
- Locality Sensitive Hashing (very confusing, still don't fully understand)
What's next for CoTrack.JS