# Packaging: Desktop .exe & Phone App

## Option A — Windows desktop .exe (recommended)

One-time, on any Windows machine with Python installed:

```bash
pip install -r requirements.txt pyinstaller
pyinstaller --onefile --name "SEO-AI-Optimizer" ^
  --add-data "config.yaml;." ^
  --add-data "seo_tool;seo_tool" ^
  --hidden-import seo_tool.runner --hidden-import seo_tool.audit ^
  --hidden-import seo_tool.geo --hidden-import seo_tool.content ^
  --hidden-import seo_tool.report ^
  app.py
```

Your app appears at `dist/SEO-AI-Optimizer.exe`. Double-click it — it starts and opens in your browser like a normal app. No Python needed on machines you copy it to.

Notes:
- Windows SmartScreen may warn on unsigned exes — click "More info → Run anyway", or sign the exe with a code-signing certificate for distribution.
- Reports save to a `reports/` folder next to the exe.

## Option B — macOS / Linux desktop app

Same command with `:` instead of `;` in --add-data:

```bash
pyinstaller --onefile --name "SEO-AI-Optimizer" \
  --add-data "config.yaml:." --add-data "seo_tool:seo_tool" \
  --hidden-import seo_tool.runner --hidden-import seo_tool.audit \
  --hidden-import seo_tool.geo --hidden-import seo_tool.content \
  --hidden-import seo_tool.report \
  app.py
```

On macOS you can also add `--windowed --icon icon.icns` to get a clickable `.app` bundle.

## Option C — Phone app (no app store needed)

The interface is a mobile-first PWA (Progressive Web App):

1. Run the app on your computer (exe or `python app.py`). The console prints a phone URL like `http://192.168.1.5:8765`.
2. On your phone (same WiFi), open that URL in Chrome/Safari.
3. Browser menu → **Add to Home Screen**. It installs with its own icon and opens full-screen like a native app.

Want it to work away from home WiFi? Deploy the same `app.py` to any small cloud host (Render, Railway, a $5 VPS) — then the phone app works from anywhere, and the scheduler runs 24/7 even when your computer is off. Add a login (e.g., Flask-Login or basic auth) before exposing it to the internet.

## Option D — True app-store phone app (later)

If you eventually want a Play Store / App Store listing, wrap the deployed web app with Capacitor (capacitorjs.com): it turns the same UI into installable Android/iOS builds without rewriting anything. That's the future-proof path — one codebase, four targets (Windows, Mac, web, mobile).
