Real-Time Recipe Import Notifications


Waiting 20–60 seconds for AI to process a recipe feels like forever. Users needed to know when it was done, whether the app was open, backgrounded, or they'd wandered off to check Instagram.

The challenge: deliver notifications reliably without killing battery life or hammering the database with constant requests.

I tested a few approaches (database subscriptions, polling, push notifications) and landed on a hybrid system. Push notifications handle the happy path. Smart polling kicks in as a fallback for edge cases, but stops immediately once a push comes through to avoid redundant requests.

State persists across app backgrounding using AsyncStorage, so users get notified even if they've left the app. The result: reliable notifications without the battery drain.