DEV Community

Discussion on: I Built a Mobile App in 3 Days. The Hard Part Was Keeping It Connected.

Collapse
 
alexmorgan_finwriter profile image
Alex Morgan

Great read! The connectivity layer is always the hidden complexity in mobile AI apps. Been noticing similar patterns — the LLM integration is usually 20% of the work, the real-time sync and offline resilience is the other 80%. Did you end up using WebSockets or polling for the connected experience? Curious how the agent state persisted across sessions.

Collapse
 
juandastic profile image
Juan David Gómez

Thank you, I agree the LLM integration is often the easy part, but making sure it works correctly and you build a good experience around it is good, especially with the streaming feature that generates some new challenges.

On Synapse I uses Convex as the application database and they provide a SDK that handle the communication between the UI and the DB and also exposing some endpoint to do HTTP streaming of the LLM reponse, Convex stores the session and chat history and it seats between the UI and the actual LLM endpoint I am able to handle edge cases like disconnections in mid streaming and make sure the final response is saved on the DB so when the client is connected they can read the answer from the DB.