Inspiration:
This year Hack KU announced the special track 'Social Good.' We decided to brainstorm how we could develop software in ways that would benefit our community. We decided to create a social media platform that would promote mental wellness and encourage positive engagement.
What it does:
When the user starts MindMend, they are prompted to provide the URL to their Twitter account. MindMend then uses a web scraper to visit the user's followed accounts and grab each of their most recent tweets. Once each tweet has been scraped, the user is taken to a homepage where each friend (followed account) is displayed with their most recent tweet and a sentiment rating.* MindMend uses natural language processing to analyze the sentiment of each tweet and rate it from Positive, to Neutral, to Negative.
How we built it:
For our web app we created our app with Node.js. We created an API using Axios for React.js and Flask for Python. We built our frontend with React.js, CSS and Tailwind. We utilized PyTorch for the sentiment analysis and we used the RoBERTa transformer model. Lastly, we used Selenium to web scrape from Twitter.
Challenges we ran into:
- Web Scraping: When accessing Twitter, we are required to log in to a registered Twitter account. Once you are logged in, we had to scrape the tweets by parsing through the HTML on Twitter's app. These sites are designed to be difficult to web scrape, but we persevered.
- Sentiment Analysis: Once we scraped the tweets, we had to find a way to analyze the sentiment of each post. We decided to use a pretrained transformer model, and decided on RoBERTa. Transformers have greater ability to understand sentiment with the sequence of words compared to less advanced models such as VADER.
- Representing Users: After we fed the tweets into the transformer, we had to create an abstraction for users Our approach was to create a 'Users' class (JSON object) which contained each user and their posts, sentiment rating, real name, and username.
- Integrating This Tech in Our App: The web scraping, data collection, and sentiment analysis were originally developed and tested in python modules while the app was developed in our repo. Once we finished the python modules we had to refactor our code so that we could achieve the desired functionality within the app itself.
- Styling: Once most of our work was finished, we could pivot to polishing our user experience. Using Tailwind, we were able to implement complex and user friendly UI for efficient navigation.
Accomplishments:
We are really proud to have developed an app with valuable functionality and a clean UI. We incorporated a large tech stack as well as multiple generative AI technologies. We believe these factors propelled us to create an application with the potential to make a positive impact in our community.
What we learned:
New Technologies: This was our first time utilizing technologies such as web scraping or natural language processing. Full-Stack Development: For two of our three group members, this was our first time developing a full stack application. With some experience in HTML, CSS, and JavaScript, we were introduced to backend frameworks like Axios and Flask.
What's next for MindMend:
There are a few more features/technologies that we would integrate in our app if we had more time.
- Parental Controls: The biggest social media companies in the world have reluctantly added small regulations for parental controls, but not nearly enough to protect adolescence on social media. We would like to develop more advanced safety mechanisms. (See https://www.judiciary.senate.gov/protecting-children-online)
- More Personalization: Due to time constraints we were not able to implement an associated user database with our application, though doing so would allow for more personalized features. These features could be tweet/sentiment history, broader user interactions, or better recommendations for mental health resources.
Log in or sign up for Devpost to join the conversation.