Project Story
Inspiration As a group of friends who regularly go to the gym and on walks together, we've tried many fitness apps like MyFitnessPal. While powerful, they often felt overly complicated for our needs. We wanted to create something that was simple, fast, and focused on the features we actually use tracking workouts, monitoring progress, and a bit of friendly competition. Our inspiration was to build the ideal fitness app for our friend groupand for anyone else looking for a straightforward, community driven experience.
What it does FitTrack is a web application designed to help users track their fitness journey in a simple and intuitive way. It includes features for logging workouts and nutrition, visualizing progress with charts, and engaging with a community through leaderboards. The primary goal was to build a dynamic, real-time, multi-user application without relying on any front-end frameworks like React or Vue, demonstrating the power of modern vanilla JavaScript.
How we built it We built FitTrack using only the core technologies of the web, sticking strictly to the hackathon's "vanilla stack" rule. The entire front-end is built with HTML5, CSS3, and JavaScript (ES6+). For the backend, we leveraged Google Firebase, using Firestore as our real-time NoSQL database and Firebase Authentication for secure user management. We also integrated Chart.js to create the dynamic progress charts.
Challenges we ran into Our biggest challenge was building a real-time, multi-user application without a front-end framework. This forced us to manage application state and UI updates manually, which led to several interesting problems:
Database Structure: Initially, our leaderboard didn't work because we were saving data in a way that was difficult to query publicly. We learned about database denormalization and restructured our Firestore collections to save a separate, public copy of leaderboard-relevant data.
Security Rules: At one point, our app was silently failing to save data. We discovered our Firestore Security Rules were too restrictive and weren't allowing writes to our new global collections. Debugging and fixing the rules was a major learning experience.
Asynchronous Code: We ran into race conditions where the UI would try to display data before it had been fetched from Firebase, resulting in empty components. We had to refactor our code to ensure that rendering functions only run after the necessary data is available.
Accomplishments that we're proud of We are incredibly proud of building a full-stack, real-time application from scratch using only vanilla JavaScript. It's a testament to what can be achieved with the fundamentals. Successfully integrating Firebase for a seamless backend experience and creating a polished, responsive UI with features like dark mode are accomplishments we're particularly proud of. Most importantly, we're proud of how we collaborated as a team to diagnose and solve complex bugs.
What we learned This project was a deep dive into the fundamentals of web development. We learned how to manage a complex application state without a framework, the importance of a well-designed database schema, and how to write secure and efficient Firestore rules. We also gained invaluable experience in debugging asynchronous code and collaborating effectively as a remote team.
What's next for FitTrack This hackathon was just the beginning. We plan to continue developing FitTrack as the go-to app for our friends. Our next steps include adding more social features like a friends list and direct messaging, creating more detailed workout planning tools, and adding support for tracking outdoor activities like walks and runs with map integration.