Native iOS UI/UX, generated by AI. A set of runnable iOS demos that show StemJSON in practice — the new JSON-based language AI writes, rendered as native SwiftUI by StemRuntimeSDK.
Every module in this repo was produced through AI-assisted authoring — human-designed prompts, human selection among candidate outputs, and human editorial curation of the final JSON. StemJSON is a declarative JSON DSL designed to be written by an LLM and rendered as native SwiftUI by StemRuntimeSDK. No web views, no React Native, no JavaScript bridge.
Point an AI at the LLM spec (or the full spec for human context). Ask for the UI/UX you want. Drop the output into this workspace. Run it.
| Project | What it is |
|---|---|
| StemQuickStart | ~20 lines of Swift. Counter + text binding. Copy this to start. |
| StemSwiftUI | Full showcase — every module type rendered modally. |
| StemUIKit | Same modules, UIKit host. |
| StemHome ⭐ | Native SwiftUI + StemJSON mixed in the same app with bidirectional state. |
The demo that answers: can AI-generated UI coexist with hand-written SwiftUI in the same app? Yes — and this shows how.
Native SwiftUI tabs alongside an LLM-generated StemJSON module, sharing state bidirectionally. Tap a native toggle → the JSON module receives it via onCustom and updates declaratively. Change JSON state → the native view reads it back through runtime.subscribe and re-renders. runtime.trigger() from Swift, runtime.subscribe() back — no bridge, no serialization per call, no polling.
The point: you don't have to choose. Let the AI generate the feature surface; keep the critical paths in the Swift code you wrote. Both live in the same screen, backed by the same state.
For a per-module breakdown — what each JSON demonstrates and any external setup — see StemJSON/MODULES.md.
git clone https://github.com/vkrychun/stem-examples-swift.git
cd stem-examples-swift
open StemExamples.xcworkspaceIn Xcode: pick a scheme, set your signing team (empty by default), run on a simulator or device. iOS 18+.
Note: on physical devices, the freeware tier of StemRuntimeSDK displays a small "Powered by StemJSON" notice on rendered surfaces. This is removable under the paid SDK licence; see the StemRuntimeSDK EULA.
- Create a Firebase project at console.firebase.google.com, enable Firestore.
- Drop
GoogleService-Info.plistintoStemSwiftUI/StemSwiftUI/(already.gitignored) — or paste project ID + API key into the Messenger settings sheet at runtime.
Other demos have no external dependencies.
- StemJSON spec — human-readable language specification.
- StemJSON — LLM reference — condensed reference optimised for LLM prompts.
- StemRuntimeSDK — the Swift runtime that renders it.
The example code in this repository — Swift sources and JSON modules — is released under the MIT License. Copy, adapt, ship.
The two projects this repo links against are governed by their own licenses:
- StemJSON specification — OWFa 1.0 with an additional attribution requirement.
- StemRuntimeSDK — its own End-User License Agreement.
If you redistribute or adapt the JSON modules in a product that implements StemJSON, the spec's attribution requirement still applies (see the StemJSON LICENSE).
StemJSON specification created by Vasyl Krychun — https://stemjson.com
"StemJSON", "StemRuntimeSDK", "StemRuntime", and the StemJSON logo are trademarks of Vasyl Krychun. See the StemJSON trademark policy for permitted uses.
