robodev 0.11.0 → 0.13.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 (329) hide show
  1. package/package.json +1 -1
  2. package/src/collect-files.test.ts +19 -0
  3. package/src/collect-files.ts +1 -0
  4. package/src/config.test.ts +26 -0
  5. package/src/config.ts +34 -5
  6. package/src/emit-starter.test.ts +68 -0
  7. package/src/emit-starter.ts +47 -13
  8. package/src/index.ts +45 -4
  9. package/templates/auth-chat/.config/local.spa.template.yml +27 -0
  10. package/templates/auth-chat/.oxlint-base.json +29 -0
  11. package/templates/auth-chat/.oxlintrc.json +78 -0
  12. package/templates/auth-chat/.rulesync/rules/frontend-api-boundary.md +36 -0
  13. package/templates/auth-chat/.rulesync/rules/frontend-component-structure.md +38 -0
  14. package/templates/auth-chat/.rulesync/rules/frontend-forms.md +32 -0
  15. package/templates/auth-chat/.rulesync/rules/frontend-notifications.md +24 -0
  16. package/templates/auth-chat/.rulesync/rules/frontend-povio-components.md +42 -0
  17. package/templates/auth-chat/.rulesync/rules/frontend-povio-ui.md +45 -0
  18. package/templates/auth-chat/.rulesync/rules/frontend-query-autocomplete.md +29 -0
  19. package/templates/auth-chat/.rulesync/rules/frontend-tables-and-lists.md +34 -0
  20. package/templates/auth-chat/.rulesync/rules/frontend-translations.md +26 -0
  21. package/templates/auth-chat/.rulesync/rules/project-overview.md +32 -0
  22. package/templates/auth-chat/.rulesync/rules/robodev-api.md +30 -0
  23. package/templates/auth-chat/.rulesync/rules/robodev-auth.md +40 -0
  24. package/templates/auth-chat/.rulesync/rules/robodev-database.md +22 -0
  25. package/templates/auth-chat/.rulesync/rules/role-based-app-structure.md +36 -0
  26. package/templates/auth-chat/.rulesync/skills/media-feature/SKILL.md +21 -0
  27. package/templates/auth-chat/.rulesync/skills/povio-ui-styling/SKILL.md +208 -0
  28. package/templates/auth-chat/.rulesync/skills/povio-ui-styling/agents/openai.yaml +4 -0
  29. package/templates/auth-chat/.rulesync/skills/robodev-api-route/SKILL.md +13 -0
  30. package/templates/auth-chat/.rulesync/skills/robodev-table/SKILL.md +12 -0
  31. package/templates/auth-chat/README.md +26 -7
  32. package/templates/auth-chat/api/invite.ts +43 -0
  33. package/templates/auth-chat/apps/fe/index.html +24 -0
  34. package/templates/auth-chat/apps/fe/openapi-codegen.config.ts +37 -0
  35. package/templates/auth-chat/apps/fe/package.json +82 -0
  36. package/templates/auth-chat/apps/fe/public/apple-touch-icon.png +0 -0
  37. package/templates/auth-chat/apps/fe/public/favicon-96x96.png +0 -0
  38. package/templates/auth-chat/apps/fe/public/favicon.ico +0 -0
  39. package/templates/auth-chat/apps/fe/public/favicon.svg +3 -0
  40. package/templates/auth-chat/apps/fe/public/site.webmanifest +21 -0
  41. package/templates/auth-chat/apps/fe/public/web-app-manifest-192x192.png +0 -0
  42. package/templates/auth-chat/apps/fe/public/web-app-manifest-512x512.png +0 -0
  43. package/templates/auth-chat/apps/fe/src/assets/fonts/GeneralSans-Bold.otf +0 -0
  44. package/templates/auth-chat/apps/fe/src/assets/fonts/GeneralSans-Medium.otf +0 -0
  45. package/templates/auth-chat/apps/fe/src/assets/fonts/GeneralSans-Regular.otf +0 -0
  46. package/templates/auth-chat/apps/fe/src/assets/fonts/GeneralSans-Semibold.otf +0 -0
  47. package/templates/auth-chat/apps/fe/src/assets/locales/en/translation.json +202 -0
  48. package/templates/auth-chat/apps/fe/src/assets/locales/sl/translation.json +202 -0
  49. package/templates/auth-chat/apps/fe/src/clients/app-rest-client.ts +15 -0
  50. package/templates/auth-chat/apps/fe/src/clients/auth-token-store.ts +101 -0
  51. package/templates/auth-chat/apps/fe/src/clients/rest/app-error-handler.ts +31 -0
  52. package/templates/auth-chat/apps/fe/src/clients/rest/interceptors/authorization-header.interceptor.ts +15 -0
  53. package/templates/auth-chat/apps/fe/src/clients/rest/interceptors/refresh-token.interceptor.ts +37 -0
  54. package/templates/auth-chat/apps/fe/src/clients/rest/interceptors/response.interceptor.ts +17 -0
  55. package/templates/auth-chat/apps/fe/src/components/404.tsx +18 -0
  56. package/templates/auth-chat/apps/fe/src/components/features/auth/AuthBrandPanel.tsx +60 -0
  57. package/templates/auth-chat/apps/fe/src/components/features/auth/AuthLayout.tsx +23 -0
  58. package/templates/auth-chat/apps/fe/src/components/features/auth/LoginPage.tsx +111 -0
  59. package/templates/auth-chat/apps/fe/src/components/features/auth/RegisterPage.tsx +143 -0
  60. package/templates/auth-chat/apps/fe/src/components/features/chat/ChatPage.tsx +105 -0
  61. package/templates/auth-chat/apps/fe/src/components/features/chat/InviteForm.tsx +84 -0
  62. package/templates/auth-chat/apps/fe/src/components/features/profile/ProfilePage.tsx +96 -0
  63. package/templates/auth-chat/apps/fe/src/components/googleAnalytics/GoogleAnalytics.tsx +35 -0
  64. package/templates/auth-chat/apps/fe/src/components/layout/AppLayout.tsx +19 -0
  65. package/templates/auth-chat/apps/fe/src/components/layout/app-header/AppHeader.tsx +91 -0
  66. package/templates/auth-chat/apps/fe/src/components/layout/app-header/MobileNavigation.tsx +51 -0
  67. package/templates/auth-chat/apps/fe/src/components/layout/app-header/NavLink.tsx +29 -0
  68. package/templates/auth-chat/apps/fe/src/components/shared/branding/BrandLogo.tsx +13 -0
  69. package/templates/auth-chat/apps/fe/src/components/shared/error/ErrorFallback.tsx +43 -0
  70. package/templates/auth-chat/apps/fe/src/components/shared/error/ErrorText.tsx +20 -0
  71. package/templates/auth-chat/apps/fe/src/components/shared/error/NotFound.tsx +36 -0
  72. package/templates/auth-chat/apps/fe/src/components/shared/forms/RequiredLabel.tsx +21 -0
  73. package/templates/auth-chat/apps/fe/src/components/shared/forms/RowInputWrapper.tsx +50 -0
  74. package/templates/auth-chat/apps/fe/src/components/shared/head/AppHead.tsx +32 -0
  75. package/templates/auth-chat/apps/fe/src/components/shared/head/DefaultAppHead.tsx +34 -0
  76. package/templates/auth-chat/apps/fe/src/components/shared/layout/LoadingState.tsx +9 -0
  77. package/templates/auth-chat/apps/fe/src/components/shared/layout/ThinPageWrapper.tsx +5 -0
  78. package/templates/auth-chat/apps/fe/src/components/shared/page/PageHeader.tsx +69 -0
  79. package/templates/auth-chat/apps/fe/src/components/shared/ui/Card.tsx +60 -0
  80. package/templates/auth-chat/apps/fe/src/components/shared/ui/GoogleLoginButton.tsx +19 -0
  81. package/templates/auth-chat/apps/fe/src/components/shared/ui/RequiredLabel.tsx +22 -0
  82. package/templates/auth-chat/apps/fe/src/components/shared/ui/TableActions.tsx +22 -0
  83. package/templates/auth-chat/apps/fe/src/config/app.config.ts +35 -0
  84. package/templates/auth-chat/apps/fe/src/config/i18n.ts +43 -0
  85. package/templates/auth-chat/apps/fe/src/config/inits/a11y.ts +14 -0
  86. package/templates/auth-chat/apps/fe/src/config/inits/logger.ts +7 -0
  87. package/templates/auth-chat/apps/fe/src/config/inits/sentry.ts +21 -0
  88. package/templates/auth-chat/apps/fe/src/config/jwt.config.ts +2 -0
  89. package/templates/auth-chat/apps/fe/src/config/query.config.ts +20 -0
  90. package/templates/auth-chat/apps/fe/src/hooks/useAuth.ts +5 -0
  91. package/templates/auth-chat/apps/fe/src/main.tsx +52 -0
  92. package/templates/auth-chat/apps/fe/src/pages/(guest)/login.tsx +23 -0
  93. package/templates/auth-chat/apps/fe/src/pages/(guest)/register.tsx +23 -0
  94. package/templates/auth-chat/apps/fe/src/pages/(guest)/route.tsx +18 -0
  95. package/templates/auth-chat/apps/fe/src/pages/(private)/index.tsx +23 -0
  96. package/templates/auth-chat/apps/fe/src/pages/(private)/profile.tsx +23 -0
  97. package/templates/auth-chat/apps/fe/src/pages/(private)/route.tsx +18 -0
  98. package/templates/auth-chat/apps/fe/src/pages/(public)/auth.tsx +37 -0
  99. package/templates/auth-chat/apps/fe/src/pages/(public)/route.tsx +9 -0
  100. package/templates/auth-chat/apps/fe/src/pages/__root.tsx +164 -0
  101. package/templates/auth-chat/apps/fe/src/providers/AppErrorBoundary.tsx +10 -0
  102. package/templates/auth-chat/apps/fe/src/providers/OpenApiRuntimeProvider.tsx +31 -0
  103. package/templates/auth-chat/apps/fe/src/providers/index.tsx +44 -0
  104. package/templates/auth-chat/apps/fe/src/providers/jwt.provider.tsx +95 -0
  105. package/templates/auth-chat/apps/fe/src/routeTree.gen.ts +225 -0
  106. package/templates/auth-chat/apps/fe/src/styles/base.css +103 -0
  107. package/templates/auth-chat/apps/fe/src/styles/fonts/fonts.tsx +10 -0
  108. package/templates/auth-chat/apps/fe/src/styles/fonts/general-sans.css +31 -0
  109. package/templates/auth-chat/apps/fe/src/styles/globals.css +28 -0
  110. package/templates/auth-chat/apps/fe/src/styles/overrides/defaults/button.override.ts +536 -0
  111. package/templates/auth-chat/apps/fe/src/styles/overrides/defaults/checkbox.override.ts +71 -0
  112. package/templates/auth-chat/apps/fe/src/styles/overrides/defaults/input.override.ts +252 -0
  113. package/templates/auth-chat/apps/fe/src/styles/overrides/defaults/label.override.ts +91 -0
  114. package/templates/auth-chat/apps/fe/src/styles/overrides/defaults/modal.override.ts +57 -0
  115. package/templates/auth-chat/apps/fe/src/styles/overrides/defaults/radio.override.ts +46 -0
  116. package/templates/auth-chat/apps/fe/src/styles/overrides/defaults/table.override.ts +104 -0
  117. package/templates/auth-chat/apps/fe/src/styles/overrides/defaults/tag.override.ts +66 -0
  118. package/templates/auth-chat/apps/fe/src/styles/overrides/defaults/typography.override.ts +115 -0
  119. package/templates/auth-chat/apps/fe/src/styles/overrides/outline.clsx.ts +10 -0
  120. package/templates/auth-chat/apps/fe/src/styles/overrides/uiOverrides.override.ts +60 -0
  121. package/templates/auth-chat/apps/fe/src/styles/theme.css +2177 -0
  122. package/templates/auth-chat/apps/fe/src/types/i18next.d.ts +12 -0
  123. package/templates/auth-chat/apps/fe/src/types/table.d.ts +17 -0
  124. package/templates/auth-chat/apps/fe/src/types/ui.d.ts +26 -0
  125. package/templates/auth-chat/apps/fe/src/types/vite-env.d.ts +20 -0
  126. package/templates/auth-chat/apps/fe/src/utils/date.utils.ts +17 -0
  127. package/templates/auth-chat/apps/fe/src/utils/number.utils.ts +12 -0
  128. package/templates/auth-chat/apps/fe/src/utils/string.utils.ts +5 -0
  129. package/templates/auth-chat/apps/fe/src/vite-env.d.ts +1 -0
  130. package/templates/auth-chat/apps/fe/tsconfig.app.json +32 -0
  131. package/templates/auth-chat/apps/fe/tsconfig.json +9 -0
  132. package/templates/auth-chat/apps/fe/tsconfig.node.json +31 -0
  133. package/templates/auth-chat/apps/fe/vite.config.ts +94 -0
  134. package/templates/auth-chat/openapi.json +1016 -0
  135. package/templates/auth-chat/oxfmt.config.js +23 -0
  136. package/templates/auth-chat/package.json +6 -13
  137. package/templates/auth-chat/rulesync.jsonc +18 -0
  138. package/templates/auth-chat/tsconfig.json +2 -4
  139. package/templates/backend/README.md +2 -2
  140. package/templates/backend/api/_lib.ts +359 -0
  141. package/templates/backend/api/aliens/labels.ts +19 -0
  142. package/templates/backend/api/files/presigned-url.ts +48 -0
  143. package/templates/backend/api/files/upload.ts +29 -0
  144. package/templates/backend/api/planets/[id]/like.ts +36 -0
  145. package/templates/backend/api/planets/[id].ts +56 -13
  146. package/templates/backend/api/planets/paginate.ts +36 -0
  147. package/templates/backend/api/planets.ts +52 -44
  148. package/templates/backend/database.ts +33 -13
  149. package/templates/backend/package.json +1 -1
  150. package/templates/catalog.json +3 -3
  151. package/templates/empty/package.json +1 -1
  152. package/templates/space/.config/local.spa.template.yml +27 -0
  153. package/templates/space/.oxlint-base.json +29 -0
  154. package/templates/space/.oxlintrc.json +78 -0
  155. package/templates/space/.rulesync/rules/frontend-api-boundary.md +36 -0
  156. package/templates/space/.rulesync/rules/frontend-component-structure.md +38 -0
  157. package/templates/space/.rulesync/rules/frontend-forms.md +32 -0
  158. package/templates/space/.rulesync/rules/frontend-notifications.md +24 -0
  159. package/templates/space/.rulesync/rules/frontend-povio-components.md +42 -0
  160. package/templates/space/.rulesync/rules/frontend-povio-ui.md +45 -0
  161. package/templates/space/.rulesync/rules/frontend-query-autocomplete.md +29 -0
  162. package/templates/space/.rulesync/rules/frontend-tables-and-lists.md +34 -0
  163. package/templates/space/.rulesync/rules/frontend-translations.md +26 -0
  164. package/templates/space/.rulesync/rules/project-overview.md +32 -0
  165. package/templates/space/.rulesync/rules/robodev-api.md +30 -0
  166. package/templates/space/.rulesync/rules/robodev-auth.md +40 -0
  167. package/templates/space/.rulesync/rules/robodev-database.md +22 -0
  168. package/templates/space/.rulesync/rules/role-based-app-structure.md +36 -0
  169. package/templates/space/.rulesync/skills/media-feature/SKILL.md +21 -0
  170. package/templates/space/.rulesync/skills/povio-ui-styling/SKILL.md +208 -0
  171. package/templates/space/.rulesync/skills/povio-ui-styling/agents/openai.yaml +4 -0
  172. package/templates/space/.rulesync/skills/robodev-api-route/SKILL.md +13 -0
  173. package/templates/space/.rulesync/skills/robodev-table/SKILL.md +12 -0
  174. package/templates/space/README.md +26 -7
  175. package/templates/space/api/_lib.ts +359 -0
  176. package/templates/space/api/aliens/labels.ts +19 -0
  177. package/templates/space/api/files/presigned-url.ts +48 -0
  178. package/templates/space/api/files/upload.ts +29 -0
  179. package/templates/space/api/planets/[id]/like.ts +36 -0
  180. package/templates/space/api/planets/[id].ts +56 -13
  181. package/templates/space/api/planets/paginate.ts +36 -0
  182. package/templates/space/api/planets.ts +52 -44
  183. package/templates/space/apps/fe/index.html +24 -0
  184. package/templates/space/apps/fe/openapi-codegen.config.ts +37 -0
  185. package/templates/space/apps/fe/package.json +82 -0
  186. package/templates/space/apps/fe/public/apple-touch-icon.png +0 -0
  187. package/templates/space/apps/fe/public/favicon-96x96.png +0 -0
  188. package/templates/space/apps/fe/public/favicon.ico +0 -0
  189. package/templates/space/apps/fe/public/favicon.svg +3 -0
  190. package/templates/space/apps/fe/public/site.webmanifest +21 -0
  191. package/templates/space/apps/fe/public/web-app-manifest-192x192.png +0 -0
  192. package/templates/space/apps/fe/public/web-app-manifest-512x512.png +0 -0
  193. package/templates/space/apps/fe/src/assets/fonts/GeneralSans-Bold.otf +0 -0
  194. package/templates/space/apps/fe/src/assets/fonts/GeneralSans-Medium.otf +0 -0
  195. package/templates/space/apps/fe/src/assets/fonts/GeneralSans-Regular.otf +0 -0
  196. package/templates/space/apps/fe/src/assets/fonts/GeneralSans-Semibold.otf +0 -0
  197. package/templates/space/apps/fe/src/assets/locales/en/translation.json +301 -0
  198. package/templates/space/apps/fe/src/assets/locales/sl/translation.json +301 -0
  199. package/templates/space/apps/fe/src/clients/app-rest-client.ts +15 -0
  200. package/templates/space/apps/fe/src/clients/auth-token-store.ts +101 -0
  201. package/templates/space/apps/fe/src/clients/rest/app-error-handler.ts +31 -0
  202. package/templates/space/apps/fe/src/clients/rest/interceptors/authorization-header.interceptor.ts +15 -0
  203. package/templates/space/apps/fe/src/clients/rest/interceptors/refresh-token.interceptor.ts +37 -0
  204. package/templates/space/apps/fe/src/clients/rest/interceptors/response.interceptor.ts +17 -0
  205. package/templates/space/apps/fe/src/components/404.tsx +18 -0
  206. package/templates/space/apps/fe/src/components/features/auth/AuthBrandPanel.tsx +60 -0
  207. package/templates/space/apps/fe/src/components/features/auth/AuthLayout.tsx +23 -0
  208. package/templates/space/apps/fe/src/components/features/auth/LoginPage.tsx +111 -0
  209. package/templates/space/apps/fe/src/components/features/auth/RegisterPage.tsx +143 -0
  210. package/templates/space/apps/fe/src/components/features/home/HomePage.tsx +21 -0
  211. package/templates/space/apps/fe/src/components/features/planets/details/PlanetDetailsPage.tsx +139 -0
  212. package/templates/space/apps/fe/src/components/features/planets/details/PlanetEditPage.tsx +266 -0
  213. package/templates/space/apps/fe/src/components/features/planets/feed/PlanetFeedCard.tsx +131 -0
  214. package/templates/space/apps/fe/src/components/features/planets/feed/PlanetsFeedPage.tsx +119 -0
  215. package/templates/space/apps/fe/src/components/features/planets/list/PlanetCard.tsx +89 -0
  216. package/templates/space/apps/fe/src/components/features/planets/list/PlanetCreateModal.tsx +179 -0
  217. package/templates/space/apps/fe/src/components/features/planets/list/PlanetsFilters.css +3 -0
  218. package/templates/space/apps/fe/src/components/features/planets/list/PlanetsFilters.tsx +73 -0
  219. package/templates/space/apps/fe/src/components/features/planets/list/PlanetsGridPage.tsx +51 -0
  220. package/templates/space/apps/fe/src/components/features/planets/list/PlanetsInfiniteTablePage.tsx +79 -0
  221. package/templates/space/apps/fe/src/components/features/planets/list/PlanetsPage.tsx +65 -0
  222. package/templates/space/apps/fe/src/components/features/planets/list/PlanetsTablePage.tsx +72 -0
  223. package/templates/space/apps/fe/src/components/features/planets/list/PlanetsTableSummary.tsx +29 -0
  224. package/templates/space/apps/fe/src/components/features/planets/list/PlanetsViewTabs.tsx +79 -0
  225. package/templates/space/apps/fe/src/components/features/planets/list/table/PlanetsTable.tsx +30 -0
  226. package/templates/space/apps/fe/src/components/features/planets/list/table/PlanetsTableActions.tsx +64 -0
  227. package/templates/space/apps/fe/src/components/features/planets/list/table/PlanetsTableInfinite.tsx +36 -0
  228. package/templates/space/apps/fe/src/components/features/planets/list/table/planetsTableColumns.tsx +72 -0
  229. package/templates/space/apps/fe/src/components/features/planets/list/table/usePlanetTableFilters.tsx +102 -0
  230. package/templates/space/apps/fe/src/components/features/profile/ProfilePage.tsx +96 -0
  231. package/templates/space/apps/fe/src/components/googleAnalytics/GoogleAnalytics.tsx +35 -0
  232. package/templates/space/apps/fe/src/components/layout/AppLayout.tsx +19 -0
  233. package/templates/space/apps/fe/src/components/layout/app-header/AppHeader.tsx +93 -0
  234. package/templates/space/apps/fe/src/components/layout/app-header/MobileNavigation.tsx +53 -0
  235. package/templates/space/apps/fe/src/components/layout/app-header/NavLink.tsx +29 -0
  236. package/templates/space/apps/fe/src/components/shared/branding/BrandLogo.tsx +13 -0
  237. package/templates/space/apps/fe/src/components/shared/error/ErrorFallback.tsx +43 -0
  238. package/templates/space/apps/fe/src/components/shared/error/ErrorText.tsx +20 -0
  239. package/templates/space/apps/fe/src/components/shared/error/NotFound.tsx +36 -0
  240. package/templates/space/apps/fe/src/components/shared/forms/RequiredLabel.tsx +21 -0
  241. package/templates/space/apps/fe/src/components/shared/forms/RowInputWrapper.tsx +50 -0
  242. package/templates/space/apps/fe/src/components/shared/head/AppHead.tsx +32 -0
  243. package/templates/space/apps/fe/src/components/shared/head/DefaultAppHead.tsx +34 -0
  244. package/templates/space/apps/fe/src/components/shared/layout/LoadingState.tsx +9 -0
  245. package/templates/space/apps/fe/src/components/shared/layout/ThinPageWrapper.tsx +5 -0
  246. package/templates/space/apps/fe/src/components/shared/page/PageHeader.tsx +69 -0
  247. package/templates/space/apps/fe/src/components/shared/ui/Card.tsx +60 -0
  248. package/templates/space/apps/fe/src/components/shared/ui/GoogleLoginButton.tsx +19 -0
  249. package/templates/space/apps/fe/src/components/shared/ui/RequiredLabel.tsx +22 -0
  250. package/templates/space/apps/fe/src/components/shared/ui/TableActions.tsx +22 -0
  251. package/templates/space/apps/fe/src/config/app.config.ts +35 -0
  252. package/templates/space/apps/fe/src/config/i18n.ts +43 -0
  253. package/templates/space/apps/fe/src/config/inits/a11y.ts +14 -0
  254. package/templates/space/apps/fe/src/config/inits/logger.ts +7 -0
  255. package/templates/space/apps/fe/src/config/inits/sentry.ts +21 -0
  256. package/templates/space/apps/fe/src/config/jwt.config.ts +2 -0
  257. package/templates/space/apps/fe/src/config/query.config.ts +20 -0
  258. package/templates/space/apps/fe/src/hooks/useAuth.ts +5 -0
  259. package/templates/space/apps/fe/src/main.tsx +52 -0
  260. package/templates/space/apps/fe/src/pages/(guest)/login.tsx +23 -0
  261. package/templates/space/apps/fe/src/pages/(guest)/register.tsx +23 -0
  262. package/templates/space/apps/fe/src/pages/(guest)/route.tsx +18 -0
  263. package/templates/space/apps/fe/src/pages/(private)/index.tsx +23 -0
  264. package/templates/space/apps/fe/src/pages/(private)/planets/$id/edit.tsx +53 -0
  265. package/templates/space/apps/fe/src/pages/(private)/planets/$id/index.tsx +41 -0
  266. package/templates/space/apps/fe/src/pages/(private)/planets/index.tsx +24 -0
  267. package/templates/space/apps/fe/src/pages/(private)/planets-feed.tsx +23 -0
  268. package/templates/space/apps/fe/src/pages/(private)/profile.tsx +23 -0
  269. package/templates/space/apps/fe/src/pages/(private)/route.tsx +18 -0
  270. package/templates/space/apps/fe/src/pages/(public)/auth.tsx +37 -0
  271. package/templates/space/apps/fe/src/pages/(public)/route.tsx +9 -0
  272. package/templates/space/apps/fe/src/pages/__root.tsx +164 -0
  273. package/templates/space/apps/fe/src/providers/AppErrorBoundary.tsx +10 -0
  274. package/templates/space/apps/fe/src/providers/OpenApiRuntimeProvider.tsx +31 -0
  275. package/templates/space/apps/fe/src/providers/index.tsx +44 -0
  276. package/templates/space/apps/fe/src/providers/jwt.provider.tsx +95 -0
  277. package/templates/space/apps/fe/src/routeTree.gen.ts +309 -0
  278. package/templates/space/apps/fe/src/styles/base.css +103 -0
  279. package/templates/space/apps/fe/src/styles/fonts/fonts.tsx +10 -0
  280. package/templates/space/apps/fe/src/styles/fonts/general-sans.css +31 -0
  281. package/templates/space/apps/fe/src/styles/globals.css +28 -0
  282. package/templates/space/apps/fe/src/styles/overrides/defaults/button.override.ts +536 -0
  283. package/templates/space/apps/fe/src/styles/overrides/defaults/checkbox.override.ts +71 -0
  284. package/templates/space/apps/fe/src/styles/overrides/defaults/input.override.ts +252 -0
  285. package/templates/space/apps/fe/src/styles/overrides/defaults/label.override.ts +91 -0
  286. package/templates/space/apps/fe/src/styles/overrides/defaults/modal.override.ts +57 -0
  287. package/templates/space/apps/fe/src/styles/overrides/defaults/radio.override.ts +46 -0
  288. package/templates/space/apps/fe/src/styles/overrides/defaults/table.override.ts +104 -0
  289. package/templates/space/apps/fe/src/styles/overrides/defaults/tag.override.ts +66 -0
  290. package/templates/space/apps/fe/src/styles/overrides/defaults/typography.override.ts +115 -0
  291. package/templates/space/apps/fe/src/styles/overrides/outline.clsx.ts +10 -0
  292. package/templates/space/apps/fe/src/styles/overrides/uiOverrides.override.ts +60 -0
  293. package/templates/space/apps/fe/src/styles/theme.css +2177 -0
  294. package/templates/space/apps/fe/src/types/i18next.d.ts +12 -0
  295. package/templates/space/apps/fe/src/types/table.d.ts +17 -0
  296. package/templates/space/apps/fe/src/types/ui.d.ts +26 -0
  297. package/templates/space/apps/fe/src/types/vite-env.d.ts +20 -0
  298. package/templates/space/apps/fe/src/utils/date.utils.ts +17 -0
  299. package/templates/space/apps/fe/src/utils/image-fallback.ts +9 -0
  300. package/templates/space/apps/fe/src/utils/media-upload.ts +63 -0
  301. package/templates/space/apps/fe/src/utils/number.utils.ts +12 -0
  302. package/templates/space/apps/fe/src/utils/string.utils.ts +5 -0
  303. package/templates/space/apps/fe/src/vite-env.d.ts +1 -0
  304. package/templates/space/apps/fe/tsconfig.app.json +32 -0
  305. package/templates/space/apps/fe/tsconfig.json +9 -0
  306. package/templates/space/apps/fe/tsconfig.node.json +31 -0
  307. package/templates/space/apps/fe/vite.config.ts +94 -0
  308. package/templates/space/database.ts +33 -13
  309. package/templates/space/openapi.json +1819 -0
  310. package/templates/space/oxfmt.config.js +23 -0
  311. package/templates/space/package.json +6 -13
  312. package/templates/space/rulesync.jsonc +18 -0
  313. package/templates/space/tsconfig.json +2 -4
  314. package/templates/auth-chat/index.html +0 -201
  315. package/templates/auth-chat/src/main.tsx +0 -282
  316. package/templates/auth-chat/vite.config.ts +0 -7
  317. package/templates/backend/api/health.ts +0 -7
  318. package/templates/backend/api/launch.ts +0 -29
  319. package/templates/backend/api/me.ts +0 -14
  320. package/templates/backend/api/motto.ts +0 -9
  321. package/templates/backend/api/rockets.ts +0 -43
  322. package/templates/space/api/health.ts +0 -7
  323. package/templates/space/api/launch.ts +0 -29
  324. package/templates/space/api/me.ts +0 -14
  325. package/templates/space/api/motto.ts +0 -9
  326. package/templates/space/api/rockets.ts +0 -43
  327. package/templates/space/index.html +0 -138
  328. package/templates/space/src/main.tsx +0 -229
  329. package/templates/space/vite.config.ts +0 -7
