We wanted to help Twitter users engage in thoughtful conversations on the platform. A challenge we see on social media platforms such as Twitter is that users are often dehumanized while interacting on online platforms. We wanted to create something that helps users connect with each other and learn more about each other and in this way, we wanted to encourage healthy conversations amongst Twitter users in an entertaining and engaging manner. The concept takes inspiration from Ancient Greek philosopher Socrates who we borrowed from as a symbol of wisdom and thought-provoking discussion.

What it does

Socrates is a Twitter bot that continuously processes tweets and threads and responds to users whenever key phrases are used such as !SocratesBot. When Socrates is summoned, he prompts the thread with a question so that users can engage in discussion. Socrates is also built with an accompanying dashboard where admins and users can see growing conversations that have been started by Socrates. From this dashboard, admins can register more questions for Socrates to use and normal users can find active conversations that they might want to jump into.

How we built it

We built Socrates using Tweepy to manage the stream of Tweets. Tweepy is implemented in a Flask backend server where we also maintain endpoints for Socrates to post to Twitter as well as various admin functionality on the dashboard. Socrates currently connects to a Google Spreadsheet for his questions and whenever a Twitter user summons him, he uses this database to engage the users. As a bot, Socrates is continuously processing tweets on our backend server and responds to the user when they use certain key phrases. We also built the bot dashboard using React and Bootstrap for styling. The dashboard communicates with Socrates through endpoints and visualizes tweets using libraries such as D3.js.

Challenges we ran into

This hackathon came with many 'firsts' for each one of our team members. Working with the Twitter API, Python, Flask, Google Sheets & Cloud APIs, all for the first time proved to be quite the challenge. After learning how to use each of these technologies and getting used to them, a lot of the challenges we were encountering revolved around trying to connect our back-end and front-end, as well as getting the Twitter bot to behave properly. Most issues we were able to overcome, however, we were unable to get our front-end fully connected with our back-end, leading us to create a "proof-of-concept" for what our bot Dashboard would be like.

Accomplishments that we're proud of

Our accomplishments go hand-in-hand with the challenges mentioned above. We are proud to have tackled this project by going out of our comfort-zones and using technologies we were not familiar with. We are proud of being able to overcome many of our challenges, and overall just being able to have something neat to present at the end of a very restless hackathon.

What we learned

How to work with flask and python to create a slick backend, as well as how to use the Twitter API to stream & process data, automate tweeting, and lastly, despite not being able to include it in the final product, we learned how to use the Google Cloud API to conduct sentiment analysis on tweets streamed from our backend.

What's next for Socrates

Socrates can definitely go in a multitude of different directions, but we believe that the best way to continue pursuing our goal of making Twitter a more welcoming place for healthy conversation, is to be able to automate the bot through ML/NLP methods to create personalized experiences for all of its users. Having a dashboard that visualizes the vast array of positive/healthy interactions that Twitter users have between eachother (using Socrates) and how those interactions have a positive affect on other people's interactions would be amazing. We believe that we can one day, with applications just like this, we will be able to visualize the spread of positivity throughout social media, allowing us to learn new ways to encourage healthy conversations for everyone.

Share this project: