We all know the impact words can have on our mood. Similarly, we also know the great positive impact that some words of happiness can have on our mood. With this in mind, we were inspired to make an app which delivers some of this positivity through happy tweets! The user would be able to receive a thread of happy tweets related to a topic of their choice, bringing them some happiness throughout the day!

What it does

HappyFlock curates the happiest tweets from people the user follows as well from a topic of their interest when signing up with their Twitter account. Additionally, the app provides recommendations on how a happy tweet could be about, so they can also make someone’s day by tweeting what is making them joyful at the moment, inviting others to join in a happy and healthy conversation.

How we built it

Using Swift and Xcode, we created an app that integrates the Twitter API to retrieve tweets and select the happiest ones using sentiment analysis.

We developed a custom Web API for our app to classify get #HappyTweets! Our API, written in Python, makes use of the Twitter API through the Tweepy Library to get tweets based on user interests. It uses the TextBlob Sentiment Analysis Library along with a Pre-Trained Dataset to classify the polarity of the tweets (from -1:negative to 1:positive). It runs on a Google Virtual Machine and is accessible through simple GET and POST requests.

The Front-End was developed in Figma first and then adapted towards an iOS app using SwiftUI. We learned how to leverage the use of Views (notably, we created a TweetView) and working with animations, graphics, and buttons to promote a simple, #Happy, and Twitter-like experience!

Challenges we ran into

One of the challenges we ran into was the implementation of choosing more than one topic. Ideally, we wanted the user to be able to choose various topics of interest to receive their thread of happy tweets from. However, we soon realized that due to time constraints, we were limited to having the user only choose one topic from a set of predetermined options.

Accomplishments that we're proud of

We worked together to create everything from the Figma Mock-ups, ideating the best bird names, and working together to create the Front-End and the Back-End.

We were able to develop in SwiftUI pretty quickly and get a scope on how to use Sentiment Analysis to promote good in a social network! :)

What we learned

  • How to use Twitter API
  • How to perform sentiment analysis
  • UI design

How to run

You can run our app by downloading the Xcode project found in our GitHub Repository. From there you can test out all of our app's exciting features!

What's next for HappyFlocks

We’d love to fix the challenge we faced of having the user be limited to choosing only one topic of interest. This would be done by implementing a preferences algorithm, which would allow the user to choose multiple topics of interest instead of just one, allowing for more personalized happy tweets.

Built With

Share this project: