# macOS Shell App

Native macOS shell around the web app in `web/src/`.

## What It Does
- Starts/stops bundled backend executable from app resources
- Hosts UI in `WKWebView` at local `127.0.0.1` URL
- Keeps user inside app window (no external browser)
- Provides a native toolbar `Help` button that opens bundled quick-start docs in-app

## Build Self-Contained App
From repo root:
1. Build embedded backend + macOS app:
   - `./scripts/build_selfcontained_mac_app.sh`
2. Output app bundle:
   - `dist-mac/<timestamp>/<Scheme>.app`
3. Optional DMG packaging:
   - `APP_BUNDLE_PATH="dist-mac/<timestamp>/<Scheme>.app" ./scripts/create_installer_dmg.sh`
   - DMG output path: `build/dmg/<AppName>-<timestamp>.dmg`

## Run In Xcode
From repo root:
1. Generate embedded backend binary:
   - `./scripts/build_embedded_backend.sh`
2. Open project:
   - `mac/src/*.xcodeproj`
3. Build/Run scheme:
   - default: project name (or set `MAC_SCHEME` in scripts)

## Notes
- Web source of truth is `web/src/` (`web/src/app.py`, `web/src/web_core/`).
- Embedded backend binary is copied into the first `EmbeddedBackend/` folder discovered under the selected project directory.
