Inspiration

We all want to build better habits, but standard tracking apps feel like a spreadsheet of chores. Our true spark of inspiration came from the anime and manhwa Solo Leveling, where the protagonist is given a glowing, semi-sentient UI "System" that forces him to complete daily physical quests to avoid penalties and level up from a weak E-Rank hunter into a god-tier shadow monarch. We realized that real-life self-improvement needs that exact same high-stakes, addictive feedback loop. We built Habit Hero to capture that specific psychological rush. By turning mundane chores into daily quest logs, awarding experience points, and unlocking elite milestone badges, we transform your ordinary routine into a legendary system where you can literally watch yourself level up in real time.

What it does

Habit Hero is a web-based gamified habit tracker that turns your daily routine into a live quest log. Users are given three fundamental daily quests worth 15 XP each, and can craft up to 7 custom habits worth 25 XP each. As you complete quests, you gain XP, advance your global Hero Level, and unlock milestone achievement badges. To keep the game moving forward, an automated engine resets your daily quests at midnight local time and wipes your custom habits so every morning brings a brand-new slate of quests.

How we built it

The application is fully built in Python using the Streamlit framework for a responsive, reactive user interface. We utilized Streamlit's st.session_state to build an in-memory game state machine that tracks player experience points and quest status. To handle time-zone-aware automated resets, we implemented logic using Python's datetime and zoneinfo libraries, isolating the real-time countdown timer within an automated st.fragment rerun loop that ticks down and updates the app every 60 seconds.

Challenges we ran into

One of our biggest hurdles was dealing with data structure synchronization and Streamlit's execution lifecycle. Early on, state data type conflicts would crash the loop logic. Furthermore, we faced an elusive bug where the level-up balloon animation would completely disappear; we discovered that calling an immediate st.rerun() was wiping out the interface cache before the graphics could render. We also had to overcome "cloud time-warps" when deploying to a Linux server, forcing us to rebuild our time mechanics around explicit time zones rather than local server clocks.

Accomplishments that we're proud of

We are incredibly proud of building a dynamic, stateful game architecture that functions seamlessly directly in the browser. Successfully mastering Streamlit's linear top-to-bottom execution model to fire reward systems (like live toast alerts and cascading screen balloons) exactly at the moment of a boundary level-up felt like a massive win.

What we learned

This project was a masterclass in state management and web application lifecycles. We learned how to transition data structures cleanly from static dictionaries to dynamic lists of objects, how to handle the strict difference between timezone-aware and timezone-naive datetimes, and how operating system differences (Windows vs. Linux case-sensitivity) can break file paths upon deployment.

What's next for Habit Hero

The journey isn't over at level 50! The next step for Habit Hero is implementing a database (like SQLite or Firestore) so players don't lose their historical XP when the server spins down. We also want to introduce an inventory shop where players can spend "gold" earned alongside xp and through daily streaks to buy custom avatar equipment in a potential gacha system, layout customization, and a multiplayer party system to tackle habits together as a guild. There is also potential for the integration of VLMs to assess quest completion with a picture or pictures of the task's completion.

Built With

Share this project:

Updates