DEV Community

Robert Colca
Robert Colca

Posted on

How I have developed an application to fight SARS-COV-2 using Github Student Pack

Introduction

An interesting project I have developed in the last period of time, is Covid5G, yes I know that this project might sound a little bit weird for some people out there, but it's not related to the 5G technology, but to the fact that our team was initially composed of 5 people.

By developing this project we won the #HackTheVirus hackathon(See: devpost) and had several apparitions in some important Romanian newspapers, like this one: https://adevarul.ro/locale/cluj-napoca/video-functioneaza-aplicatia-putea-ajuta-oprirea-sars-cov-2-fost-realizata-patru-tineri-romani-premiata-competitie-internationala-1_5ec29f305163ec4271e87b0e/index.html

I really think it was a fun experience developing this whole application and collaborating with my team, using Github and the Github Student Pack in order to fight this pandemic. #githubsdp

Inspiration

About 25% of coronavirus transmissions may have occurred in pre-symptomatic stages — meaning it can be spread by people who don't yet know they have it.

But what if you're healthy — or bored? Is it ethical to go to the grocery store or it is better to order delivery? But by doing so, are we not exposing delivery people to increased risks? Are you breaking the social contract by going to the grocery store? Or, by not going, are you hurting the economy? It is responsible to go for a run in a crowded park?

Social distancing can dramatically slow the rate at which the infection spreads. Getting the social distancing wrong will lead to second wave of infections and a return to lockdowns. We can't afford to repeat the same mistakes.

Grocery shopping will need to happen, people will need to go to the doctor or take care of old people, others need to commute to work or simply go for a walk for mental health sake.

How to do all these tasks in the safest way possible? COVID5G changes the way people live social distancing nowadays.

Our aim is to support governments to enforce #socialdistancing, offering flexibility and increasing awareness while #flatteningthecurve. Through COVID5G we commit to eradicate the possibilities of secondary and tertiary wave of COVID-19 while ensuring an optimized social distancing.

What it does

  • Predicts a health score

Once the user is logged-in COVID5G he/she will take a test developed in line with World Health Organization guidelines, including a travel history. The results will determine user's health score (red flag- high risk of infection, green- healthy user). The application extracts real time location and pins the respective flag onto a geomap.

  • Increases awareness

The application tracks a 14 days travel history. As soon as a person gets infected, all the people who met him/her in the last 14 days will be notified within a second.

The instant notification system increases awareness by helping those who got in touch with infected people deal with the situation and take appropriate measures: self-isolate themselves for the required time until they might show symptoms and are tested for COVID-19, increase sanitary measures at home, observing whether they develop symptoms, contacting a near-by hospital etc. Additionally, the infected user can consent to send his/her COVID5G data to the health authorities. All is done while ensuring complete privacy.

  • Monitor and redirect the user to the closest hospital

COVID5G has a daily compulsory health check to monitor the health score of the user. If the user is in a critical health state, the application redirects him/her to the closest hospital.

COVID5G'S priority is user's health, thus the closest hospitals are available to all the users irrespective of the health score.

  • Manages the grocery and optimizes the time spent in supermarkets and pharmacies

Grocery shopping is vital for maintaining a good health during these tough times. However, it might prove to be difficult giving the social distancing barriers.

Highly engineered for users, COVID5G offers real time information about the number of people in the supermarket, the number of infected or possibly infected people.

Community health is a priority, thus the application intends to protect also workers by not exposing them to a huge stream of customers in the same time, needing to deal with higher exposure to risk and more efforts to sanitize the entire place. The application puts at users' disposal an entire timetable to optimize the stream in the market. Thus, instead of going at noon on a Saturday when the place is sure to be crowded, COVID5G suggests going really early on a weekday morning.

Overall, the entire shopping experience during social distancing is improved: less crowd, less time spent in a queue, less risks both for user and for the workers.

  • Manages the strolling and commuting routes

If you are a doctor, farmer, worker in a supermarket, truck driver, airport staff, delivery employee, janitor &garbage collector, you work in an animal foster etc. you need to commute to work.

Or for the sake of mental health you need to take a stroll. Real time data is available at just one fingertip distance. The exact number of people in a place and the number of infected people are now easily accessible. The application even recommends alternative routes to avoid risky places. Moreover, a notification system is put into place so that user becomes immediately aware when he/she enters a risky area.

Challenges we ran into

We struggled to understand how the Google APIs work and establish an API key for accessing them was a very important learning experience for our team.

Moreover, we brainstormed a lot about the libraries to use in order to ensure the application works in the background and sends the notification alerts, without demanding the user to be permanently connected.

On the mobile site, the most challenging feature was to make the location requests battery-friendly. We surpassed this issue by sending the coordinates only when the user is changing its location by 15 meters.

Accomplishments that we're proud of

We were able to develop both an web-based application and mobile application. We managed to succesfully develop the back-end and front-end side and integrated more than one interesting tools that can help users in differing ways: 24/7 acess to real data, risky areas, groceries, hospitals. We did not expect to be able to do this in such little time, but we successfully managed to pull it off.

How we built it

We developed a mobile application based on the MVVM architecture. We used the following frameworks: RxSwift, GeoLocation, Moya, Alamofire, SwiftLint, RxCocoa and ReachabilitySwift. The server-side was written with the help of Moya. (Moya uses Alamofire while providing a different approach to structuring the network layer); We also used the native push notification feature provided by Apple, to inform people that should post new symptoms when a time interval has passed. To reach the user location we needed to ask for permissions.

What we learned

Through COVID5G , we learnt the importance of raising awareness, as well as using the already existing platforms to make a difference, especially in a time where it is difficult to communicate with one another and ensure everyone receives the information they need.

What's next for COVID5G

COVID5G wants to change the way millions of people live the social distancing tough times.

COVID5G not only gives personalized information about cases around the user, but also about local grocery stores and local hospitals. It predicts how risky a location is, it alerts the user when he/she enters a risky area, predicts the user's current health state, and reduces spreading, all of it while respecting privacy.

Next we would like to build collaborations with sponsors, governments, health authorities etc. so that people supposed to stay in quarantine or self-isolation at home are monitored properly.

Moreover, when the user has no more mobile data, we would like to use network location provider or even Bluetooth.

We would like to implement AI algorithms based on historical supermarket data to offer even the hours when it is best to go in.

Top comments (0)