LevlUp
Organise and level up
The problem LevlUp solves
We are solving the Intention-Action Gap. People fail to achieve their goals not because they lack ambition, but because they lack motivation, accountability, and a clear plan. Our platform transforms personal development from a lonely, unstructured chore into an engaging, social, and intelligent game you play with your friends. On our platform, you can ask for a curated plan for almost anything. It also verifies by asking you to upload pictures of your progress. Therefore, it is a great website for LevlUp-ping.
Challenges we ran into
There were many bugs I ran into. Most of them were small bugs, but I would like to share a few of them.
Challenge 1: The "It Works on My Machine" Problem (Environment & Paths)
One of the first and most persistent hurdles was simply getting the application to run. We ran into a cascade of environment-specific issues:
The Symptom: My terminal kept showing errors like "No such file or directory" or "unable to open database file", even though I could clearly see the files in my editor.
The Hurdles: After systematic debugging, we identified several root causes:
PowerShell Execution Policy: Windows was blocking the script needed to activate our Python virtual environment.
Folder Path Issues: Having a space in my project folder name (taskify- hackathon) was confusing the Python interpreter.
Cloud Sync Interference: My project folder was located in a OneDrive-synced directory, which was causing subtle file path and permission errors.
How I Got Over It: This taught me the importance of a clean, standard development environment. We solved it by:
Switching the VS Code terminal from PowerShell to the more stable Command Prompt.
Renaming the project folder to use a hyphen instead of a space.
Moving the entire project to a simple, local directory (C:\dev) to eliminate any cloud-sync issues. This was the definitive fix that made the application run reliably.
Challenge 2: The Evolving AI API (A Moving Target)
Integrating the Google Gemini AI was the core of our project, and it was also our biggest challenge. We faced a series of errors that felt like a moving target.
The Symptom: Our application kept failing with a 404 NOT_FOUND error from the Google API, with messages like "models/gemini-pro is not found".
The Hurdles: This wasn't a single problem, but a chain of them:
Incorrect Model Names: The AI landscape is evolving so fast that model names in tutorials and even official documentation can become outdated. We tried several model names (gemini-pro, gemini-1.5-flash) that were incorrect for my specific project setup.
API Service Not Enabled: We learned that creating an API key is not enough. You must also explicitly enable the "Generative Language API" in the Google Cloud Console for the key to have permission to work.
Unpredictable AI Responses: Once we successfully connected, the AI would sometimes return a valid plan, and other times it would return an empty response or a response wrapped in extra text, causing our JSON parser to crash.
How I Got Over It: This is where we had to become real detectives.
Using a Diagnostic Script: Instead of guessing model names, we wrote a separate Python script (check_models.py) that called the ListModels API endpoint. This gave us the definitive, 100% correct list of models available to my specific account, which finally solved the "not found" error.
Robust Code: To handle the unpredictable AI responses, we upgraded our Python code. We added safety settings to the API call to prevent the AI from being blocked, and used regular expressions (re.search) to intelligently find and extract the JSON data, even if it was surrounded by other text.
Challenge 3: The Logical Bug - The "Infinite Points" Exploit
After getting the features working, I discovered a major flaw in my own logic.
The Symptom: A user could complete a task, get 10 points, un-complete it, and then complete it again to get another 10 points, leading to an infinite score.
The Hurdle: My code was designed to simply "toggle" a task's completion status, and it awarded points every time the status was set to True.
How I Got Over It: This was a pure logic fix. I refactored the function to only award points if the task's status was changing from False to True. This is a simple task. completed: check before awarding points, made the gamification system fair and robust.
Overall, every bug was a critical frustrating event , i got some help from AI for debugging too and learned a lot from it
Tracks Applied (1)