Skip to content
HABITARIUM

HABITARIUM

Gamified Habit Tracker using Monad Blockchain for smart contracts

Created on 27th April 2025

•

HABITARIUM

HABITARIUM

Gamified Habit Tracker using Monad Blockchain for smart contracts

The problem HABITARIUM solves

Building and sticking to positive habits is challenging. Many people struggle with:

  • Lack of Motivation: Standard habit trackers can feel like a chore.
  • Poor Engagement: It's easy to forget or give up without compelling feedback loops.
  • Organization: Managing multiple habits towards larger goals can be difficult.

Habitarium addresses this by transforming habit tracking into an engaging game. It uses principles of gamification (XP, levels, HP, streaks, rewards) and goal-setting to make the process more fun, motivating, and structured. Users not only track completion but also see tangible progress through leveling up, earning resources (HP), and unlocking rewards, making them more invested in their self-improvement journey. The planned (and partially simulated) Monad blockchain integration aims to add future layers of immutable proof, unique rewards (NFTs), and potential tokenomics.

Challenges we ran into

We encountered several hurdles building Habitarium. Initially, selecting the right UI framework took time before we settled on Mantine UI, which greatly accelerated frontend work. Implementing the backend gamification, including XP, HP, levels, and especially accurate streak tracking, required careful PostgreSQL transaction management across multiple tables like users, habits, and the new habit_streaks table.
The most significant challenge was deploying our Solidity smart contracts (ERC20, ERC1155, HabitLog) to the Monad Testnet using Hardhat. We first resolved network configuration errors like HH110 by verifying the RPC URL and Chain ID against official sources. Then, we faced persistent issues loading the deployer private key from the .env file. This required meticulous debugging, including checking file location, name, encoding, removing leading spaces, adding the '0x' prefix to the key, and ensuring dotenv loaded correctly in the Hardhat config. We also had to fix multiple PostgreSQL errors during setup, like granting correct permissions (REFERENCES, DELETE, ALTER OWNER) to our application user and refactoring SQL queries to avoid issues like 'FOR UPDATE on LEFT JOIN' by fetching and locking related tables separately within transactions. Schema cleanup was also needed, removing old streak columns from the habits table after creating the dedicated habit_streaks table.
Ultimately, we successfully deployed the contracts to Monad Testnet. However, due to the significant time spent resolving these deployment and database issues, we implemented backend simulation placeholders for blockchain interactions (logging habits, redeeming rewards) instead of fully integrating direct contract calls within the hackathon timeframe. The deployed contracts are verifiable on the testnet. Finally, standard frontend debugging was needed to trace API errors (400, 401, 500) using browser and backend logs, fixing issues like missing API calls or incorrect request parameters.

Tracks Applied (2)

Ethereum Track

Habitarium fits the Ethereum Track as it's built upon core Ethereum technologies and standards, exploring a web3 applica...Read More
ETHIndia

ETHIndia

Monad Track

Our project, Habitarium, utilizes Monad for its core vision of on-chain gamified habit tracking. Monad's high TPS and lo...Read More

Monad

Discussion

Builders also viewed

See more projects on Devfolio