How lynx-family/integrating-lynx-demo-projects works
Project type and purpose
• This is a mono-repo containing four “empty” or template mobile apps that demonstrate integrating the Lynx runtime into existing projects.
• It is not a multi-tier web application with a service or database layer; instead it’s four stand-alone native mobile demos (two Android, two iOS) that all share a common Lynx “bundle” asset.
File structure
• Top level:
• LICENSE, README.md
• android/
– JavaEmptyProject/ (Gradle-Groovy Android demo)
– KotlinEmptyProject/ (Gradle-Kotlin Android demo)
• ios/
– HelloLynxObjc/ (Objective-C iOS demo)
– HelloLynxSwift/ (Swift iOS demo)
• Each Android sub-project:
• app/src/main/assets/main.lynx.bundle (the compiled Lynx template)
• app/src/main/java/...DemoTemplateProvider.java|kt (loads the bundle)
• Multiple Activities (MainActivity, DebugActivity, SwitchActivity)
• UI/theme packages, resources under res/
• Gradle scripts (build.gradle(.kts), settings.gradle(.kts), wrapper)
• Each iOS sub-project:
• main.lynx.bundle at root
• DemoLynxProvider.(h|m|swift) (loads the bundle)
• AppDelegate, SceneDelegate, ViewController
• Xcode project files, asset catalogs, storyboards, Podfile
README for additional insights
• Confirms these are “demo projects for getting started with integrating Lynx to existing project.”
• No backend, database, or external web services—purely native clients loading a pre‐built bundle.
Main components
a. Repository (mono-repo)
b. Android
• JavaEmptyProject
– Build system (Gradle-Groovy)
– Assets folder (.lynx.bundle)
– DemoTemplateProvider (native wrapper around Lynx engine)
– Activities (UI hosts)
– UI-theme modules
• KotlinEmptyProject (same breakdown but Gradle-Kotlin DSL)
c. iOS
• HelloLynxObjc
– Xcode/Pods build system
– Asset (main.lynx.bundle)
– DemoLynxProvider (ObjC)
– AppDelegate, SceneDelegate, ViewController (UI hosts)
• HelloLynxSwift (same breakdown in Swift)
d. Lynx Engine (shared across all four demos; loads .bundle and renders UI)
e. Build Steps (external tools that compile native code & bundle Lynx templates)
Relationships & data flows
• Build process → produces main.lynx.bundle → placed in app assets
• At runtime, DemoTemplateProvider → loads .bundle → hands template to Lynx Engine → Engine renders UI inside native host (Activity or ViewController)
• Native UI hosts may call into Lynx for navigation or theming via the provider
Architectural patterns & design principles
• Separation of concerns:
• Build / bundling step is distinct from runtime
• Platform-specific host code (Activities/ViewControllers) is separated from cross-platform template logic (Lynx bundle)
• Template provider abstraction: hides the Lynx runtime details behind a small native interface
• Consistent directory layout across demos for easy comparison
Detail
• Likewise for iOS
• This level of granularity helps spotlight exactly how and where Lynx integrates into each platform demo.