Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.runable.com/llms.txt

Use this file to discover all available pages before exploring further.

Every mobile app has to decide what lives on the phone, what lives on a server, and what bridges the two. Runable handles all three layers for you you describe the data and how the user should experience it, and the agent picks the right storage in each place.

How data flows

What lives where

On the device

Anything the user expects to see instantly the current screen’s content, recent activity, preferences, drafts, cached lists. The app reads from here first, then refreshes from the server in the background.

On the server

The source of truth across devices the user’s account, history, shared content, anything that needs to survive an uninstall. The phone pulls fresh copies as needed.

Sensitive on the device

Sign-in tokens, biometric flags, payment receipts stored in the device’s secure enclave (Face ID / Touch ID hardware). Untouchable by other apps.

Files and media

Photos, documents, exports uploaded to cloud storage and referenced by ID. The phone keeps a cache for fast display. See Mobile App File Storage.

Three patterns the agent uses

The default for apps with accounts. The server is the source of truth; the phone keeps a fresh cache.
  • Reads: instant from the cache, then refreshed from the server in the background.
  • Writes: sent to the server. The UI updates immediately (optimistic), and rolls back if the server rejects.
  • Offline: the cache keeps the app readable. Writes queue locally and replay when the network comes back.
Use for: social apps, messaging, e-commerce, anything where a user has an account.
The agent picks one of these based on how you describe the app. You can ask to switch later: make this app offline-first.

Add data to your app

1

Describe the data and how the user touches it

Notes app. Each note has a title, body, color tag (red / yellow / green), pinned flag, and a created-at timestamp. List view sorted by pinned first, then most recent. Detail view supports edit-in-place. Trash bin keeps deleted notes for 30 days. Sync across the user’s devices.The agent builds the schemas, the screens, the create/edit/delete flows, and the sync rules from one prompt.
2

Pick what is sensitive

Anything that should never leak to other apps or be exfiltrated from the phone goes in the secure enclave. The agent defaults to:
  • Always secure: sign-in tokens, biometric flags, payment receipts, API keys.
  • Never secure: cached content, preferences, drafts.
Override with: put the user’s medical entries in the secure enclave even though they are not credentials.
3

Test offline behavior

With your phone preview running, toggle Wi-Fi and cellular off. Walk through the app. The agent’s default offline behavior:
  • Reads continue to work for anything you have seen before.
  • Writes save locally and show a tiny “Will sync when online” indicator.
  • The network indicator in the UI flips to offline mode.
When you reconnect, the queue flushes and indicators clear.

Search across data

Ask: add full-text search across all notes with results highlighted. The agent picks the right approach for your data size:
  • Small data sets (under 10,000 items): the search runs entirely on the device no network, instant results.
  • Larger data sets: the agent indexes the data on the server and pulls a results list, but still highlights matches client-side for instant feedback.
Either approach handles typos, partial matches, and natural-language queries like “notes from last Tuesday about the design review.”

Conflict resolution

For offline-first apps, two devices can change the same data while neither is online. The agent supports three rules:
RuleWhat happensUse when
Last-write-winsWhichever change is most recent overwrites the other.Single user, multiple devices. Most common.
MergeNon-conflicting fields are combined automatically; truly conflicting fields prompt the user.Collaborative content, shared lists.
Manual promptThe user sees both versions side by side and picks one.High-stakes content where silently losing data is unacceptable.
Set the rule per data type: use last-write-wins for notes, but prompt the user if two devices edited the same shopping list item.

Export and delete

Apple and Google both require apps that store user data to provide a way to export and delete it. The agent generates both flows for any data-bearing app.
1

Export

Settings → Account → Export my data. The user gets a download of everything as JSON, with photos and files included as a zip. Typically arrives in their email within a few minutes.
2

Delete account

Settings → Account → Delete my account. The user confirms with their email or a one-time code. All server data is queued for deletion (default: 30-day grace period in case they change their mind, then permanent). On-device data clears immediately on sign-out.
Apple requires an in-app account deletion flow for any app with sign-in. Missing it is a top reason for first-submission rejections. The agent builds it by default; do not ask to remove it.

What you can see

The project dashboard shows, per data type:
  • Total records on the server, broken out by user
  • Active devices writing to each type in the last 7/30 days
  • Sync latency how long between a write on one device and visibility on another
  • Conflict rate how often two devices change the same record before sync
  • Storage size per user, useful for spotting outliers

What you cannot do

  • Run heavy analytics on the device. The phone is fast but the battery and memory are limited. Big queries belong on the server.
  • Share live state between two users with under-second latency. Sync runs on the order of seconds, not milliseconds. For real-time collaboration (multiplayer, shared cursors), ask the agent for a streaming approach instead.
  • Store unlimited data on the device. Phones throttle storage over time and may evict cached content. Treat the device as a fast cache, not a permanent home for unbounded data.
  • Bypass the export/delete flow. Both stores require it. You cannot opt out and stay compliant.

Next steps

File Storage

Photos, documents, and other large files.

Environment Variables

Configure backend URLs and API keys per environment.

Analytics

See how users interact with the data layer in production.

Push Notifications

Notify the user when a server-side change is ready to view.