Inspiration

Stay at home orders given in many countries because of COVID-19 has resulted in an increase in domestic violence incidents. It was already hard for domestic violence victims to seek help from police or a social worker, but now when they are trapped at home with their abusers they don’t get a lot of opportunities to contact someone for help. As calling hotline numbers or police is not feasible when the abuser is near you, some NGOs have started chat services to help people but unfortunately many smaller NGOs don’t have the resources to do the same. Some of these smaller NGOs may have an email address where people can ask them for help but the abuser usually has access to the phones or laptops of their victims and easily view their conversation which could lead to more physical abuse.

What it does

My chatbot attempts to solve this. For domestic violence victims, it helps them contact NGOs from the messenger app and helps hide their conversations and for NGO, it enables them to connect to more people through their email address.

On the surface, Asha looks like a simple chatbot that tells jokes. But its primary job is to listen for safe words like “sos” and “mask 19” which tells it that the user is a victim of domestic violence. These safe words can be publicised on websites of NGOs we partner with, posts boosted on Facebook and many other ways. When this happens the control of the conversation is transferred to another Facebook app that specialises in contacting NGO. Because of handover protocol, this system can easily be added to various existing chatbots.

The Facebook app then asks for information the user wants to send and then sends an email on their behalf to an NGO depending on the country they are in. (As the app is in development right now, it asks the user for the email address to send the email to so that the person testing it can send the email to themself and can see how it looks.)

The app then allows the user to have a 2-way conversation with the NGO.

It also generates a password that the user can use to continue their conversation if for some reason they have to delete their chat. This is done to help domestic violence victims whose partners check their phone on a regular basis.

By communicating in this manner, domestic violence victims can seek help secretly without having to clear their browsing history or email inbox and constantly be in fear of being found out.

How I built it

  • I have made two Flask applications which are hosted on Heroku. One for telling jokes which acts as a front and other that contacts NGOs.
  • It uses Facebook Messenger Platform to talk to users.
  • I have used icanhazdadjoke API to get jokes.
  • I have used an opensource python library called"O365" which is a wrapper for Microsoft graph API to send emails
  • I also use SQLite to maintain context and gather information from the user.

Challenges I ran into

  • Maintaining context and gathering text to send were the primary challenges I faced on the messenger platform. I was able to solve them by maintaining various tables in an SQLite database.
  • Sending and reading email on a Flask app was a challenge too. I used Microsoft Graph API to solve this.

Accomplishments that I'm proud of

I am happy that the final version of the app was very close to the idea of it that I had in my mind. It is also satisfying to know that I was able to learn new things and build products with it that could have a real impact on people's lives.

What I learned

  • I used to only make android apps before this project. As a result, I had to learn a lot about python and more importantly Flask.
  • I became aware of the capabilities and flexibility the Facebook messenger platform has.
  • I was able to discover and learn about various tools and technologies Facebook provides.

What's next for Asha

  • Gathering hotline numbers and email addresses of local NGOs is a monumental task. I plan to crowdsource it.
  • Adapting to more languages other than English is also one of the top priorities. The code was written in a way to make it easier but a lot of strings need to be translated.
  • As for how the message is transmitted is abstracted from the user, I would like to add the ability to send messages to NGOs via WhatsApp or SMS in case they don't have a working email address.
  • Contacting NGOs and adding more features from their feedback.

Built With

Share this project:

Updates