An advanced manufacturing cost analysis, pricing strategy, and market intelligence platform — available as a Windows desktop app and iOS SwiftUI app.
Stack: Electron + Vite + React + TypeScript · Installer: NSIS (.exe)
- Node.js 18+ (includes npm) — download from https://nodejs.org/
- Git for Windows
- No API keys, no Docker, no database needed
git clone <your-repo-url> Trial
cd Trial
git checkout claude/factorypilot-pro-app-48j2Bcd factorypilot-backend
npm install
node standalone.jsThe standalone backend starts immediately at http://localhost:3000 — no database or Docker required.
It uses validated market data for Turkey, Kenya, and Germany, and dynamically recalculates pricing based on your overhead, gross-margin, and VAT inputs.
cd factorypilot-desktop
npm install
npm run desktop:buildThis compiles the React/TypeScript renderer with Vite, bundles the Electron main process, and runs electron-builder to produce the NSIS installer.
Output:
factorypilot-desktop/dist/FactoryPilotPro Setup.exe
Double-click FactoryPilotPro Setup.exe and follow the installer.
- You can choose the installation directory.
- A FactoryPilotPro shortcut is created on your Desktop and in the Start Menu.
Double-click the FactoryPilotPro shortcut on your Desktop.
The app opens with the backend URL pre-set to http://localhost:3000.
Go to Settings at any time to change the URL.
cd factorypilot-desktop
npm install
npm run desktop:dev| Script | What it does |
|---|---|
desktop:dev |
Electron + Vite dev server with hot reload |
desktop:build |
Compile renderer + package → dist/FactoryPilotPro Setup.exe |
desktop:start |
Run the compiled app locally (no packaging) |
factorypilot-desktop/
├── electron.vite.config.ts # Vite config for main + renderer
├── package.json # Scripts + electron-builder NSIS config
├── src/
│ ├── main/index.ts # Electron main process (window creation)
│ ├── preload/index.ts # Context bridge (minimal)
│ └── renderer/
│ ├── index.html # Vite entry HTML
│ └── src/
│ ├── App.tsx # Root component (nav + state)
│ ├── types.ts # TypeScript interfaces (request/response)
│ ├── index.css # Dark theme CSS
│ └── components/
│ ├── PlanForm.tsx # Input form (9 fields)
│ ├── ResultsView.tsx # Pricing / Analogs / BOM / Assumptions tabs
│ └── SettingsScreen.tsx # Backend URL setting
└── dist/
└── FactoryPilotPro Setup.exe # Generated after desktop:build
FactoryPilotPro/
├── FactoryPilotProApp.swift # @main App entry point
├── ContentView.swift # Root TabView navigation
│
├── Models/
│ ├── Product.swift # Input + all Codable output models
│ ├── CountryProfile.swift # CountryProfile + predefined profiles
│ └── AppSettings.swift # AppSettings ObservableObject + LLMProvider enum
│
├── ViewModels/
│ ├── MainViewModel.swift # Analysis orchestration, state management
│ └── SettingsViewModel.swift # Settings & API test logic
│
├── Views/
│ ├── InputFormView.swift # Product input form with country profile card
│ ├── ResultsView.swift # Tabbed results (Overview/Costing/Competitors/Positioning)
│ ├── CostingView.swift # Manufacturing params + cost breakdown + bar chart
│ ├── CompetitorView.swift # Price positioning map + market share chart
│ ├── MarketPositioningView.swift # Pricing waterfall + USPs + channels + entry strategy
│ ├── HistoryView.swift # Analysis history list + detail view
│ └── SettingsView.swift # Provider config + API key + country profiles browser
│
├── Services/
│ ├── LLMService.swift # OpenAI + Anthropic + Custom API calls
│ ├── JSONValidator.swift # JSON extraction, schema validation, decode
│ └── ExportService.swift # JSON + CSV export, share sheet items
│
├── Engines/
│ └── PricingEngine.swift # Local quick estimate + manufacturing param inference + validation
│
└── Mock/
└── MockData.swift # Pre-built mock results for Turkey, Kenya, Germany
| Country | Currency | VAT | Labor/hr | Electricity/kWh | Competitors |
|---|---|---|---|---|---|
| Turkey | TRY ₺ | 20% | ₺115 | ₺2.85 | Omo, Persil, Bingo, Fairy, Ariel... |
| Kenya | KES/USD | 16% | KSh 80 | KSh 22.50 | Sunsilk, Pantene, Menengai, Bidco... |
| Germany | EUR € | 19% | €15.50 | €0.22 | Frosch, Ecover, DM Bio, Domestos... |
| Unknown | USD est. | 15% | Regional | Regional | Global multinationals, is_estimate=true |
{
"product": { "name", "country", "packaging", "currency" },
"manufacturing_parameters": {
"batch_size_kg", "mixing_time_minutes", "temperature_celsius",
"rpm", "fill_weight_grams", "cycle_time_minutes"
},
"costing_breakdown": {
"raw_materials_per_unit", "labor_per_unit", "electricity_per_unit",
"packaging_per_unit", "overhead_per_unit", "quality_control_per_unit",
"total_cogs", "currency", "notes"
},
"pricing_strategy": {
"manufacturer_price", "distributor_price", "retailer_price",
"consumer_price", "vat_included_price", "currency", "vat_percent", "gross_margin_percent"
},
"competitor_analysis": [
{ "brand", "product", "retail_price", "market_share_percent", "positioning", "currency" }
],
"market_positioning": {
"recommended_segment", "price_tier", "unique_selling_points",
"target_channels", "market_entry_strategy"
},
"assumptions": ["..."],
"is_estimate": false,
"generated_at": "ISO8601"
}- Open Xcode 15+
- Create new project: iOS > App
- Product Name:
FactoryPilotPro - Interface: SwiftUI
- Language: Swift
- Minimum iOS: 16.0
- Product Name:
- Delete the default
ContentView.swift - Drag all files from this directory into the Xcode project
- Ensure all files are added to the app target
- Launch the app
- Go to Settings tab
- Select Mock Mode (no API key needed for testing)
- For Live Mode: add your OpenAI or Anthropic API key
| Provider | Models Available | JSON Mode |
|---|---|---|
| OpenAI | GPT-4o, GPT-4o-mini, GPT-4-turbo | ✅ response_format: json_object |
| Anthropic | claude-opus-4-6, claude-sonnet-4-6, claude-haiku-4-5 | ✅ System prompt enforced |
| Custom | Any OpenAI-compatible endpoint | ✅ Same as OpenAI |
- API keys stored in UserDefaults (migrate to Keychain for production)
- No analytics, no telemetry
- All LLM calls made directly from device
- JSON validated before display — non-JSON responses rejected
- iOS 16.0+
- Xcode 15.0+
- Swift 5.9+