Remix.run Logo
927tanmay 20 hours ago

I’m curious about the architecture, specifically regarding the Apple Health and MCP integrations. How is the user data managed under the hood? Is the data being routed through a centralized server/external LLM APIs, or is the processing and AI integration handled entirely locally in-app?

bohdanstefaniuk 16 hours ago | parent [-]

First of all mobile application has offline support. This feature implemented by producing operations log. Basically each action made in the app is a separate operation. Same happens on the backend. Every API call mutates state in the database and creates operations.

When internet connection restored for the mobile app it sends all operations to the server. Server applies and re conciliates properly values and returns the current correct state.

Apple Health integration works buy reading values from HealthKit and pushing those values into one operations log.

MCP integration is very simple. Basically I have an API which users can use to integrate into their own apps and MCP utilize same API with OAuth authentication