Native shell generation
Why native projects live under .radical.
Native projects are generated output. Keeping identity, assets, manifests, and source files outside .radical makes regeneration repeatable.
flowchart TD Config[App Vite config, assets, and manifests] --> V[radical Vite plugin] T[TanStack Start adapter] -->|Framework outputs and request context| V V --> P[Resolved native build plan] P --> Android[Generated Android shell] P --> iOS[Generated iOS shell] App[App UI and framework routing] -->|Remote documents or bundled SPA| Android App -->|Remote documents or bundled SPA| iOS Android --> Transport[Capacitor bridge] iOS --> Transport App -->|Effect commands via Bridge| Transport Transport --> Native[Enabled native plugins]
Radical owns loading, context, safe area, offline recovery, and transition overlays. Capacitor supplies the transport and plugin ABI. The framework keeps rendering, routing, and data fetching.
One plan drives generation and launch
flowchart TD
CLI[radical android or radical ios] --> Resolve[Resolve Vite config and native build plan]
Resolve --> Mode{Bundled mode?}
Mode -->|Yes| Web[Build SPA assets]
Mode -->|No| Generate[Generate Capacitor project]
Web --> Generate
Generate --> Flag{--generate-only?}
Flag -->|Yes| Stop[Finish with generated project]
Flag -->|No: Android| Gradle[Gradle assembleDebug]
Gradle --> Adb[adb install -r]
Adb --> Launch[adb shell am start]
Flag -->|No: iOS| Xcode[xcodebuild Debug simulator app]
Xcode --> Boot[simctl boot]
Boot --> Install[simctl install]
Install --> Run[simctl launch]
Generation checks dependency versions and copies enabled native sources. Conflicting contributions fail rather than depending on plugin order. Bundled assets come from the adapter's client output; remote metadata records the UI origin and navigation allowlist.
Generated files have source inputs
This tree shows selected outputs, not every generated file. sharp writes launcher resources and iOS asset catalogs from source images. The splash remains until the initial document or fallback finishes loading.
Regeneration replaces output
Keep lasting changes in config, source assets, a plugin manifest, or Radical's generator. Manual native-project edits can disappear.
Run on a device and Set app assets contain the procedures.