# ManeshTraderMac (Xcode Shell App) This Xcode app is a native macOS shell around the existing Streamlit trading app. ## What It Does - Auto-starts backend when the app launches - Starts/stops a bundled backend executable from app resources - Embeds the local UI using `WKWebView` at `http://127.0.0.1:8501` - Keeps users inside the app window (no external browser required) ## Build Self-Contained App 1. From project root, build the embedded backend + macOS app: - `./scripts/build_selfcontained_mac_app.sh` 2. Output app bundle: - `dist-mac//ManeshTraderMac.app` 3. Optional DMG packaging: - `APP_BUNDLE_PATH="dist-mac//ManeshTraderMac.app" ./scripts/create_installer_dmg.sh` ## Run in Xcode 1. Generate embedded backend binary: - `./scripts/build_embedded_backend.sh` 2. Open `ManeshTraderMac/ManeshTraderMac.xcodeproj` 3. Build/Run the `ManeshTraderMac` scheme 4. The app auto-starts backend on launch ## Notes - Backend source of truth is the root web app (`app.py`, `manesh_trader/`). - `scripts/build_embedded_backend.sh` compiles those files into: - `ManeshTraderMac/ManeshTraderMac/EmbeddedBackend/ManeshTraderBackend` - The Swift host launches that embedded binary directly from the installed app bundle.