openuispec 0.1.18 → 0.1.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/README.md +52 -34
  2. package/cli/index.ts +1 -1
  3. package/cli/init.ts +48 -211
  4. package/docs/stress-test-maturity-report.md +97 -0
  5. package/examples/todo-orbit/AGENTS.md +127 -0
  6. package/examples/todo-orbit/CLAUDE.md +75 -0
  7. package/examples/todo-orbit/README.md +62 -0
  8. package/examples/todo-orbit/generated/android/Todo Orbit/README.md +14 -0
  9. package/examples/todo-orbit/generated/android/Todo Orbit/app/build.gradle.kts +58 -0
  10. package/examples/todo-orbit/generated/android/Todo Orbit/app/proguard-rules.pro +1 -0
  11. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/AndroidManifest.xml +20 -0
  12. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/MainActivity.kt +14 -0
  13. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/TodoOrbitApp.kt +345 -0
  14. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/support/AppLogic.kt +231 -0
  15. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/support/Models.kt +169 -0
  16. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/support/Strings.kt +8 -0
  17. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/ui/components/CommonComponents.kt +185 -0
  18. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/ui/screens/AnalyticsScreen.kt +193 -0
  19. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/ui/screens/SettingsScreen.kt +102 -0
  20. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/ui/screens/TasksScreen.kt +342 -0
  21. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/ui/sheets/EditorSheets.kt +344 -0
  22. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/ui/theme/TodoOrbitTheme.kt +59 -0
  23. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/res/values/strings.xml +148 -0
  24. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/res/values-ru/strings.xml +154 -0
  25. package/examples/todo-orbit/generated/android/Todo Orbit/build.gradle.kts +4 -0
  26. package/examples/todo-orbit/generated/android/Todo Orbit/gradle/wrapper/gradle-wrapper.jar +0 -0
  27. package/examples/todo-orbit/generated/android/Todo Orbit/gradle/wrapper/gradle-wrapper.properties +7 -0
  28. package/examples/todo-orbit/generated/android/Todo Orbit/gradle.properties +4 -0
  29. package/examples/todo-orbit/generated/android/Todo Orbit/gradlew +248 -0
  30. package/examples/todo-orbit/generated/android/Todo Orbit/gradlew.bat +93 -0
  31. package/examples/todo-orbit/generated/android/Todo Orbit/settings.gradle.kts +18 -0
  32. package/examples/todo-orbit/generated/ios/Todo Orbit/README.md +29 -0
  33. package/examples/todo-orbit/generated/ios/Todo Orbit/Resources/en.lproj/Localizable.strings +118 -0
  34. package/examples/todo-orbit/generated/ios/Todo Orbit/Resources/ru.lproj/Localizable.strings +118 -0
  35. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/App/TodoOrbitApp.swift +50 -0
  36. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Components/OrbitChrome.swift +204 -0
  37. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Components/SchedulePreviewView.swift +126 -0
  38. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Components/TrendChartView.swift +70 -0
  39. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Flows/RecurringRuleSheet.swift +123 -0
  40. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Flows/TaskEditorSheet.swift +60 -0
  41. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Models/DomainModels.swift +238 -0
  42. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Screens/AnalyticsView.swift +94 -0
  43. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Screens/SettingsView.swift +74 -0
  44. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Screens/TasksHomeView.swift +363 -0
  45. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Support/AppModel.swift +324 -0
  46. package/examples/todo-orbit/generated/ios/Todo Orbit/TodoOrbit.xcodeproj/project.pbxproj +408 -0
  47. package/examples/todo-orbit/generated/ios/Todo Orbit/TodoOrbit.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  48. package/examples/todo-orbit/generated/ios/Todo Orbit/TodoOrbit.xcodeproj/xcshareddata/xcschemes/TodoOrbit.xcscheme +79 -0
  49. package/examples/todo-orbit/generated/ios/Todo Orbit/project.yml +24 -0
  50. package/examples/todo-orbit/generated/web/Todo Orbit/index.html +16 -0
  51. package/examples/todo-orbit/generated/web/Todo Orbit/package-lock.json +1087 -0
  52. package/examples/todo-orbit/generated/web/Todo Orbit/package.json +24 -0
  53. package/examples/todo-orbit/generated/web/Todo Orbit/src/App.tsx +2114 -0
  54. package/examples/todo-orbit/generated/web/Todo Orbit/src/main.tsx +13 -0
  55. package/examples/todo-orbit/generated/web/Todo Orbit/src/styles.css +886 -0
  56. package/examples/todo-orbit/generated/web/Todo Orbit/tsconfig.json +19 -0
  57. package/examples/todo-orbit/generated/web/Todo Orbit/vite.config.ts +6 -0
  58. package/examples/todo-orbit/openuispec/README.md +158 -0
  59. package/examples/todo-orbit/openuispec/contracts/.gitkeep +0 -0
  60. package/examples/todo-orbit/openuispec/contracts/action_trigger.yaml +28 -0
  61. package/examples/todo-orbit/openuispec/contracts/collection.yaml +32 -0
  62. package/examples/todo-orbit/openuispec/contracts/data_display.yaml +38 -0
  63. package/examples/todo-orbit/openuispec/contracts/feedback.yaml +32 -0
  64. package/examples/todo-orbit/openuispec/contracts/input_field.yaml +52 -0
  65. package/examples/todo-orbit/openuispec/contracts/nav_container.yaml +47 -0
  66. package/examples/todo-orbit/openuispec/contracts/surface.yaml +28 -0
  67. package/examples/todo-orbit/openuispec/contracts/x_schedule_preview.yaml +134 -0
  68. package/examples/todo-orbit/openuispec/contracts/x_task_trend_chart.yaml +139 -0
  69. package/examples/todo-orbit/openuispec/flows/.gitkeep +0 -0
  70. package/examples/todo-orbit/openuispec/flows/create_recurring_rule.yaml +253 -0
  71. package/examples/todo-orbit/openuispec/flows/create_task.yaml +118 -0
  72. package/examples/todo-orbit/openuispec/flows/edit_task.yaml +126 -0
  73. package/examples/todo-orbit/openuispec/locales/.gitkeep +0 -0
  74. package/examples/todo-orbit/openuispec/locales/en.json +150 -0
  75. package/examples/todo-orbit/openuispec/locales/ru.json +150 -0
  76. package/examples/todo-orbit/openuispec/openuispec.yaml +122 -0
  77. package/examples/todo-orbit/openuispec/platform/.gitkeep +0 -0
  78. package/examples/todo-orbit/openuispec/platform/android.yaml +19 -0
  79. package/examples/todo-orbit/openuispec/platform/ios.yaml +20 -0
  80. package/examples/todo-orbit/openuispec/platform/web.yaml +22 -0
  81. package/examples/todo-orbit/openuispec/screens/.gitkeep +0 -0
  82. package/examples/todo-orbit/openuispec/screens/analytics.yaml +140 -0
  83. package/examples/todo-orbit/openuispec/screens/home.yaml +173 -0
  84. package/examples/todo-orbit/openuispec/screens/settings.yaml +149 -0
  85. package/examples/todo-orbit/openuispec/screens/task_detail.yaml +223 -0
  86. package/examples/todo-orbit/openuispec/tokens/.gitkeep +0 -0
  87. package/examples/todo-orbit/openuispec/tokens/color.yaml +93 -0
  88. package/examples/todo-orbit/openuispec/tokens/elevation.yaml +25 -0
  89. package/examples/todo-orbit/openuispec/tokens/icons.yaml +92 -0
  90. package/examples/todo-orbit/openuispec/tokens/layout.yaml +107 -0
  91. package/examples/todo-orbit/openuispec/tokens/motion.yaml +39 -0
  92. package/examples/todo-orbit/openuispec/tokens/spacing.yaml +18 -0
  93. package/examples/todo-orbit/openuispec/tokens/themes.yaml +23 -0
  94. package/examples/todo-orbit/openuispec/tokens/typography.yaml +52 -0
  95. package/package.json +1 -1
  96. package/schema/screen.schema.json +9 -0
  97. package/schema/validate.ts +0 -2
  98. package/spec/openuispec-v0.1.md +129 -27
