Inspiration

A big salute to the grocery workers, truck drivers and the medical workers. Social distancing is absolutely necessary for these people and the ones who are dependent on them. Everyone's life has taken a toll because of fear of falling sick due to not maintaining social distancing. What if my mobile phone alert me to do that?

What it does

Social distancer is an app that will alarm users whenever two people come close to each other breaking the rule of social distancing in public.

How I built it

The react web client sends the device id and location details to the server which is stored as key value pair in the Redis. This data will be updated every 5 seconds. With this data in redis(a lightning fast key value data store), we compute the 1 meter radius around the user. This is done for all the users using the app. Whenever these virtual circles that is plotted around the users collide, we push a message to the kafka topic which the react webclient is listening to. If the web client receives a message from this kafka topic, an alarm is rang in his mobile phone which will alert the user to move away from any potential Covid-19 exposure.

Challenges I ran into

Determining which systems to use for the design to make this much faster as millions of data could be moved around and computed. Redis is meant for caching. But since there could be a possible time to live on these data, it could be flushed periodically. Kafka was an easy choice because it was meant to be built for this.

Work when my 4 year old needed attention.

Accomplishments that I'm proud of

Able to design the full stack system from UI to the back-end and made it work for a very noble cause.

What I learned

Working on what you love while you are locked down can be fun. Apache Kafka Redis

What's next for Social Distancer

This can be implemented as a part of an existing app like facebook or an in built android update so that this will automatically alert the users instead of them going to install this app.

Built With

Share this project:

Updates