How we developed a chatbot to fight against COVID-19?
Tags: showdev, opensource, kotlin
Published: 2020-06-26 14:18:37

---
title: How we developed a chatbot to fight against COVID-19?
published: true
description: 
tags: showdev, opensource, kotlin
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/r9ykdxqdf6zjj4hkcgg0.png
---

I remember the night when a nationwide lockdown was declared. We were all sitting around bored, thinking, "Something has to be done with the excessive amount of data flowing around in GitHub." People were creating numerous APIs, web sites and mobile apps to provide information about the disease. 

## 🤕 Problem 

People had so many questions, but the answers are usually very scattered (different websites and apps). Finding out the right information is hard and it takes a lot of time. To judge the reliability of that information is important as well.

## 💡 Solution 

We concluded that we needed something which was:

- 🤗 Trustworthy
- ⚡ Quickly accessible
- 🗣️ Interactive

## ⌨️ Implementation
![](https://i1.wp.com/24.media.tumblr.com/tumblr_m9010sXDqf1qdhag9o1_500.gif)

We finally decided to make something that combined the three factors stated above. A Chatbot was the answer.

We started looking for the data sources which provide maximum accuracy and reliability. We found [CSSEGISandData/COVID-19](https://github.com/CSSEGISandData/COVID-19) a data repository operated by Johns Hopkins University Center for Systems Science and Engineering (JHU CSSE). It as the most accurate data on the internet. Also, it's the primary source of all other APIs available out there. We also found some supercool APIs, so we integrated all of them into one.

## 🌟 Features

Fast forward 4-5 days, we've created a Telegram chatbot, named [@CoDoc19Bot](https://t.me/CoDoc19Bot), with the following features:


1) 🤖 [QA](https://github.com/teamxenox/CoDoc19#qa-%EF%B8%8F)
You can ask your questions right away. With the support of NLP (Natural Language Processing), it will answer all your questions.

2) 🥼  [Corona Test](https://github.com/teamxenox/CoDoc19#corona-test-)
To check the likelihood of having COVID-19.
![](https://co-doc-landing-page.now.sh/img/mob_test.png)

3) 🤔 [Quiz](https://github.com/teamxenox/CoDoc19#quiz-)
Are you taking the correct protective measures against COVID-19? Find out.
![](https://co-doc-landing-page.now.sh/img/mob_quiz.png)

4) 📈 [Statistics](https://github.com/teamxenox/CoDoc19#statistics-)
To get global COVID-19 statistics with charts.
![](https://co-doc-landing-page.now.sh/img/mob_stats.png)

## 📣 Publishing

![](https://media.tumblr.com/tumblr_m6iiwwxrOO1rp62eq.gif)

On April 5th, we released the first version through [ProductHunt](https://www.producthunt.com/posts/codoc19). People started to use it. After 6 hours, we had around ~600 active users with ~3000 requests processed. 

## 💣 What went wrong?

![](https://thumbs.gfycat.com/AdventurousRemorsefulBaiji-size_restricted.gif)

1) After the release, one of the external APIs changed their API structure without any notice 😓. Luckily, we came to know the error and fixed it in a couple of minutes. 

2) We couldn't test it with all the countries. So, in the `CSSEGISandData` dataset, *South Korea* was labeled as *Korea, South* and we've been using simple string explode function to parse the CSV 🙄, as a result 🤷, it broke. We timely fixed it with a good CSV parsing algorithm. 😀

## 👆 What we learned?

 - Do not deploy anything without thorough testing 😋
 - If you're using any external API, try to monitor it using a program.

## ⛓️ Links

- Install the bot using [@CoDoc19Bot](https://t.me/CoDoc19Bot) handler
- Learn more about it from [our website](https://co-doc-landing-page.now.sh/)
- Learn how it works and contribute!

{% github teamxenox/CoDoc19 %}

---
### P.S.

If you're passionate about open-source development and looking to contribute to exciting open-source projects, Team XenoX might just be your calling. We're always working on something cool. So I'd love for you to join us! Check out our work at [XenoX Multiverse](http://bit.ly/xnxmltvrs)! 🔥

#### Write for XenoX!
Team XenoX is also looking to add more authors to our publication. If you like writing and have some creative ideas you'd like to share, we'd love to have you! 💯 Your blog posts will gain a lot more eyeballs. 👀 You'll get a chance to win some cool swag. And hey, you also get expert consultation and free proofing/editing from our best. 😉😎

![Write for XenoX GIF](https://dev-to-uploads.s3.amazonaws.com/i/2zs91n8giwoqsgom4201.gif)

If you want to apply, just go here and enter your details:
https://forms.clickup.com/f/1rz92-3351/VMFE0Q81LI7E0A92Z0

#### Join our Telegram Channel!

We share the best resources, articles, and other cool stuff for devs from across the internet on our Telegram channel! Join the party! 👉🏼 [Link](http://bit.ly/devtg)

![Dev Telegram channel unofficial gif](https://thepracticaldev.s3.amazonaws.com/i/pvgefc22p3c8qumwjs1a.png)