generalmobile-app

Offline-First AI Mobile App MVP

Most mobile apps assume an internet connection. That assumption breaks in the field: on construction sites, in hospitals with restricted network access, on farms and in rural areas, aboard ships, or during network outages. For users who cannot afford to wait for connectivity, an offline-first architecture is not a nice-to-have, it is the core product requirement. An offline-first AI mobile app works fully without internet access, queues data for sync when connectivity returns, and resolves conflicts intelligently when multiple devices have written to the same data. The UK has a particular need for offline-capable field software: rural broadband coverage remains patchy across large parts of England, Wales, and Scotland, and mobile data dead zones on farms and remote NHS facilities are a daily reality for field workers. For enterprise procurement teams in these sectors, offline capability is often a mandatory tender requirement, not a differentiator. On-device AI via small models like Phi-3 mini or Llama 3.2 1B means the intelligence of the product travels with the user, not with the network. GDPR applies fully: data collected offline and synced later must be handled under the same consent and retention rules as data collected online. SpeedMVPs builds offline-first AI mobile MVPs using React Native, Expo, SQLite for local storage, Supabase for cloud sync, and Ollama for on-device AI inference where network-free AI is required. Based in Hemel Hempstead, delivered in 2-3 weeks from GBP 8,000, full code ownership on delivery.

Tech Stack

React NativeExpoSQLiteSupabaseOllamaRevenueCat

Business Context: Industries Where Offline-First Matters

The market for offline-first mobile software is larger than most web-first developers appreciate. Field service engineers performing inspections in areas with poor signal. Healthcare workers on wards where network access is restricted for security reasons. Agricultural advisors collecting soil samples in areas without mobile data coverage. Logistics drivers making deliveries in underground loading bays. Surveyors working in remote properties. In all of these cases, a standard cloud-dependent mobile app is a liability. It fails silently when offline, loses data that users thought was saved, and creates distrust. An offline-first app behaves identically whether online or offline. The difference is invisible to the user. For enterprise buyers evaluating field software, offline capability is often a procurement requirement, not a differentiator. It is the baseline.

Architecture: Local Storage, Sync, and Conflict Resolution

The architecture has four layers. The local data layer uses SQLite via Expo SQLite or WatermelonDB for high-performance local queries on device. All reads and writes from the application go to the local database first, making every operation instantaneous regardless of network status. The sync layer monitors network connectivity and queues write operations when offline. When connectivity is restored, queued writes are flushed to Supabase in order, with retry logic for transient failures. The conflict resolution layer handles cases where two devices have written to the same record while offline. Simple last-write-wins is sufficient for many use cases. More complex scenarios (collaborative editing, inventory counts) require domain-specific merge logic that SpeedMVPs designs with the client during scoping. The cloud backend on Supabase provides the canonical data store, authentication, and real-time sync for multi-device scenarios. The AI layer uses on-device inference via Ollama for features that must work without internet, and falls back to server-side LLM APIs for features where network is available and higher-quality output justifies the latency.

AI Components: On-Device Inference with Ollama

On-device AI inference is a meaningful technical step up from server-side API calls. Running a small language model locally on a smartphone requires careful model selection (Phi-3 mini and Llama 3.2 1B are the current practical options for mobile), quantisation to reduce the model file size and memory footprint, and a React Native bridge to the inference runtime. The result is AI features that work with zero internet connectivity and zero per-inference cost. The trade-off is capability: small on-device models are significantly less capable than GPT-4o or Claude. The pattern SpeedMVPs recommends is a tiered approach: use the on-device model for offline scenarios and latency-sensitive interactions (real-time suggestions as the user types), and use server-side models for complex reasoning tasks when network is available. This gives users the best of both: offline reliability and online quality.

Challenges: Sync Complexity, Storage Limits, and Model Size

