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
@@ -0,0 +1,12 @@
1
+ import "i18next";
2
+
3
+ import type { defaultNS, resources } from "@/config/i18n";
4
+
5
+ declare module "i18next" {
6
+ interface CustomTypeOptions {
7
+ enableSelector: true;
8
+ returnNull: false;
9
+ defaultNS: typeof defaultNS;
10
+ resources: (typeof resources)["en"];
11
+ }
12
+ }
@@ -0,0 +1,17 @@
1
+ /* oxlint-disable unused-imports/no-unused-vars */
2
+ import "@tanstack/react-table";
3
+
4
+ declare module "@tanstack/react-table" {
5
+ interface ColumnMeta<TData extends RowData, TValue> {
6
+ width?: string;
7
+ headerClass?: string;
8
+ cellClass?: string;
9
+ sortClass?: string;
10
+ }
11
+
12
+ interface CellContext<TData extends RowData, TValue> {
13
+ original: TData;
14
+ data: TData;
15
+ value: TValue;
16
+ }
17
+ }
@@ -0,0 +1,26 @@
1
+ import "@povio/ui";
2
+ import type { UIOverrides } from "@povio/ui";
3
+ import type { LinkProps } from "@tanstack/react-router";
4
+ import type { RowData } from "@tanstack/react-table";
5
+
6
+ import type { tableRowOverride } from "@/styles/overrides/defaults/table.override";
7
+ import type { typographyOverride } from "@/styles/overrides/defaults/typography.override";
8
+
9
+ declare module "@povio/ui" {
10
+ interface LinkNavigationProps extends LinkProps {}
11
+
12
+ interface TypographyVariantProps {
13
+ size?: UIOverrides.VariantProps<typeof typographyOverride>["size"];
14
+ sizeMobile?: UIOverrides.VariantProps<typeof typographyOverride>["sizeMobile"];
15
+ }
16
+
17
+ interface TableRowVariantProps {
18
+ rowSize?: UIOverrides.VariantProps<typeof tableRowOverride>["rowSize"];
19
+ }
20
+ }
21
+
22
+ declare module "@tanstack/react-table" {
23
+ interface ColumnMeta<TData extends RowData, TValue> {
24
+ filterKey?: string;
25
+ }
26
+ }
@@ -0,0 +1,20 @@
1
+ /// <reference types="vite/client" />
2
+
3
+ interface ImportMetaEnv {
4
+ readonly VITE_PUBLIC_ENABLE_WEB_VITALS: "true" | "false";
5
+ readonly VITE_PUBLIC_API_URL: string;
6
+ readonly VITE_PUBLIC_API_MODE?: "fake" | "real";
7
+ readonly VITE_PUBLIC_FAKE_BE_SEED_VERSION?: string;
8
+ readonly VITE_PUBLIC_LOG_LEVEL: "error" | "warn";
9
+ readonly VITE_PUBLIC_SENTRY_DSN: string;
10
+ readonly VITE_PUBLIC_SENTRY_ENVIRONMENT: string;
11
+ readonly VITE_PUBLIC_SENTRY_TRACES_SAMPLE_RATE: string;
12
+ readonly VITE_PUBLIC_SENTRY_REPLAYS_ON_ERROR_SAMPLE_RATE: string;
13
+ readonly VITE_PUBLIC_SENTRY_REPLAYS_SESSION_SAMPLE_RATE: string;
14
+ readonly VITE_PUBLIC_GOOGLE_ANALYTICS_MEASUREMENT_ID: string;
15
+ readonly VITE_PUBLIC_AUTH_CUSTOM_JWT_ENABLE_MAGIC_LINK: string;
16
+ }
17
+
18
+ interface ImportMeta {
19
+ readonly env: ImportMetaEnv;
20
+ }
@@ -0,0 +1,17 @@
1
+ import { DateUtils as PovioDateUtils } from "@povio/ui";
2
+
3
+ export namespace DateUtils {
4
+ export const parseDate = (date: string | Date): Date => (typeof date === "string" ? new Date(date) : date);
5
+
6
+ export const formatDate = (date: string | Date, format = "dd/MM/yyyy") => {
7
+ const parsedDate = parseDate(date);
8
+
9
+ return PovioDateUtils.formatDate(parsedDate, format);
10
+ };
11
+
12
+ export const formatDateTime = (date: string | Date, format = "dd/MM/yyyy HH:mm") => {
13
+ const parsedDate = parseDate(date);
14
+
15
+ return PovioDateUtils.formatDate(parsedDate, format);
16
+ };
17
+ }
@@ -0,0 +1,9 @@
1
+ interface ImageFallbackOptions {
2
+ width: number;
3
+ height: number;
4
+ text?: string;
5
+ }
6
+
7
+ export function getFallbackImageUrl({ width, height, text = "No image" }: ImageFallbackOptions): string {
8
+ return `https://placehold.co/${width}x${height}?text=${encodeURIComponent(text)}`;
9
+ }
@@ -0,0 +1,63 @@
1
+ import type { FileUploadRequest } from "@povio/ui";
2
+
3
+ import { AppConfig } from "@/config/app.config";
4
+ import type { MediaModels } from "@/openapi/media/media.models";
5
+ import { MediaQueries } from "@/openapi/media/media.queries";
6
+
7
+ interface UseMediaUploadHandlerOptions {
8
+ resourceName: MediaModels.MediaResourceName;
9
+ method?: string;
10
+ onUploaded: (media: { id: string; previewUrl: string }) => void;
11
+ }
12
+
13
+ interface FileUploadOptions {
14
+ abortController?: AbortController;
15
+ onUploadProgress?: (progress: { loaded: number; total: number }) => void;
16
+ }
17
+
18
+ export function useMediaUploadHandler({ resourceName, method, onUploaded }: UseMediaUploadHandlerOptions) {
19
+ const uploadRequest = MediaQueries.useUploadRequest();
20
+
21
+ return async (request: FileUploadRequest, file: File, options?: FileUploadOptions): Promise<{ id: string }> => {
22
+ options?.onUploadProgress?.({ loaded: 1, total: 100 });
23
+
24
+ const instructions = await uploadRequest.mutateAsync({
25
+ data: {
26
+ ...request.data,
27
+ resourceName,
28
+ mimeType: file.type || "application/octet-stream",
29
+ method: method ?? "post",
30
+ },
31
+ });
32
+
33
+ if (!instructions.url || !instructions.method || !instructions.id || !instructions.fields) {
34
+ throw new Error("Media upload instructions are incomplete");
35
+ }
36
+
37
+ const formData = new FormData();
38
+ instructions.fields.forEach(([key, value]) => {
39
+ formData.append(key, value);
40
+ });
41
+ formData.append("file", file);
42
+
43
+ const uploadUrl = instructions.url.startsWith("http")
44
+ ? instructions.url
45
+ : `${AppConfig.api.url.replace(/\/+$/, "")}${instructions.url}`;
46
+
47
+ const response = await fetch(uploadUrl, {
48
+ method: instructions.method.toUpperCase(),
49
+ body: formData,
50
+ signal: options?.abortController?.signal,
51
+ });
52
+
53
+ if (!response.ok) {
54
+ const responseText = await response.text().catch(() => "");
55
+ throw new Error(`Media upload failed (${response.status})${responseText ? `: ${responseText}` : ""}`);
56
+ }
57
+
58
+ options?.onUploadProgress?.({ loaded: 100, total: 100 });
59
+ onUploaded({ id: instructions.id, previewUrl: URL.createObjectURL(file) });
60
+
61
+ return { id: instructions.id };
62
+ };
63
+ }
@@ -0,0 +1,12 @@
1
+ export namespace NumberUtils {
2
+ export function formatNumber(value: number, options?: Intl.NumberFormatOptions): string {
3
+ return new Intl.NumberFormat(undefined, options).format(value);
4
+ }
5
+
6
+ export function formatInteger(value: number, options?: Intl.NumberFormatOptions): string {
7
+ return formatNumber(value, {
8
+ maximumFractionDigits: 0,
9
+ ...options,
10
+ });
11
+ }
12
+ }
@@ -0,0 +1,5 @@
1
+ export namespace StringUtils {
2
+ export function emptyToUndefined(value: string | null | undefined): string | undefined {
3
+ return value || undefined;
4
+ }
5
+ }
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />
@@ -0,0 +1,32 @@
1
+ {
2
+ "compilerOptions": {
3
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
4
+ "target": "ES2022",
5
+ "useDefineForClassFields": true,
6
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
7
+ "module": "ESNext",
8
+ "types": ["vite/client", "node"],
9
+ "skipLibCheck": true,
10
+
11
+ /* Bundler mode */
12
+ "moduleResolution": "bundler",
13
+ "allowImportingTsExtensions": true,
14
+ "verbatimModuleSyntax": false,
15
+ "moduleDetection": "force",
16
+ "noEmit": true,
17
+ "jsx": "react-jsx",
18
+
19
+ /* Absolute imports */
20
+ "paths": {
21
+ "@/*": ["./src/*"]
22
+ },
23
+
24
+ /* Linting */
25
+ "strict": true,
26
+ "noUnusedLocals": true,
27
+ "noUnusedParameters": true,
28
+ "noFallthroughCasesInSwitch": true,
29
+ "noUncheckedSideEffectImports": true
30
+ },
31
+ "include": ["src", "node_modules/@povio/ui/dist/index.d.ts"]
32
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "files": [],
3
+ "compilerOptions": {
4
+ "paths": {
5
+ "@/*": ["./src/*"]
6
+ }
7
+ },
8
+ "references": [{ "path": "./tsconfig.app.json" }, { "path": "./tsconfig.node.json" }]
9
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "compilerOptions": {
3
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
4
+ "target": "ES2023",
5
+ "lib": ["ES2023"],
6
+ "module": "ESNext",
7
+ "types": ["node"],
8
+ "skipLibCheck": true,
9
+
10
+ /* Bundler mode */
11
+ "moduleResolution": "bundler",
12
+ "allowImportingTsExtensions": true,
13
+ "verbatimModuleSyntax": true,
14
+ "moduleDetection": "force",
15
+ "noEmit": true,
16
+
17
+ /* Absolute imports */
18
+ "paths": {
19
+ "@/*": ["./src/*"]
20
+ },
21
+
22
+ /* Linting */
23
+ "strict": true,
24
+ "noUnusedLocals": true,
25
+ "noUnusedParameters": true,
26
+ "erasableSyntaxOnly": true,
27
+ "noFallthroughCasesInSwitch": true,
28
+ "noUncheckedSideEffectImports": true
29
+ },
30
+ "include": ["vite.config.ts"]
31
+ }
@@ -0,0 +1,94 @@
1
+ import { applyEnv, resolveConfigSync, getNumber, getString } from "@povio/resolve-config";
2
+ import reactScan from "@povio/vite-plugin-react-scan";
3
+ import tailwindCSS from "@tailwindcss/vite";
4
+ import { devtools } from "@tanstack/devtools-vite";
5
+ import { tanstackRouter } from "@tanstack/router-plugin/vite";
6
+ import viteReact from "@vitejs/plugin-react";
7
+ import { defineConfig as defineViteConfig, mergeConfig } from "vite";
8
+ import devtoolsJson from "vite-plugin-devtools-json";
9
+ import { defineConfig as defineVitestConfig } from "vitest/config";
10
+ import { reactIconsSprite } from "react-icons-sprite/vite";
11
+
12
+ const repoRoot = new URL("../..", import.meta.url).pathname;
13
+ const env = resolveConfigSync({ cwd: repoRoot, module: "spa", target: "resolved" }) as any;
14
+
15
+ applyEnv(env, "__");
16
+
17
+ const isInTestMode = process.env.VITEST === "true";
18
+ const iconsSpritePlugin = reactIconsSprite();
19
+ const iconsSpriteTransform = iconsSpritePlugin.transform;
20
+
21
+ if (typeof iconsSpriteTransform === "function") {
22
+ iconsSpritePlugin.transform = function transformAppIcons(code, id, ...args) {
23
+ if (id.includes("/node_modules/")) {
24
+ return null;
25
+ }
26
+
27
+ return iconsSpriteTransform.call(this, code, id, ...args);
28
+ };
29
+ }
30
+
31
+ const createViteConfig = (isDevServer: boolean) => ({
32
+ plugins: [
33
+ isDevServer && reactScan(),
34
+ !isInTestMode &&
35
+ tanstackRouter({
36
+ target: "react",
37
+ autoCodeSplitting: true,
38
+ routesDirectory: "./src/pages",
39
+ }),
40
+ devtools({
41
+ eventBusConfig: { enabled: false },
42
+ }),
43
+ iconsSpritePlugin,
44
+ viteReact({
45
+ babel: {
46
+ plugins: ["babel-plugin-react-compiler"],
47
+ },
48
+ }),
49
+ tailwindCSS(),
50
+ !isInTestMode && devtoolsJson(),
51
+ ],
52
+ server: {
53
+ open: false,
54
+ port: getNumber(env, "VITE_DEV_PORT"),
55
+ strictPort: false,
56
+ proxy: {
57
+ "^/api(?:/|$)": {
58
+ target: getString(env, "VITE_PUBLIC_API_URL"),
59
+ changeOrigin: true,
60
+ secure: false,
61
+ },
62
+ },
63
+ },
64
+ build: {
65
+ target: "esnext",
66
+ },
67
+ optimizeDeps: {
68
+ entries: ["src/**/*.{ts,tsx}"],
69
+ },
70
+ worker: {
71
+ format: "es",
72
+ },
73
+ resolve: {
74
+ alias: {
75
+ "@": new URL("src", import.meta.url).pathname,
76
+ },
77
+ dedupe: ["react", "react-dom", "i18next", "react-i18next"],
78
+ tsconfigPaths: true,
79
+ },
80
+ });
81
+
82
+ const vitestConfig = defineVitestConfig({
83
+ test: {
84
+ root: "./",
85
+ include: ["src/**/*.test.{ts,tsx}"],
86
+ watch: false,
87
+ globals: true,
88
+ reporters: ["default"],
89
+ },
90
+ });
91
+
92
+ export default defineViteConfig(({ command }) =>
93
+ mergeConfig(createViteConfig(command === "serve"), vitestConfig),
94
+ );
@@ -1,27 +1,47 @@
1
- /**
2
- * Starter schema. `robodev deploy` creates the `space` database and these tables
3
- * (no migration files). Edit here and deploy again to sync.
4
- */
5
- import { boolean, defineDatabase, integer, pgTable, text, timestamp, uuid } from "@robodev-ai/sdk";
1
+ import { defineDatabase, integer, pgTable, text, timestamp, uuid } from "@robodev-ai/sdk";
6
2
 
