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

# Lovable → Production

> Deploy your Lovable app to production on AWS with your own domain and database.

Lovable has the best native GitHub integration of any AI builder, which makes migrating to Nometria particularly smooth. This guide covers the recommended path using Lovable's GitHub sync.

## What gets migrated

* React + Vite or Next.js source code
* Supabase schema and data
* Supabase Edge Functions (if present)
* Environment variables

## Prerequisites

* An Nometria account
* Your Lovable project connected to a GitHub repository (recommended)
* A Supabase account
* A custom domain (optional)

## Step 1 — Connect Lovable to GitHub (if not done)

If your Lovable project isn't already on GitHub:

1. In Lovable, go to **Project Settings** → **GitHub**
2. Click **Connect to GitHub** and authorize Lovable
3. Create a new repository or select an existing one
4. Lovable pushes your project code to the `main` branch

<Tip>This step only takes a minute and is the recommended approach. It gives you a clean Git history from the start.</Tip>

## Step 2 — Connect to Nometria

<Steps>
  <Step title="New Migration → Connect via GitHub">
    Go to [nometria.com/dashboard](https://nometria.com/dashboard) → **New Migration** → **Connect via GitHub**.
  </Step>

  <Step title="Select your Lovable repo">
    Authorize Nometria and select the repository that Lovable is syncing to. Choose the `main` branch.
  </Step>

  <Step title="Confirm stack detection">
    Nometria detects React + Vite (or Next.js) and your Supabase configuration. Confirm or correct these.
  </Step>
</Steps>

## Step 3 — Configure

<Steps>
  <Step title="Environment variables">
    Add your Supabase credentials and any other API keys:

    ```bash theme={null}
    VITE_SUPABASE_URL=https://xxxxxxxxxxxx.supabase.co
    VITE_SUPABASE_ANON_KEY=eyJ...
    ```

    If your Lovable app uses Stripe, Resend, or other services, add those keys now.
  </Step>

  <Step title="Database">
    Select **Use existing Supabase project** and paste your Lovable Supabase project credentials.

    Or select **Create new Supabase project** to get a fully independent copy of your database.
  </Step>

  <Step title="Domain and region">
    Set your custom domain and choose an AWS region.
  </Step>
</Steps>

## Step 4 — Deploy

Click **Deploy** and monitor the build logs. First deployment takes 5–10 minutes.

## Step 5 — Two-way sync with Lovable

Because Lovable already pushes to GitHub, Nometria's two-way sync connects naturally:

* Lovable changes → GitHub `main` (via Lovable's GitHub sync) → Nometria detects → production redeploys
* Developer PRs → merged to GitHub `main` → Nometria detects → production redeploys

You may also enable the Chrome Extension for additional visibility — the extension shows real-time sync status inside your Lovable tab.

**Recommended `.Nometria.yml` for Lovable:**

```yaml theme={null}
sync:
  builder_branch: builder/latest
  deploy_branch: main
  auto_merge: true
  auto_deploy_on_merge: true
```

With Lovable's native GitHub sync enabled, `auto_merge` from `builder/latest` may be redundant — Lovable pushes directly to `main`. Keep `auto_deploy_on_merge: true` to ensure production stays up to date after every Lovable commit.

## Post-migration checklist

* [ ] Live URL loads correctly
* [ ] Supabase auth works (sign up / sign in)
* [ ] All Supabase Edge Functions deployed
* [ ] Database reads and writes function
* [ ] SSL active on your custom domain
* [ ] Lovable GitHub sync is still enabled (for ongoing builder changes)
