The problem
A habit toggle looks small, but it still needs an owner, a date, and one durable meaning. I built the product around those rules and made external contest data useful without depending on a single feed.
What I worked on
One habit, one calendar date
Habit logs have a composite unique key for habit and date. The server verifies ownership, normalizes the supplied calendar date, and upserts the completion state. Repeated saves address the same record.
The tradeoff Uniqueness prevents duplicate rows. It does not decide which conflicting user intent should win; that remains an application-level decision.
Keep a missing provider from emptying every feed
The contest endpoint uses an aggregate feed first, then fetches missing platform data directly. I normalize and deduplicate the results before sorting them by start time. Requests are cached to avoid fetching every provider on every page visit.
A private page still needs a protected endpoint
Hiding a UI route does not protect an API someone calls directly.
My security update added an authentication check to the contest endpoint and moved provider credentials into server-side configuration. Registration and verification paths also gained rate limits and stricter validation.
What I take forward
I try to define the identity and owner of a record before designing the dashboard that displays it.