7
- export const planets = pgTable("planets", {
3
+ export const aliens = pgTable("aliens", {
8
4
  id: uuid("id").primaryKey().defaultRandom(),
9
5
  name: text("name").notNull(),
10
- climate: text("climate").notNull(),
11
- moons: integer("moons").default(0),
6
+ createdAt: timestamp("createdAt", { withTimezone: true }).defaultNow(),
7
+ updatedAt: timestamp("updatedAt", { withTimezone: true }).defaultNow(),
12
8
  });
13
9
 
14
- export const rockets = pgTable("rockets", {
10
+ export const media = pgTable("media", {
15
11
  id: uuid("id").primaryKey().defaultRandom(),
12
+ key: text("key").notNull(),
13
+ userId: text("userId").notNull(),
14
+ resourceName: text("resourceName").notNull(),
15
+ fileName: text("fileName").notNull(),
16
+ fileSize: integer("fileSize").notNull(),
17
+ mimeType: text("mimeType").notNull(),
18
+ uploaded: timestamp("uploaded", { withTimezone: true }),
19
+ createdAt: timestamp("createdAt", { withTimezone: true }).defaultNow(),
20
+ });
21
+
22
+ export const planets = pgTable("planets", {
23
+ id: uuid("id").primaryKey().defaultRandom(),
24
+ userId: text("userId").notNull(),
25
+ creatorName: text("creatorName"),
26
+ alienId: uuid("alienId").references(() => aliens.id, { onDelete: "set null" }),
27
+ discoveryDate: timestamp("discoveryDate", { withTimezone: true }),
16
28
  name: text("name").notNull(),
17
- destinationId: uuid("destinationId")
29
+ description: text("description"),
30
+ imageId: uuid("imageId").references(() => media.id, { onDelete: "set null" }),
31
+ createdAt: timestamp("createdAt", { withTimezone: true }).defaultNow(),
32
+ updatedAt: timestamp("updatedAt", { withTimezone: true }).defaultNow(),
33
+ });
34
+
35
+ export const planetLikes = pgTable("planet_likes", {
36
+ id: uuid("id").primaryKey().defaultRandom(),
37
+ planetId: uuid("planetId")
18
38
  .notNull()
19
39
  .references(() => planets.id, { onDelete: "cascade" }),
20
- launched: boolean("launched").default(false),
40
+ userId: text("userId").notNull(),
21
41
  createdAt: timestamp("createdAt", { withTimezone: true }).defaultNow(),
22
42
  });
23
43
 
24
44
  export default defineDatabase({
25
- name: "space",
26
- tables: { planets, rockets },
45
+ name: "tiny",
46
+ tables: { aliens, media, planets, planetLikes },
27
47
  });