> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openv2.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Expo and Openv2

> Understand how Openv2 uses Expo and React Native, and what that means for your project.

Openv2 builds on **Expo and React Native**, giving you a single codebase that runs on iOS, Android, and the web. Every project starts from an Expo template, and the AI assistant understands Expo's conventions — so it can write idiomatic code, install packages correctly, and run CLI commands on your behalf.

## Your project template

When you create a project, Openv2 scaffolds a standard Expo app with:

* An **`app/` directory** using [Expo Router](https://docs.expo.dev/router/introduction/) for file-based navigation
* An **`app.json`** Expo config for display name, icon, splash screen, and permissions
* A `package.json` wired to start the dev server and run builds

The AI knows this layout. When you ask for a new screen, it creates the right file in `app/` and wires up navigation automatically.

## Navigation: Expo Router vs React Navigation

Openv2 projects default to **Expo Router**, which maps files in `app/` directly to routes — similar to how Next.js works for the web. If you prefer the more explicit **React Navigation** setup, tell the assistant at the start of your project:

> "Use React Navigation instead of Expo Router for this project."

Mixing both libraries in one project causes conflicts, so pick one early and stick with it.

## How the AI runs Expo commands

The assistant can execute terminal commands inside your browser workspace. When it needs to add a package it runs:

```bash theme={null}
npx expo install <package-name>
```

This uses Expo's version-aware installer rather than plain `npm install`, which ensures package versions are compatible with your Expo SDK. You can watch commands run in real time in the **Terminal** tab of the workbench.

## Browser preview vs on-device

Openv2 shows a **web preview** in your browser for fast UI iteration. Most layout and logic works the same, but there are meaningful differences:

| Capability            | Browser preview     | Real device (Expo Go) |
| --------------------- | ------------------- | --------------------- |
| UI layout and styling | Full support        | Full support          |
| Navigation flows      | Full support        | Full support          |
| Camera, microphone    | Limited / simulated | Full native access    |
| Push notifications    | Not supported       | Supported             |
| Deep links            | Partial             | Full support          |
| Native modules        | May not load        | Full support          |
| Performance feel      | Approximation       | Accurate              |

Use the browser preview to move fast. Switch to a real device when you need to verify camera, notifications, or native module behavior.

## Testing on a device with Expo Go

Expo Go lets you open your app on a physical phone without a full build. Scan the QR code from the **Preview** panel or use a tunnel link, and the app loads on your device over your network.

<Note>
  Some packages require native code that Expo Go cannot load. If a feature works in browser preview but fails on device, the package may need a [custom development build](/builds-mobile) instead of Expo Go.
</Note>

## EAS for production builds

When you're ready to build a distributable binary, Openv2 uses **EAS Build** (Expo Application Services). The build wizards in the workspace header guide you through creating an APK, AAB, or iOS archive without touching Xcode or Android Studio locally.

See [Builds & mobile](/builds-mobile) for the full build workflow.

## Working with native modules

Most Expo-maintained packages work out of the box. Third-party packages that include native code may require an **Expo config plugin** — a script that modifies the native project during the build phase.

<Warning>
  Heavy native modules outside Expo's supported set may be impractical in the browser workspace. Ask the AI early whether a specific package needs a config plugin, and expect that you'll need a real build (not just browser preview) to test it.
</Warning>

## Pure native Swift is not supported

If you need a pure native Swift app, that is outside what Openv2's template provides. You can export the patterns and logic the AI generates and bring them into a native Xcode project, but Openv2 does not run a Swift-in-browser workflow.

***

<CardGroup cols={2}>
  <Card title="Backend & Data" icon="database" href="/backend">
    Connect OpenV2 Cloud or your own API for persistent data and auth.
  </Card>

  <Card title="Builds & mobile" icon="hammer" href="/builds-mobile">
    Create APK, AAB, or iOS builds ready for store submission.
  </Card>
</CardGroup>
