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

# Exporting Code

> Download and work with your code outside Newly

# Exporting Code

You own 100% of the code generated by Newly. Export it anytime to work locally, hand off to developers, or host elsewhere.

## Export Options

<CardGroup cols={2}>
  <Card title="GitHub Sync" icon="github">
    Automatic sync to your repository
  </Card>

  <Card title="Download ZIP" icon="file-zipper">
    Download complete source code
  </Card>
</CardGroup>

## Downloading as ZIP

<Steps>
  <Step title="Open Menu">
    Click **More** in the project header
  </Step>

  <Step title="Download">
    Click **Download ZIP**
  </Step>

  <Step title="Extract">
    Extract the ZIP file to your preferred location
  </Step>
</Steps>

## Running Locally

<Steps>
  <Step title="Install Node.js">
    Ensure you have Node.js 18+ installed
  </Step>

  <Step title="Install Dependencies">
    ```bash theme={null}
    cd my-app
    pnpm install
    ```
  </Step>

  <Step title="Start Expo">
    ```bash theme={null}
    pnpx expo start
    ```
  </Step>

  <Step title="Run on Device">
    * Scan QR code with Expo Go
    * Or press `i` for iOS Simulator
    * Or press `a` for Android Emulator
  </Step>
</Steps>

## Local Development Requirements

| Requirement | Version           |
| ----------- | ----------------- |
| Node.js     | 18 or higher      |
| npm         | 9 or higher       |
| Expo CLI    | Latest (via pnpx) |

### For iOS Development (Mac only)

* Xcode 15+
* iOS Simulator

### For Android Development

* Android Studio
* Android Emulator or physical device

## Customizing Exported Code

The exported code is standard React Native/Expo. You can:

<AccordionGroup>
  <Accordion title="Add native modules">
    Install and configure native packages that require additional setup
  </Accordion>

  <Accordion title="Modify build configuration">
    Customize app.json, eas.json, and native configuration
  </Accordion>

  <Accordion title="Integrate with CI/CD">
    Set up automated builds and deployments
  </Accordion>

  <Accordion title="Hand off to developers">
    Share with your development team for further work
  </Accordion>
</AccordionGroup>

## Backend Considerations

If your app uses Liquid Backend:

<Warning>
  The backend runs on Newly's infrastructure. To fully self-host, you'll need to migrate the backend to your own infrastructure.
</Warning>

### Options for Backend

1. **Keep using Newly** - Your Liquid Backend continues working
2. **Build custom backend** - Create your own API using the generated code as reference

## Maintaining After Export

If you continue development outside Newly:

<CardGroup cols={2}>
  <Card title="Keep Dependencies Updated" icon="arrow-rotate-right">
    Regularly update Expo SDK and packages
  </Card>

  <Card title="Follow React Native Best Practices" icon="book">
    Learn from the generated code patterns
  </Card>

  <Card title="Monitor for Issues" icon="eye">
    Set up error tracking (Sentry, etc.)
  </Card>

  <Card title="Test on Devices" icon="mobile">
    Always test on real devices before releasing
  </Card>
</CardGroup>

## Re-importing to Newly

Currently, importing external changes back into Newly is supported via GitHub sync:

1. Connect GitHub to your Newly project
2. Push changes from your local development to created repo
3. Changes sync to Newly on next project open

<Note>
  Major structural changes made outside Newly may affect how well the AI can assist with future changes.
</Note>
