Tamawell: Gamified Wellness Tracker
Inspiration
Transitioning from university lectures to a full-time software engineering placement at Visa in Belfast has completely changed my daily routine. Between work and settling into a new city, finding the motivation to stay active and take care of myself was getting tough. I wanted a way to gamify my daily habits. The idea for Tamawell came from a simple concept: if you won't take care of yourself, maybe you'll do it for a virtual pet. Your real-world wellness directly correlates to your digital companion's health.
What it does
Tamawell is a mobile app where a virtual pet relies on your daily physical activity to survive and thrive.
- Keep Walking: Continuous steps actively boost your pet's energy.
- Shake to Play: Physical device motion increases the pet's happiness.
- Log Meals: Logging your real-life meals keeps your pet from going hungry.
- Viral Loop: Users can challenge friends to beat their daily step streak using the native share sheet.
- Premium Store: A mock Visa checkout flow that lets users "buy" a premium care package to max out their pet's stats instantly.
The app features a dynamic UI that adapts to your local time, shifting into a cosy dark mode after 7:00 PM, and providing tactile haptic feedback when you hit milestones.
How I built it
I built Tamawell using React Native and Expo. I handled the global state of the pet (energy, hunger, happiness) using a custom PetContext. To ensure the pet's stats persist between app loads, I wired up local storage using AsyncStorage.
For the real-world interactions, I integrated expo-sensors. I wrote a custom usePedometer hook to track live step counts and a useAccelerometerGesture hook to detect shaking motions. I also dropped in expo-haptics to give the buttons and step-goals a premium native feel. For the final polish, I integrated React Native's Share API and built a custom Modal with an ActivityIndicator to simulate a Visa payment gateway processing delay.
The core game logic relies on calculating the elapsed time to deplete stats, balanced against the user's active inputs. For example, the energy reward for walking is calculated using a threshold system:
$$E_{new} = \min\left(100, E_{current} + 15 \times \left\lfloor \frac{\Delta \text{steps}}{100} \right\rfloor\right)$$
Challenges I ran into
The sprint was intense, and I hit a few distinct roadblocks:
- The Asynchronous Trap: I initially crashed the app by trying to synchronously parse a Promise from
AsyncStorageinto a JSON object inside auseEffecthook. I had to restructure my load state into a proper async helper function. - Dependency Conflicts: I fought with aggressive npm peer dependency blocks when installing native Expo modules, having to bypass strict checks just to get packages like haptics installed.
- Git Submodule Issues: Less than an hour before the deadline, I realised Expo had initialised a hidden
.gitfolder inside my project directory. GitHub treated my app as a broken nested submodule, refusing to display my code. I had to bypass branch protection by force-pushing a clean history via an orphan branch to the cloud.
What I learned
This project really solidified my understanding of React Native hooks, particularly how to cleanly separate logic into custom hooks (usePedometer, usePetLogic). I learned a lot about handling asynchronous local storage in a mobile environment, hooking into device hardware APIs, and mocking checkout infrastructures. I also learned some permanent lessons about auditing Git worktrees before trying to push!
What's next for Tamawell
I want to replace the manual "Log Meal" system with actual health app integrations, and build a fully functioning backend for the premium store so users can buy custom background colours or accessories for the pet.
Log in or sign up for Devpost to join the conversation.