In recent times, the political atmosphere has been everything but bipartisan. With the nation polarized and partisan politics overwhelming the efficiency of congress, it seems as if policy gridlock will always be inevitable. In this regard, reaching a bipartisan consensus about contemporary issues has become increasingly difficult. This divide has increased the number of hate crimes, violence, terror, anger, and fear. In light of this, we developed a web application called Let’s Talk that aims to produce a middle ground between citizens, by prompting discussions between individuals of opposing political spectrums and ideologies. We hope that this application can serve as a medium that allows users to share their views and opinions in a healthy environment while gaining a better understanding of the world around them. In doing so, we wish to improve our community by fostering intellectual conversations that lead to reflection and learning.
What it does
To use our web application, users must first authenticate themselves by logging in with their Google account. The home screen for authenticated users has a relevant news section on the right in the event that users want to create a room and discuss the most recent domestic or international events.
After this, the user has one of two choices: either create a private room with any topics for discussion or join a room that has already selected a topic for discussion (public room). Anyone can join private discussions if they are provided with an URL. However, for public discussion rooms, to foster discussion, we only match those with opposing viewpoints. Initially, the users who are joining a public room are presented with a slider that they can move around to specify their views in regards to a discussion topic (the left side is for and the right side is against). Then, the user is paired up with another user that has an opposite viewpoint based on the sliders (or close to an opposite view) on that topic.
In these rooms, users are able to chat in real-time with each other based on the topic question (ex. How do you feel about abortion? For-abortion vs against-abortion). After the discussion is over, the users leave the room and are given the opportunity to reflect on what they learned in the discussion and tweet it on Twitter.
How we built it
This application utilized a variety of technologies and frameworks to display the front end and to manage our back end. We used Firebase Google authentication to manage our users and Firebase Firestore to store and retrieve user information.
In our Node.js + Express backend, we also used socket.io to send information such as audio and messages to users in the room through websockets. Redis was also utilized as a key-value storage option. Essentially, it handled storing the message and room state for each room. In addition, we used a naive way of matching users to rooms with a Finder data structure, a Map. Furthermore, we used Firestore to store the basic user data. For our front end, we used React.js and BaseWeb to build out the core UI. We also used fetch to make API calls from our web client.
Challenges we ran into
Our biggest challenge was to integrate our front end with our socket.io back-end server. We had multiple problems with configuring and running Redis, our in-memory management solution. We also dealt with CORS issues related to our socket server which was hosted on Heroku. This meant that our front-end was rendered functionless when deployed/hosted on Heroku.
Another big challenge was testing the room state since web sockets introduce a lot of complexity. In order to do this, we created endpoints to view all the rooms and the room data as well as open rooms for matching.
Accomplishments we are proud of
We are proud to develop a full-stack application within the given timeframe. We are also proud that we were able to put away our differences in expertise and domain to create a working app to promote better civic engagement and help our communities. We are also proud that we got real-time chat to work through the use of websockets.
What we learned
We learned that integrating the front end and back end is a daunting task and should not be left till the end. Most importantly, we learned that we should focus on the core features before we start implementing features that aren’t that necessary for the application.
Apart from the non-technical aspects, some of our team members were fairly new to developing full-stack apps. We learned a lot about Redis, sockets, and webRTC.
What's next for Let’s Talk
We believe that Let’s Talk has huge potential to change the way we discuss and find a middle ground. We will continue to build new features such as allowing more than two people to join and debate in a single room. We first developed a real-time chat between users because we thought that chatting removes all of the initial bias of meeting someone. However, we know that not everyone prefers to chat, so in the future, we can create alternative methods of communication such as voice or even video calls. We also hope to explore adding a better moderation system where users can set time limits and better facilitate rounds. Most importantly, we hope to promote our website through social media and other platforms to gain more active users which will help create a bigger impact on the world.
React.js, Firebase Authentication, Firebase Firestore, Node.js, Express, Redis, Socket.io, and BaseWeb.