Shared product intent, platform-native runtime ownership.

Architecture

Open Edge AI uses a React Native shell on Android, a separate native SwiftUI app on iOS, and native model execution modules on each platform.

High-level flow

Android React Native screens
  → src/native/AIEngine.ts
  → NativeModules.AIEngine
  → Kotlin bridge
  → QueryRouter
  → Model runtime / embeddings / vector DB / workers

iOS SwiftUI views
  → Foundation Model or Gemma client
  → Apple Foundation Models / LiteRT-LM runtime

React Native app

The root application coordinates active screens, selected models, chat persistence, work folders, navigation, and display personalization. Reusable UI lives under src/components, screens under src/screens, and shared visual tokens under src/theme.

Android native core

AreaResponsibility
bridge/Registers and exposes React Native methods.
core/Routing, model lifecycle, runtime status, embeddings, vision, and multimodal requests.
db/Vector persistence and similarity lookup helpers.
workers/Background indexing jobs and long-running device work.

Native iOS core

The iOS target is a native SwiftUI app. It owns Apple Foundation Models integration, Gemma/LiteRT-LM runtime work, model state, and iOS-specific interaction behavior without depending on the React Native CLI.

Web preview

Vite and React Native Web provide a browser target for fast interface iteration. Native model features return development fallbacks in this environment.

Storage

React Native state uses AsyncStorage for sessions, messages, drafts, folders, selected models, and display settings. Android retrieval uses local SQLite helpers for indexing and vector lookup.

Privacy boundary

Chat context, embeddings, indexing, and model execution should remain on device whenever possible. Any network feature must document what leaves the device, why it is required, whether it is optional, and how retention and deletion work.

Local-first is an architectural constraint, not a promise that every future feature is automatically offline. Network behavior must remain explicit and optional where practical.