
What I Learned Building a Habit Tracker with React + AWS Amplify Gen 2
I've been building Bi Kaizen (a minimalist habit tracker) as a side project over the past few months. The Stack React 19 + TypeScript + Vite AWS Amplify Gen 2 (AppSync/GraphQL, DynamoDB, Lambda, Cognito) TanStack React Query 5 for caching and optimistic updates Tailwind CSS dnd-kit for drag-and-drop habit reordering i18next for EN / UK / RU support Here's what I ran into and what actually worked. 1. Amplify Gen 2 has a silent pagination bug you need to fix manually The code-first schema is genuinely better than YAML/JSON — you get typed GraphQL operations for free and it feels like real engineering. But there's a nasty default behavior that bit me hard. The problem : Amplify's owner-based auth (allow.owner()) applies authorization after the DynamoDB query, not during it. That means when a user calls listHabits, AppSync executes a full table scan - iterating through every record from every user - hits DynamoDB's pagination limit (e.g. 1MB of data), and then filters down to just the reco
Continue reading on Dev.to Webdev
Opens in a new tab