@@ -0,0 +1,127 @@
1
+ # OpenUISpec — AI Assistant Rules
2
+ # ================================
3
+ # This project uses OpenUISpec to define UI as a semantic spec.
4
+ # Spec files are the single source of truth for all UI across platforms.
5
+ # Targets: "ios", "android", "web"
6
+
7
+ ## What is OpenUISpec
8
+ OpenUISpec is a YAML-based spec format that describes an app's UI semantically — tokens, screens, flows, and platform overrides. AI reads the spec and generates native code (SwiftUI, Compose, React). AI reads native code and updates the spec. The spec is the sync layer between platforms.
9
+
10
+ ## Spec location
11
+ - Spec root: `openuispec/`
12
+ - Manifest: `openuispec/openuispec.yaml` — always read this first.
13
+ - Tokens: `openuispec/tokens/` — colors, typography, spacing, motion, icons, themes
14
+ - Screens: `openuispec/screens/` — one YAML file per screen
15
+ - Flows: `openuispec/flows/` — multi-step navigation journeys
16
+ - Contracts: `openuispec/contracts/` — UI component definitions
17
+ - Platform: `openuispec/platform/` — per-target overrides (iOS, Android, Web)
18
+ - Locales: `openuispec/locales/` — i18n strings (JSON, ICU MessageFormat)
19
+
20
+ **Note:** These are the default paths. Actual paths are in `includes:` in `openuispec.yaml` and may use relative paths (e.g. `../../shared/locales`). Always read `openuispec.yaml` to find the real directories.
21
+
22
+ ## If spec directories are empty (first-time setup)
23
+ This means the project has existing UI code but hasn't been specced yet. Your job:
24
+
25
+ 1. **Find existing screens** — scan the codebase for UI screen files (SwiftUI views, Compose screens, React components/pages).
26
+ 2. **Create stubs** — for each screen, create `openuispec/screens/<name>.yaml` with:
27
+ ```yaml
28
+ screen_name:
29
+ semantic: "Brief description of what this screen does"
30
+ status: stub
31
+ layout:
32
+ type: scroll_vertical
33
+ ```
34
+ 3. **Extract tokens** — scan the codebase for colors, fonts, spacing values and create token files in `openuispec/tokens/`.
35
+ 4. **Update the manifest** — fill in `data_model` and `api.endpoints` in `openuispec/openuispec.yaml` based on the existing code.
36
+ 5. **Spec screens on demand** — when the user asks to spec a screen, read the native code, create a full spec, and change `status: draft` → `ready`.
37
+
38
+ ## Screen and flow status
39
+ - `stub` — placeholder, not yet specced. Drift detection skips these.
40
+ - `draft` — actively being specced. Tracked by drift.
41
+ - `ready` — fully specified (default if omitted). Tracked by drift.
42
+
43
+ ## Making UI changes
44
+ 1. Read the relevant spec files before modifying any UI code.
45
+ 2. If the change requires a spec update, modify the spec FIRST, then update code.
46
+ 3. Never modify generated code without updating the spec.
47
+ 4. When adding a new screen, create the corresponding spec file.
48
+ 5. When removing a screen, remove the spec file and update flow references.
49
+
50
+ ## After modifying spec files
51
+ 1. Run `openuispec validate` to check specs against the schema.
52
+ 2. Run `openuispec drift --snapshot --target <target>` for each affected platform.
53
+ 3. Run `openuispec drift` to verify no untracked drift remains.
54
+
55
+ ## Learning OpenUISpec — where to find the docs
56
+ All documentation is in the installed `openuispec` package. Search in this order:
57
+ 1. **Local:** `node_modules/openuispec/` (project dependency)
58
+ 2. **Global:** run `npm root -g` to get the global prefix, then look in `<prefix>/openuispec/`
59
+ 3. **Online fallback:** if not installed, fetch from:
60
+ - `https://openuispec.rsteam.uz/llms-full.txt` — complete spec + all JSON schemas
61
+ - `https://openuispec.rsteam.uz/llms.txt` — concise summary with links
62
+
63
+ Inside the package:
64
+ 1. **Full specification:** `spec/openuispec-v0.1.md` — the complete spec (read this to understand the format)
65
+ 2. **Example app:** `examples/taskflow/` — a complete working app with all file types
66
+ 3. **JSON Schemas:** `schema/` — validation schemas that define the exact structure of every file type
67
+
68
+ ## Token file structure — root wrapper key required
69
+ Every token file must have a single root key matching the token type. Do NOT put properties at the top level.
70
+ - `tokens/color.yaml` → root key: `color`
71
+ - `tokens/typography.yaml` → root key: `typography`
72
+ - `tokens/spacing.yaml` → root key: `spacing`
73
+ - `tokens/elevation.yaml` → root key: `elevation`
74
+ - `tokens/motion.yaml` → root key: `motion`
75
+ - `tokens/layout.yaml` → root key: `layout`
76
+ - `tokens/themes.yaml` → root key: `themes`
77
+ - `tokens/icons.yaml` → root key: `icons`
78
+
79
+ ## File formats and schemas — read before creating spec files
80
+ Before creating or editing any spec file, read the corresponding JSON Schema. Do not guess the file format.
81
+
82
+ | File | Schema (in `schema/` inside the installed package) | Root key |
83
+ |------|--------|----------|
84
+ | `openuispec.yaml` | `openuispec.schema.json` | `spec_version` |
85
+ | `screens/*.yaml` | `screen.schema.json` | `<screen_id>` |
86
+ | `flows/*.yaml` | `flow.schema.json` | `<flow_id>` |
87
+ | `platform/*.yaml` | `platform.schema.json` | `platform` |
88
+ | `locales/*.json` | `locale.schema.json` | (object) |
89
+ | `contracts/x_*.yaml` | `custom-contract.schema.json` | `contract` |
90
+ | `tokens/color.yaml` | `tokens/color.schema.json` | `color` |
91
+ | `tokens/typography.yaml` | `tokens/typography.schema.json` | `typography` |
92
+ | `tokens/spacing.yaml` | `tokens/spacing.schema.json` | `spacing` |
93
+ | `tokens/elevation.yaml` | `tokens/elevation.schema.json` | `elevation` |
94
+ | `tokens/motion.yaml` | `tokens/motion.schema.json` | `motion` |
95
+ | `tokens/layout.yaml` | `tokens/layout.schema.json` | `layout` |
96
+ | `tokens/themes.yaml` | `tokens/themes.schema.json` | `themes` |
97
+ | `tokens/icons.yaml` | `tokens/icons.schema.json` | `icons` |
98
+
99
+ Shared type definitions (actions, data-binding, adaptive, validation, common) are in `schema/defs/`.
100
+
101
+ Workflow: read the schema → read an example from `examples/taskflow/` → create the YAML → run `openuispec validate`.
102
+
103
+ ## Spec format reference
104
+ - 7 contract families: nav_container, surface, action_trigger, input_field, data_display, collection, feedback
105
+ - Custom contracts: prefixed with `x_` (e.g., `x_media_player`)
106
+ - Data binding: `$data:`, `$state:`, `$param:`, `$t:` prefixes
107
+ - Actions: typed objects (navigate, api_call, set_state, confirm, sequence, feedback, etc.)
108
+ - Adaptive layout: size classes (compact, regular, expanded) with per-section overrides
109
+
110
+ ## Output directories
111
+ Drift tracks spec changes per target. By default state is stored in `generated/<target>/<project>/`.
112
+ To map targets to actual code directories, set `generation.output_dir` in `openuispec.yaml`:
113
+ ```yaml
114
+ generation:
115
+ output_dir:
116
+ web: "../web-ui/"
117
+ android: "../kmp-ui/"
118
+ ios: "../kmp-ui/iosApp/"
119
+ ```
120
+ Paths are relative to `openuispec.yaml`. The `.openuispec-state.json` file is stored inside each output directory.
121
+
122
+ ## CLI commands
123
+ - `openuispec init` — scaffold a new spec project
124
+ - `openuispec validate [group...]` — validate spec files against schemas
125
+ - `openuispec drift --target <t>` — check for spec drift
126
+ - `openuispec drift --snapshot --target <t>` — snapshot current state
127
+ - `openuispec drift --all` — include stubs in drift check
@@ -0,0 +1,75 @@
1
+ # OpenUISpec — AI Assistant Rules
2
+ # ================================
3
+ # This project uses OpenUISpec to define UI as a semantic spec.
4
+ # Spec files are the single source of truth for all UI across platforms.
5
+ # Targets: "ios", "android", "web"
6
+
7
+ ## IMPORTANT — Read the specification before working with spec files
8
+
9
+ The spec format, file schemas, and generation rules are defined in the installed `openuispec` package.
10
+ You MUST read the reference files listed below before creating, editing, or generating from any spec file.
11
+ Do NOT guess the file format — skipping this step will produce invalid YAML that fails validation.
12
+
13
+ **Find the package in this order:**
14
+ 1. `node_modules/openuispec/` (project dependency)
15
+ 2. Run `npm root -g` → `<prefix>/openuispec/` (global install)
16
+ 3. Online: `https://openuispec.rsteam.uz/llms-full.txt` (if not installed)
17
+
18
+ **Reference files inside the package (read in this order):**
19
+ 1. `README.md` — schema tables, file format reference, root wrapper keys
20
+ 2. `spec/openuispec-v0.1.md` — full specification (contracts, layout, expressions, adaptive, etc.)
21
+ 3. `examples/taskflow/` — complete working example with all file types
22
+ 4. `schema/` — JSON Schemas for every file type
23
+
24
+ These files are updated with each package version. Always read from the installed package,
25
+ not from cached or memorized content, to ensure you use the latest spec.
26
+
27
+ ## What is OpenUISpec
28
+ OpenUISpec is a YAML-based spec format that describes an app's UI semantically — tokens, screens, flows, and platform overrides. AI reads the spec and generates native code (SwiftUI, Compose, React). AI reads native code and updates the spec. The spec is the sync layer between platforms.
29
+
30
+ ## Spec location
31
+ - Spec root: `openuispec/`
32
+ - Manifest: `openuispec/openuispec.yaml` — always read this first.
33
+ - Tokens: `openuispec/tokens/`
34
+ - Screens: `openuispec/screens/`
35
+ - Flows: `openuispec/flows/`
36
+ - Contracts: `openuispec/contracts/`
37
+ - Platform: `openuispec/platform/`
38
+ - Locales: `openuispec/locales/`
39
+
40
+ **Note:** These are the default paths. Actual paths are in `includes:` in `openuispec.yaml` and may use relative paths. Always read `openuispec.yaml` to find the real directories.
41
+
42
+ ## If spec directories are empty (first-time setup)
43
+ This means the project has existing UI code but hasn't been specced yet. Your job:
44
+
45
+ 1. **Read the spec first** — find and read `spec/openuispec-v0.1.md` from the installed package.
46
+ 2. **Find existing screens** — scan the codebase for UI screen files.
47
+ 3. **Create stubs** — for each screen, create `openuispec/screens/<name>.yaml` with:
48
+ ```yaml
49
+ screen_name:
50
+ semantic: "Brief description of what this screen does"
51
+ status: stub
52
+ layout:
53
+ type: scroll_vertical
54
+ ```
55
+ 4. **Extract tokens** — scan for colors, fonts, spacing and create files in `openuispec/tokens/`.
56
+ 5. **Update the manifest** — fill in `data_model` and `api.endpoints` in `openuispec/openuispec.yaml`.
57
+
58
+ ## Making UI changes
59
+ 1. Read the relevant spec files before modifying any UI code.
60
+ 2. If the change requires a spec update, modify the spec FIRST, then update code.
61
+ 3. Never modify generated code without updating the spec.
62
+ 4. When adding a new screen, create the corresponding spec file.
63
+ 5. When removing a screen, remove the spec file and update flow references.
64
+
65
+ ## After modifying spec files
66
+ 1. Run `openuispec validate` to check specs against the schema.
67
+ 2. Run `openuispec drift --snapshot --target <target>` for each affected platform.
68
+ 3. Run `openuispec drift` to verify no untracked drift remains.
69
+
70
+ ## CLI commands
71
+ - `openuispec init` — scaffold a new spec project
72
+ - `openuispec validate [group...]` — validate spec files against schemas
73
+ - `openuispec drift --target <t>` — check for spec drift
74
+ - `openuispec drift --snapshot --target <t>` — snapshot current state
75
+ - `openuispec drift --all` — include stubs in drift check
@@ -0,0 +1,62 @@
1
+ # Todo Orbit
2
+
3
+ Todo Orbit is a multi-platform sample project for OpenUISpec. It combines a source spec with generated iOS, Android, and web outputs so the repository can demonstrate the full workflow from semantic UI definition to platform-native code.
4
+
5
+ ## What this sample covers
6
+
7
+ - Task management screens with search, filtering, and detail views
8
+ - Analytics and trend visualization
9
+ - Settings with language and theme preferences
10
+ - Create and edit task flows
11
+ - Recurring-rule creation with conditional fields and validation
12
+ - Bilingual localization with English and Russian
13
+ - Custom contracts for schedule preview and task trend charts
14
+
15
+ ## Project layout
16
+
17
+ | Path | Purpose |
18
+ |------|---------|
19
+ | [`openuispec/`](./openuispec/) | Source OpenUISpec project: manifest, tokens, screens, flows, contracts, locales |
20
+ | [`generated/web/Todo Orbit/`](./generated/web/Todo%20Orbit/) | Generated React + Vite web app |
21
+ | [`generated/ios/Todo Orbit/`](./generated/ios/Todo%20Orbit/) | Generated SwiftUI iOS target |
22
+ | [`generated/android/Todo Orbit/`](./generated/android/Todo%20Orbit/) | Generated Jetpack Compose Android target |
23
+ | [`artifacts/screenshots/`](./artifacts/screenshots/) | Reference screenshots from generated outputs |
24
+
25
+ ## Start here
26
+
27
+ If you want to understand the sample at the spec level, open [`openuispec/openuispec.yaml`](./openuispec/openuispec.yaml). That manifest defines the project structure, data model, API surface, localization setup, and generation targets.
28
+
29
+ For spec authoring details, see [`openuispec/README.md`](./openuispec/README.md).
30
+
31
+ ## Running the generated web app
32
+
33
+ ```bash
34
+ cd examples/todo-orbit/generated/web/'Todo Orbit'
35
+ npm install
36
+ npm run dev
37
+ ```
38
+
39
+ ## Opening the native targets
40
+
41
+ - iOS: open [`generated/ios/Todo Orbit/`](./generated/ios/Todo%20Orbit/) in Xcode using `TodoOrbit.xcodeproj`
42
+ - Android: open [`generated/android/Todo Orbit/`](./generated/android/Todo%20Orbit/) in Android Studio
43
+
44
+ Platform-specific notes are documented in:
45
+
46
+ - [`generated/ios/Todo Orbit/README.md`](./generated/ios/Todo%20Orbit/README.md)
47
+ - [`generated/android/Todo Orbit/README.md`](./generated/android/Todo%20Orbit/README.md)
48
+
49
+ ## Screenshots
50
+
51
+ Examples of the generated output are available in [`artifacts/screenshots/`](./artifacts/screenshots/):
52
+
53
+ - `web-home.png`
54
+ - `web-analytics.png`
55
+ - `web-settings.png`
56
+ - `android-home.png`
57
+ - `android-analytics.png`
58
+ - `android-settings.png`
59
+
60
+ ## Why this sample exists
61
+
62
+ TaskFlow is the compact reference example in this repository. Todo Orbit is the broader showcase: it exercises localization, custom contracts, richer flows, and generated outputs across all three supported targets.
@@ -0,0 +1,14 @@
1
+ # Todo Orbit Android
2
+
3
+ Generated Android target for the OpenUISpec Todo Orbit project.
4
+
5
+ ## Structure
6
+
7
+ - `app/` — Android application module
8
+ - `app/src/main/java/uz/rsteam/todoorbit/MainActivity.kt` — Compose app scaffold
9
+ - `app/src/main/java/uz/rsteam/todoorbit/ui/theme/TodoOrbitTheme.kt` — light/dark theme mapped from spec tokens
10
+
11
+ ## Notes
12
+
13
+ - The project models the current OpenUISpec surface: tasks, analytics, settings, create/edit flows, recurring rule flow, bilingual strings, theme switching, and the two custom contracts (`x_task_trend_chart`, `x_schedule_preview`).
14
+ - Build verification was limited by the local environment: `gradle`, `kotlinc`, and `sdkmanager` were not installed in the workspace session, so this target was generated as a credible Gradle/Compose project but not compiled here.
@@ -0,0 +1,58 @@
1
+ plugins {
2
+ id("com.android.application")
3
+ id("org.jetbrains.kotlin.plugin.compose")
4
+ }
5
+
6
+ android {
7
+ namespace = "uz.rsteam.todoorbit"
8
+ compileSdk = 36
9
+
10
+ defaultConfig {
11
+ applicationId = "uz.rsteam.todoorbit"
12
+ minSdk = 26
13
+ targetSdk = 35
14
+ versionCode = 1
15
+ versionName = "0.1.0"
16
+ }
17
+
18
+ buildTypes {
19
+ release {
20
+ isMinifyEnabled = false
21
+ proguardFiles(
22
+ getDefaultProguardFile("proguard-android-optimize.txt"),
23
+ "proguard-rules.pro"
24
+ )
25
+ }
26
+ }
27
+
28
+ compileOptions {
29
+ sourceCompatibility = JavaVersion.VERSION_17
30
+ targetCompatibility = JavaVersion.VERSION_17
31
+ }
32
+
33
+ buildFeatures {
34
+ compose = true
35
+ }
36
+
37
+ packaging {
38
+ resources {
39
+ excludes += "/META-INF/{AL2.0,LGPL2.1}"
40
+ }
41
+ }
42
+ }
43
+
44
+ dependencies {
45
+ implementation(platform("androidx.compose:compose-bom:2026.03.00"))
46
+ implementation("androidx.appcompat:appcompat:1.7.1")
47
+ implementation("androidx.core:core-ktx:1.16.0")
48
+ implementation("androidx.activity:activity-compose:1.11.0")
49
+ implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.9.4")
50
+ implementation("androidx.compose.ui:ui")
51
+ implementation("androidx.compose.ui:ui-tooling-preview")
52
+ implementation("androidx.compose.foundation:foundation")
53
+ implementation("androidx.compose.material3:material3")
54
+ implementation("androidx.compose.material:material-icons-extended")
55
+
56
+ debugImplementation("androidx.compose.ui:ui-tooling")
57
+ debugImplementation("androidx.compose.ui:ui-test-manifest")
58
+ }
@@ -0,0 +1 @@
1
+ # Intentionally minimal for generated demo output.
@@ -0,0 +1,20 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
3
+
4
+ <application
5
+ android:allowBackup="true"
6
+ android:label="@string/app_name"
7
+ android:supportsRtl="true"
8
+ android:theme="@android:style/Theme.Material.Light.NoActionBar">
9
+ <activity
10
+ android:name=".MainActivity"
11
+ android:exported="true">
12
+ <intent-filter>
13
+ <action android:name="android.intent.action.MAIN" />
14
+
15
+ <category android:name="android.intent.category.LAUNCHER" />
16
+ </intent-filter>
17
+ </activity>
18
+ </application>
19
+
20
+ </manifest>
@@ -0,0 +1,14 @@
1
+ package uz.rsteam.todoorbit
2
+
3
+ import android.os.Bundle
4
+ import androidx.activity.ComponentActivity
5
+ import androidx.activity.compose.setContent
6
+
7
+ class MainActivity : ComponentActivity() {
8
+ override fun onCreate(savedInstanceState: Bundle?) {
9
+ super.onCreate(savedInstanceState)
10
+ setContent {
11
+ TodoOrbitGeneratedApp()
12
+ }
13
+ }
14
+ }