Offline-first architecture is more complex than purely online architecture. The sync logic, conflict resolution, and queue management are non-trivial to implement correctly. Common failure modes include: data loss when a user switches devices mid-offline session, duplicate records created by aggressive retry logic, and user confusion about what state has synced and what is still local. SpeedMVPs addresses these by building a visible sync status indicator into the UI (a simple icon that shows pending, syncing, and synced states), designing the conflict resolution policy with the client before building, and stress-testing the sync logic with simulated network failures before delivery. Storage on mobile devices is finite. Large SQLite databases and on-device model files (typically 500MB-2GB for practical small models) require careful management. The app must handle the case where device storage is nearly full and degrade gracefully rather than crash.

Outcomes: What Offline-First Delivers in the Field

The primary outcome of an offline-first app is trust. Field users who have been burned by data loss on cloud-dependent apps are initially sceptical of any mobile software. An offline-first app that demonstrably works in airplane mode, saves their work, and syncs cleanly when they return to the office earns trust quickly and deeply. Secondary outcomes include adoption rate (offline-first apps see higher sustained usage in field roles), data completeness (users capture data at point of need rather than waiting until they have internet and then trying to remember), and reduced data entry errors (immediate capture at the source is more accurate than retrospective entry). For enterprise buyers, offline-first is also a security argument: data that does not transit the internet during collection is not exposed to network interception.

Lessons: Offline-First Is a Product Decision, Not a Feature

Retrofitting offline support onto an app that was built assuming internet connectivity is extremely difficult. Every data access pattern must be redesigned, every API call must be rethought, and the testing surface expands dramatically. Offline-first must be a founding architectural decision, made before the first line of application code. This is why SpeedMVPs designs the data layer and sync strategy in the scoping phase, before build begins. Start with a small, well-defined offline scope. Define exactly which data types and workflows must work offline at MVP stage. Not everything needs to work offline on day one. A form that captures field inspection data and syncs later is a solvable offline-first problem. A real-time collaborative map with live edits from multiple field users is a much harder problem. Solve the simpler problem first and validate that users actually need the harder version before building it.

Frequently Asked Questions

How large are on-device AI models and how much storage do they require?+

Practical on-device models for mobile AI features range from 500MB to 2GB depending on the model and quantisation level. Phi-3 mini at 4-bit quantisation runs around 800MB. Llama 3.2 1B at 4-bit quantisation is approximately 700MB. These are downloaded once on first launch (or on-demand when the user first activates an AI feature) and stored locally. Users with limited device storage may need to clear the model cache. The app handles the case where the model is not downloaded by offering degraded functionality rather than failing completely.

What happens if two users edit the same record while offline?+

Conflict resolution strategy depends on the use case. For most field data collection scenarios, the appropriate policy is last-write-wins: the most recent save overwrites earlier ones. For scenarios where both edits must be preserved (stock counts, quality inspection scores), SpeedMVPs designs a merge strategy during scoping that combines values according to domain-specific rules. In both cases, conflicts are logged so administrators can review and manually resolve ambiguous cases if needed.

Can the app sync partial data while still offline on a slow connection?+

The sync layer is designed to tolerate unreliable connectivity, not just binary offline/online states. Records are synced individually with per-record acknowledgement, so a partial sync (interrupted by reconnection loss) preserves the records that successfully synced. The queue resumes from where it stopped on the next connectivity window. For large file attachments (photos, audio recordings), the sync system prioritises metadata records first and queues file uploads separately to avoid blocking data sync on large binary transfers.

Does the offline-first architecture add significant cost to the MVP?+

Yes, offline-first adds meaningful complexity compared to a standard online-only mobile app. The local database setup, sync engine, conflict resolution logic, and on-device AI integration add approximately 20-40% to the build scope. SpeedMVPs factors this into the fixed-price quote during scoping. The investment is justified when your target users genuinely need offline capability. If offline is a nice-to-have rather than a hard requirement, a standard online-first app with graceful offline error messages is a better starting point.

If your users work in environments where internet connectivity is unreliable, an offline-first AI mobile app is the right foundation. Get a free consultation at speedmvps.co.uk

Get a Free Quote