@origen-ui/admin-cli 1.0.0

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 (430) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +17 -0
  3. package/bin/og-admin.mjs +131 -0
  4. package/package.json +28 -0
  5. package/templates/current/clean/.codebuddy/AGENTS.md +18 -0
  6. package/templates/current/clean/.codebuddy/rules/01-feature-architecture.md +12 -0
  7. package/templates/current/clean/.codebuddy/rules/02-vue-typescript.md +12 -0
  8. package/templates/current/clean/.codebuddy/rules/03-component-policy.md +30 -0
  9. package/templates/current/clean/.codebuddy/rules/04-api-auth-router.md +12 -0
  10. package/templates/current/clean/.codebuddy/rules/05-style.md +12 -0
  11. package/templates/current/clean/.codebuddy/rules/06-quality.md +12 -0
  12. package/templates/current/clean/.codebuddy/skills/build-admin-feature/SKILL.md +17 -0
  13. package/templates/current/clean/.codebuddy/skills/style-og-origen-ui/SKILL.md +14 -0
  14. package/templates/current/clean/.codebuddy/skills/use-og-dialog/SKILL.md +15 -0
  15. package/templates/current/clean/.codebuddy/skills/use-og-editor/SKILL.md +28 -0
  16. package/templates/current/clean/.codebuddy/skills/use-og-form/SKILL.md +15 -0
  17. package/templates/current/clean/.codebuddy/skills/use-og-form-table/SKILL.md +28 -0
  18. package/templates/current/clean/.codebuddy/skills/use-og-http/SKILL.md +16 -0
  19. package/templates/current/clean/.codebuddy/skills/use-og-router-tabs/SKILL.md +14 -0
  20. package/templates/current/clean/.codebuddy/skills/use-og-search/SKILL.md +17 -0
  21. package/templates/current/clean/.codebuddy/skills/use-og-table/SKILL.md +19 -0
  22. package/templates/current/clean/.codebuddy/skills/use-og-upload/SKILL.md +28 -0
  23. package/templates/current/clean/.codex/AGENTS.md +15 -0
  24. package/templates/current/clean/.codex/rules/01-feature-architecture.md +6 -0
  25. package/templates/current/clean/.codex/rules/02-vue-typescript.md +6 -0
  26. package/templates/current/clean/.codex/rules/03-component-policy.md +24 -0
  27. package/templates/current/clean/.codex/rules/04-api-auth-router.md +6 -0
  28. package/templates/current/clean/.codex/rules/05-style.md +6 -0
  29. package/templates/current/clean/.codex/rules/06-quality.md +6 -0
  30. package/templates/current/clean/.codex/skills/build-admin-feature/SKILL.md +14 -0
  31. package/templates/current/clean/.codex/skills/build-admin-feature/references/component-selection.md +25 -0
  32. package/templates/current/clean/.codex/skills/style-og-origen-ui/SKILL.md +11 -0
  33. package/templates/current/clean/.codex/skills/style-og-origen-ui/agents/openai.yaml +4 -0
  34. package/templates/current/clean/.codex/skills/use-og-dialog/SKILL.md +12 -0
  35. package/templates/current/clean/.codex/skills/use-og-dialog/agents/openai.yaml +4 -0
  36. package/templates/current/clean/.codex/skills/use-og-editor/SKILL.md +25 -0
  37. package/templates/current/clean/.codex/skills/use-og-form/SKILL.md +12 -0
  38. package/templates/current/clean/.codex/skills/use-og-form-table/SKILL.md +25 -0
  39. package/templates/current/clean/.codex/skills/use-og-http/SKILL.md +13 -0
  40. package/templates/current/clean/.codex/skills/use-og-http/agents/openai.yaml +4 -0
  41. package/templates/current/clean/.codex/skills/use-og-router-tabs/SKILL.md +11 -0
  42. package/templates/current/clean/.codex/skills/use-og-search/SKILL.md +14 -0
  43. package/templates/current/clean/.codex/skills/use-og-table/SKILL.md +16 -0
  44. package/templates/current/clean/.codex/skills/use-og-upload/SKILL.md +25 -0
  45. package/templates/current/clean/.cursor/AGENTS.md +18 -0
  46. package/templates/current/clean/.cursor/rules/01-feature-architecture.mdc +12 -0
  47. package/templates/current/clean/.cursor/rules/02-vue-typescript.mdc +12 -0
  48. package/templates/current/clean/.cursor/rules/03-component-policy.mdc +30 -0
  49. package/templates/current/clean/.cursor/rules/04-api-auth-router.mdc +12 -0
  50. package/templates/current/clean/.cursor/rules/05-style.mdc +12 -0
  51. package/templates/current/clean/.cursor/rules/06-quality.mdc +12 -0
  52. package/templates/current/clean/.cursor/skills/build-admin-feature/SKILL.md +14 -0
  53. package/templates/current/clean/.cursor/skills/style-og-origen-ui/SKILL.md +11 -0
  54. package/templates/current/clean/.cursor/skills/use-og-dialog/SKILL.md +12 -0
  55. package/templates/current/clean/.cursor/skills/use-og-editor/SKILL.md +25 -0
  56. package/templates/current/clean/.cursor/skills/use-og-form/SKILL.md +12 -0
  57. package/templates/current/clean/.cursor/skills/use-og-form-table/SKILL.md +25 -0
  58. package/templates/current/clean/.cursor/skills/use-og-http/SKILL.md +13 -0
  59. package/templates/current/clean/.cursor/skills/use-og-router-tabs/SKILL.md +11 -0
  60. package/templates/current/clean/.cursor/skills/use-og-search/SKILL.md +14 -0
  61. package/templates/current/clean/.cursor/skills/use-og-table/SKILL.md +16 -0
  62. package/templates/current/clean/.cursor/skills/use-og-upload/SKILL.md +25 -0
  63. package/templates/current/clean/.env.example +7 -0
  64. package/templates/current/clean/.env.production.example +31 -0
  65. package/templates/current/clean/.qoder/AGENTS.md +15 -0
  66. package/templates/current/clean/.qoder/rules/01-feature-architecture.md +12 -0
  67. package/templates/current/clean/.qoder/rules/02-vue-typescript.md +12 -0
  68. package/templates/current/clean/.qoder/rules/03-component-policy.md +30 -0
  69. package/templates/current/clean/.qoder/rules/04-api-auth-router.md +12 -0
  70. package/templates/current/clean/.qoder/rules/05-style.md +12 -0
  71. package/templates/current/clean/.qoder/rules/06-quality.md +12 -0
  72. package/templates/current/clean/.qoder/skills/build-admin-feature/SKILL.md +14 -0
  73. package/templates/current/clean/.qoder/skills/style-og-origen-ui/SKILL.md +11 -0
  74. package/templates/current/clean/.qoder/skills/use-og-dialog/SKILL.md +12 -0
  75. package/templates/current/clean/.qoder/skills/use-og-editor/SKILL.md +25 -0
  76. package/templates/current/clean/.qoder/skills/use-og-form/SKILL.md +12 -0
  77. package/templates/current/clean/.qoder/skills/use-og-form-table/SKILL.md +25 -0
  78. package/templates/current/clean/.qoder/skills/use-og-http/SKILL.md +13 -0
  79. package/templates/current/clean/.qoder/skills/use-og-router-tabs/SKILL.md +11 -0
  80. package/templates/current/clean/.qoder/skills/use-og-search/SKILL.md +14 -0
  81. package/templates/current/clean/.qoder/skills/use-og-table/SKILL.md +16 -0
  82. package/templates/current/clean/.qoder/skills/use-og-upload/SKILL.md +25 -0
  83. package/templates/current/clean/AGENTS.md +16 -0
  84. package/templates/current/clean/README.md +116 -0
  85. package/templates/current/clean/component-catalog.json +765 -0
  86. package/templates/current/clean/e2e/admin-shell.spec.ts +150 -0
  87. package/templates/current/clean/e2e/demo-shell.spec.ts +328 -0
  88. package/templates/current/clean/evals/component-selection.json +29 -0
  89. package/templates/current/clean/gitignore +3 -0
  90. package/templates/current/clean/index.html +13 -0
  91. package/templates/current/clean/openapi.json +1623 -0
  92. package/templates/current/clean/package.json +65 -0
  93. package/templates/current/clean/playwright.config.ts +31 -0
  94. package/templates/current/clean/playwright.demo.config.ts +25 -0
  95. package/templates/current/clean/recipes/README.md +7 -0
  96. package/templates/current/clean/recipes/remote-crud-dialog-form.json +15 -0
  97. package/templates/current/clean/recipes/remote-crud-dialog-form.vue +66 -0
  98. package/templates/current/clean/scaffold.lock.json +12 -0
  99. package/templates/current/clean/scripts/check-admin-bundle.mjs +214 -0
  100. package/templates/current/clean/scripts/check-admin-scaffold.mjs +168 -0
  101. package/templates/current/clean/scripts/clean-overlay/src/features/errors/pages/Forbidden.vue +26 -0
  102. package/templates/current/clean/scripts/clean-overlay/src/features/errors/pages/NotFound.vue +26 -0
  103. package/templates/current/clean/scripts/clean-overlay/src/features/errors/pages/ServerError.vue +26 -0
  104. package/templates/current/clean/scripts/clean-overlay/src/features/errors/pages/error-pages.spec.ts +32 -0
  105. package/templates/current/clean/scripts/clean-overlay/src/main.ts +91 -0
  106. package/templates/current/clean/scripts/clean-overlay/src/router/componentRegistry.ts +25 -0
  107. package/templates/current/clean/scripts/clean-overlay/src/router/dynamicRoutes.spec.ts +47 -0
  108. package/templates/current/clean/scripts/clean-overlay/src/router/staticRoutes.ts +63 -0
  109. package/templates/current/clean/scripts/demo-api.ts +797 -0
  110. package/templates/current/clean/scripts/generate-api.ts +27 -0
  111. package/templates/current/clean/scripts/performance/baselines/bundle-gzip-v2-pre-entry-unification.json +38 -0
  112. package/templates/current/clean/scripts/remove-examples.mjs +54 -0
  113. package/templates/current/clean/src/App.vue +67 -0
  114. package/templates/current/clean/src/api/client.spec.ts +66 -0
  115. package/templates/current/clean/src/api/client.ts +72 -0
  116. package/templates/current/clean/src/api/generated/data-contracts.ts +268 -0
  117. package/templates/current/clean/src/api/generated/http-client.ts +266 -0
  118. package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/345/206/205/345/256/271/346/226/207/347/253/240.ts +147 -0
  119. package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/345/256/241/350/256/241.ts +53 -0
  120. package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/346/226/207/344/273/266/344/270/212/344/274/240.ts +66 -0
  121. package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/347/224/250/346/210/267.ts +171 -0
  122. package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/350/217/234/345/215/225.ts +181 -0
  123. package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/350/247/222/350/211/262.ts +169 -0
  124. package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/350/256/242/345/215/225/350/215/211/347/250/277.ts +170 -0
  125. package/templates/current/clean/src/api/generated//350/256/244/350/257/201.ts +98 -0
  126. package/templates/current/clean/src/api/http-adapter.spec.ts +33 -0
  127. package/templates/current/clean/src/api/http-adapter.ts +83 -0
  128. package/templates/current/clean/src/api/index.ts +41 -0
  129. package/templates/current/clean/src/app/createAdminUi.spec.ts +110 -0
  130. package/templates/current/clean/src/app/createAdminUi.ts +78 -0
  131. package/templates/current/clean/src/app/menu.spec.ts +255 -0
  132. package/templates/current/clean/src/app/menu.ts +268 -0
  133. package/templates/current/clean/src/app/menuTypes.ts +17 -0
  134. package/templates/current/clean/src/app/origenUiLocale.spec.ts +14 -0
  135. package/templates/current/clean/src/app/origenUiLocale.ts +65 -0
  136. package/templates/current/clean/src/app/permission.ts +9 -0
  137. package/templates/current/clean/src/app/runtimeConfig.ts +77 -0
  138. package/templates/current/clean/src/demo-api.spec.ts +167 -0
  139. package/templates/current/clean/src/env.d.ts +14 -0
  140. package/templates/current/clean/src/features/appearance/components/ThemePanel.vue +200 -0
  141. package/templates/current/clean/src/features/appearance/composables/useTheme.ts +17 -0
  142. package/templates/current/clean/src/features/appearance/store/theme.ts +140 -0
  143. package/templates/current/clean/src/features/auth/pages/Login.vue +159 -0
  144. package/templates/current/clean/src/features/auth/store/auth.spec.ts +131 -0
  145. package/templates/current/clean/src/features/auth/store/auth.ts +210 -0
  146. package/templates/current/clean/src/features/errors/pages/Forbidden.vue +26 -0
  147. package/templates/current/clean/src/features/errors/pages/NotFound.vue +26 -0
  148. package/templates/current/clean/src/features/errors/pages/ServerError.vue +26 -0
  149. package/templates/current/clean/src/features/errors/pages/error-pages.spec.ts +32 -0
  150. package/templates/current/clean/src/features/security/components/DevtoolsProtectionOverlay.vue +56 -0
  151. package/templates/current/clean/src/features/security/devtoolsProtection.spec.ts +211 -0
  152. package/templates/current/clean/src/features/security/devtoolsProtection.ts +242 -0
  153. package/templates/current/clean/src/features/shell/components/AdminWatermark.spec.ts +90 -0
  154. package/templates/current/clean/src/features/shell/components/AdminWatermark.vue +47 -0
  155. package/templates/current/clean/src/features/shell/components/RouteProgress.vue +68 -0
  156. package/templates/current/clean/src/features/shell/composables/useRouteProgress.spec.ts +95 -0
  157. package/templates/current/clean/src/features/shell/composables/useRouteProgress.ts +52 -0
  158. package/templates/current/clean/src/features/shell/store/sidebar.ts +55 -0
  159. package/templates/current/clean/src/features/system/access/api/admin-repository.ts +279 -0
  160. package/templates/current/clean/src/features/system/access/api/rbac.spec.ts +72 -0
  161. package/templates/current/clean/src/features/system/access/api/rbac.ts +272 -0
  162. package/templates/current/clean/src/features/system/access/composables/useAuthorizationRefresh.ts +15 -0
  163. package/templates/current/clean/src/features/workspace/pages/Empty.vue +18 -0
  164. package/templates/current/clean/src/features/workspace/pages/Profile.vue +183 -0
  165. package/templates/current/clean/src/layouts/AdminLayout.vue +61 -0
  166. package/templates/current/clean/src/layouts/BreadcrumbBar.vue +27 -0
  167. package/templates/current/clean/src/layouts/SideMenu.vue +119 -0
  168. package/templates/current/clean/src/layouts/TopBar.vue +301 -0
  169. package/templates/current/clean/src/layouts/WorkspaceTabs.vue +44 -0
  170. package/templates/current/clean/src/layouts/topBarMenuSearch.spec.ts +31 -0
  171. package/templates/current/clean/src/layouts/topBarMenuSearch.ts +21 -0
  172. package/templates/current/clean/src/locales/en-US.ts +55 -0
  173. package/templates/current/clean/src/locales/index.ts +119 -0
  174. package/templates/current/clean/src/locales/messages.spec.ts +23 -0
  175. package/templates/current/clean/src/locales/zh-CN.ts +55 -0
  176. package/templates/current/clean/src/locales/zh-TW.ts +44 -0
  177. package/templates/current/clean/src/main.ts +91 -0
  178. package/templates/current/clean/src/router/bootstrap.ts +76 -0
  179. package/templates/current/clean/src/router/componentRegistry.ts +25 -0
  180. package/templates/current/clean/src/router/dynamicRoutes.spec.ts +47 -0
  181. package/templates/current/clean/src/router/dynamicRoutes.ts +162 -0
  182. package/templates/current/clean/src/router/guards.ts +5 -0
  183. package/templates/current/clean/src/router/queryEncryption.spec.ts +82 -0
  184. package/templates/current/clean/src/router/queryEncryption.ts +133 -0
  185. package/templates/current/clean/src/router/routeQuery.spec.ts +11 -0
  186. package/templates/current/clean/src/router/routeQuery.ts +3 -0
  187. package/templates/current/clean/src/router/runtimeErrorRecovery.spec.ts +161 -0
  188. package/templates/current/clean/src/router/runtimeErrorRecovery.ts +108 -0
  189. package/templates/current/clean/src/router/staticRoutes.ts +63 -0
  190. package/templates/current/clean/src/router/useRouteQueryDefaults.spec.ts +90 -0
  191. package/templates/current/clean/src/router/useRouteQueryDefaults.ts +51 -0
  192. package/templates/current/clean/src/router/useRouteQueryDefaults.types.ts +19 -0
  193. package/templates/current/clean/src/store/index.ts +3 -0
  194. package/templates/current/clean/src/styles/element/index.scss +33 -0
  195. package/templates/current/clean/src/styles/index.css +39 -0
  196. package/templates/current/clean/src/styles/layout.css +115 -0
  197. package/templates/current/clean/src/styles/shell.css +196 -0
  198. package/templates/current/clean/src/styles/source-package-style-compat.css +1 -0
  199. package/templates/current/clean/src/templates/og-form.ts +48 -0
  200. package/templates/current/clean/src/templates/og-table.ts +212 -0
  201. package/templates/current/clean/src/templates/router.ts +51 -0
  202. package/templates/current/clean/src/templates/templates.spec.ts +90 -0
  203. package/templates/current/clean/src/theme/index.ts +7 -0
  204. package/templates/current/clean/src/utils/__tests__/color-mix.spec.ts +39 -0
  205. package/templates/current/clean/src/utils/color-mix.ts +76 -0
  206. package/templates/current/clean/src/utils/permissions.ts +6 -0
  207. package/templates/current/clean/tsconfig.json +40 -0
  208. package/templates/current/clean/tsconfig.node.json +9 -0
  209. package/templates/current/clean/vite.build-policy.ts +405 -0
  210. package/templates/current/clean/vite.config.ts +37 -0
  211. package/templates/current/examples/.codebuddy/AGENTS.md +18 -0
  212. package/templates/current/examples/.codebuddy/rules/01-feature-architecture.md +12 -0
  213. package/templates/current/examples/.codebuddy/rules/02-vue-typescript.md +12 -0
  214. package/templates/current/examples/.codebuddy/rules/03-component-policy.md +30 -0
  215. package/templates/current/examples/.codebuddy/rules/04-api-auth-router.md +12 -0
  216. package/templates/current/examples/.codebuddy/rules/05-style.md +12 -0
  217. package/templates/current/examples/.codebuddy/rules/06-quality.md +12 -0
  218. package/templates/current/examples/.codebuddy/skills/build-admin-feature/SKILL.md +17 -0
  219. package/templates/current/examples/.codebuddy/skills/style-og-origen-ui/SKILL.md +14 -0
  220. package/templates/current/examples/.codebuddy/skills/use-og-dialog/SKILL.md +15 -0
  221. package/templates/current/examples/.codebuddy/skills/use-og-editor/SKILL.md +28 -0
  222. package/templates/current/examples/.codebuddy/skills/use-og-form/SKILL.md +15 -0
  223. package/templates/current/examples/.codebuddy/skills/use-og-form-table/SKILL.md +28 -0
  224. package/templates/current/examples/.codebuddy/skills/use-og-http/SKILL.md +16 -0
  225. package/templates/current/examples/.codebuddy/skills/use-og-router-tabs/SKILL.md +14 -0
  226. package/templates/current/examples/.codebuddy/skills/use-og-search/SKILL.md +17 -0
  227. package/templates/current/examples/.codebuddy/skills/use-og-table/SKILL.md +19 -0
  228. package/templates/current/examples/.codebuddy/skills/use-og-upload/SKILL.md +28 -0
  229. package/templates/current/examples/.codex/AGENTS.md +15 -0
  230. package/templates/current/examples/.codex/rules/01-feature-architecture.md +6 -0
  231. package/templates/current/examples/.codex/rules/02-vue-typescript.md +6 -0
  232. package/templates/current/examples/.codex/rules/03-component-policy.md +24 -0
  233. package/templates/current/examples/.codex/rules/04-api-auth-router.md +6 -0
  234. package/templates/current/examples/.codex/rules/05-style.md +6 -0
  235. package/templates/current/examples/.codex/rules/06-quality.md +6 -0
  236. package/templates/current/examples/.codex/skills/build-admin-feature/SKILL.md +14 -0
  237. package/templates/current/examples/.codex/skills/build-admin-feature/references/component-selection.md +25 -0
  238. package/templates/current/examples/.codex/skills/style-og-origen-ui/SKILL.md +11 -0
  239. package/templates/current/examples/.codex/skills/style-og-origen-ui/agents/openai.yaml +4 -0
  240. package/templates/current/examples/.codex/skills/use-og-dialog/SKILL.md +12 -0
  241. package/templates/current/examples/.codex/skills/use-og-dialog/agents/openai.yaml +4 -0
  242. package/templates/current/examples/.codex/skills/use-og-editor/SKILL.md +25 -0
  243. package/templates/current/examples/.codex/skills/use-og-form/SKILL.md +12 -0
  244. package/templates/current/examples/.codex/skills/use-og-form-table/SKILL.md +25 -0
  245. package/templates/current/examples/.codex/skills/use-og-http/SKILL.md +13 -0
  246. package/templates/current/examples/.codex/skills/use-og-http/agents/openai.yaml +4 -0
  247. package/templates/current/examples/.codex/skills/use-og-router-tabs/SKILL.md +11 -0
  248. package/templates/current/examples/.codex/skills/use-og-search/SKILL.md +14 -0
  249. package/templates/current/examples/.codex/skills/use-og-table/SKILL.md +16 -0
  250. package/templates/current/examples/.codex/skills/use-og-upload/SKILL.md +25 -0
  251. package/templates/current/examples/.cursor/AGENTS.md +18 -0
  252. package/templates/current/examples/.cursor/rules/01-feature-architecture.mdc +12 -0
  253. package/templates/current/examples/.cursor/rules/02-vue-typescript.mdc +12 -0
  254. package/templates/current/examples/.cursor/rules/03-component-policy.mdc +30 -0
  255. package/templates/current/examples/.cursor/rules/04-api-auth-router.mdc +12 -0
  256. package/templates/current/examples/.cursor/rules/05-style.mdc +12 -0
  257. package/templates/current/examples/.cursor/rules/06-quality.mdc +12 -0
  258. package/templates/current/examples/.cursor/skills/build-admin-feature/SKILL.md +14 -0
  259. package/templates/current/examples/.cursor/skills/style-og-origen-ui/SKILL.md +11 -0
  260. package/templates/current/examples/.cursor/skills/use-og-dialog/SKILL.md +12 -0
  261. package/templates/current/examples/.cursor/skills/use-og-editor/SKILL.md +25 -0
  262. package/templates/current/examples/.cursor/skills/use-og-form/SKILL.md +12 -0
  263. package/templates/current/examples/.cursor/skills/use-og-form-table/SKILL.md +25 -0
  264. package/templates/current/examples/.cursor/skills/use-og-http/SKILL.md +13 -0
  265. package/templates/current/examples/.cursor/skills/use-og-router-tabs/SKILL.md +11 -0
  266. package/templates/current/examples/.cursor/skills/use-og-search/SKILL.md +14 -0
  267. package/templates/current/examples/.cursor/skills/use-og-table/SKILL.md +16 -0
  268. package/templates/current/examples/.cursor/skills/use-og-upload/SKILL.md +25 -0
  269. package/templates/current/examples/.env.example +7 -0
  270. package/templates/current/examples/.env.production.example +31 -0
  271. package/templates/current/examples/.qoder/AGENTS.md +15 -0
  272. package/templates/current/examples/.qoder/rules/01-feature-architecture.md +12 -0
  273. package/templates/current/examples/.qoder/rules/02-vue-typescript.md +12 -0
  274. package/templates/current/examples/.qoder/rules/03-component-policy.md +30 -0
  275. package/templates/current/examples/.qoder/rules/04-api-auth-router.md +12 -0
  276. package/templates/current/examples/.qoder/rules/05-style.md +12 -0
  277. package/templates/current/examples/.qoder/rules/06-quality.md +12 -0
  278. package/templates/current/examples/.qoder/skills/build-admin-feature/SKILL.md +14 -0
  279. package/templates/current/examples/.qoder/skills/style-og-origen-ui/SKILL.md +11 -0
  280. package/templates/current/examples/.qoder/skills/use-og-dialog/SKILL.md +12 -0
  281. package/templates/current/examples/.qoder/skills/use-og-editor/SKILL.md +25 -0
  282. package/templates/current/examples/.qoder/skills/use-og-form/SKILL.md +12 -0
  283. package/templates/current/examples/.qoder/skills/use-og-form-table/SKILL.md +25 -0
  284. package/templates/current/examples/.qoder/skills/use-og-http/SKILL.md +13 -0
  285. package/templates/current/examples/.qoder/skills/use-og-router-tabs/SKILL.md +11 -0
  286. package/templates/current/examples/.qoder/skills/use-og-search/SKILL.md +14 -0
  287. package/templates/current/examples/.qoder/skills/use-og-table/SKILL.md +16 -0
  288. package/templates/current/examples/.qoder/skills/use-og-upload/SKILL.md +25 -0
  289. package/templates/current/examples/AGENTS.md +16 -0
  290. package/templates/current/examples/README.md +116 -0
  291. package/templates/current/examples/component-catalog.json +765 -0
  292. package/templates/current/examples/e2e/admin-shell.spec.ts +150 -0
  293. package/templates/current/examples/e2e/demo-shell.spec.ts +328 -0
  294. package/templates/current/examples/evals/component-selection.json +29 -0
  295. package/templates/current/examples/gitignore +3 -0
  296. package/templates/current/examples/index.html +13 -0
  297. package/templates/current/examples/openapi.json +1623 -0
  298. package/templates/current/examples/package.json +65 -0
  299. package/templates/current/examples/playwright.config.ts +31 -0
  300. package/templates/current/examples/playwright.demo.config.ts +25 -0
  301. package/templates/current/examples/recipes/README.md +7 -0
  302. package/templates/current/examples/recipes/remote-crud-dialog-form.json +15 -0
  303. package/templates/current/examples/recipes/remote-crud-dialog-form.vue +66 -0
  304. package/templates/current/examples/scaffold.lock.json +12 -0
  305. package/templates/current/examples/scripts/check-admin-bundle.mjs +214 -0
  306. package/templates/current/examples/scripts/check-admin-scaffold.mjs +168 -0
  307. package/templates/current/examples/scripts/clean-overlay/src/features/errors/pages/Forbidden.vue +26 -0
  308. package/templates/current/examples/scripts/clean-overlay/src/features/errors/pages/NotFound.vue +26 -0
  309. package/templates/current/examples/scripts/clean-overlay/src/features/errors/pages/ServerError.vue +26 -0
  310. package/templates/current/examples/scripts/clean-overlay/src/features/errors/pages/error-pages.spec.ts +32 -0
  311. package/templates/current/examples/scripts/clean-overlay/src/main.ts +91 -0
  312. package/templates/current/examples/scripts/clean-overlay/src/router/componentRegistry.ts +25 -0
  313. package/templates/current/examples/scripts/clean-overlay/src/router/dynamicRoutes.spec.ts +47 -0
  314. package/templates/current/examples/scripts/clean-overlay/src/router/staticRoutes.ts +63 -0
  315. package/templates/current/examples/scripts/demo-api.ts +797 -0
  316. package/templates/current/examples/scripts/generate-api.ts +27 -0
  317. package/templates/current/examples/scripts/performance/baselines/bundle-gzip-v2-pre-entry-unification.json +38 -0
  318. package/templates/current/examples/scripts/remove-examples.mjs +54 -0
  319. package/templates/current/examples/src/App.vue +67 -0
  320. package/templates/current/examples/src/api/client.spec.ts +66 -0
  321. package/templates/current/examples/src/api/client.ts +72 -0
  322. package/templates/current/examples/src/api/generated/data-contracts.ts +268 -0
  323. package/templates/current/examples/src/api/generated/http-client.ts +266 -0
  324. package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/345/206/205/345/256/271/346/226/207/347/253/240.ts +147 -0
  325. package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/345/256/241/350/256/241.ts +53 -0
  326. package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/346/226/207/344/273/266/344/270/212/344/274/240.ts +66 -0
  327. package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/347/224/250/346/210/267.ts +171 -0
  328. package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/350/217/234/345/215/225.ts +181 -0
  329. package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/350/247/222/350/211/262.ts +169 -0
  330. package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/350/256/242/345/215/225/350/215/211/347/250/277.ts +170 -0
  331. package/templates/current/examples/src/api/generated//350/256/244/350/257/201.ts +98 -0
  332. package/templates/current/examples/src/api/http-adapter.spec.ts +33 -0
  333. package/templates/current/examples/src/api/http-adapter.ts +83 -0
  334. package/templates/current/examples/src/api/index.ts +41 -0
  335. package/templates/current/examples/src/app/createAdminUi.spec.ts +110 -0
  336. package/templates/current/examples/src/app/createAdminUi.ts +78 -0
  337. package/templates/current/examples/src/app/menu.spec.ts +255 -0
  338. package/templates/current/examples/src/app/menu.ts +268 -0
  339. package/templates/current/examples/src/app/menuTypes.ts +17 -0
  340. package/templates/current/examples/src/app/origenUiLocale.spec.ts +14 -0
  341. package/templates/current/examples/src/app/origenUiLocale.ts +65 -0
  342. package/templates/current/examples/src/app/permission.ts +9 -0
  343. package/templates/current/examples/src/app/runtimeConfig.ts +77 -0
  344. package/templates/current/examples/src/demo-api.spec.ts +167 -0
  345. package/templates/current/examples/src/env.d.ts +14 -0
  346. package/templates/current/examples/src/features/appearance/components/ThemePanel.vue +200 -0
  347. package/templates/current/examples/src/features/appearance/composables/useTheme.ts +17 -0
  348. package/templates/current/examples/src/features/appearance/store/theme.ts +140 -0
  349. package/templates/current/examples/src/features/auth/pages/Login.vue +159 -0
  350. package/templates/current/examples/src/features/auth/store/auth.spec.ts +131 -0
  351. package/templates/current/examples/src/features/auth/store/auth.ts +210 -0
  352. package/templates/current/examples/src/features/errors/pages/Forbidden.vue +26 -0
  353. package/templates/current/examples/src/features/errors/pages/NotFound.vue +26 -0
  354. package/templates/current/examples/src/features/errors/pages/ServerError.vue +26 -0
  355. package/templates/current/examples/src/features/errors/pages/error-pages.spec.ts +32 -0
  356. package/templates/current/examples/src/features/feature-composables.spec.ts +208 -0
  357. package/templates/current/examples/src/features/security/components/DevtoolsProtectionOverlay.vue +56 -0
  358. package/templates/current/examples/src/features/security/devtoolsProtection.spec.ts +211 -0
  359. package/templates/current/examples/src/features/security/devtoolsProtection.ts +242 -0
  360. package/templates/current/examples/src/features/shell/components/AdminWatermark.spec.ts +90 -0
  361. package/templates/current/examples/src/features/shell/components/AdminWatermark.vue +47 -0
  362. package/templates/current/examples/src/features/shell/components/RouteProgress.vue +68 -0
  363. package/templates/current/examples/src/features/shell/composables/useRouteProgress.spec.ts +95 -0
  364. package/templates/current/examples/src/features/shell/composables/useRouteProgress.ts +52 -0
  365. package/templates/current/examples/src/features/shell/store/sidebar.ts +55 -0
  366. package/templates/current/examples/src/features/system/access/api/admin-repository.ts +279 -0
  367. package/templates/current/examples/src/features/system/access/api/rbac.spec.ts +72 -0
  368. package/templates/current/examples/src/features/system/access/api/rbac.ts +272 -0
  369. package/templates/current/examples/src/features/system/access/composables/useAuthorizationRefresh.ts +15 -0
  370. package/templates/current/examples/src/features/system/audit/composables/useAuditManagement.ts +117 -0
  371. package/templates/current/examples/src/features/system/audit/pages/AuditList.vue +20 -0
  372. package/templates/current/examples/src/features/system/menus/components/MenuEditorForm.vue +189 -0
  373. package/templates/current/examples/src/features/system/menus/composables/useMenuManagement.ts +327 -0
  374. package/templates/current/examples/src/features/system/menus/pages/MenuList.vue +49 -0
  375. package/templates/current/examples/src/features/system/roles/components/RoleEditorForm.vue +112 -0
  376. package/templates/current/examples/src/features/system/roles/composables/useRoleManagement.ts +198 -0
  377. package/templates/current/examples/src/features/system/roles/pages/RoleList.vue +45 -0
  378. package/templates/current/examples/src/features/system/users/components/UserEditorForm.vue +101 -0
  379. package/templates/current/examples/src/features/system/users/composables/useUserManagement.ts +233 -0
  380. package/templates/current/examples/src/features/system/users/pages/UserList.vue +49 -0
  381. package/templates/current/examples/src/features/workspace/pages/Dashboard.spec.ts +32 -0
  382. package/templates/current/examples/src/features/workspace/pages/Dashboard.vue +297 -0
  383. package/templates/current/examples/src/features/workspace/pages/Empty.vue +18 -0
  384. package/templates/current/examples/src/features/workspace/pages/Profile.vue +183 -0
  385. package/templates/current/examples/src/layouts/AdminLayout.vue +61 -0
  386. package/templates/current/examples/src/layouts/BreadcrumbBar.vue +27 -0
  387. package/templates/current/examples/src/layouts/SideMenu.vue +119 -0
  388. package/templates/current/examples/src/layouts/TopBar.vue +301 -0
  389. package/templates/current/examples/src/layouts/WorkspaceTabs.vue +44 -0
  390. package/templates/current/examples/src/layouts/topBarMenuSearch.spec.ts +31 -0
  391. package/templates/current/examples/src/layouts/topBarMenuSearch.ts +21 -0
  392. package/templates/current/examples/src/locales/en-US.ts +55 -0
  393. package/templates/current/examples/src/locales/index.ts +119 -0
  394. package/templates/current/examples/src/locales/messages.spec.ts +23 -0
  395. package/templates/current/examples/src/locales/zh-CN.ts +55 -0
  396. package/templates/current/examples/src/locales/zh-TW.ts +44 -0
  397. package/templates/current/examples/src/main.ts +91 -0
  398. package/templates/current/examples/src/router/bootstrap.ts +76 -0
  399. package/templates/current/examples/src/router/componentRegistry.ts +83 -0
  400. package/templates/current/examples/src/router/dynamicRoutes.spec.ts +109 -0
  401. package/templates/current/examples/src/router/dynamicRoutes.ts +162 -0
  402. package/templates/current/examples/src/router/guards.ts +5 -0
  403. package/templates/current/examples/src/router/queryEncryption.spec.ts +82 -0
  404. package/templates/current/examples/src/router/queryEncryption.ts +133 -0
  405. package/templates/current/examples/src/router/routeQuery.spec.ts +11 -0
  406. package/templates/current/examples/src/router/routeQuery.ts +3 -0
  407. package/templates/current/examples/src/router/runtimeErrorRecovery.spec.ts +161 -0
  408. package/templates/current/examples/src/router/runtimeErrorRecovery.ts +108 -0
  409. package/templates/current/examples/src/router/staticRoutes.ts +63 -0
  410. package/templates/current/examples/src/router/useRouteQueryDefaults.spec.ts +90 -0
  411. package/templates/current/examples/src/router/useRouteQueryDefaults.ts +51 -0
  412. package/templates/current/examples/src/router/useRouteQueryDefaults.types.ts +19 -0
  413. package/templates/current/examples/src/store/index.ts +3 -0
  414. package/templates/current/examples/src/styles/element/index.scss +33 -0
  415. package/templates/current/examples/src/styles/index.css +39 -0
  416. package/templates/current/examples/src/styles/layout.css +115 -0
  417. package/templates/current/examples/src/styles/shell.css +196 -0
  418. package/templates/current/examples/src/styles/source-package-style-compat.css +1 -0
  419. package/templates/current/examples/src/templates/og-form.ts +48 -0
  420. package/templates/current/examples/src/templates/og-table.ts +212 -0
  421. package/templates/current/examples/src/templates/router.ts +51 -0
  422. package/templates/current/examples/src/templates/templates.spec.ts +90 -0
  423. package/templates/current/examples/src/theme/index.ts +7 -0
  424. package/templates/current/examples/src/utils/__tests__/color-mix.spec.ts +39 -0
  425. package/templates/current/examples/src/utils/color-mix.ts +76 -0
  426. package/templates/current/examples/src/utils/permissions.ts +6 -0
  427. package/templates/current/examples/tsconfig.json +40 -0
  428. package/templates/current/examples/tsconfig.node.json +9 -0
  429. package/templates/current/examples/vite.build-policy.ts +405 -0
  430. package/templates/current/examples/vite.config.ts +37 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 The Origen UI contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,17 @@
