openuispec 0.1.18 → 0.1.19
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.
- package/README.md +52 -34
- package/cli/index.ts +1 -1
- package/docs/stress-test-maturity-report.md +97 -0
- package/examples/todo-orbit/AGENTS.md +127 -0
- package/examples/todo-orbit/CLAUDE.md +127 -0
- package/examples/todo-orbit/README.md +62 -0
- package/examples/todo-orbit/generated/android/Todo Orbit/README.md +14 -0
- package/examples/todo-orbit/generated/android/Todo Orbit/app/build.gradle.kts +58 -0
- package/examples/todo-orbit/generated/android/Todo Orbit/app/proguard-rules.pro +1 -0
- package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/AndroidManifest.xml +20 -0
- package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/MainActivity.kt +14 -0
- package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/TodoOrbitApp.kt +345 -0
- package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/support/AppLogic.kt +231 -0
- package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/support/Models.kt +169 -0
- package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/support/Strings.kt +8 -0
- package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/ui/components/CommonComponents.kt +185 -0
- package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/ui/screens/AnalyticsScreen.kt +193 -0
- package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/ui/screens/SettingsScreen.kt +102 -0
- package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/ui/screens/TasksScreen.kt +342 -0
- package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/ui/sheets/EditorSheets.kt +344 -0
- package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/ui/theme/TodoOrbitTheme.kt +59 -0
- package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/res/values/strings.xml +148 -0
- package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/res/values-ru/strings.xml +154 -0
- package/examples/todo-orbit/generated/android/Todo Orbit/build.gradle.kts +4 -0
- package/examples/todo-orbit/generated/android/Todo Orbit/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/examples/todo-orbit/generated/android/Todo Orbit/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/examples/todo-orbit/generated/android/Todo Orbit/gradle.properties +4 -0
- package/examples/todo-orbit/generated/android/Todo Orbit/gradlew +248 -0
- package/examples/todo-orbit/generated/android/Todo Orbit/gradlew.bat +93 -0
- package/examples/todo-orbit/generated/android/Todo Orbit/settings.gradle.kts +18 -0
- package/examples/todo-orbit/generated/ios/Todo Orbit/README.md +29 -0
- package/examples/todo-orbit/generated/ios/Todo Orbit/Resources/en.lproj/Localizable.strings +118 -0
- package/examples/todo-orbit/generated/ios/Todo Orbit/Resources/ru.lproj/Localizable.strings +118 -0
- package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/App/TodoOrbitApp.swift +50 -0
- package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Components/OrbitChrome.swift +204 -0
- package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Components/SchedulePreviewView.swift +126 -0
- package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Components/TrendChartView.swift +70 -0
- package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Flows/RecurringRuleSheet.swift +123 -0
- package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Flows/TaskEditorSheet.swift +60 -0
- package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Models/DomainModels.swift +238 -0
- package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Screens/AnalyticsView.swift +94 -0
- package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Screens/SettingsView.swift +74 -0
- package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Screens/TasksHomeView.swift +363 -0
- package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Support/AppModel.swift +324 -0
- package/examples/todo-orbit/generated/ios/Todo Orbit/TodoOrbit.xcodeproj/project.pbxproj +408 -0
- package/examples/todo-orbit/generated/ios/Todo Orbit/TodoOrbit.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/examples/todo-orbit/generated/ios/Todo Orbit/TodoOrbit.xcodeproj/xcshareddata/xcschemes/TodoOrbit.xcscheme +79 -0
- package/examples/todo-orbit/generated/ios/Todo Orbit/project.yml +24 -0
- package/examples/todo-orbit/generated/web/Todo Orbit/index.html +16 -0
- package/examples/todo-orbit/generated/web/Todo Orbit/package-lock.json +1087 -0
- package/examples/todo-orbit/generated/web/Todo Orbit/package.json +24 -0
- package/examples/todo-orbit/generated/web/Todo Orbit/src/App.tsx +2114 -0
- package/examples/todo-orbit/generated/web/Todo Orbit/src/main.tsx +13 -0
- package/examples/todo-orbit/generated/web/Todo Orbit/src/styles.css +886 -0
- package/examples/todo-orbit/generated/web/Todo Orbit/tsconfig.json +19 -0
- package/examples/todo-orbit/generated/web/Todo Orbit/vite.config.ts +6 -0
- package/examples/todo-orbit/openuispec/README.md +158 -0
- package/examples/todo-orbit/openuispec/contracts/.gitkeep +0 -0
- package/examples/todo-orbit/openuispec/contracts/action_trigger.yaml +28 -0
- package/examples/todo-orbit/openuispec/contracts/collection.yaml +32 -0
- package/examples/todo-orbit/openuispec/contracts/data_display.yaml +38 -0
- package/examples/todo-orbit/openuispec/contracts/feedback.yaml +32 -0
- package/examples/todo-orbit/openuispec/contracts/input_field.yaml +52 -0
- package/examples/todo-orbit/openuispec/contracts/nav_container.yaml +47 -0
- package/examples/todo-orbit/openuispec/contracts/surface.yaml +28 -0
- package/examples/todo-orbit/openuispec/contracts/x_schedule_preview.yaml +134 -0
- package/examples/todo-orbit/openuispec/contracts/x_task_trend_chart.yaml +139 -0
- package/examples/todo-orbit/openuispec/flows/.gitkeep +0 -0
- package/examples/todo-orbit/openuispec/flows/create_recurring_rule.yaml +253 -0
- package/examples/todo-orbit/openuispec/flows/create_task.yaml +118 -0
- package/examples/todo-orbit/openuispec/flows/edit_task.yaml +126 -0
- package/examples/todo-orbit/openuispec/locales/.gitkeep +0 -0
- package/examples/todo-orbit/openuispec/locales/en.json +150 -0
- package/examples/todo-orbit/openuispec/locales/ru.json +150 -0
- package/examples/todo-orbit/openuispec/openuispec.yaml +122 -0
- package/examples/todo-orbit/openuispec/platform/.gitkeep +0 -0
- package/examples/todo-orbit/openuispec/platform/android.yaml +19 -0
- package/examples/todo-orbit/openuispec/platform/ios.yaml +20 -0
- package/examples/todo-orbit/openuispec/platform/web.yaml +22 -0
- package/examples/todo-orbit/openuispec/screens/.gitkeep +0 -0
- package/examples/todo-orbit/openuispec/screens/analytics.yaml +139 -0
- package/examples/todo-orbit/openuispec/screens/home.yaml +172 -0
- package/examples/todo-orbit/openuispec/screens/settings.yaml +148 -0
- package/examples/todo-orbit/openuispec/screens/task_detail.yaml +223 -0
- package/examples/todo-orbit/openuispec/tokens/.gitkeep +0 -0
- package/examples/todo-orbit/openuispec/tokens/color.yaml +93 -0
- package/examples/todo-orbit/openuispec/tokens/elevation.yaml +25 -0
- package/examples/todo-orbit/openuispec/tokens/icons.yaml +92 -0
- package/examples/todo-orbit/openuispec/tokens/layout.yaml +107 -0
- package/examples/todo-orbit/openuispec/tokens/motion.yaml +39 -0
- package/examples/todo-orbit/openuispec/tokens/spacing.yaml +18 -0
- package/examples/todo-orbit/openuispec/tokens/themes.yaml +23 -0
- package/examples/todo-orbit/openuispec/tokens/typography.yaml +52 -0
- package/package.json +1 -1
- package/schema/validate.ts +0 -2
- package/spec/openuispec-v0.1.md +76 -12
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
OpenUISpec is a **semantic UI specification format** that replaces cross-platform frameworks with a declarative design language. Instead of sharing runtime code across platforms, you share the *spec* — and AI generates native SwiftUI, Jetpack Compose, and React code from it.
|
|
6
6
|
|
|
7
|
+
OpenUISpec is a shared UI sync language for native products, optimized for solo developers but equally usable by teams. It is not a pixel-perfect design format like Figma and it is not a shared runtime like Flutter or React Native. Its job is to keep product intent, interaction contracts, flows, tokens, and platform outputs aligned while still allowing bounded native variation on iOS, Android, and web.
|
|
8
|
+
|
|
7
9
|
## Why
|
|
8
10
|
|
|
9
11
|
Cross-platform frameworks (Flutter, React Native, KMP/CMP) solve code duplication by sharing a runtime. OpenUISpec solves it by sharing **intent**:
|
|
@@ -13,7 +15,7 @@ Cross-platform frameworks (Flutter, React Native, KMP/CMP) solve code duplicatio
|
|
|
13
15
|
| Cross-platform framework | Runtime code | Abstraction layer |
|
|
14
16
|
| **OpenUISpec** | **Semantic spec** | **Native per platform** |
|
|
15
17
|
|
|
16
|
-
The result: each platform feels native, but every app stays consistent because it's generated from the same source of truth.
|
|
18
|
+
The result: each platform feels native, but every app stays semantically consistent because it's generated from the same source of truth.
|
|
17
19
|
|
|
18
20
|
## How it works
|
|
19
21
|
|
|
@@ -56,7 +58,18 @@ Then hand your spec to any AI code generator:
|
|
|
56
58
|
|
|
57
59
|
> Generate a native iOS app from this OpenUISpec. Follow all contract state machines, apply token ranges for iOS, and implement navigation flows as defined. Use `platform/ios.yaml` for SwiftUI-specific overrides.
|
|
58
60
|
|
|
59
|
-
|
|
61
|
+
Before platform code generation, the AI should refresh its understanding of the current target toolchain and platform conventions instead of relying on stale memory. This matters most for project formats, resource wiring, navigation APIs, packaging rules, and other implementation details that change across toolchain versions.
|
|
62
|
+
|
|
63
|
+
For platform generation, treat these as hard output constraints:
|
|
64
|
+
|
|
65
|
+
- Generate a valid native project or target that actually bundles every required runtime resource. Converting spec inputs into platform-native resource files is insufficient unless those files are attached to the final app target and resolve at runtime.
|
|
66
|
+
- Do not ship unresolved resource identifiers in the UI. Raw localization keys, token references, asset names, or placeholder paths mean the generated output is incomplete.
|
|
67
|
+
- Do not use a container or navigation primitive without defining its behavior for every supported size class and form factor. Master-detail patterns must provide a non-empty compact fallback instead of assuming large-screen behavior.
|
|
68
|
+
|
|
69
|
+
See the examples for concrete reference projects:
|
|
70
|
+
|
|
71
|
+
- [TaskFlow](./examples/taskflow/) for a compact spec covering all 7 contract families
|
|
72
|
+
- [Todo Orbit](./examples/todo-orbit/openuispec/) for a bilingual task app with generated iOS, Android, and web targets under `examples/todo-orbit/generated/`
|
|
60
73
|
|
|
61
74
|
## Repository structure
|
|
62
75
|
|
|
@@ -89,37 +102,41 @@ openuispec/
|
|
|
89
102
|
│ │ └── validation.schema.json # Validation rule definitions
|
|
90
103
|
│ └── validate.ts # Validation script (npm run validate)
|
|
91
104
|
├── examples/
|
|
92
|
-
│
|
|
93
|
-
│
|
|
94
|
-
│
|
|
95
|
-
│
|
|
96
|
-
│
|
|
97
|
-
│
|
|
98
|
-
│
|
|
99
|
-
│
|
|
100
|
-
│
|
|
101
|
-
│
|
|
102
|
-
│
|
|
103
|
-
│
|
|
104
|
-
│
|
|
105
|
-
│
|
|
106
|
-
│
|
|
107
|
-
│
|
|
108
|
-
│
|
|
109
|
-
│
|
|
110
|
-
│
|
|
111
|
-
│
|
|
112
|
-
│
|
|
113
|
-
│
|
|
114
|
-
│
|
|
115
|
-
│
|
|
116
|
-
│
|
|
117
|
-
│
|
|
118
|
-
│
|
|
119
|
-
│
|
|
120
|
-
│
|
|
121
|
-
│
|
|
122
|
-
│
|
|
105
|
+
│ ├── taskflow/ # Compact reference spec
|
|
106
|
+
│ │ ├── openuispec.yaml # Root manifest + data model + API endpoints
|
|
107
|
+
│ │ ├── tokens/
|
|
108
|
+
│ │ │ ├── color.yaml # Brand + semantic + status colors
|
|
109
|
+
│ │ │ ├── typography.yaml # Font family + 8-step type scale
|
|
110
|
+
│ │ │ ├── spacing.yaml # 4px base unit, 9-step scale
|
|
111
|
+
│ │ │ ├── elevation.yaml # 4-level elevation (none/sm/md/lg)
|
|
112
|
+
│ │ │ ├── motion.yaml # Durations, easings, patterns
|
|
113
|
+
│ │ │ ├── layout.yaml # Size classes, primitives, reflow rules
|
|
114
|
+
│ │ │ ├── themes.yaml # Light, dark, warm variants
|
|
115
|
+
│ │ │ └── icons.yaml # Icon registry with platform mappings
|
|
116
|
+
│ │ ├── contracts/ # Standard contract extensions + custom contracts
|
|
117
|
+
│ │ │ ├── input_field.yaml # Standard contract with cut_corner variant
|
|
118
|
+
│ │ │ └── x_media_player.yaml # Custom media player contract (Section 12)
|
|
119
|
+
│ │ ├── screens/
|
|
120
|
+
│ │ │ ├── home.yaml # Task list with search, filters, FAB, adaptive nav
|
|
121
|
+
│ │ │ ├── task_detail.yaml # Full task view with actions + assignee sheet
|
|
122
|
+
│ │ │ ├── projects.yaml # Project grid + new project dialog
|
|
123
|
+
│ │ │ ├── project_detail.yaml # Single project with task list (stub)
|
|
124
|
+
│ │ │ ├── settings.yaml # Preferences, toggles, account management
|
|
125
|
+
│ │ │ ├── profile_edit.yaml # Edit profile form (stub)
|
|
126
|
+
│ │ │ └── calendar.yaml # Calendar view (stub)
|
|
127
|
+
│ │ ├── flows/
|
|
128
|
+
│ │ │ ├── create_task.yaml # Task creation form (sheet presentation)
|
|
129
|
+
│ │ │ └── edit_task.yaml # Task editing flow
|
|
130
|
+
│ │ ├── locales/
|
|
131
|
+
│ │ │ └── en.json # English locale (ICU MessageFormat)
|
|
132
|
+
│ │ └── platform/
|
|
133
|
+
│ │ ├── ios.yaml # SwiftUI overrides + behaviors
|
|
134
|
+
│ │ ├── android.yaml # Compose overrides + behaviors
|
|
135
|
+
│ │ └── web.yaml # React overrides + responsive rules
|
|
136
|
+
│ └── todo-orbit/ # Full showcase app with generated targets
|
|
137
|
+
│ ├── openuispec/ # Source OpenUISpec project
|
|
138
|
+
│ ├── generated/ # Generated iOS, Android, and web apps
|
|
139
|
+
│ └── artifacts/ # Screenshots and supporting outputs
|
|
123
140
|
├── cli/ # CLI tool (openuispec init, drift, validate)
|
|
124
141
|
│ ├── index.ts # Entry point
|
|
125
142
|
│ └── init.ts # Project scaffolding + AI rules
|
|
@@ -214,7 +231,7 @@ Paths are relative to `openuispec.yaml`. The `.openuispec-state.json` file is st
|
|
|
214
231
|
|
|
215
232
|
## Status
|
|
216
233
|
|
|
217
|
-
**v0.1 — Draft**. The spec covers all foundational layers.
|
|
234
|
+
**v0.1 — Draft**. The spec covers all foundational layers. TaskFlow provides a compact reference app, and Todo Orbit extends coverage with localization, recurring-rule flows, custom contracts, and generated native/web targets.
|
|
218
235
|
|
|
219
236
|
### Roadmap
|
|
220
237
|
|
|
@@ -231,6 +248,7 @@ Paths are relative to `openuispec.yaml`. The `.openuispec-state.json` file is st
|
|
|
231
248
|
- [x] Form system (validation rules, field dependencies)
|
|
232
249
|
- [x] Drift detection (spec change tracking per platform)
|
|
233
250
|
- [x] CLI tool (`openuispec init` for project scaffolding + AI rules)
|
|
251
|
+
- [x] Multi-platform showcase app (`examples/todo-orbit/`)
|
|
234
252
|
- [ ] More example apps (e-commerce, social, dashboard)
|
|
235
253
|
|
|
236
254
|
## Contributing
|
package/cli/index.ts
CHANGED
|
@@ -43,7 +43,7 @@ Usage:
|
|
|
43
43
|
openuispec drift --snapshot --target <t> Snapshot current state
|
|
44
44
|
openuispec validate [group...] Validate spec files
|
|
45
45
|
|
|
46
|
-
Validate groups: manifest, tokens, screens, flows, platform, locales,
|
|
46
|
+
Validate groups: manifest, tokens, screens, flows, platform, locales, contracts
|
|
47
47
|
|
|
48
48
|
Docs: https://openuispec.rsteam.uz
|
|
49
49
|
`);
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# OpenUISpec Stress Test & Maturity Assessment
|
|
2
|
+
|
|
3
|
+
Date: 2026-03-14
|
|
4
|
+
|
|
5
|
+
## Scope
|
|
6
|
+
This assessment stress-tested the project at four layers:
|
|
7
|
+
|
|
8
|
+
1. **Schema correctness pressure** across both reference specs (`taskflow`, `todo-orbit`).
|
|
9
|
+
2. **Type safety and implementation consistency** in the TypeScript toolchain.
|
|
10
|
+
3. **Change-tracking workflow resilience** using drift snapshot/check across all declared targets.
|
|
11
|
+
4. **Generated output comparison** to verify functional parity across platform outputs without requiring pixel-perfect identity.
|
|
12
|
+
|
|
13
|
+
## Commands executed
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm ci
|
|
17
|
+
npm run validate # from examples/taskflow (workspace script)
|
|
18
|
+
npx tsx ../../../schema/validate.ts # from examples/todo-orbit/openuispec
|
|
19
|
+
npx tsc --noEmit
|
|
20
|
+
for t in ios android web; do
|
|
21
|
+
npx tsx ../../../drift/index.ts --snapshot --target "$t"
|
|
22
|
+
npx tsx ../../../drift/index.ts --target "$t"
|
|
23
|
+
done
|
|
24
|
+
python - <<'PY'
|
|
25
|
+
from pathlib import Path
|
|
26
|
+
roots={
|
|
27
|
+
'web':Path('examples/todo-orbit/generated/web/Todo Orbit/src'),
|
|
28
|
+
'ios':Path('examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit'),
|
|
29
|
+
'android':Path('examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit')
|
|
30
|
+
}
|
|
31
|
+
for k,r in roots.items():
|
|
32
|
+
code=[p for p in r.rglob('*') if p.is_file() and p.suffix in ['.tsx','.ts','.swift','.kt','.css']]
|
|
33
|
+
loc=sum(sum(1 for _ in p.open('r',encoding='utf-8')) for p in code)
|
|
34
|
+
print(f"{k}: files={len(code)} loc={loc}")
|
|
35
|
+
PY
|
|
36
|
+
rg --files "examples/todo-orbit/artifacts/screenshots"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Results summary
|
|
40
|
+
|
|
41
|
+
- **Validation stress**: Passed for both example projects (all manifests, tokens, screens, flows, platform files, locales, and contracts).
|
|
42
|
+
- **Compiler stress**: `tsc --noEmit` passed.
|
|
43
|
+
- **Workflow stress (drift)**:
|
|
44
|
+
- Initial condition required snapshots (expected for first run).
|
|
45
|
+
- After snapshot creation, all three targets (`ios`, `android`, `web`) reported **0 changed / 0 added / 0 removed**.
|
|
46
|
+
|
|
47
|
+
## Generated output comparison (functional parity, not pixel parity)
|
|
48
|
+
|
|
49
|
+
The repository already frames Todo Orbit as a showcase with generated outputs for web, iOS, and Android. In this model, differences in structure/styling between generators or AI agents are expected.
|
|
50
|
+
|
|
51
|
+
### Comparison policy used
|
|
52
|
+
|
|
53
|
+
- **Do compare**: coverage of screens/flows/features, data model usage, localization support, and contract intent.
|
|
54
|
+
- **Do not require**: identical widget trees, identical naming, exact spacing/typography values, or 1:1 rendered pixels.
|
|
55
|
+
|
|
56
|
+
### Observed output differences (expected)
|
|
57
|
+
|
|
58
|
+
- Web output is centralized in a small React surface (`src/App.tsx`, `src/main.tsx`, `src/styles.css`), while iOS/Android split into screen/component/flow files in platform-native patterns.
|
|
59
|
+
- Code volume differs by target (`web: 3 files / 3013 LOC`, `ios: 11 files / 1516 LOC`, `android: 11 files / 1992 LOC`), which is normal because generated architecture choices vary by platform and template style.
|
|
60
|
+
|
|
61
|
+
### Observed output alignment (good)
|
|
62
|
+
|
|
63
|
+
- All targets include the same core feature set represented in spec: home/tasks, analytics, settings, task editor flow, and recurring-rule flow.
|
|
64
|
+
- Localization assets exist for EN/RU in generated native outputs and in web runtime messages.
|
|
65
|
+
- Reference screenshots exist for corresponding web and Android screens (`home`, `analytics`, `settings`), indicating practical parity at user-flow level rather than pixel-level equivalence.
|
|
66
|
+
|
|
67
|
+
## Maturity score (0–5)
|
|
68
|
+
|
|
69
|
+
- **Specification maturity: 4.0 / 5**
|
|
70
|
+
- Strong: clear schema decomposition, contract model, and examples.
|
|
71
|
+
- Gap: project still explicitly marked **v0.1 Draft**.
|
|
72
|
+
|
|
73
|
+
- **Implementation maturity: 3.9 / 5**
|
|
74
|
+
- Strong: deterministic validators, lint-like contract usage checks, drift hashing, and multi-target generated examples.
|
|
75
|
+
- Gap: limited automated unit/integration test coverage in root scripts.
|
|
76
|
+
|
|
77
|
+
- **Operational readiness: 3.7 / 5**
|
|
78
|
+
- Strong: practical CLI workflows for init/validate/drift and documented generated project layout.
|
|
79
|
+
- Gap: baseline onboarding friction for generated app dependency installation can be high in constrained environments.
|
|
80
|
+
|
|
81
|
+
**Overall maturity estimate: 3.9 / 5 (promising, near early-production for spec tooling, with remaining work in generator conformance automation).**
|
|
82
|
+
|
|
83
|
+
## What this says about idea–implementation fit
|
|
84
|
+
|
|
85
|
+
- **Idea fit is high**: the repository architecture matches the thesis (“share semantic intent, generate native apps”).
|
|
86
|
+
- **Implementation fit is good**: current tooling already enforces many promised invariants (schema + contract usage + drift).
|
|
87
|
+
- **Cross-generator variance is acceptable**: output can differ by coding agent/LLM as long as contract behavior and user flows remain faithful to spec intent.
|
|
88
|
+
- **Main risk is ecosystem hardening, not concept validity**: next maturity gains likely come from deeper automated tests, generator conformance tests, and CI reproducibility across generated targets.
|
|
89
|
+
|
|
90
|
+
## Recommended next stress tests
|
|
91
|
+
|
|
92
|
+
1. Add a `test` script with unit tests for validator edge-cases (especially custom contracts and malformed wrappers).
|
|
93
|
+
2. Add golden-file conformance tests for drift output and schema error formatting.
|
|
94
|
+
3. Add CI matrix that validates both examples + executes drift check for all targets.
|
|
95
|
+
4. Add conformance checks that compare generated outputs on **feature parity** (screens, flows, actions, i18n keys), not snapshot pixel identity.
|
|
96
|
+
5. Add “break tests” (intentionally invalid fixtures) to ensure failure messages stay actionable.
|
|
97
|
+
6. Add benchmark scripts for validator runtime and drift checks on scaled synthetic specs.
|
|
@@ -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,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,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>
|