Tracer is a COVID-19 contact tracing application designed for patients (users) to self-report their visited locations. If a patient has caught the COVID-19 virus they can report an exposure, then all users at shared locations within a week of that exposure are alerted.
This app is decoupled, meaning the frontend, backend, and database, of the application can live independently. However, instead of putting the frontend and API subdomains into separate repository it made more sense to consolidate them. The app also uses the Google Maps Geocoding API and provides the ability for a user to populate the latitude/longitude data based on the location name/address.
- NodeJS - This project was built using Node v16.13.0
- NestJS - NestJS is a NodeJS framework that fully supports TypeScript and uses Express under the hood.
- TypeORM with MySQL - NestJS has TypeORM support, which allows one to use object-relational mapping as a way to interact with a relational DB without having to use SQL directly.
- AngularJS - The project was built using Angular v13.0.1
- Angular Material - Angular Material is Material design applied to AngularJS. It contains a myriad of components and style options for an elegant user experience.
- You'll need NPM to install dependencies and launch the API
- You'll also need Angular CLI to launch the UI
- You may want to configure the JWT secret in
api/src/auth/constants.ts
- Navigate to the
api
folder - Run
npm install
- Run
npm start
(prod) ornpm run start:dev
(dev) to launch the API - The API will be available at http://localhost:3000
- Configure the database options in
api/src/config/constants.ts
- This project has been tested and works with MySQL (results may vary with others)
- Ensure your MySQL server is running
- Navigate to the
api
folder - Run
npm install
- Run
ng serve
to launch the UI - The API will be available at http://localhost:4200
- Set up a Google Cloud Platform project (if you don't have one already)
- Generate a Geocoding API key (if you don't have one already)
Go into frontend/environments
and update:
frontend/environments/environment.ts
frontend/environments/environment.prod.ts
These files contain configuration information for both the Tracer API and the Google Geocoding API. In development, the Tracer API will point to http://localhost:3000
(default URL).
The environment.ts
files will look like this (image below). Replace GEOCODING-API-KEY
with your API key.
By clicking "Get Started" or "Login" a patient can create an account if they do not have one already.
Once logged in, the "Home" page shows a patient's profile information in addition to whether or not they've been exposed to COVID-19. Patients can also click "Update Info" or "Change Password" to make changes to their accounts.
Patients can add previously visited locations to the "Locations" page. This will create the location in the database and record all patients who have to the location on that day.
If a patient has tested positive for COVID-19, they can report this on the "Exposures" page. By reporting an exposure, Tracer will notify all other patients that were at the same place on the same day within the past week of catching the virus.
Our other patient, Jane Doe, who was at Google HQ on the same day as John Doe, has been notified that she may have been exposed to COVID-19 after John reported his exposure to COVID-19.