Inspiration
Being high school students, this quarantine was one of complete boredom, and though we could spend time finding productive things to do, we lacked the motivation to do. Inspired by this laziness, we decided to build something to help. We thought that if we struggled with staying on task, then others would as well. In order to motivate ourselves, we created a system to incentivize ourselves in a fresh and bold way—be productive or ruin our social lives.
What it does
BadHabits monitors the title of the open window (not the contents!) and stores how long you have spent on each site in memory. There is then an analytics page where you can check out how long you have spent on each application and the pie graph helps you visualize how much of a percentage of your time you’ve spent on each application. We’ve also integrated Facebook and Twitter APIs so that you can login. You can customize the blacklist of apps and the amount of time that is deemed “excessive”, and if your total use time over 24 hours exceeds that time limit, then your social life gets ruined :)
How we built it
We utilized the electron framework to easily create a GUI and to allow for easy exporting to a standalone app. The current focused window title is polled every second and stored inside a custom data structure for the best memory and computational efficiency. Every minute your total use time across all blacklisted apps would be computed through the data structure, and if it exceeded the time limit then Twitter and Facebook APIs that you have logged into will post embarrassing messages onto your feed.
Challenges we ran into
Integrating the electron framework with react was our first attempt at developing the GUI, however it failed due to difficulties having the two communicate with each other. Furthermore, working online rather in person made it a lot more difficult to collaborate with our teammates.
Accomplishments that we’re proud of
In the end we were able to make this project work, and that’s already pretty cool by itself. Working through a virtual hackathon and making a project of this scale was extremely tiring but rewarding. Furthermore learning a new framework and having to switch out all our React code required us to work more efficiently than ever to succeed.
What I learned
It is very important to have a solid plan before making an application. Since we did not think through all of our steps, we encountered many hardships that we could have else avoided, such as the difficulty in integrating React with Electron.
What's next for BadHabits
Next we would work on making the user interface more user friendly and have more API integrations. In addition, having more statistical analysis available for the user would provide a more refined and detailed app.
Log in or sign up for Devpost to join the conversation.