Building Out Reminders and Data Models
WEEK 8
Felipe de Souza
10/26/2025


The past seven days were packed with learning, refactoring and new features. After last week’s momentum on authentication and basic navigation, I shifted focus toward two major areas: reminders and a deeper Firestore data model. The goal was to give our users the ability to set, update and track small habits while laying the groundwork for future features like streaks, badges and statistics.
Refining the sign‑out experience
Earlier in the week I noticed that the app was always signing users out on launch—hardly ideal for a productivity tool! This behaviour was caused by an old authVm.signOut() call in MainActivity.onCreate. I removed that call in the Signout branch and refactored the UI to include a proper sign‑out button. Now sign‑out is an intentional action instead of a side effect, which makes the user experience feel far more polished. It was a small change in code but a big improvement in how the app feels.
A full CRUD cycle for reminders
Most of the week was spent on the Firebase Reminders branch. I created a new Reminders collection in Firestore and wrote repository functions to create, update, delete and mark reminders complete/incomplete. The commit history shows the incremental additions: adding server timestamps when creating reminders, wiring up an updateReminderfunction to /users/{uid}/reminders, and automatically setting or unsetting the completedAt field when a user checks off a remindernewtab. To test these functions I added temporary buttons in TempScreens.kt that allowed me to invoke the repository methods and watch the results live in a debug view. This iterative approach helped me catch issues early—like forgetting to refresh the UI after an update—and ensured that the final implementation is robust.
I also connected the app to the Firestore emulator for local development. This involved creating a debug directory, configuring the Firebase CLI and fixing a missing includeSubdomains attribute in our .firebaserc file. Having a local emulator makes it faster to test database changes without risking production data.
Expanding Firestore models: stats, streaks and badges
Once the CRUD operations were stable, I turned to the data model itself. In the Firestore Models Data Class Additons branch, I added Stats, Streak, and Badge data classes and updated the existing User model to include these nested collections. The ensureUserCreated() method in FirestoreRepository.kt now uses a Stats object instead of an ad‑hoc mapOf() call, aligning the code with our new models and ensuring type safety. These changes pave the way for features like streak tracking and gamified badges. The commit messages on October 25 show the sequence: adding the new classes, updating the user data class to reflect the UI, and refactoring the repository to use the new classesnewtab. I also fixed navigation from SignIn to CreateAccount, ensuring new users can register without running into dead links.
Gallery





Explore
Discover my journey as a software engineer.
© 2025. All rights reserved.