1
+ # @origen-ui/admin-cli
2
+
3
+ `@origen-ui/admin-cli` creates a standalone Admin scaffold.
4
+
5
+ ```sh
6
+ npx @origen-ui/admin-cli create origen-smoke --skip-install
7
+ pnpm dlx @origen-ui/admin-cli create origen-smoke --skip-install
8
+ ```
9
+
10
+ Use `--variant examples` to create the demo-enabled scaffold. `--skip-install`
11
+ and `--no-git` are available for automated setup.
12
+
13
+ ## Compatibility
14
+
15
+ Version 2 removes the `og-admin update` command and no longer ships the 1.0.1
16
+ baseline template. Existing scaffolds are not upgraded in place; create a new
17
+ project and migrate application code manually when moving to a newer scaffold.
@@ -0,0 +1,131 @@
1
+ #!/usr/bin/env node
2
+ // @ts-check
3
+ import { spawnSync } from 'node:child_process'
4
+ import { existsSync } from 'node:fs'
5
+ import { cp, lstat, mkdir, readdir, readFile, rename, writeFile } from 'node:fs/promises'
6
+ import { dirname, resolve } from 'node:path'
7
+ import process from 'node:process'
8
+ import { fileURLToPath } from 'node:url'
9
+
10
+ const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..')
11
+ const args = process.argv.slice(2)
12
+ const command = args[0]
13
+ const root = resolve(process.cwd())
14
+ let packageVersion = ''
15
+
16
+ async function main() {
17
+ packageVersion = JSON.parse(await readFile(resolve(packageRoot, 'package.json'), 'utf8')).version
18
+ if (command === 'create') return createProject()
19
+ fail('Usage: og-admin create <directory> [--variant clean|examples] [--name <name>] [--skip-install] [--no-git]')
20
+ }
21
+
22
+ async function createProject() {
23
+ const directory = args[1]
24
+ if (!directory || directory.startsWith('-')) {
25
+ fail('Usage: og-admin create <directory> [--variant clean|examples] [--name <name>] [--skip-install] [--no-git]')
26
+ }
27
+ const variant = option('variant') ?? 'clean'
28
+ if (!['clean', 'examples'].includes(variant)) fail('--variant must be clean or examples.')
29
+
30
+ const destination = resolve(root, directory)
31
+ await assertCreateDestinationSafe(destination)
32
+ if (existsSync(destination) && (await readdir(destination)).length)
33
+ fail(`Refusing to overwrite non-empty directory: ${destination}`)
34
+ const template = resolve(packageRoot, 'templates', 'current', variant)
35
+ if (!existsSync(template)) {
36
+ fail('This @origen-ui/admin-cli package does not contain Admin templates. Reinstall a complete published package.')
37
+ }
38
+
39
+ await mkdir(destination, { recursive: true })
40
+ await assertCreateDestinationSafe(destination)
41
+ await cp(template, destination, { recursive: true, force: false, errorOnExist: true })
42
+ await rename(resolve(destination, 'gitignore'), resolve(destination, '.gitignore'))
43
+ await updatePackageName(destination, option('name') ?? '@origen-ui/admin')
44
+ try {
45
+ if (!args.includes('--skip-install')) runInteractive('pnpm', ['install'], destination)
46
+ if (!args.includes('--no-git')) runInteractive('git', ['init'], destination)
47
+ } catch (error) {
48
+ const message = error instanceof Error ? error.message : String(error)
49
+ fail(`Project files were created at ${destination}, but setup failed. Inspect the directory and retry the failed command. ${message}`)
50
+ }
51
+ console.log(`Created Origen UI Admin ${packageVersion} (${variant}) at ${destination}`)
52
+ console.log('Next: pnpm dev')
53
+ }
54
+
55
+ /**
56
+ * Reject create targets that would resolve through an existing link. Relative
57
+ * and absolute destination paths retain their CLI semantics; only filesystem
58
+ * indirections that can redirect writes outside the requested path are denied.
59
+ * @param {string} destination
60
+ */
61
+ async function assertCreateDestinationSafe(destination) {
62
+ let current = destination
63
+ while (true) {
64
+ try {
65
+ const details = await lstat(current)
66
+ if (details.isSymbolicLink())
67
+ throw new Error(`Refusing to create project through symlink or junction: ${current}`)
68
+ if (current === destination && !details.isDirectory())
69
+ throw new Error(`Refusing to create project in non-directory path: ${destination}`)
70
+ } catch (error) {
71
+ if (!isCode(error, 'ENOENT')) throw error
72
+ }
73
+
74
+ const parent = dirname(current)
75
+ if (parent === current) return
76
+ current = parent
77
+ }
78
+ }
79
+
80
+ /** @param {string} destination @param {string} name */
81
+ async function updatePackageName(destination, name) {
82
+ const manifestPath = resolve(destination, 'package.json')
83
+ const manifest = JSON.parse(await readFile(manifestPath, 'utf8'))
84
+ manifest.name = name
85
+ await writeFile(manifestPath, `${JSON.stringify(manifest, null, 2)}\n`)
86
+ }
87
+
88
+ /** @param {string} name */
89
+ function option(name) {
90
+ const index = args.indexOf(`--${name}`)
91
+ if (index >= 0) return args[index + 1]
92
+ const prefix = `--${name}=`
93
+ return args.find((value) => value.startsWith(prefix))?.slice(prefix.length)
94
+ }
95
+
96
+ /** @param {string} executable @param {NodeJS.Platform} [platform] */
97
+ function commandFor(executable, platform = process.platform) {
98
+ return platform === 'win32' && executable === 'pnpm' ? 'pnpm.cmd' : executable
99
+ }
100
+
101
+ /** @param {string} executable @param {string[]} commandArgs @param {string} cwd */
102
+ function runInteractive(executable, commandArgs, cwd) {
103
+ const result = spawnSync(commandFor(executable), commandArgs, {
104
+ cwd,
105
+ stdio: 'inherit',
106
+ windowsHide: true,
107
+ })
108
+ if (result.status !== 0) {
109
+ throw new Error(`${executable} ${commandArgs.join(' ')} failed with exit ${result.status ?? 'unknown'}.`)
110
+ }
111
+ }
112
+
113
+ /** @param {string} message @returns {never} */
114
+ function fail(message) {
115
+ console.error(message)
116
+ process.exit(1)
117
+ }
118
+
119
+ /** @param {unknown} error @param {string} code */
120
+ function isCode(error, code) {
121
+ return !!error && typeof error === 'object' && 'code' in error && error.code === code
122
+ }
123
+
124
+ if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
125
+ void main().catch((error) => {
126
+ console.error(error)
127
+ process.exitCode = 1
128
+ })
129
+ }
130
+
131
+ export { commandFor, option }
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@origen-ui/admin-cli",
3
+ "type": "module",
4
+ "version": "1.0.0",
5
+ "description": "Project creation CLI for the Origen UI Admin scaffold",
6
+ "license": "MIT",
7
+ "bin": {
8
+ "og-admin": "./bin/og-admin.mjs"
9
+ },
10
+ "files": [
11
+ "bin",
12
+ "templates/current"
13
+ ],
14
+ "engines": {
15
+ "node": ">=20.0.0"
16
+ },
17
+ "publishConfig": {
18
+ "access": "public"
19
+ },
20
+ "scripts": {
21
+ "build": "node --check bin/og-admin.mjs && pnpm run templates:check",
22
+ "templates:sync": "node scripts/prepare-templates.mjs",
23
+ "templates:check": "node scripts/check-templates.mjs",
24
+ "type-check": "tsc --noEmit --allowJs --checkJs --target ES2022 --module NodeNext --moduleResolution NodeNext --strict --skipLibCheck bin/og-admin.mjs",
25
+ "test": "vitest run --testTimeout 30000 test/admin-cli.test.mjs",
26
+ "lint": "eslint bin scripts test --max-warnings=0"
27
+ }
28
+ }
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: og-admin-scaffold
3
+ description: Official guidance for the standalone @origen-ui Admin scaffold.
4
+ alwaysApply: true
5
+ globs:
6
+ - '**/*'
7
+ ---
8
+
9
+ # @origen-ui Admin scaffold
10
+
11
+ Read `AGENTS.local.md` when it exists. Keep product code in `src/app` and
12
+ `src/features`; do not modify managed files or generated agent files without an
13
+ upgrade migration. Run `pnpm type-check` and `pnpm test` for every application change.
14
+
15
+ Use `build-admin-feature` before adding a feature. Use matching `use-og-*` skills
16
+ for tables, search, forms, dialogs, routing, or HTTP. Remote lists must use
17
+ `OgTableWithSearch`; forms use `OgForm`; dialogs use `OgDialog`; network
18
+ requests use `@origen-ui/http`. Do not replace these with Element Plus equivalents.
@@ -0,0 +1,12 @@
1
+ ---
2
+ description: 01-feature-architecture
3
+ alwaysApply: false
4
+ globs:
5
+ - '**/*'
6
+ ---
7
+ # Feature architecture
8
+
9
+ - Keep route pages thin composition surfaces under `src/features/<feature>/pages`.
10
+ - Put UI sections in `components`, stateful side effects in `composables`, and API adapters in `api`.
11
+ - Keep data flow as props down and typed events up. Do not mutate props.
12
+ - `src/app` owns application integration; `src/features` owns business behavior; examples never become feature dependencies.
@@ -0,0 +1,12 @@
1
+ ---
2
+ description: 02-vue-typescript
3
+ alwaysApply: false
4
+ globs:
5
+ - '**/*'
6
+ ---
7
+ # Vue and TypeScript
8
+
9
+ - Use Vue 3 `<script setup lang="ts">` and Composition API.
10
+ - Keep source state minimal, derive values with `computed`, and use watchers only for side effects.
11
+ - Type props, emits, exposed APIs, composable inputs, API payloads, and route metadata.
12
+ - Use `useTemplateRef` for imperative component APIs and keep templates declarative.
@@ -0,0 +1,30 @@
1
+ ---
2
+ description: 03-component-policy
3
+ alwaysApply: false
4
+ globs:
5
+ - '**/*'
6
+ ---
7
+ # @origen-ui component policy
8
+
9
+ <!-- component-catalog:start -->
10
+ - `OgDialog` (@origen-ui/dialog): Parent-controlled dialog UI; avoid Element Plus ElDialog in business features.
11
+ - `createOgDialog` (@origen-ui/dialog): Awaitable or manager-owned dialog workflows; avoid createApp or a global fallback manager.
12
+ - `OgEditor` (@origen-ui/editor): Rich text authoring; avoid Unsanitized HTML persistence or direct DOM insertion.
13
+ - `OgEditorViewer` (@origen-ui/editor): Readonly rich text rendering; avoid Rendering untrusted HTML without server sanitization.
14
+ - `OgForm` (@origen-ui/form): Schema-driven create, edit, or readonly forms; avoid Element Plus ElForm or removed legacy APIs.
15
+ - `OgFormTable` (@origen-ui/form-table): Editable array fields and line-item forms; avoid Mutating parent form arrays or duplicate remote table fetching.
16
+ - `OgSearch` (@origen-ui/search): Standalone query/filter panels; avoid Owning list loading or pagination.
17
+ - `OgTable` (@origen-ui/table): Typed local or remote data tables; avoid Legacy fetch/searchSchema APIs or ElTable.
18
+ - `OgTableLocal` (@origen-ui/table): Editable local tables embedded in a form or workflow; avoid Treating local rows as an implicit remote data source.
19
+ - `OgTableWithSearch` (@origen-ui/table-search): Remote CRUD lists with search and paging; avoid Separate ad-hoc search and table state.
20
+ - `OgTabs` (@origen-ui/tabs): Page-local business tabs; avoid Using page-local tabs for route workspace state.
21
+ - `OgUpload` (@origen-ui/upload): Validated file uploads and URL projection; avoid Package-level transport clients or mutating internal files.
22
+ - `OgFormItem` (@origen-ui/form): A single schema-aware field needs to participate in an existing OgForm context; avoid Using it as a transparent Element Plus ElFormItem replacement.
23
+ - `FieldRenderer` (@origen-ui/form): An advanced integration needs the registered OgForm control renderer; avoid Treating it as a general-purpose Element Plus control wrapper.
24
+ - `SvgIcon` (@origen-ui/icons): Rendering a project SVG sprite icon; avoid Passing untrusted or arbitrary symbol identifiers.
25
+ - `RouterViewHost` (@origen-ui/router): Rendering a route workspace with keep-alive semantics; avoid Using it as a transparent vue-router RouterView replacement.
26
+ <!-- component-catalog:end -->
27
+
28
+ - Route workspace: `@origen-ui/router`; page-local business tabs: `OgTabs`.
29
+ - Use Element Plus only for primitives. Do not add `ElTable`, `ElForm`, `ElDialog`, axios, or raw fetch to a business feature.
30
+ - Pass AbortSignal through every list and async-options implementation. Configure permissions explicitly when a component declares them.
@@ -0,0 +1,12 @@
1
+ ---
2
+ description: 04-api-auth-router
3
+ alwaysApply: false
4
+ globs:
5
+ - '**/*'
6
+ ---
7
+ # API, authentication, and routing
8
+
9
+ - Create application-owned `ApiClient` instances with explicit response adapters.
10
+ - Keep token, refresh URL, CSRF source, and login navigation in the application adapter.
11
+ - Resolve backend component keys through the local registry; never import a backend-supplied path.
12
+ - Local authentication and menu providers are development-only. Remote failures must reach the caller.
@@ -0,0 +1,12 @@
1
+ ---
2
+ description: 05-style
3
+ alwaysApply: false
4
+ globs:
5
+ - '**/*'
6
+ ---
7
+ # Styling
8
+
9
+ - Use Element Plus CSS variables and the application theme tokens.
10
+ - Keep component styles scoped and use class selectors.
11
+ - Load only required `origen-ui/*.css` entries. `origen-ui/style.css` does not exist.
12
+ - Preserve responsive layouts and avoid hard-coded theme colors outside token definitions.
@@ -0,0 +1,12 @@
1
+ ---
2
+ description: 06-quality
3
+ alwaysApply: false
4
+ globs:
5
+ - '**/*'
6
+ ---
7
+ # Quality gates
8
+
9
+ - Run `pnpm type-check`, `pnpm test`, and `pnpm build` for application changes.
10
+ - Run `pnpm agents:check` after changing official rules or Skills.
11
+ - Do not use deprecated component APIs such as `resetFields`, `dependsOn`, global renderer registration, or legacy OgTable read APIs.
12
+ - Add focused unit or browser coverage for user-visible behavior and failed requests.
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: build-admin-feature
3
+ description: Build a typed Vue Admin business feature. Use when adding a page, CRUD workflow, feature folder, business API adapter, permissioned menu, or route in the standalone @origen-ui Admin scaffold.
4
+ alwaysApply: false
5
+ globs:
6
+ - 'packages/**'
7
+ ---
8
+
9
+ # Build an Admin feature
10
+
11
+ 1. Define the feature model, permissions, API contract, and route before writing a page.
12
+ 2. Create `api`, `composables`, `components`, and `pages` only when the responsibility exists.
13
+ 3. Select the mandatory @origen-ui business component before writing view code.
14
+ 4. Register a local component key for a remote menu; never trust a backend import path.
15
+ 5. Add a focused test and run application quality gates.
16
+
17
+ Read `references/component-selection.md` before choosing a UI primitive.
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: style-og-origen-ui
3
+ description: Style a standalone @origen-ui Admin page with origen-ui CSS entries, Element Plus design tokens, dark-mode variables, and responsive enterprise layout conventions.
4
+ alwaysApply: false
5
+ globs:
6
+ - 'packages/**'
7
+ ---
8
+
9
+ # Style Admin UI
10
+
11
+ Load `origen-ui/style.css` by default. Use an explicit component entry such as
12
+ `origen-ui/table-search.css` only when the application intentionally adopts
13
+ on-demand styles. Use Element Plus variables and application tokens, keep local styles
14
+ scoped, and verify light/dark rendering before finishing.
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: use-og-dialog
3
+ description: Build parent-controlled dialogs or awaitable edit workflows with @origen-ui/dialog. Use for dialog confirmation, close guards, dynamic form content, manager-owned sessions, and typed dialog outcomes.
4
+ alwaysApply: false
5
+ globs:
6
+ - 'packages/dialog/**'
7
+ ---
8
+
9
+ # Use OgDialog
10
+
11
+ Use `<OgDialog v-model>` for parent-owned visibility. For workflows, call
12
+ `app.use(createOgDialog())` once, render `OgDialogHost` in the application tree, and
13
+ open through `useDialog().open`. Handle the discriminated `DialogOutcome` and
14
+ keep dynamic content in the current Vue application context. Never call
15
+ `createApp()` or use a global fallback manager.
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: use-og-editor
3
+ description: Build rich text authoring and readonly content surfaces with @origen-ui/editor. Use for HTML editing, toolbar presets, media uploads, source mode, and content limits.
4
+ alwaysApply: false
5
+ globs:
6
+ - 'packages/editor/**'
7
+ ---
8
+
9
+ # Use OgEditor
10
+
11
+ Use `OgEditor` with `v-model` for authoring and `OgEditorViewer` for readonly
12
+ content. Load `@origen-ui/editor/style.css` (or the matching explicit
13
+ `origen-ui/editor.css` entry). Choose editor initialization through
14
+ the discriminated `setup` prop, then use `maxLength`, `readonly`, or `disabled` rather than wrapping
15
+ the editor in ad-hoc state.
16
+
17
+ Configure image, video, and attachment uploads independently through
18
+ `EditorUploadOptions`. Each `request` must honor the supplied `AbortSignal`,
19
+ report progress, and return an `EditorUploadResult`; keep transport and auth in
20
+ the application service. The component pipeline is
21
+ `validate -> transform -> request -> insert` for selection, drag/drop, and
22
+ pasted media, so do not bypass it with direct DOM insertion.
23
+
24
+ Treat initial HTML, pasted content, and source-mode edits as untrusted. Keep the
25
+ package sanitizer enabled and sanitize again on the server before persistence or
26
+ rendering. Use exposed methods such as `focus`, `setContent`, `retryUpload`, and
27
+ `cancelUpload` through a typed template ref, and handle upload events for
28
+ telemetry without duplicating upload state.
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: use-og-form
3
+ description: Build schema-driven create, edit, and readonly business forms with @origen-ui/form. Use for typed fields, permissions, validation, linkage, async options, custom renderers, and submission transforms.
4
+ alwaysApply: false
5
+ globs:
6
+ - 'packages/form/**'
7
+ ---
8
+
9
+ # Use OgForm
10
+
11
+ Use `FormField<T>` with `prop: keyof T & string`. Prefer visible, disabled, readonly,
12
+ dependencies plus linkage, compute, valueChange, or validators for cross-field behavior.
13
+ Use `type: 'custom'` with an instance `RendererRegistry`; unknown renderers must fail.
14
+ Custom controls must update the supplied model. Do not use removed `resetFields` or
15
+ `dependsOn` APIs.
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: use-og-form-table
3
+ description: Build typed editable array fields with @origen-ui/form-table. Use for line-item forms, local row editing, row creation/removal, and OgForm-linked table validation.
4
+ alwaysApply: false
5
+ globs:
6
+ - 'packages/form-table/**'
7
+ ---
8
+
9
+ # Use OgFormTable
10
+
11
+ Create the field with `createOgFormTableField<T, K, TRow>()` and keep `prop`
12
+ typed as a key of the parent form model. Declare a stable `tableId`, unique
13
+ `rowKey`, typed `columns`, and an optional async `createRow`; use `span` or
14
+ `newline` only for intentional OgForm grid placement. The helper defaults to
15
+ `span: 24` and writes every row addition, edit, and removal back to the parent
16
+ field immediately.
17
+
18
+ Use a `DataColumn` editor for editable cells and configure it with the same
19
+ OgForm field contract (`required`, `requiredWhen`, `validator`, `rules`,
20
+ `valueChange`, and `compute`). Cell commits include the complete computed row;
21
+ hidden, disabled, and readonly editors are excluded from validation. Preserve a
22
+ stable renderer registry when custom editors are needed, and ensure custom
23
+ controls update the supplied model.
24
+
25
+ The table is local state: use the existing OgTable column, filter, sort,
26
+ selection, persistence, and export configuration as needed, but do not add a
27
+ second remote fetch or mutate the parent form object directly. Keep row keys
28
+ unique and test add/edit/remove plus validation and computed-field behavior.
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: use-og-http
3
+ description: Configure or consume @origen-ui/http in a standalone Admin app. Use for API clients, business services, token refresh, CSRF, retry, cancellation, and authentication-expiry handling.
4
+ alwaysApply: false
5
+ globs:
6
+ - 'packages/http/**'
7
+ ---
8
+
9
+ # Use @origen-ui/http
10
+
11
+ Create application-owned `TokenManager` and `ApiClient` instances with an explicit
12
+ response adapter. Keep auth URLs, cookie access, refresh, and navigation in the
13
+ application adapter. Pass AbortSignal from callers, let rejected business errors
14
+ reach feature composables, and do not create package-level client singletons.
15
+
16
+ Only idempotent reads retry. Use `silent` only for expected failures.
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: use-og-router-tabs
3
+ description: Configure @origen-ui/router dynamic routes, access policies, backend menus, breadcrumbs, keep-alive metadata, and workspace tabs in the standalone Admin scaffold.
4
+ alwaysApply: false
5
+ globs:
6
+ - 'packages/router/**'
7
+ ---
8
+
9
+ # Use router and tabs
10
+
11
+ Transform validated backend menu data into local route component keys. Mark login
12
+ and error routes public and hidden. Keep permission checks in the access policy,
13
+ not page conditionals. Use `RouterViewHost` for the outlet and `RouterTabs` for
14
+ route workspace behavior; use `OgTabs` only for page-local tabs.
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: use-og-search
3
+ description: Build a typed standalone query panel with @origen-ui/search. Use for filter forms, async option loading, responsive search layout, reset behavior, and parameter transformation outside a OgTable list.
4
+ alwaysApply: false
5
+ globs:
6
+ - 'packages/search/**'
7
+ ---
8
+
9
+ # Use OgSearch
10
+
11
+ Keep list loading and pagination outside OgSearch. Type every field against the
12
+ query model, make `options` and `optionsApi` mutually exclusive, and pass the
13
+ provided AbortSignal to async option requests. Defaults initialize the component
14
+ once; later controlled model updates are authoritative. Submit explicitly; reset
15
+ is configured only through the `reset` object, clears every search field, and does
16
+ not silently load a list. Bind expansion through `v-model:expanded`; do not put
17
+ expansion state in `config` or use an imperative expansion setter.
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: use-og-table
3
+ description: Build typed remote lists, CRUD tables, paging, search, row actions, batch actions, drafts, exports, or virtual tables with @origen-ui/table and OgTableWithSearch.
4
+ alwaysApply: false
5
+ globs:
6
+ - 'packages/table/**'
7
+ ---
8
+
9
+ # Use OgTable
10
+
11
+ Declare `tableId`, `rowKey`, typed columns, and `dataSource` explicitly. Implement
12
+ `dataSource.list(request, context)` as the only read entry and pass
13
+ `context.signal` to the service. Use `config.search.fields`, action columns, and
14
+ `config.actions.batch`; do not restore `fetch`, `searchSchema`, or legacy search
15
+ v-model APIs. Configure built-ins only through named config blocks: state is
16
+ under `config.state`, while masking and analytics keep their own named blocks.
17
+ Register application extensions with `createOgTable({ extensions })` and
18
+ configure them only through `config.extensions`; never put built-in IDs there.
19
+ Provide `config.permissions.has` whenever permissions are declared.
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: use-og-upload
3
+ description: Build validated file workflows with @origen-ui/upload. Use for adapter-backed uploads, URL projection, retries, progress, file actions, and coordinated form submission.
4
+ alwaysApply: false
5
+ globs:
6
+ - 'packages/upload/**'
7
+ ---
8
+
9
+ # Use OgUpload
10
+
11
+ Prefer an application-owned `OgUploadAdapter` for business endpoints. Its
12
+ `upload` and optional `remove`, `preview`, and `download` callbacks must honor
13
+ the provided `AbortSignal`; pass progress through `onProgress` and keep auth and
14
+ request mapping in the application service. For conventional XHR endpoints,
15
+ create the same transport explicitly with `createXhrUploadAdapter(options)` and
16
+ pass the returned adapter; response mapping remains in `resolveResponse`.
17
+
18
+ Choose `valueType` intentionally: `fileList` exposes `OgUploadFile[]`, `url`
19
+ projects one URL, and `urls` projects a URL list. Set `accept`, `maxSize`,
20
+ `limit`, `multiple`, `duplicate`, and `beforeUpload` for validation. Use
21
+ `variant="drag"` or `"picture-card"` for the selection surface and keep
22
+ `showFileList` and labels accessible.
23
+
24
+ Leave `autoUpload` enabled unless a parent workflow needs an explicit submit;
25
+ then call the typed `submit()` expose and inspect its `successful`, `failed`, and
26
+ `pending` files. Configure retry deliberately, handle emitted validation and
27
+ operation errors, and use `abort`, `retry`, `remove`, or `clearFiles` through a
28
+ template ref instead of mutating internal files.
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: og-admin-scaffold
3
+ description: Official guidance for the standalone @origen-ui Admin scaffold.
4
+ ---
5
+
6
+ # @origen-ui Admin scaffold
7
+
8
+ Read `AGENTS.local.md` when it exists. Keep product code in `src/app` and
9
+ `src/features`; do not modify managed files or generated agent files without an
10
+ upgrade migration. Run `pnpm type-check` and `pnpm test` for every application change.
11
+
12
+ Use `build-admin-feature` before adding a feature. Use matching `use-og-*` skills
13
+ for tables, search, forms, dialogs, routing, or HTTP. Remote lists must use
14
+ `OgTableWithSearch`; forms use `OgForm`; dialogs use `OgDialog`; network
15
+ requests use `@origen-ui/http`. Do not replace these with Element Plus equivalents.
@@ -0,0 +1,6 @@
1
+ # Feature architecture
2
+
3
+ - Keep route pages thin composition surfaces under `src/features/<feature>/pages`.
4
+ - Put UI sections in `components`, stateful side effects in `composables`, and API adapters in `api`.
5
+ - Keep data flow as props down and typed events up. Do not mutate props.
6
+ - `src/app` owns application integration; `src/features` owns business behavior; examples never become feature dependencies.
@@ -0,0 +1,6 @@
1
+ # Vue and TypeScript
2
+
3
+ - Use Vue 3 `<script setup lang="ts">` and Composition API.
4
+ - Keep source state minimal, derive values with `computed`, and use watchers only for side effects.
5
+ - Type props, emits, exposed APIs, composable inputs, API payloads, and route metadata.
6
+ - Use `useTemplateRef` for imperative component APIs and keep templates declarative.
@@ -0,0 +1,24 @@
1
+ # @origen-ui component policy
2
+
3
+ <!-- component-catalog:start -->
4
+ - `OgDialog` (@origen-ui/dialog): Parent-controlled dialog UI; avoid Element Plus ElDialog in business features.
5
+ - `createOgDialog` (@origen-ui/dialog): Awaitable or manager-owned dialog workflows; avoid createApp or a global fallback manager.
6
+ - `OgEditor` (@origen-ui/editor): Rich text authoring; avoid Unsanitized HTML persistence or direct DOM insertion.
7
+ - `OgEditorViewer` (@origen-ui/editor): Readonly rich text rendering; avoid Rendering untrusted HTML without server sanitization.
8
+ - `OgForm` (@origen-ui/form): Schema-driven create, edit, or readonly forms; avoid Element Plus ElForm or removed legacy APIs.
9
+ - `OgFormTable` (@origen-ui/form-table): Editable array fields and line-item forms; avoid Mutating parent form arrays or duplicate remote table fetching.
10
+ - `OgSearch` (@origen-ui/search): Standalone query/filter panels; avoid Owning list loading or pagination.
11
+ - `OgTable` (@origen-ui/table): Typed local or remote data tables; avoid Legacy fetch/searchSchema APIs or ElTable.
12
+ - `OgTableLocal` (@origen-ui/table): Editable local tables embedded in a form or workflow; avoid Treating local rows as an implicit remote data source.
13
+ - `OgTableWithSearch` (@origen-ui/table-search): Remote CRUD lists with search and paging; avoid Separate ad-hoc search and table state.
14
+ - `OgTabs` (@origen-ui/tabs): Page-local business tabs; avoid Using page-local tabs for route workspace state.
15
+ - `OgUpload` (@origen-ui/upload): Validated file uploads and URL projection; avoid Package-level transport clients or mutating internal files.
16
+ - `OgFormItem` (@origen-ui/form): A single schema-aware field needs to participate in an existing OgForm context; avoid Using it as a transparent Element Plus ElFormItem replacement.
17
+ - `FieldRenderer` (@origen-ui/form): An advanced integration needs the registered OgForm control renderer; avoid Treating it as a general-purpose Element Plus control wrapper.
18
+ - `SvgIcon` (@origen-ui/icons): Rendering a project SVG sprite icon; avoid Passing untrusted or arbitrary symbol identifiers.
19
+ - `RouterViewHost` (@origen-ui/router): Rendering a route workspace with keep-alive semantics; avoid Using it as a transparent vue-router RouterView replacement.
20
+ <!-- component-catalog:end -->
21
+
22
+ - Route workspace: `@origen-ui/router`; page-local business tabs: `OgTabs`.
23
+ - Use Element Plus only for primitives. Do not add `ElTable`, `ElForm`, `ElDialog`, axios, or raw fetch to a business feature.
24
+ - Pass AbortSignal through every list and async-options implementation. Configure permissions explicitly when a component declares them.
@@ -0,0 +1,6 @@
1
+ # API, authentication, and routing
2
+
3
+ - Create application-owned `ApiClient` instances with explicit response adapters.
4
+ - Keep token, refresh URL, CSRF source, and login navigation in the application adapter.
5
+ - Resolve backend component keys through the local registry; never import a backend-supplied path.
6
+ - Local authentication and menu providers are development-only. Remote failures must reach the caller.
@@ -0,0 +1,6 @@
1
+ # Styling
2
+
3
+ - Use Element Plus CSS variables and the application theme tokens.
4
+ - Keep component styles scoped and use class selectors.
5
+ - Load only required `origen-ui/*.css` entries. `origen-ui/style.css` does not exist.
6
+ - Preserve responsive layouts and avoid hard-coded theme colors outside token definitions.
@@ -0,0 +1,6 @@
1
+ # Quality gates
2
+
3
+ - Run `pnpm type-check`, `pnpm test`, and `pnpm build` for application changes.
4
+ - Run `pnpm agents:check` after changing official rules or Skills.
5
+ - Do not use deprecated component APIs such as `resetFields`, `dependsOn`, global renderer registration, or legacy OgTable read APIs.
6
+ - Add focused unit or browser coverage for user-visible behavior and failed requests.
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: build-admin-feature
3
+ description: Build a typed Vue Admin business feature. Use when adding a page, CRUD workflow, feature folder, business API adapter, permissioned menu, or route in the standalone @origen-ui Admin scaffold.
4
+ ---
5
+
6
+ # Build an Admin feature
7
+
8
+ 1. Define the feature model, permissions, API contract, and route before writing a page.
9
+ 2. Create `api`, `composables`, `components`, and `pages` only when the responsibility exists.
10
+ 3. Select the mandatory @origen-ui business component before writing view code.
11
+ 4. Register a local component key for a remote menu; never trust a backend import path.
12
+ 5. Add a focused test and run application quality gates.
13
+
14
+ Read `references/component-selection.md` before choosing a UI primitive.