@@ -1,29 +0,0 @@
1
- /** POST /api/launch — marks a rocket as launched. */
2
- import { rockets } from "../database";
3
- import { defineApi, eq, z } from "@robodev-ai/sdk";
4
-
5
- const Rocket = z.object({
6
- id: z.string(),
7
- name: z.string(),
8
- destinationId: z.string(),
9
- launched: z.boolean(),
10
- });
11
-
12
- export const post = defineApi({
13
- body: z.object({
14
- id: z.string().uuid(),
15
- }),
16
- response: Rocket,
17
- handler: async ({ db, body }) => {
18
- const rows = await db
19
- .update(rockets)
20
- .set({ launched: true })
21
- .where(eq(rockets.id, body.id))
22
- .returning();
23
- const row = rows[0];
24
- if (!row) {
25
- throw new Error("Rocket not found");
26
- }
27
- return Rocket.parse(row);
28
- },
29
- });
@@ -1,14 +0,0 @@
1
- /** GET /api/me — current project user (Robodev Auth required). */
2
- import { defineApi, z } from "@robodev-ai/sdk";
3
-
4
- export const get = defineApi({
5
- auth: "required",
6
- response: z.object({
7
- user: z.object({
8
- id: z.string(),
9
- email: z.string(),
10
- name: z.string().nullable().optional(),
11
- }),
12
- }),
13
- handler: async ({ user }) => ({ user }),
14
- });
@@ -1,9 +0,0 @@
1
- /** GET /api/motto — plain-text envelope response. */
2
- import { defineApi } from "@robodev-ai/sdk";
3
-
4
- export const get = defineApi({
5
- handler: async () => ({
6
- contentType: "text/plain; charset=utf-8",
7
- body: "Ad astra",
8
- }),
9
- });
@@ -1,43 +0,0 @@
1
- /** GET/POST /api/rockets — list (optional `?destinationId=`) and create rockets. */
2
- import { rockets } from "../database";
3
- import { defineApi, eq, z } from "@robodev-ai/sdk";
4
-
5
- const Rocket = z.object({
6
- id: z.string(),
7
- name: z.string(),
8
- destinationId: z.string(),
9
- launched: z.boolean(),
10
- });
11
-
12
- export const get = defineApi({
13
- query: z.object({
14
- destinationId: z.string().optional(),
15
- }),
16
- response: z.array(Rocket),
17
- handler: async ({ db, query }) => {
18
- const rows = query.destinationId
19
- ? await db.select().from(rockets).where(eq(rockets.destinationId, query.destinationId))
20
- : await db.select().from(rockets);
21
- return Rocket.array().parse(rows);
22
- },
23
- });
24
-
25
- export const post = defineApi({
26
- body: z.object({
27
- name: z.string().min(1),
28
- destinationId: z.string().uuid(),
29
- launched: z.boolean().optional(),
30
- }),
31
- response: Rocket,
32
- handler: async ({ db, body }) => {
33
- const [row] = await db
34
- .insert(rockets)
35
- .values({
36
- name: body.name,
37
- destinationId: body.destinationId,
38
- launched: body.launched ?? false,
39
- })
40
- .returning();
41
- return Rocket.parse(row);
42
- },
43
- });
@@ -1,138 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>{{NAME}}</title>
7
- <style>
8
- :root {
9
- color-scheme: dark;
10
- --bg: #12141a;
11
- --panel: #1b1e27;
12
- --line: #2c3140;
13
- --text: #ece8df;
14
- --muted: #9a9488;
15
- --accent: #d4a15a;
16
- }
17
- * {
18
- box-sizing: border-box;
19
- }
20
- body {
21
- margin: 0;
22
- min-height: 100vh;
23
- background: var(--bg);
24
- color: var(--text);
25
- font:
26
- 15px/1.5 ui-sans-serif,
27
- system-ui,
28
- sans-serif;
29
- }
30
- main {
31
- max-width: 920px;
32
- margin: 0 auto;
33
- padding: 32px 20px 64px;
34
- }
35
- h1 {
36
- font-size: 28px;
37
- font-weight: 600;
38
- letter-spacing: -0.03em;
39
- margin: 0 0 6px;
40
- }
41
- .lede {
42
- color: var(--muted);
43
- margin: 0 0 28px;
44
- }
45
- .grid {
46
- display: grid;
47
- gap: 20px;
48
- grid-template-columns: 1fr;
49
- }
50
- @media (min-width: 760px) {
51
- .grid {
52
- grid-template-columns: 1fr 1fr;
53
- }
54
- }
55
- section {
56
- background: var(--panel);
57
- border: 1px solid var(--line);
58
- border-radius: 10px;
59
- padding: 18px;
60
- }
61
- h2 {
62
- margin: 0 0 14px;
63
- font-size: 16px;
64
- font-weight: 600;
65
- }
66
- ul {
67
- list-style: none;
68
- margin: 0 0 16px;
69
- padding: 0;
70
- }
71
- li {
72
- display: flex;
73
- justify-content: space-between;
74
- gap: 12px;
75
- align-items: baseline;
76
- padding: 10px 0;
77
- border-top: 1px solid var(--line);
78
- }
79
- li:first-child {
80
- border-top: 0;
81
- padding-top: 0;
82
- }
83
- .meta {
84
- color: var(--muted);
85
- font-size: 13px;
86
- }
87
- form {
88
- display: grid;
89
- gap: 8px;
90
- }
91
- label {
92
- display: grid;
93
- gap: 4px;
94
- font-size: 12px;
95
- color: var(--muted);
96
- }
97
- input,
98
- select,
99
- button {
100
- font: inherit;
101
- color: var(--text);
102
- }
103
- input,
104
- select {
105
- background: var(--bg);
106
- border: 1px solid var(--line);
107
- border-radius: 6px;
108
- padding: 8px 10px;
109
- }
110
- button {
111
- background: var(--accent);
112
- color: #1a140b;
113
- border: 0;
114
- border-radius: 6px;
115
- padding: 8px 12px;
116
- font-weight: 600;
117
- cursor: pointer;
118
- }
119
- button.ghost {
120
- background: transparent;
121
- color: var(--accent);
122
- border: 1px solid var(--accent);
123
- }
124
- button:disabled {
125
- opacity: 0.5;
126
- cursor: default;
127
- }
128
- .error {
129
- color: #e08b8b;
130
- margin: 0 0 16px;
131
- }
132
- </style>
133
- </head>
134
- <body>
135
- <div id="root"></div>
136
- <script type="module" src="/src/main.tsx"></script>
137
- </body>
138
- </html>
@@ -1,229 +0,0 @@
1
- /** Starter UI. Hosted builds use the project origin; local Vite uses `VITE_API_URL`. */
2
- import { StrictMode, useEffect, useState, type FormEvent } from "react";
3
- import { createRoot } from "react-dom/client";
4
-
5
- type Planet = { id: string; name: string; climate: string; moons: number };
6
- type Rocket = { id: string; name: string; destinationId: string; launched: boolean };
7
-
8
- function projectApiUrl(): string {
9
- const fromEnv = import.meta.env.VITE_API_URL;
10
- if (typeof fromEnv === "string" && fromEnv.trim()) return fromEnv.replace(/\/+$/, "");
11
- if (typeof window !== "undefined") return window.location.origin;
12
- return "";
13
- }
14
-
15
- async function request<T>(path: string, init?: RequestInit): Promise<T> {
16
- const base = projectApiUrl();
17
- const res = await fetch(`${base}${path}`, {
18
- ...init,
19
- headers: { "Content-Type": "application/json", ...init?.headers },
20
- });
21
- if (!res.ok) {
22
- throw new Error((await res.text()) || `${res.status} ${path}`);
23
- }
24
- return res.json() as Promise<T>;
25
- }
26
-
27
- function App() {
28
- const [planets, setPlanets] = useState<Planet[]>([]);
29
- const [rockets, setRockets] = useState<Rocket[]>([]);
30
- const [error, setError] = useState<string | null>(null);
31
- const [pending, setPending] = useState(false);
32
- const [planetForm, setPlanetForm] = useState({ name: "", climate: "", moons: "0" });
33
- const [rocketForm, setRocketForm] = useState({ name: "", destinationId: "" });
34
-
35
- async function refresh() {
36
- const nextPlanets = await request<Planet[]>("/api/planets");
37
- const nextRockets = await request<Rocket[]>("/api/rockets");
38
- setPlanets(nextPlanets);
39
- setRockets(nextRockets);
40
- setRocketForm((form) => ({
41
- ...form,
42
- destinationId: form.destinationId || nextPlanets[0]?.id || "",
43
- }));
44
- }
45
-
46
- useEffect(() => {
47
- void refresh().catch((err: unknown) =>
48
- setError(err instanceof Error ? err.message : "Failed to load"),
49
- );
50
- }, []);
51
-
52
- async function onAddPlanet(event: FormEvent) {
53
- event.preventDefault();
54
- setPending(true);
55
- setError(null);
56
- try {
57
- await request("/api/planets", {
58
- method: "POST",
59
- body: JSON.stringify({
60
- name: planetForm.name,
61
- climate: planetForm.climate,
62
- moons: Number(planetForm.moons),
63
- }),
64
- });
65
- setPlanetForm({ name: "", climate: "", moons: "0" });
66
- await refresh();
67
- } catch (err) {
68
- setError(err instanceof Error ? err.message : "Could not add planet");
69
- } finally {
70
- setPending(false);
71
- }
72
- }
73
-
74
- async function onAddRocket(event: FormEvent) {
75
- event.preventDefault();
76
- setPending(true);
77
- setError(null);
78
- try {
79
- await request("/api/rockets", {
80
- method: "POST",
81
- body: JSON.stringify({
82
- name: rocketForm.name,
83
- destinationId: rocketForm.destinationId,
84
- }),
85
- });
86
- setRocketForm((form) => ({ ...form, name: "" }));
87
- await refresh();
88
- } catch (err) {
89
- setError(err instanceof Error ? err.message : "Could not add rocket");
90
- } finally {
91
- setPending(false);
92
- }
93
- }
94
-
95
- async function onLaunch(id: string) {
96
- setPending(true);
97
- setError(null);
98
- try {
99
- await request("/api/launch", {
100
- method: "POST",
101
- body: JSON.stringify({ id }),
102
- });
103
- await refresh();
104
- } catch (err) {
105
- setError(err instanceof Error ? err.message : "Could not launch");
106
- } finally {
107
- setPending(false);
108
- }
109
- }
110
-
111
- const planetName = (id: string) => planets.find((planet) => planet.id === id)?.name ?? id;
112
-
113
- return (
114
- <main>
115
- <h1>{"{{NAME}}"}</h1>
116
- <p className="lede">React frontend talking to your Starbase APIs at {projectApiUrl()}.</p>
117
- {error ? <p className="error">{error}</p> : null}
118
-
119
- <div className="grid">
120
- <section>
121
- <h2>Planets</h2>
122
- <ul>
123
- {planets.map((planet) => (
124
- <li key={planet.id}>
125
- <div>
126
- <strong>{planet.name}</strong>
127
- <div className="meta">
128
- {planet.climate} · {planet.moons} {planet.moons === 1 ? "moon" : "moons"}
129
- </div>
130
- </div>
131
- </li>
132
- ))}
133
- </ul>
134
- <form onSubmit={onAddPlanet}>
135
- <label>
136
- Name
137
- <input
138
- required
139
- value={planetForm.name}
140
- onChange={(event) => setPlanetForm({ ...planetForm, name: event.target.value })}
141
- />
142
- </label>
143
- <label>
144
- Climate
145
- <input
146
- required
147
- value={planetForm.climate}
148
- onChange={(event) => setPlanetForm({ ...planetForm, climate: event.target.value })}
149
- />
150
- </label>
151
- <label>
152
- Moons
153
- <input
154
- type="number"
155
- min={0}
156
- value={planetForm.moons}
157
- onChange={(event) => setPlanetForm({ ...planetForm, moons: event.target.value })}
158
- />
159
- </label>
160
- <button type="submit" disabled={pending}>
161
- Add planet
162
- </button>
163
- </form>
164
- </section>
165
-
166
- <section>
167
- <h2>Rockets</h2>
168
- <ul>
169
- {rockets.map((rocket) => (
170
- <li key={rocket.id}>
171
- <div>
172
- <strong>{rocket.name}</strong>
173
- <div className="meta">
174
- {planetName(rocket.destinationId)} · {rocket.launched ? "launched" : "on pad"}
175
- </div>
176
- </div>
177
- {rocket.launched ? null : (
178
- <button
179
- className="ghost"
180
- type="button"
181
- disabled={pending}
182
- onClick={() => onLaunch(rocket.id)}
183
- >
184
- Launch
185
- </button>
186
- )}
187
- </li>
188
- ))}
189
- </ul>
190
- <form onSubmit={onAddRocket}>
191
- <label>
192
- Name
193
- <input
194
- required
195
- value={rocketForm.name}
196
- onChange={(event) => setRocketForm({ ...rocketForm, name: event.target.value })}
197
- />
198
- </label>
199
- <label>
200
- Destination
201
- <select
202
- required
203
- value={rocketForm.destinationId}
204
- onChange={(event) =>
205
- setRocketForm({ ...rocketForm, destinationId: event.target.value })
206
- }
207
- >
208
- {planets.map((planet) => (
209
- <option key={planet.id} value={planet.id}>
210
- {planet.name}
211
- </option>
212
- ))}
213
- </select>
214
- </label>
215
- <button type="submit" disabled={pending || planets.length === 0}>
216
- Add rocket
217
- </button>
218
- </form>
219
- </section>
220
- </div>
221
- </main>
222
- );
223
- }
224
-
225
- createRoot(document.getElementById("root")!).render(
226
- <StrictMode>
227
- <App />
228
- </StrictMode>,
229
- );
@@ -1,7 +0,0 @@
1
- import react from "@vitejs/plugin-react";
2
- import { defineConfig } from "vite";
3
-
4
- export default defineConfig({
5
- plugins: [react()],
6
- server: { port: 5173 },
7
- });