# Abeta KMP Kit (`Abeta-dev/kmp`) — Complete Technical Reference > Self-contained LLM/AI context reference for **Abeta KMP Kit (`dev.abeta.kmp`)** and its embedded **Go 1.26.0 SDUI BFF (`github.com/abeta-dev/kmp/bff`)**. > License: Apache-2.0 | Repo: `https://github.com/Abeta-dev/kmp` | Index: `llms.txt` --- ## 1. 3-Repo Abeta SDUI Platform Architecture The Abeta Server-Driven UI (SDUI) Platform spans three coordinated open-source repositories sharing one canonical `v1` JSON wire protocol: 1. **`Abeta-dev/kmp` (this repository — Client Kit & Canonical `v1` Wire Contracts)**: - 4-layer **Kotlin Multiplatform + Compose Multiplatform** SDUI, Wearable & Room 3 Database Kit (`kmp/`, **11 publishable library modules** + `bom` + `dependencies` = **13 Maven Central artifacts** at **`v0.7.0`**). - Reference **Go 1.26.0** SDUI BFF & **8 exportable Go packages** (`bff/`, published as `github.com/abeta-dev/kmp/bff@v0.9.0` via `pkg/sdui/{actions,analytics,atoms,cache,molecules,server,snippets,theming}`). - Runnable **7-in-1 Super-App Showcase Launcher** (`kmp/sample-app`) and **20-story End-to-End Interactive Storybook** (`kmp/storybook`, featuring all **31** stateless UI atoms across 8 dedicated UI Atom stories, **All 23 Snippets**, Voice & Desktop OS Bridges, and all 7 Super-App verticals — Fresh, Bites, Pulse, Mart, Spark, Trade, Pay + Watch — playable live in WasmJS browser with multi-step workflows). 2. **`Abeta-dev/layout-engine`** (`https://raw.githubusercontent.com/Abeta-dev/layout-engine/main/llms.txt`): - Companion SDUI layout & composition engine in the Abeta SDUI Platform aligned with the same `v1` wire semantics (`bff@v0.9.0`). 3. **`Abeta-dev/sdui-bff`** (`https://raw.githubusercontent.com/Abeta-dev/sdui-bff/main/llms.txt`): - Multi-tenant production Go SDUI BFF importing `github.com/abeta-dev/kmp/bff@v0.9.0` to serve live vertical screens and interactive mutations for all 7 Super-App verticals (`abeta-fresh`, `abeta-bites`, `abeta-pulse`, `abeta-mart`, `abeta-spark`, `abeta-trade`, `abeta-pay`). ### Core Toolchain Versions (`kmp/dependencyManagement/gradle/libs.versions.toml` & `bff/go.mod`) - **Kotlin**: `2.4.21` | **Compose Multiplatform**: `1.12.2` (Material 3 `1.12.0-alpha03`) | **Gradle**: `9.7.0` (JDK 21) - **KotlinX**: Coroutines `1.11.0`, Serialization `1.13.0`, DateTime `0.8.0`, Immutable Collections `0.5.2` - **Networking / DI / Settings**: Ktor `3.6.1`, `org.brotli:dec:0.1.2`, Koin `4.2.2`, Kermit `2.2.0`, `multiplatform-settings:1.3.0` - **Local Database**: AndroidX Room 3 `3.0.3`, SQLite Bundled `2.7.1`, SQLite Web `2.7.1`, KSP `2.3.14` - **Quality & Publishing**: Spotless `8.11.0`, Detekt `2.0.0-alpha.6`, Dokka `2.3.0`, Binary Compatibility Validator `0.18.2`, Vanniktech Maven Publish `0.37.0` - **Go BFF**: Go `1.26.0`, Gin `v1.12.0`, `github.com/abeta-dev/go-libs@v0.4.0`, `github.com/andybalholm/brotli@v1.3.0` --- ## 2. Strict 4-Layer Uncle Bob Dependency Rule & Module Matrix Dependencies strictly point **inward** (`Layer 3 -> Layer 2 -> Layer 1 -> Layer 0`; Go `internal/handler -> internal/usecase -> internal/domain <- internal/infra`). Enforced deterministically in CI by `scripts/check_architecture_and_owners.sh` and `bff/internal/domain/arch_test.go`. ### Supported Multiplatform Targets - **8-Target Headless / Contract Publishable Modules** (`core`, `state`, `analytics`, `database`, `sdui-contracts`, `action-engine`, `network`, `watch-companion`): `jvm`, `iosArm64`, `iosSimulatorArm64`, `macosArm64`, `watchosArm64`, `watchosSimulatorArm64`, `watchosDeviceArm64`, `wasmJs`. - **5-Target Compose UI Publishable Modules** (`design-tokens`, `ui-atoms`, `sdui-layout`) + **`storybook`**: `jvm`, `iosArm64`, `iosSimulatorArm64`, `macosArm64`, `wasmJs`. - **`sample-app`**: JVM Desktop & `--headless` CLI. - **Drop-In Reference Native Host Glue (`kmp/platforms/`)**: - Published Maven Central artifacts target `jvm`, `iosArm64`, `iosSimulatorArm64`, `macosArm64`, `watchosArm64`, `watchosSimulatorArm64`, `watchosDeviceArm64`, and `wasmJs` (with guarded JVM AWT/file fallbacks). - `android/{AndroidPlatformBridgeFactory,AbetaAndroidHostActivity,AndroidDatabaseFactory}.kt` (Android `ComponentActivity`/`FragmentActivity` + Room 3 `BundledSQLiteDriver` + `MIGRATION_1_2`, requires consumer Android app with `ANDROID_HOME`). - `wearos/{WearCompanionHostActivity,WearSduiRenderer}.kt` (Wear OS Compose Material & Glance/Tile renderer wiring `:watch-companion` with Android-native bridges). - `apple/AbetaAppleHosts.swift` & `apple/Sources/{AbetaSduiSwiftUI,AbetaWatchSwiftUI}/` (4-product SwiftPM `Abeta-dev/kmp-spm` `0.7.0`: `AbetaSduiKit`, `AbetaWatchKit`, `AbetaSduiSwiftUI`, `AbetaWatchSwiftUI`, plus macOS Cocoa `launchMacOsSduiWindow`). - `web/README.md` (COOP/COEP headers for Room 3 `wasmJs` OPFS Web Worker SQLite persistence). ### All 11 Publishable KMP Modules + BOM + Catalog (`io.github.abeta-dev`; Kotlin package `dev.abeta.kmp.*`) | Layer | Module | Coordinate (`0.7.0`) | Allowed Internal Deps | Key Responsibilities | | :--- | :--- | :--- | :--- | :--- | | **Catalog** | `dependencyManagement` | `io.github.abeta-dev:dependencies` | *(catalog)* | External (`libs.versions.toml`) & internal (`internal.versions.toml`) Gradle Version Catalogs | | **BOM** | `kmp-bom` | `io.github.abeta-dev:bom` | *(platform)* | Java Platform BOM aligning all 11 publishable `io.github.abeta-dev:*` modules + `dependencies` (13 Maven Central artifacts total) | | **Layer 0** | `core` | `io.github.abeta-dev:core` | None | `AppResult`, `AppError` (`ErrorCategory`, `isRetryable`), `DispatcherProvider`, `Clock`, `AppLogger`/`RedactingAppLogger`, `KeyValueStore`/`ObservableKeyValueStore`, `SingleFlight`, `Debouncer`, `ClickBackpressureGuard`, `BackoffPolicy`, `FieldValidators`, `PlatformInfo`/`PlatformCapabilities`, `HapticEngine`, `ClipboardPort`, `ExternalLauncherPort`, `SharePort`, `ConnectivityMonitor`, `PermissionPort`, `LocationPort`, `FilePickerPort`, `PushNotificationPort`, `AudioCapturePort`, `SpeechToTextPort`, `DesktopSystemPort`, `LocaleFormatter`, `DeepLinkParser`, `SecureKeyValueStore` (Apple Keychain `SecItem*` w/ `NSLock`, JVM `0600`/`0700` file-backed AES-256-GCM, WasmJS `sessionStorage`), `BiometricAuthenticator` (`LAContext`) | | **Layer 0** | `state` | `io.github.abeta-dev:state` | `:core` | Thread-safe `SessionStore`/`PersistentSessionStore`/`SessionLifecycleManager`, `DataStoreKeyValueStore` (`androidx.datastore:datastore-preferences-core:1.3.0`), `createDiskKeyValueStore`, schema-versioned `PreferenceStore`, `createSecurePersistentKeyValueStore(namespace)`, `FeatureFlagProvider`, `OfflineMutationQueue` | | **Layer 0** | `analytics` | `io.github.abeta-dev:analytics` | `:core` | `AnalyticsEvent`, `AnalyticsTracker`, `Composite`, `Logger`, `Recording`, `Sanitizing`, `Deduplicating`, `Enriching`, and `Buffered` trackers | | **Layer 0** | `database` | `io.github.abeta-dev:database` | `:core` | **Room 3 (`3.0.3`, schema v2 w/ `MIGRATION_1_2`)** KMP SQLite DB (`AbetaDatabase` with `@ConstructedBy(AbetaDatabaseConstructor::class)`, `AbetaLocalDatabase`): tables `cached_screens` (PK `screenId`, `payloadJson`, `etag`, `pageVersion`, `appVersion`, TTL), `offline_mutations` (PK `id`, FIFO retry queue), `key_value_records` (PK `namespace`+`recordKey`, TTL). Uses `sqlite-bundled:2.7.1` on JVM/Android/Apple and `sqlite-web:2.7.1` OPFS Web Worker on `wasmJs`; KSP `2.3.14` schema exports `1.json` & `2.json` under `kmp/database/schemas/` | | **Layer 1** | `design-tokens` | `io.github.abeta-dev:design-tokens` | None | `ColorTokens`, `DesignPalette`, `SpacingTokens`, `CornerRadiusTokens`, `StrokeWidthTokens`, `TypographyTokens` (17 type roles), `ElevationTokens`, `MotionTokens`, `OpacityTokens`, `SizingTokens`, `ThemePreset` (`INDIGO`, `EMERALD`, `AMBER`), `ColorAccessibility`, `DesignTheme`, `ThemeTokens`, and `ResponsiveTokens.kt` (`WindowWidthClass`, `WindowHeightClass`, `DeviceFormFactor`, `AdaptiveLayoutMetrics`, `ThemeTokens.adaptiveMetrics`) | | **Layer 1** | `sdui-contracts` | `io.github.abeta-dev:sdui-contracts` | None | Pure `@Serializable` `v1` wire DTOs (`SduiJson` with `ignoreUnknownKeys = true`): `PageResponse` (`page_version`, `app_version`, `etag`, `stream_spec`), `ScreenManifestResponse` (`sdui_schema_version`), `SnippetEnvelope` (`sticky`, `motion`), **29 Wire Atoms** (incl. `MediaPagerAtom`, `CountdownAtom` w/ `expires_at_epoch_ms`, & 12 `ExtendedAtoms.kt` primitives), **23 `SnippetTypes`** (incl. `nudge_bar`, `marquee_strip`, `order_tracker`, **`composed_block`** Atomic Snippet Molding Engine with **36 `ComposedNodeKind`s**, `custom_slot`, and `graph_canvas`), **6 `SnippetDeltaOp`s**, `MotionSpec` (7 Ambient `MotionLoopEffect`s), `FloatingCartSpec` (free-delivery threshold nudge fields), `AdaptiveContracts`, `ActionRef`, `ValidationRuleContract`, `TrackingContract`. Zero Compose or Ktor imports | | **Layer 1** | `ui-atoms` | `io.github.abeta-dev:ui-atoms` | `:design-tokens`, `:sdui-contracts` | **31 stateless Compose atoms** (incl. `UiStepper`, `UiCountdown`, `UiRollingCounter`, `UiMediaPager`, plus 12 extended atoms `UiRadioGroup`, `UiSelect`, `UiOtpInput`, `UiChip`, `UiSegmentedControl`, `UiRating`, `UiPrice`, `UiBadge`, `UiAlertBanner`, `UiStatTile`, `UiKeyValueRow`, real ISO/IEC 18004 `UiQrCode`) + `UiCelebrationOverlay`, `UiHapticFeedback`, `MotionModifier` + `MotionLoopModifiers` (`applyMotionSpec`, 7 Ambient `MotionLoopEffect`s, `Modifier.pressBounce`, `Modifier.shakeOnError` honoring `reducedMotion`), `LocalImageRenderer`, `TokenResolvers`. Emits `onAction: (ActionRef) -> Unit` only; NEVER imports `:core`, `:action-engine`, `:network`, or `:sdui-layout` | | **Layer 2** | `action-engine` | `io.github.abeta-dev:action-engine` | `:core`, `:sdui-contracts` | OCP action system: **18 `ActionTypes`**, `ActionPayloadDecoder`, `ActionDecoderRegistry`, `ActionHandler`, `ActionRegistry`, `DefaultActionDispatcher` (depth & dispatch-budget guarded), `ActionValidator`, `ApiCallExecutor`, `ActionOutcome` | | **Layer 2** | `network` | `io.github.abeta-dev:network` | `:core` | Ktor `3.6.1` `HttpTransport`/`KtorHttpTransport`/`HttpClientFactory`: HTTP/2 ALPN, Brotli (`br`), conditional `If-None-Match`/`304`, `SseTransport`/`KtorSseTransport` (`Last-Event-ID` reconnect), `CsrfTokenProvider` + single `403` retry, `NetworkConfig.appVersion` (`X-Client-App-Version`), bearer refresh (`AuthTokenProvider`), validated `sha256/` SPKI/cert pinning (`CertificatePinMatcher` for JVM/OkHttp `CertificatePinner` and Apple Darwin `NSURLSession` across iOS/macOS/watchOS) | | **Layer 3** | `sdui-layout` | `io.github.abeta-dev:sdui-layout` | Layers 0–2 | `LayoutController` (`observeConnectivity`, `handleDeepLink`, `isOffline`, `applyDeltaPatch`/`observeStream`, `loadMore`, `errorShakeSequence`, `dismissFeedback`), `SduiLayoutViewModel` + `SavedState`, `PlatformBridgeBundle`, `PlatformBridgeOutcomeExecutor`, `AdaptiveScreenContainers`, **23 snippet renderers** (`BuiltInSnippetModule`, incl. `NudgeBar`, `MarqueeStrip`, `OrderTracker`, **`ComposedBlock`** w/ **36 `ComposedNodeKind`s**, `CustomSlot` + `CustomSlotRegistry`, and `GraphCanvas`), `FloatingCartDockHost` (free-delivery threshold nudge) + `PageCartCalculator`, rich SDUI `ModalBottomSheet`/`AlertDialog`, `PullToRefreshBox`, `CachedScreenRepository` (`VERSION_GATED`, `304`, `/manifest`), `RemoteBffAnalyticsTracker`, `OfflineActionCoordinator`, `KtorImageRenderer`, `createSduiKoinModule`, `SduiHostedRoot`, iOS `createSduiViewController` (`AbetaSduiKit.xcframework`), macOS `launchMacOsSduiWindow` | | **Layer 3** | `watch-companion` | `io.github.abeta-dev:watch-companion` | `:core`, `:state`, `:analytics`, `:database`, `:sdui-contracts`, `:action-engine`, `:network` | Headless wearable orchestrator (zero Compose UI imports): `WatchGlanceModels`, `WatchScreenMapper`, `RemoteWatchPageSource` (ETag/304 & offline cache), `WatchRemoteApiCallExecutor`, `WatchCompanionController`, `createWatchCompanionModule`, `createAppleWatchCompanionHost`, `AbetaWatchKit.xcframework` | **Key Architectural Invariants**: - **Atomic / Action Decoupling**: `ui-atoms` only accepts wire contracts and invokes `onAction: (ActionRef) -> Unit`; zero monolithic `when (actionType)` in UI or core. - **Apple HMPP Split**: C/ObjC code using bit-width-varying types (`NSInteger`/`CFIndex`) lives in `apple64Main` + `watchosArm64Main` so HMPP metadata and Dokka compile cleanly. - **ABI Stability**: Every publishable library maintains a Binary Compatibility Validator descriptor at `kmp//api/.api` (verified via `./gradlew apiCheck`, updated via `./gradlew apiDump`). - **No Hardcoded Versions**: External versions live only in `libs.versions.toml`; internal coordinates in `internal.versions.toml`. --- ## 3. SDUI Wire Protocol (`v1`) Reference Shared 1:1 between `kmp/sdui-contracts` + `kmp/action-engine` (`SduiJson`, `kotlinx.serialization`) and `bff/pkg/sdui/{actions,atoms,snippets,theming}` (`encoding/json`). All JSON keys use `snake_case`. ### 3.1 HTTP Envelope & Root `PageResponse` Every BFF `/api/v1/*` response wraps payloads in `ginmw.Envelope` (`BffEnvelope` on KMP): ```json { "success": true, "data": { ... }, "error": null } ``` On error: `{ "success": false, "data": null, "error": { "code": "...", "message": "...", "detail": "..." } }`. `PageResponse` (`GET /api/v1/screens/:screenId`): - `page_id` (`string`, req), `title` (`string?`), `toolbar` (`ToolbarSpec?`: `title`, `subtitle`, `navigation_icon`, `trailing_actions`, `bg_color`, `layout`) - `snippets` (`SnippetEnvelope[]`), `bottom_bar` (`BottomBarSpec?`: `primary_button`, `secondary_button`, `helper_text`, `layout`, `motion`) - `floating_cart` (`FloatingCartSpec?`: `label`, `eta_badge`, `cta`, `motion`, `free_delivery_threshold_cents`, `nudge_prefix`, `unlocked_label`) - `page_actions` (`ActionRef[]`), `tracking` (`TrackingContract?`), `pull_to_refresh` (`ActionRef?`) - `pagination` (`PaginationSpec?`: `next_cursor`, `has_more`, `load_more_action`) - `adaptive_layout` (`AdaptivePageSpec?`: `layout_mode` [`single_column`|`centered`|`split_pane`], `max_width_dp`, `split_pane_enabled`, `secondary_snippet_ids`) - `page_version` (`string?`), `app_version` (`string?`), `etag` (`string?`), `stream_spec` (`SseStreamSpec?`) `SnippetEnvelope`: `snippet_id` (`string`, req), `snippet_parent_id` (`string?`), `snippet_type` (`string`, req), `sticky` (`bool`), `data` (`JsonObject`), `tracking` (`TrackingContract?`), `motion` (`MotionSpec?`). `SnippetDeltaPatch` (SSE `GET /api/v1/streams/:streamId` — **6 `SnippetDeltaOp`s**): `append_text`, `patch_snippet_data`, `replace_snippet`, `insert_snippet`, `remove_snippet`, `update_page_meta`. ### 3.2 Critical Wire Invariants 1. **String-Only `TrackingContract.properties` Invariant**: In `kmp/sdui-contracts` (`ActionContracts.kt`), `TrackingContract` is defined as: ```kotlin data class TrackingContract( @SerialName("event_name") val eventName: String, val properties: Map = emptyMap(), ) ``` Every BFF emitting `tracking.properties` (including Go structs where `TrackingMeta.Properties` is `map[string]any`) **MUST serialize only JSON string values** (`"count": "3"`, NOT `"count": 3` or booleans/objects). Non-string values fail `kotlinx.serialization` decoding on KMP clients. 2. **`TabItemSpec.title` is a plain `string`**: Not a `TextAtom`. 3. **Forward Compatibility**: `SduiJson` sets `ignoreUnknownKeys = true`; unknown `snippet_type` entries fall back safely inside `SnippetRegistry`. 4. **Shared Styling & Motion Primitives**: - `ColorTokenRef`: `token`, `alpha`, `fallback_hex`, `hex` - `TypographyTokenRef`: `token`, `font_weight`, `letter_spacing` - `LayoutConfig`: `padding`/`margin` (`top`,`bottom`,`start`,`end`,`all`,`horizontal`,`vertical`), `bg_color`, `corner_radius` (`token`,`all`,`top_start`,`top_end`,`bottom_start`,`bottom_end`), `border` (`width_dp`,`width_token`,`color`), `fill_max_width` - `MotionSpec`: `enter`/`exit` (`none`|`fade_in`|`slide_up`|`slide_down`|`scale_in`|`spring_bounce`), `duration_token` (`instant`|`fast`|`normal`|`slow`), `duration_ms`, `stagger_ms`, `delay_ms`, `loop_effect` (`none` + **7 ambient loops**: `pulse`|`shimmer`|`wiggle`|`float`|`heartbeat`|`glow_ring`|`marquee`) - `ResponsiveColumnsSpec` / `ResponsiveIntSpec`: `compact`, `medium`, `expanded` ### 3.3 All 29 Wire Atoms (`sdui-contracts` & `pkg/sdui/atoms`) 1. `TextAtom`: `id`, `text`, `color`, `typography`, `max_lines`, `alignment` (`start`|`center`|`end`), `markdown`, `strike_through`, `underline`, `prefix_icon`, `suffix_icon`, `on_click`, `layout` 2. `IconAtom`: `id`, `name`, `size_dp`, `color`, `content_description`, `on_click`, `layout` 3. `TagAtom`: `id`, `label`, `variant` (`neutral`|`brand`|`success`|`warning`|`error`|`info`), `bg_color`, `text_color`, `border`, `icon`, `on_click`, `layout`, `motion` 4. `ButtonAtom`: `id`, `label`, `sub_label`, `variant` (`primary`|`secondary`|`outline`|`ghost`|`destructive`), `size` (`sm`|`md`|`lg`), `enabled`, `loading`, `full_width`, `leading_icon`, `trailing_icon`, `on_click`, `tracking`, `layout`, `motion` 5. `ImageAtom`: `id`, `url`, `content_description`, `width_dp`, `height_dp`, `aspect_ratio`, `scale_mode` (`fit`|`fill_bounds`|`crop`|`inside`), `corner_radius`, `placeholder_color`, `on_click`, `layout` 6. `TextFieldAtom`: `field_id`, `label`, `placeholder`, `initial_value`, `helper_text`, `error_text`, `enabled`, `read_only`, `single_line`, `max_lines`, `max_length`, `required`, `regex`, `keyboard_type` (`text`|`number`|`email`|`phone`|`password`|`decimal`|`uri`), `prefix_icon`, `suffix_icon`, `on_value_change`, `on_submit`, `layout` 7. `DividerAtom`: `id`, `thickness_dp`, `color`, `inset_start_dp`, `layout` 8. `SpacerAtom`: `id`, `width_dp`, `height_dp`, `weight` 9. `ProgressAtom`: `id`, `kind` (`linear`|`circular`), `progress`, `label`, `color`, `track_color`, `layout` 10. `SwitchAtom`: `field_id`, `label`, `subtitle`, `checked`, `enabled`, `on_change`, `layout` 11. `CheckboxAtom`: `field_id`, `label`, `subtitle`, `checked`, `enabled`, `required`, `on_change`, `layout` 12. `SliderAtom`: `field_id`, `label`, `value`, `min_value`, `max_value`, `steps`, `show_value`, `unit_label`, `enabled`, `on_change`, `layout` 13. `AvatarAtom`: `id`, `url`, `initials`, `size_dp`, `bg_color`, `text_color`, `content_description`, `on_click`, `layout` 14. `SkeletonAtom`: `id`, `kind` (`text`|`rectangle`|`circle`), `width_dp`, `height_dp`, `layout` 15. `StepperAtom`: `field_id`, `label`, `quantity`, `min_quantity` (`0`), `max_quantity` (`20`), `enabled`, `on_increment`, `on_decrement`, `layout` 16. `CountdownAtom`: `countdown_id`, `remaining_seconds`, `expires_at_epoch_ms` *(added in v0.7.0 / bff@v0.9.0)*, `label`, `urgent_threshold_seconds` (`60`), `show_hours`, `expired_text` (`"00:00"`), `on_expire`, `motion` 17. `RadioGroupAtom` *(ExtendedAtoms.kt / extended_atoms.go)*: `field_id`, `label`, `options` (`OptionItem[]`: `id`, `label`, `subtitle`, `enabled`, `badge`), `selected_id`, `enabled`, `on_change`, `layout` 18. `SelectAtom`: `field_id`, `label`, `placeholder` (`"Select an option"`), `options` (`OptionItem[]`), `selected_id`, `helper_text`, `error_text`, `enabled`, `on_change`, `layout` 19. `OtpInputAtom`: `field_id`, `label`, `length` (`6`), `initial_value`, `masked`, `helper_text`, `error_text`, `enabled`, `on_complete`, `layout` 20. `ChipAtom`: `id`, `label`, `selected`, `enabled`, `removable`, `leading_icon`, `on_click`, `on_remove`, `layout` 21. `SegmentedControlAtom`: `field_id`, `options` (`OptionItem[]`), `selected_id`, `enabled`, `on_change`, `layout` 22. `RatingAtom`: `id`, `field_id`, `value`, `max_stars` (`5`), `interactive`, `review_count`, `label`, `star_size_dp` (`20`), `on_rate`, `layout` 23. `PriceAtom`: `id`, `amount_text`, `original_amount_text`, `discount_label`, `unit_suffix`, `emphasized`, `layout` 24. `BadgeAtom`: `id`, `count`, `max_count` (`99`), `label`, `dot_only`, `variant` (`neutral`|`brand`|`success`|`warning`|`error`|`info`), `layout`, `motion` 25. `AlertBannerAtom`: `id`, `title`, `message`, `variant` (`neutral`|`brand`|`success`|`warning`|`error`|`info`), `icon`, `action_label`, `on_action`, `dismissible`, `on_dismiss`, `layout` 26. `StatTileAtom`: `id`, `label`, `value`, `delta_label`, `delta_positive`, `caption`, `icon`, `on_click`, `layout` 27. `KeyValueRowAtom`: `id`, `label`, `value`, `sublabel`, `value_color`, `emphasized`, `show_divider`, `on_click`, `layout` 28. `QrCodeAtom`: `id`, `payload`, `label`, `caption`, `size_dp` (`160`), `on_click`, `layout` 29. `MediaPagerAtom`: `id`, `images` (`ImageAtom[]`), `aspect_ratio`, `height_dp`, `show_indicators`, `auto_advance_ms`, `on_page_click`, `layout` ### 3.4 All 31 Stateless Compose UI Atoms (`kmp/ui-atoms`) Renders all 29 wire atoms plus `UiSurfaceCard` and `UiRollingCounter`: `UiText`, `UiIcon`, `UiTag`, `UiButton`, `UiImage`, `UiTextField`, `UiDivider`, `UiSpacer`, `UiProgress`, `UiSurfaceCard`, `UiSwitch`, `UiCheckbox`, `UiSlider`, `UiAvatar`, `UiSkeleton`, `UiStepper` (animated `ADD` <-> `- qty +` morph with `UiHapticFeedback` hooks), `UiCountdown` (live ticking urgency timer with `expires_at_epoch_ms` & expiration callback), `UiRollingCounter` (smooth odometer-style digit roll), `UiMediaPager` (swipeable `HorizontalPager` with draw-phase indicators), plus 12 extended atoms (`UiRadioGroup`, `UiSelect`, `UiOtpInput`, `UiChip`, `UiSegmentedControl`, `UiRating`, `UiPrice`, `UiBadge`, `UiAlertBanner`, `UiStatTile`, `UiKeyValueRow`, real ISO/IEC 18004 `UiQrCode`). Companion utilities in `ui-atoms`: `UiCelebrationOverlay`, `UiHapticFeedback` (`UiHapticKind`, `LocalUiHapticFeedback`, `rememberComposeHapticFallback`), `MotionModifier` + `MotionLoopModifiers` (`applyMotionSpec`, 7 ambient `MotionLoopEffect`s, `Modifier.pressBounce`, `Modifier.shakeOnError`, reduced-motion collapse). ### 3.5 All 23 Canonical `SnippetTypes` (`SnippetTypes` & `pkg/sdui/snippets`) | `snippet_type` | Contract (`sdui-contracts` / Go) | Exact JSON Payload Keys (`snake_case`) | | :--- | :--- | :--- | | `header_v1` | `HeaderSnippetData` | `title`, `subtitle`, `leading_icon`, `avatar`, `trailing_tag`, `trailing_action`, `trailing_icon`, `skeletons`, `on_click`, `layout` | | `banner_v1` | `BannerSnippetData` | `title`, `body`, `icon`, `image`, `tag`, `cta`, `dismiss_action`, `on_click`, `layout` | | `metric_card` | `MetricCardSnippetData` | `label`, `value`, `delta`, `caption`, `icon`, `progress`, `on_click`, `layout` | | `card_v1` | `CardSnippetData` | `title`, `subtitle`, `description`, `media`, `avatar`, `skeletons`, `badge`, `leading_icon`, `primary_button`, `secondary_button`, `on_click`, `layout` | | `action_row` | `ActionRowSnippetData` | `title`, `subtitle`, `leading_icon`, `trailing_tag`, `trailing_icon`, `on_click`, `layout` | | `form_v1` | `FormSnippetData` | `form_id`, `title`, `description`, `fields`, `switches`, `checkboxes`, `sliders`, `submit_button`, `cancel_button`, `layout` | | `empty_state` | `EmptyStateSnippetData` | `title`, `message`, `icon`, `image`, `action_button`, `layout` | | `divider` | `DividerSnippetData` | `divider`, `layout` | | `spacer` | `SpacerSnippetData` | `spacer` | | `product_card` | `ProductCardSnippetData` | `product_id`, `title`, `subtitle`, `price`, `original_price`, `unit_price_cents`, `badge`, `image`, `stepper`, `rating`, `on_click`, `layout` | | `carousel` | `CarouselSnippetData` | `title`, `items`, `item_width_dp`, `item_width_by_width`, `spacing_dp`, `layout` | | `grid` | `GridSnippetData` | `title`, `columns`, `columns_by_width`, `spacing_dp`, `items`, `layout` | | `tabs` | `TabsSnippetData` | `tabs` (`[{ id, title, badge, snippets }]`), `selected_index`, `layout` | | `accordion` | `AccordionSnippetData` | `title`, `subtitle`, `initially_expanded`, `snippets`, `layout` | | `swipe_deck` | `SwipeDeckSnippetData` | `deck_id`, `cards` (`SwipeCardItem[]`), `like_label`, `nope_label`, `super_like_label`, `empty_title`, `empty_message`, `on_like`, `on_nope`, `on_super_like`, `on_undo`, `layout` | | `search_bar` | `SearchBarSnippetData` | `search_id`, `query`, `placeholder`, `leading_icon`, `trailing_icon`, `submit_label`, `clearable`, `on_submit`, `on_clear`, `on_trailing_click`, `layout` | | `chip_group` | `ChipGroupSnippetData` | `group_id`, `title`, `multi_select`, `chips` (`FilterChipItem[]`), `layout` | | `nudge_bar` | `NudgeBarSnippetData` | `nudge_id`, `title`, `subtitle`, `icon`, `badge`, `countdown`, `progress`, `cta`, `dismissible`, `pointer_edge` (`top`|`bottom`), `on_dismiss`, `on_click`, `layout` | | `marquee_strip` | `MarqueeStripSnippetData` | `strip_id`, `items` (`MarqueeItem[]`), `velocity_dp_per_sec` (`48`), `separator` (`"•"`), `layout` | | `order_tracker` | `OrderTrackerSnippetData` | `tracker_id`, `order_code`, `headline`, `eta_countdown`, `eta_badge`, `rider_name`, `rider_caption`, `steps` (`OrderTrackerStep[]`), `primary_action`, `secondary_action`, `layout` | | `composed_block` | `ComposedBlockSnippetData` | `block_id`, `recipe_name`, `root` (`ComposedNode` tree up to depth 6 across **36 `ComposedNodeKind`s**: `column`, `row`, `box`, `card`, `flow_row`, `scroll_row`, `grid`, `text`, `button`, `tag`, `icon`, `image`, `avatar`, `progress`, `divider`, `spacer`, `stepper`, `countdown`, `rolling_counter`, `text_field`, `switch`, `checkbox`, `slider`, `media_pager`, `radio_group`, `select`, `otp_input`, `chip`, `segmented_control`, `rating`, `price`, `badge`, `alert_banner`, `stat_tile`, `key_value_row`, `qr_code`), `layout` | | `custom_slot` | `CustomSlotSnippetData` | `slot_id`, `slot_type`, `props` (`JsonObject`), `fallback` (`SnippetEnvelope?`), `layout` | | `graph_canvas` | `GraphCanvasSnippetData` | `canvas_id`, `title`, `nodes` (`GraphNodeSpec[]`), `edges` (`GraphEdgeSpec[]` w/ `bezier`\|`straight`\|`dashed`), `viewport_height_dp`, `interactive`, `on_node_tap`, `on_node_move`, `layout` | **Exact Sub-Item Schemas (`InteractiveSnippetContracts.kt`, `NudgeAndComposedContracts.kt`, `ExtendedAtoms.kt`)**: - `SwipeCardItem` (inside `swipe_deck.cards`): `card_id`, `title` (`TextAtom`), `subtitle` (`TextAtom?`), `bio` (`TextAtom?`), `badge` (`TagAtom?`), `distance_text` (`TextAtom?`), `image` (`ImageAtom?`), `tags` (`TagAtom[]`), `on_like` (`ActionRef?`), `on_nope` (`ActionRef?`), `on_super_like` (`ActionRef?`), `on_click` (`ActionRef?`). - `FilterChipItem` (inside `chip_group.chips`): `id`, `label`, `selected` (`bool`), `icon` (`IconAtom?`), `badge` (`string?`), `on_click` (`ActionRef?`). - `MarqueeItem` (inside `marquee_strip.items`): `id`, `text`, `icon` (`IconAtom?`), `badge` (`TagAtom?`), `on_click` (`ActionRef?`). - `OrderTrackerStep` (inside `order_tracker.steps`): `id`, `label`, `caption`, `icon` (`IconAtom?`), `completed` (`bool`), `active` (`bool`). - `ComposedNode` (recursive inside `composed_block.root`, max depth 6): `node_id` (alias `id`), `kind`, `spacing_dp`, `alignment`, `horizontal_alignment`, `vertical_alignment`, `main_axis_arrangement`, `weight`, `children` (`ComposedNode[]`), typed leaf slots (`text`, `button`, `tag`, `icon`, `image`, `avatar`, `progress`, `divider`, `spacer`, `stepper`, `countdown`, `counter_value`/`counter_typography`/`counter_color`, `radio_group`, `select`, `otp_input`, `chip`, `segmented_control`, `rating`, `price`, `badge`, `alert_banner`, `stat_tile`, `key_value_row`, `qr_code`), `on_click`, `layout`, `motion`. Go BFF recipe helpers: `MoldFlashDealRecipe`, `MoldLoyaltyStampRecipe`, `MoldLiveEtaPromoRecipe`. ```json [ { "snippet_id": "fresh_search_bar", "snippet_type": "search_bar", "data": { "search_id": "fresh_search", "placeholder": "Search groceries & essentials...", "clearable": true, "on_submit": { "id": "search_fresh", "type": "navigate", "payload": { "route": "fresh-home" } } } }, { "snippet_id": "fresh_filter_chips", "snippet_type": "chip_group", "data": { "group_id": "fresh_filters", "multi_select": false, "chips": [ { "id": "all", "label": "All", "selected": true }, { "id": "produce", "label": "Produce", "selected": false, "badge": "8M" } ] } }, { "snippet_id": "spark_deck_main", "snippet_type": "swipe_deck", "data": { "deck_id": "spark_primary", "like_label": "LIKE", "nope_label": "NOPE", "super_like_label": "SUPER LIKE", "cards": [ { "card_id": "spark_maya", "title": { "text": "Maya Chen, 28" }, "subtitle": { "text": "Product Designer · Studio K" }, "distance_text": { "text": "2.4 km" }, "tags": [{ "label": "Design" }, { "label": "Coffee" }], "on_like": { "id": "like_maya", "type": "call_api", "payload": { "endpoint": "/api/v1/spark/swipe", "method": "POST", "body": { "profile_id": "spark_maya", "action": "like" } } } } ] }, "tracking": { "event_name": "deck_impression", "properties": { "vertical": "abeta-spark", "deck_size": "3" } } } ] ``` ### 3.6 Go SDUI BFF HTTP Endpoints (`bff/internal/handler/router.go` — `bff@v0.9.0`) - `GET /api/v1/screens` (ETag `304`) — lists the **12 built-in screens** (`home`, `catalog`, `containers`, `profile`, `form-demo`, `fresh-home`, `store-home`, `watch-status`, `pay-home`, `pay-transfer`, `pay-cards`, `pay-receipt`) - `GET /api/v1/manifest` & `GET /api/v1/screens/manifest` (ETag `304`) — returns `ScreenManifestResponse` (SHA-256 screen versions, `app_version`, `sdui_schema_version`) - `GET /api/v1/screens/:screenId` (ETag `304`) — returns `ginmw.Envelope` - `GET /api/v1/streams/:streamId` — real-time uncompressed SSE delta stream (`Last-Event-ID` cursor replay + `204 No Content` catch-up) - `POST /api/v1/actions/execute` — executes a declarative `ActionTrigger` with server-side `ValidationRule` checks - `POST /api/v1/orders/express` — express order endpoint returning `trigger_feedback` (`celebration`) + `show_toast` follow-up actions - `POST /api/v1/pay/transfer` — Abeta Pay P2P transfer mutation returning settlement receipt follow-ups - `GET /api/v1/catalog/tokens` (ETag `304`) — exports design token catalog metadata - `POST /api/v1/analytics/events` & `GET /api/v1/analytics/summary` — batched SDUI client analytics ingestion & telemetry summary - Observability & Docs: `GET /healthz`, `GET /readyz`, `GET /metrics`, `GET /openapi.json` (OpenAPI 3.1), `GET /docs` (Scalar UI) - Reusable `pkg/sdui/{cache,server}` & Middleware: `pkg/sdui/cache` (`UpstreamCachedScreenRepository` w/ `singleflight`, prefix/tag/all invalidation, O(1) `BuildManifest`), `pkg/sdui/server` (fail-closed `CORSMiddleware`, `private, no-cache` `ETagMiddleware` honoring `page.ETag` & `X-App-Version`/`X-Page-Version`/`X-Client-App-Version`, pooled `CompressionMiddleware` `br`/`gzip`, per-router `JWTAuthMiddleware`, `HTTPUpstreamFetcher`, `StreamProvider`), plus `go-libs/ginmw` and `http.Server.Protocols` (`HTTP/1.1` + `h2c` + TLS 1.2+ HTTP/2). ### 3.7 All 18 Built-In `ActionTypes` (`ActionPayloads.kt` & `pkg/sdui/actions`) `ActionRef` / `ActionTrigger` envelope: `id`, `type`, `payload`, `validations` (`[{ field_id, rule, value?, message }]`), `secondary_actions` (`ActionRef[]`). | `type` | Payload Keys (`snake_case`) | | :--- | :--- | | `navigate` | `route`, `params` (`map`), `clear_back_stack`, `launch_mode` | | `back_press` | `result` (`map`), `steps` (default `1`) | | `open_dialog` | `dialog_id`, `title`, `message`, `dismissible`, `positive_action`, `negative_action`, `presentation` (`dialog`|`bottom_sheet`) | | `dismiss_overlay` | `overlay_id`, `all` | | `show_toast` | `message`, `duration_ms` (`2500`), `variant` (`info`) | | `call_api` | `endpoint`, `method` (`POST`), `headers`, `body`, `on_success`, `on_error` | | `save_state` | `key`, `value`, `scope` (`session`) | | `delete_state` | `key`, `scope` (`session`) | | `track_event` | `event_name`, `properties` (`map`) | | `refresh_page` | `page_id`, `show_loader` | | `copy_to_clipboard` | `text`, `label` | | `update_snippets` | `operation`, `target_snippet_id`, `snippets` (`SnippetEnvelope[]`) | | `batch` | `actions` (`ActionRef[]`), `stop_on_error`, `parallel` | | `trigger_feedback` | `effect` (`celebration`|`cart_bounce`|`shake_error`|`haptic_tick`), `title`, `subtitle`, `duration_ms` (`1800`), `target_id` | | `open_url` | `url`, `external_browser` (`true`), `fallback_route` | | `share` | `title`, `text`, `url`, `chooser_title` | | `request_permission` | `permission` (`location`|`notifications`|`camera`|`storage`), `rationale`, `on_granted`, `on_denied` | | `biometric_auth` | `reason`, `title`, `allow_device_credential` (`true`), `on_authenticated`, `on_failed` | **11 Golden Wire Parity Fixtures** (`bff/testdata/golden/`): `home_screen.json`, `form_screen.json`, `action_batch.json`, `containers_screen.json`, `store_home.json`, `interactive_screen.json`, `nudges_and_composed_screen.json`, `extended_atoms_screen.json`, `express_molecules_and_analytics_screen.json`, `streaming_and_versioned_screen.json`, `spatial_custom_and_graph_screen.json` — validated by both `bff/internal/infra/golden*_test.go` and `kmp/sdui-contracts/.../GoldenFixturesParityTest.kt`. --- ## 4. Installation & Consumption Snippets (Zero Credentials Required) ### Gradle KMP — Maven Central (Stable, verified `io.github.abeta-dev` namespace; Kotlin package `dev.abeta.kmp.*`) ```kotlin // settings.gradle.kts dependencyResolutionManagement { repositories { mavenCentral() google() } versionCatalogs { create("abetaKmp") { from("io.github.abeta-dev:dependencies:0.7.0") } } } // build.gradle.kts (commonMain) dependencies { implementation(project.dependencies.platform("io.github.abeta-dev:bom:0.7.0")) implementation("io.github.abeta-dev:core") implementation("io.github.abeta-dev:database") // Optional Room 3 KMP local SQLite DB implementation("io.github.abeta-dev:design-tokens") implementation("io.github.abeta-dev:sdui-contracts") implementation("io.github.abeta-dev:ui-atoms") implementation("io.github.abeta-dev:action-engine") implementation("io.github.abeta-dev:network") implementation("io.github.abeta-dev:sdui-layout") // implementation("io.github.abeta-dev:watch-companion") // Optional headless wearable kit } ``` ### Gradle KMP — Cloudsmith Open Source (Anonymous `-SNAPSHOT` & Mirror) ```kotlin repositories { maven("https://dl.cloudsmith.io/public/abeta-dev/kmp/maven/") } dependencies { implementation(project.dependencies.platform("io.github.abeta-dev:bom:0.7.0-SNAPSHOT")) implementation("io.github.abeta-dev:sdui-layout") } ``` Inside this monorepo, `abeta.kmpLocalBuild=true` substitutes `io.github.abeta-dev:*` with local Gradle projects; pass `-Pabeta.kmpLocalBuild=false` to resolve published artifacts. ### Apple SwiftPM (`Abeta-dev/kmp-spm` — 4 Products) ```swift // Package.swift — or Xcode -> File -> Add Package Dependencies... dependencies: [ .package(url: "https://github.com/Abeta-dev/kmp-spm", from: "0.7.0"), ] // 4 Products: // - iOS/iPadOS 15+: import AbetaSduiSwiftUI (SwiftUI wrapper) or import AbetaSduiKit (binary XCFramework) // - watchOS 9+: import AbetaWatchSwiftUI (SwiftUI renderer) or import AbetaWatchKit (binary XCFramework) ``` ### Go Module Proxy (`proxy.golang.org` — 8 Exportable `pkg/sdui/*` Packages) ```bash go get github.com/abeta-dev/kmp/bff@v0.9.0 ``` ```go import ( "github.com/abeta-dev/kmp/bff/pkg/sdui/actions" "github.com/abeta-dev/kmp/bff/pkg/sdui/analytics" "github.com/abeta-dev/kmp/bff/pkg/sdui/atoms" "github.com/abeta-dev/kmp/bff/pkg/sdui/cache" "github.com/abeta-dev/kmp/bff/pkg/sdui/molecules" "github.com/abeta-dev/kmp/bff/pkg/sdui/server" "github.com/abeta-dev/kmp/bff/pkg/sdui/snippets" "github.com/abeta-dev/kmp/bff/pkg/sdui/theming" ) ``` ### Docker Images (GHCR) ```bash docker pull ghcr.io/abeta-dev/layout-engine:0.4.0 docker pull ghcr.io/abeta-dev/sdui-bff:0.4.0 ``` --- ## 5. 7-in-1 Super-App Showcase Launcher & 20-Story End-to-End Storybook ### 7-in-1 Super-App Showcase (`kmp/sample-app` + `Abeta-dev/sdui-bff`) | Showcase App | Vertical Category | Tenant ID | Entry & Sub-Screens | Theme Preset | Highlighted SDUI Patterns | | :--- | :--- | :--- | :--- | :--- | :--- | | **Abeta Fresh** | 8-Min Quick-Commerce Grocery | `abeta-fresh` | `fresh-home` | `EMERALD` | `search_bar`, express perks `marquee_strip`, `chip_group`, Flash Drop `nudge_bar` (`CountdownAtom` + `WIGGLE`), molded `composed_block` (`loyalty_stamp_card`), responsive `product_card` grid + `UiStepper`, `FloatingCartDockHost` (`$15` free-delivery threshold nudge), express `celebration` | | **Abeta Bites** | Restaurant & Food Delivery | `abeta-bites` | `bites-home`, `bites-restaurant`, `bites-order-track` | `AMBER` | `search_bar`, cuisine `chip_group`, promo `carousel`, restaurant menu `product_card` grid, animated 4-step `order_tracker` (`#BTS-4091`, live `CountdownAtom` ETA, rider card & actions) | | **Abeta Pulse** | Live Events, Concerts & Cinema | `abeta-pulse` | `pulse-home`, `pulse-event-detail` | `INDIGO` | `search_bar`, category `chip_group`, urgency `nudge_bar` with `CountdownAtom`, event `card_v1` discovery, seat/tier booking flow with `celebration` overlay | | **Abeta Mart** | Multi-Category Retail Marketplace | `abeta-mart` | `mart-home`, `mart-product-detail` | `AMBER` | `search_bar`, perks `marquee_strip`, department `chip_group`, lightning-deals `carousel`, `product_card` grid, `accordion` specs & reviews, OS `share` action | | **Abeta Spark** | Swipe-Based Profile Discovery | `abeta-spark` | `spark-deck`, `spark-matches` | `INDIGO` | Prime Boost `nudge_bar` (`HEARTBEAT` badge), interest `chip_group`, stacked gesture `swipe_deck` (`on_like`/`on_nope`/`on_super_like`), mutual match `celebration` & matches inbox | | **Abeta Trade** | B2B Wholesale & Direct RFQ | `abeta-trade` | `trade-home`, `trade-supplier`, `trade-quotes`, `trade-po-track` | `EMERALD` | `search_bar`, verification `chip_group`, molded `composed_block` (`moq_bulk_savings_card`), MOQ `metric_card`, supplier directory, validated `form_v1` RFQ, 3-factory quote comparison, 4-stage freight PO tracker | | **Abeta Pay** | Fintech, Wallet, Virtual Card & P2P | `abeta-pay` | `pay-home`, `pay-transfer`, `pay-cards`, `pay-receipt` | `INDIGO` | `UiRollingCounter` wallet balance, FX/cashback `marquee_strip`, Zero-Fee cashback `nudge_bar` + `CountdownAtom`, molded `composed_block` Metal Virtual Card, `biometric_auth` P2P transfer, smart card `UiSwitch`/`UiSlider` controls, 4-stage `#PAY-3081` settlement tracker | Built-in screens in `bff/internal/infra/screen_repo.go` (**12 screens**): `home`, `catalog`, `containers`, `profile`, `form-demo`, `fresh-home`, `store-home`, `watch-status`, `pay-home`, `pay-transfer`, `pay-cards`, `pay-receipt`. (Full 7-vertical multi-screen offline demos live in `kmp/sample-app`, `kmp/storybook`, and sibling `Abeta-dev/sdui-bff`.) ### Interactive 20-Story End-to-End Storybook (`kmp/storybook`) 5 categories across Desktop JVM, WasmJS Browser (`?story=&app=` deep linking), macOS Cocoa, and iOS (`AbetaStorybookKit.xcframework`): - **Live Super-App Demos**: `super-app-demos` — all 7 multi-screen Super-App verticals (**Abeta Fresh**, **Abeta Bites**, **Abeta Pulse**, **Abeta Mart**, **Abeta Spark**, **Abeta Trade**, **Abeta Pay**) + **Abeta Watch** running interactively in browser with zero backend required, live `?q=` search & `?filter=` chip filtering, Phone/Tablet/Full viewport switcher, Live Analytics Event Stream, and celebration overlays - **Foundations**: `introduction`, `design-tokens` (WCAG contrast, 17 type roles, 3 theme presets) - **UI Atoms (8 stories covering all 31 atoms)**: `atom-button`, `atom-text-tag`, `atom-text-field`, `atom-media-feedback` (incl. `UiMediaPager`), `atom-controls-data`, `atom-selection-otp` (`UiRadioGroup`, `UiSelect`, `UiOtpInput`, `UiChip`, `UiSegmentedControl`), `atom-commerce-fintech` (`UiPrice`, `UiRating`, `UiKeyValueRow`, ISO/IEC 18004 `UiQrCode`, `UiStepper`), `atom-feedback-telemetry` (`UiBadge`, `UiAlertBanner`, `UiStatTile`, `UiCountdown`, `UiRollingCounter`) - **SDUI Snippets**: `sdui-snippets` ("All 23 Snippets" via `BuiltInSnippetModule`, incl. `custom_slot` & `graph_canvas`) - **Playground**: `sdui-playground`, `motion-store`, `live-bff-explorer` (Built-in Demo Backend + Remote Go BFF), `responsive-bridges` (incl. **Voice & Desktop OS Bridges**), `discovery-search` (`SwipeDeck`, `SearchBar`, `ChipGroup`), `animation-nudges` (**Animation & Nudges Lab** — 7 motion loops, `UiRollingCounter`, `UiCountdown`, cart threshold nudge, `order_tracker`), `snippet-crafter` (**Atomic Snippet Crafter** — live `ComposedBlock` visual builder & wire JSON inspector), `e2e-journeys` (**End-to-End App Journeys** — multi-step Abeta Fresh, Spark & Trade walkthroughs) --- ## 6. Verification & Developer Commands ```bash # 1. Brand/path hygiene & Uncle Bob Dependency Rule + BOM + ABI + Wire Parity + Code Owners ./scripts/check_brand_hygiene.sh ./scripts/check_architecture_and_owners.sh # 2. KMP format, Detekt, ABI apiCheck, compile & unit/golden/compose.uiTest suites (JDK 21) (cd kmp && ./gradlew check) # 3. Sample App headless smoke checks (core kit + all 7 Super-App verticals) (cd kmp && ./gradlew :sample-app:run --args="--headless") (cd kmp && ./gradlew :sample-app:run --args="--headless --verticals") # 4. Launch Desktop Showcase or Storybook (offline or connected to live Go BFF) (cd kmp && ./gradlew :sample-app:run --args="--verticals --bff-url http://localhost:8080") (cd kmp && ./gradlew :storybook:run) (cd kmp && ./gradlew :storybook:wasmJsBrowserDevelopmentRun) # 5. Export Retina Compose screenshots (Demo, Super-App Verticals, Storybook) (cd kmp && ./gradlew :sample-app:run --args="--capture-screenshots=../docs/assets/screenshots") (cd kmp && ./gradlew :sample-app:run --args="--capture-verticals=../docs/assets/screenshots") (cd kmp && ./gradlew :storybook:run --args="--capture-screenshots=../docs/assets/screenshots") # 6. ABI baseline dump, Dokka v2 HTML docs & Apple XCFrameworks (cd kmp && ./gradlew apiDump) (cd kmp && ./gradlew dokkaGenerateHtml) (cd kmp && ./gradlew :sdui-layout:assembleAbetaSduiKitXCFramework :watch-companion:assembleAbetaWatchKitXCFramework :storybook:assembleAbetaStorybookKitXCFramework) # 7. Go 1.26.0 SDUI BFF vet, race tests & local server (OpenAPI at /openapi.json, Scalar at /docs) (cd bff && go vet ./... && go test -race -cover ./...) (cd bff && go run ./cmd/bff) # 8. Full monorepo verification gate ./scripts/verify_all.sh ```