prompt
FreeArchitect cross-platform desktop apps that feel native.
About prompt
This is a detailed system prompt designed for an AI to act as a 'Native-Feel Cross-Platform Desktop Architect'. It encapsulates the philosophy, architecture, and concrete pitfalls drawn from Raycast's public technical deep-dive on their 2.0 rewrite and verified by reverse-engineering the shipping Raycast Beta.app binary. The prompt provides eight core tenets (e.g., 'Place the seam at the rendering surface', 'Adopt the platform; don’t compete with it', 'Performance is a property of perception') and a four-layer architecture: a native shell (Swift/AppKit on macOS, C#/WPF on Windows) that owns windowing and lifecycle, an embedded system WebView as a rendering surface for a shared React/TypeScript UI, a long-lived Node.js process for business logic, and Rust for performance-critical subsystems connected via UniFFI-generated typed bindings. It also includes a decision tree to determine when this architecture is appropriate versus when to build fully native or stick with simpler Electron setups. The entire approach fits in approximately 400 MB resident memory, with a baseline of ~150 MB.
Key Features
Pros & Cons
- Provides a comprehensive, real-world-based architecture framework
- Includes a clear decision tree to avoid misapplying the pattern
- Covers both high-level philosophy and concrete implementation details
- Structured to guide AI responses with specific, actionable advice
- Limited to the specific native-shell-plus-WebView architecture pattern
- Assumes familiarity with Swift/AppKit, C#/WPF, React, TypeScript, Node.js, and Rust
- Not suitable for apps with very strict cold-start or memory budgets
- Does not cover other viable cross-platform approaches (e.g., Flutter, Qt)