Inspiration

It’s all over Twitter. Misinformation, harrassment, bullying. Today’s top social media platforms host an environment rife with extremism and echo chambers. Instead of seeking to understand, users engage in cancel culture and flame wars. The consequences are severe: without open-minded civil discourse, society fails to meet in the middle and compromise on the many pressing issues it faces, including gun control, abortion rights, climate change, and systemic racism. So, we created Civil, the world’s first hub for productive dialogue.

What it does

Civil gives every user a rating, 1 to 5 stars, based on the quality and civility of their posts. A user can view the discussions of users in the tiers above them, such as 4.5 to 5 star users, but not comment on them. At the same time, posts written by users in a rating tier lower than them are hidden. By giving greater visibility to higher-star discussions, this system brings productive discussion to the forefront and incentives users to think before they post.

How do we calculate a user’s rating? Two things go into it. 1) Machine learning. We fine-tuned an algorithm that uses natural language processing to give a comment a rating based on four weighted filters (Severe Toxicity, Insult, Threat, and Identity Attack) and adjusts a user’s rating accordingly. 2) A new way to interact - the Respect button! Since the conception of social media, three buttons have dominated: Like, Comment, and Share. With the respect button, even if you don’t necessarily like or agree with a post, you can still respect it for the viewpoint, the way it was supported or explained, or maybe it helped you see their point. The amount of respect a post/comment receives factors into its rating and gives a community-driven dimension to our rating system.

How we built it

We used an extremely lightweight stack, including SvelteKit and TailwindCSS, that allowed us to rapidly prototype Civil. We used Figma to choose a color scheme design our graphics. We used a Firebase backend to store a user’s data, such as their Google Account info and their rating. We used python to build a comment analysis script based on Google’s Perspective API.

Challenges we ran into

With little experience merging backend and frontend, we spent a good amount of time scratching our heads over the deployment of our python algorithm. Instead, we translated the python script into a javascript function to be called on the front-end (which we’re still working on).

Accomplishments that we're proud of

Coming up with such a unique and possibly impactful idea gave us the motivation to spend a lot of time on Civil’s development. We miraculously wired up Firebase with our app so that a user can log in with their Google Account. We learned how to fetch information from an API created algorithms, and we also worked out an algorithm that calculates how that comment’s rating affects the user’s overall rating.

What we learned

This was our first hackathon. Two of our three team members had never touched an API until now, nor Javascript. We tried but gave up on Flask and JQuery. Still, through all the struggle, we managed to stun ourselves by building something quite substantial in the span of 36 hours. The rapid ideating, prototyping, and development skills we’ve learned will be extremely useful in the future.

What's next for Civil

Understandably, a full-fledged social media app requires a lot of features. As such, we have yet to implement basic features like commenting or a profile section. We envisioned our app to have many categories that users can look through to find a discussion they’re interested in. We are also nearly finished with integrating our algorithm with the web app so that when a user posts, their rating will dynamically update depending on their post rating.

Share this project:

Updates