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.
- package/package.json +1 -1
- package/src/collect-files.test.ts +19 -0
- package/src/collect-files.ts +1 -0
- package/src/config.test.ts +26 -0
- package/src/config.ts +34 -5
- package/src/emit-starter.test.ts +68 -0
- package/src/emit-starter.ts +47 -13
- package/src/index.ts +45 -4
- package/templates/auth-chat/.config/local.spa.template.yml +27 -0
- package/templates/auth-chat/.oxlint-base.json +29 -0
- package/templates/auth-chat/.oxlintrc.json +78 -0
- package/templates/auth-chat/.rulesync/rules/frontend-api-boundary.md +36 -0
- package/templates/auth-chat/.rulesync/rules/frontend-component-structure.md +38 -0
- package/templates/auth-chat/.rulesync/rules/frontend-forms.md +32 -0
- package/templates/auth-chat/.rulesync/rules/frontend-notifications.md +24 -0
- package/templates/auth-chat/.rulesync/rules/frontend-povio-components.md +42 -0
- package/templates/auth-chat/.rulesync/rules/frontend-povio-ui.md +45 -0
- package/templates/auth-chat/.rulesync/rules/frontend-query-autocomplete.md +29 -0
- package/templates/auth-chat/.rulesync/rules/frontend-tables-and-lists.md +34 -0
- package/templates/auth-chat/.rulesync/rules/frontend-translations.md +26 -0
- package/templates/auth-chat/.rulesync/rules/project-overview.md +32 -0
- package/templates/auth-chat/.rulesync/rules/robodev-api.md +30 -0
- package/templates/auth-chat/.rulesync/rules/robodev-auth.md +40 -0
- package/templates/auth-chat/.rulesync/rules/robodev-database.md +22 -0
- package/templates/auth-chat/.rulesync/rules/role-based-app-structure.md +36 -0
- package/templates/auth-chat/.rulesync/skills/media-feature/SKILL.md +21 -0
- package/templates/auth-chat/.rulesync/skills/povio-ui-styling/SKILL.md +208 -0
- package/templates/auth-chat/.rulesync/skills/povio-ui-styling/agents/openai.yaml +4 -0
- package/templates/auth-chat/.rulesync/skills/robodev-api-route/SKILL.md +13 -0
- package/templates/auth-chat/.rulesync/skills/robodev-table/SKILL.md +12 -0
- package/templates/auth-chat/README.md +26 -7
- package/templates/auth-chat/api/invite.ts +43 -0
- package/templates/auth-chat/apps/fe/index.html +24 -0
- package/templates/auth-chat/apps/fe/openapi-codegen.config.ts +37 -0
- package/templates/auth-chat/apps/fe/package.json +82 -0
- package/templates/auth-chat/apps/fe/public/apple-touch-icon.png +0 -0
- package/templates/auth-chat/apps/fe/public/favicon-96x96.png +0 -0
- package/templates/auth-chat/apps/fe/public/favicon.ico +0 -0
- package/templates/auth-chat/apps/fe/public/favicon.svg +3 -0
- package/templates/auth-chat/apps/fe/public/site.webmanifest +21 -0
- package/templates/auth-chat/apps/fe/public/web-app-manifest-192x192.png +0 -0
- package/templates/auth-chat/apps/fe/public/web-app-manifest-512x512.png +0 -0
- package/templates/auth-chat/apps/fe/src/assets/fonts/GeneralSans-Bold.otf +0 -0
- package/templates/auth-chat/apps/fe/src/assets/fonts/GeneralSans-Medium.otf +0 -0
- package/templates/auth-chat/apps/fe/src/assets/fonts/GeneralSans-Regular.otf +0 -0
- package/templates/auth-chat/apps/fe/src/assets/fonts/GeneralSans-Semibold.otf +0 -0
- package/templates/auth-chat/apps/fe/src/assets/locales/en/translation.json +202 -0
- package/templates/auth-chat/apps/fe/src/assets/locales/sl/translation.json +202 -0
- package/templates/auth-chat/apps/fe/src/clients/app-rest-client.ts +15 -0
- package/templates/auth-chat/apps/fe/src/clients/auth-token-store.ts +101 -0
- package/templates/auth-chat/apps/fe/src/clients/rest/app-error-handler.ts +31 -0
- package/templates/auth-chat/apps/fe/src/clients/rest/interceptors/authorization-header.interceptor.ts +15 -0
- package/templates/auth-chat/apps/fe/src/clients/rest/interceptors/refresh-token.interceptor.ts +37 -0
- package/templates/auth-chat/apps/fe/src/clients/rest/interceptors/response.interceptor.ts +17 -0
- package/templates/auth-chat/apps/fe/src/components/404.tsx +18 -0
- package/templates/auth-chat/apps/fe/src/components/features/auth/AuthBrandPanel.tsx +60 -0
- package/templates/auth-chat/apps/fe/src/components/features/auth/AuthLayout.tsx +23 -0
- package/templates/auth-chat/apps/fe/src/components/features/auth/LoginPage.tsx +111 -0
- package/templates/auth-chat/apps/fe/src/components/features/auth/RegisterPage.tsx +143 -0
- package/templates/auth-chat/apps/fe/src/components/features/chat/ChatPage.tsx +105 -0
- package/templates/auth-chat/apps/fe/src/components/features/chat/InviteForm.tsx +84 -0
- package/templates/auth-chat/apps/fe/src/components/features/profile/ProfilePage.tsx +96 -0
- package/templates/auth-chat/apps/fe/src/components/googleAnalytics/GoogleAnalytics.tsx +35 -0
- package/templates/auth-chat/apps/fe/src/components/layout/AppLayout.tsx +19 -0
- package/templates/auth-chat/apps/fe/src/components/layout/app-header/AppHeader.tsx +91 -0
- package/templates/auth-chat/apps/fe/src/components/layout/app-header/MobileNavigation.tsx +51 -0
- package/templates/auth-chat/apps/fe/src/components/layout/app-header/NavLink.tsx +29 -0
- package/templates/auth-chat/apps/fe/src/components/shared/branding/BrandLogo.tsx +13 -0
- package/templates/auth-chat/apps/fe/src/components/shared/error/ErrorFallback.tsx +43 -0
- package/templates/auth-chat/apps/fe/src/components/shared/error/ErrorText.tsx +20 -0
- package/templates/auth-chat/apps/fe/src/components/shared/error/NotFound.tsx +36 -0
- package/templates/auth-chat/apps/fe/src/components/shared/forms/RequiredLabel.tsx +21 -0
- package/templates/auth-chat/apps/fe/src/components/shared/forms/RowInputWrapper.tsx +50 -0
- package/templates/auth-chat/apps/fe/src/components/shared/head/AppHead.tsx +32 -0
- package/templates/auth-chat/apps/fe/src/components/shared/head/DefaultAppHead.tsx +34 -0
- package/templates/auth-chat/apps/fe/src/components/shared/layout/LoadingState.tsx +9 -0
- package/templates/auth-chat/apps/fe/src/components/shared/layout/ThinPageWrapper.tsx +5 -0
- package/templates/auth-chat/apps/fe/src/components/shared/page/PageHeader.tsx +69 -0
- package/templates/auth-chat/apps/fe/src/components/shared/ui/Card.tsx +60 -0
- package/templates/auth-chat/apps/fe/src/components/shared/ui/GoogleLoginButton.tsx +19 -0
- package/templates/auth-chat/apps/fe/src/components/shared/ui/RequiredLabel.tsx +22 -0
- package/templates/auth-chat/apps/fe/src/components/shared/ui/TableActions.tsx +22 -0
- package/templates/auth-chat/apps/fe/src/config/app.config.ts +35 -0
- package/templates/auth-chat/apps/fe/src/config/i18n.ts +43 -0
- package/templates/auth-chat/apps/fe/src/config/inits/a11y.ts +14 -0
- package/templates/auth-chat/apps/fe/src/config/inits/logger.ts +7 -0
- package/templates/auth-chat/apps/fe/src/config/inits/sentry.ts +21 -0
- package/templates/auth-chat/apps/fe/src/config/jwt.config.ts +2 -0
- package/templates/auth-chat/apps/fe/src/config/query.config.ts +20 -0
- package/templates/auth-chat/apps/fe/src/hooks/useAuth.ts +5 -0
- package/templates/auth-chat/apps/fe/src/main.tsx +52 -0
- package/templates/auth-chat/apps/fe/src/pages/(guest)/login.tsx +23 -0
- package/templates/auth-chat/apps/fe/src/pages/(guest)/register.tsx +23 -0
- package/templates/auth-chat/apps/fe/src/pages/(guest)/route.tsx +18 -0
- package/templates/auth-chat/apps/fe/src/pages/(private)/index.tsx +23 -0
- package/templates/auth-chat/apps/fe/src/pages/(private)/profile.tsx +23 -0
- package/templates/auth-chat/apps/fe/src/pages/(private)/route.tsx +18 -0
- package/templates/auth-chat/apps/fe/src/pages/(public)/auth.tsx +37 -0
- package/templates/auth-chat/apps/fe/src/pages/(public)/route.tsx +9 -0
- package/templates/auth-chat/apps/fe/src/pages/__root.tsx +164 -0
- package/templates/auth-chat/apps/fe/src/providers/AppErrorBoundary.tsx +10 -0
- package/templates/auth-chat/apps/fe/src/providers/OpenApiRuntimeProvider.tsx +31 -0
- package/templates/auth-chat/apps/fe/src/providers/index.tsx +44 -0
- package/templates/auth-chat/apps/fe/src/providers/jwt.provider.tsx +95 -0
- package/templates/auth-chat/apps/fe/src/routeTree.gen.ts +225 -0
- package/templates/auth-chat/apps/fe/src/styles/base.css +103 -0
- package/templates/auth-chat/apps/fe/src/styles/fonts/fonts.tsx +10 -0
- package/templates/auth-chat/apps/fe/src/styles/fonts/general-sans.css +31 -0
- package/templates/auth-chat/apps/fe/src/styles/globals.css +28 -0
- package/templates/auth-chat/apps/fe/src/styles/overrides/defaults/button.override.ts +536 -0
- package/templates/auth-chat/apps/fe/src/styles/overrides/defaults/checkbox.override.ts +71 -0
- package/templates/auth-chat/apps/fe/src/styles/overrides/defaults/input.override.ts +252 -0
- package/templates/auth-chat/apps/fe/src/styles/overrides/defaults/label.override.ts +91 -0
- package/templates/auth-chat/apps/fe/src/styles/overrides/defaults/modal.override.ts +57 -0
- package/templates/auth-chat/apps/fe/src/styles/overrides/defaults/radio.override.ts +46 -0
- package/templates/auth-chat/apps/fe/src/styles/overrides/defaults/table.override.ts +104 -0
- package/templates/auth-chat/apps/fe/src/styles/overrides/defaults/tag.override.ts +66 -0
- package/templates/auth-chat/apps/fe/src/styles/overrides/defaults/typography.override.ts +115 -0
- package/templates/auth-chat/apps/fe/src/styles/overrides/outline.clsx.ts +10 -0
- package/templates/auth-chat/apps/fe/src/styles/overrides/uiOverrides.override.ts +60 -0
- package/templates/auth-chat/apps/fe/src/styles/theme.css +2177 -0
- package/templates/auth-chat/apps/fe/src/types/i18next.d.ts +12 -0
- package/templates/auth-chat/apps/fe/src/types/table.d.ts +17 -0
- package/templates/auth-chat/apps/fe/src/types/ui.d.ts +26 -0
- package/templates/auth-chat/apps/fe/src/types/vite-env.d.ts +20 -0
- package/templates/auth-chat/apps/fe/src/utils/date.utils.ts +17 -0
- package/templates/auth-chat/apps/fe/src/utils/number.utils.ts +12 -0
- package/templates/auth-chat/apps/fe/src/utils/string.utils.ts +5 -0
- package/templates/auth-chat/apps/fe/src/vite-env.d.ts +1 -0
- package/templates/auth-chat/apps/fe/tsconfig.app.json +32 -0
- package/templates/auth-chat/apps/fe/tsconfig.json +9 -0
- package/templates/auth-chat/apps/fe/tsconfig.node.json +31 -0
- package/templates/auth-chat/apps/fe/vite.config.ts +94 -0
- package/templates/auth-chat/openapi.json +1016 -0
- package/templates/auth-chat/oxfmt.config.js +23 -0
- package/templates/auth-chat/package.json +6 -13
- package/templates/auth-chat/rulesync.jsonc +18 -0
- package/templates/auth-chat/tsconfig.json +2 -4
- package/templates/backend/README.md +2 -2
- package/templates/backend/api/_lib.ts +359 -0
- package/templates/backend/api/aliens/labels.ts +19 -0
- package/templates/backend/api/files/presigned-url.ts +48 -0
- package/templates/backend/api/files/upload.ts +29 -0
- package/templates/backend/api/planets/[id]/like.ts +36 -0
- package/templates/backend/api/planets/[id].ts +56 -13
- package/templates/backend/api/planets/paginate.ts +36 -0
- package/templates/backend/api/planets.ts +52 -44
- package/templates/backend/database.ts +33 -13
- package/templates/backend/package.json +1 -1
- package/templates/catalog.json +3 -3
- package/templates/empty/package.json +1 -1
- package/templates/space/.config/local.spa.template.yml +27 -0
- package/templates/space/.oxlint-base.json +29 -0
- package/templates/space/.oxlintrc.json +78 -0
- package/templates/space/.rulesync/rules/frontend-api-boundary.md +36 -0
- package/templates/space/.rulesync/rules/frontend-component-structure.md +38 -0
- package/templates/space/.rulesync/rules/frontend-forms.md +32 -0
- package/templates/space/.rulesync/rules/frontend-notifications.md +24 -0
- package/templates/space/.rulesync/rules/frontend-povio-components.md +42 -0
- package/templates/space/.rulesync/rules/frontend-povio-ui.md +45 -0
- package/templates/space/.rulesync/rules/frontend-query-autocomplete.md +29 -0
- package/templates/space/.rulesync/rules/frontend-tables-and-lists.md +34 -0
- package/templates/space/.rulesync/rules/frontend-translations.md +26 -0
- package/templates/space/.rulesync/rules/project-overview.md +32 -0
- package/templates/space/.rulesync/rules/robodev-api.md +30 -0
- package/templates/space/.rulesync/rules/robodev-auth.md +40 -0
- package/templates/space/.rulesync/rules/robodev-database.md +22 -0
- package/templates/space/.rulesync/rules/role-based-app-structure.md +36 -0
- package/templates/space/.rulesync/skills/media-feature/SKILL.md +21 -0
- package/templates/space/.rulesync/skills/povio-ui-styling/SKILL.md +208 -0
- package/templates/space/.rulesync/skills/povio-ui-styling/agents/openai.yaml +4 -0
- package/templates/space/.rulesync/skills/robodev-api-route/SKILL.md +13 -0
- package/templates/space/.rulesync/skills/robodev-table/SKILL.md +12 -0
- package/templates/space/README.md +26 -7
- package/templates/space/api/_lib.ts +359 -0
- package/templates/space/api/aliens/labels.ts +19 -0
- package/templates/space/api/files/presigned-url.ts +48 -0
- package/templates/space/api/files/upload.ts +29 -0
- package/templates/space/api/planets/[id]/like.ts +36 -0
- package/templates/space/api/planets/[id].ts +56 -13
- package/templates/space/api/planets/paginate.ts +36 -0
- package/templates/space/api/planets.ts +52 -44
- package/templates/space/apps/fe/index.html +24 -0
- package/templates/space/apps/fe/openapi-codegen.config.ts +37 -0
- package/templates/space/apps/fe/package.json +82 -0
- package/templates/space/apps/fe/public/apple-touch-icon.png +0 -0
- package/templates/space/apps/fe/public/favicon-96x96.png +0 -0
- package/templates/space/apps/fe/public/favicon.ico +0 -0
- package/templates/space/apps/fe/public/favicon.svg +3 -0
- package/templates/space/apps/fe/public/site.webmanifest +21 -0
- package/templates/space/apps/fe/public/web-app-manifest-192x192.png +0 -0
- package/templates/space/apps/fe/public/web-app-manifest-512x512.png +0 -0
- package/templates/space/apps/fe/src/assets/fonts/GeneralSans-Bold.otf +0 -0
- package/templates/space/apps/fe/src/assets/fonts/GeneralSans-Medium.otf +0 -0
- package/templates/space/apps/fe/src/assets/fonts/GeneralSans-Regular.otf +0 -0
- package/templates/space/apps/fe/src/assets/fonts/GeneralSans-Semibold.otf +0 -0
- package/templates/space/apps/fe/src/assets/locales/en/translation.json +301 -0
- package/templates/space/apps/fe/src/assets/locales/sl/translation.json +301 -0
- package/templates/space/apps/fe/src/clients/app-rest-client.ts +15 -0
- package/templates/space/apps/fe/src/clients/auth-token-store.ts +101 -0
- package/templates/space/apps/fe/src/clients/rest/app-error-handler.ts +31 -0
- package/templates/space/apps/fe/src/clients/rest/interceptors/authorization-header.interceptor.ts +15 -0
- package/templates/space/apps/fe/src/clients/rest/interceptors/refresh-token.interceptor.ts +37 -0
- package/templates/space/apps/fe/src/clients/rest/interceptors/response.interceptor.ts +17 -0
- package/templates/space/apps/fe/src/components/404.tsx +18 -0
- package/templates/space/apps/fe/src/components/features/auth/AuthBrandPanel.tsx +60 -0
- package/templates/space/apps/fe/src/components/features/auth/AuthLayout.tsx +23 -0
- package/templates/space/apps/fe/src/components/features/auth/LoginPage.tsx +111 -0
- package/templates/space/apps/fe/src/components/features/auth/RegisterPage.tsx +143 -0
- package/templates/space/apps/fe/src/components/features/home/HomePage.tsx +21 -0
- package/templates/space/apps/fe/src/components/features/planets/details/PlanetDetailsPage.tsx +139 -0
- package/templates/space/apps/fe/src/components/features/planets/details/PlanetEditPage.tsx +266 -0
- package/templates/space/apps/fe/src/components/features/planets/feed/PlanetFeedCard.tsx +131 -0
- package/templates/space/apps/fe/src/components/features/planets/feed/PlanetsFeedPage.tsx +119 -0
- package/templates/space/apps/fe/src/components/features/planets/list/PlanetCard.tsx +89 -0
- package/templates/space/apps/fe/src/components/features/planets/list/PlanetCreateModal.tsx +179 -0
- package/templates/space/apps/fe/src/components/features/planets/list/PlanetsFilters.css +3 -0
- package/templates/space/apps/fe/src/components/features/planets/list/PlanetsFilters.tsx +73 -0
- package/templates/space/apps/fe/src/components/features/planets/list/PlanetsGridPage.tsx +51 -0
- package/templates/space/apps/fe/src/components/features/planets/list/PlanetsInfiniteTablePage.tsx +79 -0
- package/templates/space/apps/fe/src/components/features/planets/list/PlanetsPage.tsx +65 -0
- package/templates/space/apps/fe/src/components/features/planets/list/PlanetsTablePage.tsx +72 -0
- package/templates/space/apps/fe/src/components/features/planets/list/PlanetsTableSummary.tsx +29 -0
- package/templates/space/apps/fe/src/components/features/planets/list/PlanetsViewTabs.tsx +79 -0
- package/templates/space/apps/fe/src/components/features/planets/list/table/PlanetsTable.tsx +30 -0
- package/templates/space/apps/fe/src/components/features/planets/list/table/PlanetsTableActions.tsx +64 -0
- package/templates/space/apps/fe/src/components/features/planets/list/table/PlanetsTableInfinite.tsx +36 -0
- package/templates/space/apps/fe/src/components/features/planets/list/table/planetsTableColumns.tsx +72 -0
- package/templates/space/apps/fe/src/components/features/planets/list/table/usePlanetTableFilters.tsx +102 -0
- package/templates/space/apps/fe/src/components/features/profile/ProfilePage.tsx +96 -0
- package/templates/space/apps/fe/src/components/googleAnalytics/GoogleAnalytics.tsx +35 -0
- package/templates/space/apps/fe/src/components/layout/AppLayout.tsx +19 -0
- package/templates/space/apps/fe/src/components/layout/app-header/AppHeader.tsx +93 -0
- package/templates/space/apps/fe/src/components/layout/app-header/MobileNavigation.tsx +53 -0
- package/templates/space/apps/fe/src/components/layout/app-header/NavLink.tsx +29 -0
- package/templates/space/apps/fe/src/components/shared/branding/BrandLogo.tsx +13 -0
- package/templates/space/apps/fe/src/components/shared/error/ErrorFallback.tsx +43 -0
- package/templates/space/apps/fe/src/components/shared/error/ErrorText.tsx +20 -0
- package/templates/space/apps/fe/src/components/shared/error/NotFound.tsx +36 -0
- package/templates/space/apps/fe/src/components/shared/forms/RequiredLabel.tsx +21 -0
- package/templates/space/apps/fe/src/components/shared/forms/RowInputWrapper.tsx +50 -0
- package/templates/space/apps/fe/src/components/shared/head/AppHead.tsx +32 -0
- package/templates/space/apps/fe/src/components/shared/head/DefaultAppHead.tsx +34 -0
- package/templates/space/apps/fe/src/components/shared/layout/LoadingState.tsx +9 -0
- package/templates/space/apps/fe/src/components/shared/layout/ThinPageWrapper.tsx +5 -0
- package/templates/space/apps/fe/src/components/shared/page/PageHeader.tsx +69 -0
- package/templates/space/apps/fe/src/components/shared/ui/Card.tsx +60 -0
- package/templates/space/apps/fe/src/components/shared/ui/GoogleLoginButton.tsx +19 -0
- package/templates/space/apps/fe/src/components/shared/ui/RequiredLabel.tsx +22 -0
- package/templates/space/apps/fe/src/components/shared/ui/TableActions.tsx +22 -0
- package/templates/space/apps/fe/src/config/app.config.ts +35 -0
- package/templates/space/apps/fe/src/config/i18n.ts +43 -0
- package/templates/space/apps/fe/src/config/inits/a11y.ts +14 -0
- package/templates/space/apps/fe/src/config/inits/logger.ts +7 -0
- package/templates/space/apps/fe/src/config/inits/sentry.ts +21 -0
- package/templates/space/apps/fe/src/config/jwt.config.ts +2 -0
- package/templates/space/apps/fe/src/config/query.config.ts +20 -0
- package/templates/space/apps/fe/src/hooks/useAuth.ts +5 -0
- package/templates/space/apps/fe/src/main.tsx +52 -0
- package/templates/space/apps/fe/src/pages/(guest)/login.tsx +23 -0
- package/templates/space/apps/fe/src/pages/(guest)/register.tsx +23 -0
- package/templates/space/apps/fe/src/pages/(guest)/route.tsx +18 -0
- package/templates/space/apps/fe/src/pages/(private)/index.tsx +23 -0
- package/templates/space/apps/fe/src/pages/(private)/planets/$id/edit.tsx +53 -0
- package/templates/space/apps/fe/src/pages/(private)/planets/$id/index.tsx +41 -0
- package/templates/space/apps/fe/src/pages/(private)/planets/index.tsx +24 -0
- package/templates/space/apps/fe/src/pages/(private)/planets-feed.tsx +23 -0
- package/templates/space/apps/fe/src/pages/(private)/profile.tsx +23 -0
- package/templates/space/apps/fe/src/pages/(private)/route.tsx +18 -0
- package/templates/space/apps/fe/src/pages/(public)/auth.tsx +37 -0
- package/templates/space/apps/fe/src/pages/(public)/route.tsx +9 -0
- package/templates/space/apps/fe/src/pages/__root.tsx +164 -0
- package/templates/space/apps/fe/src/providers/AppErrorBoundary.tsx +10 -0
- package/templates/space/apps/fe/src/providers/OpenApiRuntimeProvider.tsx +31 -0
- package/templates/space/apps/fe/src/providers/index.tsx +44 -0
- package/templates/space/apps/fe/src/providers/jwt.provider.tsx +95 -0
- package/templates/space/apps/fe/src/routeTree.gen.ts +309 -0
- package/templates/space/apps/fe/src/styles/base.css +103 -0
- package/templates/space/apps/fe/src/styles/fonts/fonts.tsx +10 -0
- package/templates/space/apps/fe/src/styles/fonts/general-sans.css +31 -0
- package/templates/space/apps/fe/src/styles/globals.css +28 -0
- package/templates/space/apps/fe/src/styles/overrides/defaults/button.override.ts +536 -0
- package/templates/space/apps/fe/src/styles/overrides/defaults/checkbox.override.ts +71 -0
- package/templates/space/apps/fe/src/styles/overrides/defaults/input.override.ts +252 -0
- package/templates/space/apps/fe/src/styles/overrides/defaults/label.override.ts +91 -0
- package/templates/space/apps/fe/src/styles/overrides/defaults/modal.override.ts +57 -0
- package/templates/space/apps/fe/src/styles/overrides/defaults/radio.override.ts +46 -0
- package/templates/space/apps/fe/src/styles/overrides/defaults/table.override.ts +104 -0
- package/templates/space/apps/fe/src/styles/overrides/defaults/tag.override.ts +66 -0
- package/templates/space/apps/fe/src/styles/overrides/defaults/typography.override.ts +115 -0
- package/templates/space/apps/fe/src/styles/overrides/outline.clsx.ts +10 -0
- package/templates/space/apps/fe/src/styles/overrides/uiOverrides.override.ts +60 -0
- package/templates/space/apps/fe/src/styles/theme.css +2177 -0
- package/templates/space/apps/fe/src/types/i18next.d.ts +12 -0
- package/templates/space/apps/fe/src/types/table.d.ts +17 -0
- package/templates/space/apps/fe/src/types/ui.d.ts +26 -0
- package/templates/space/apps/fe/src/types/vite-env.d.ts +20 -0
- package/templates/space/apps/fe/src/utils/date.utils.ts +17 -0
- package/templates/space/apps/fe/src/utils/image-fallback.ts +9 -0
- package/templates/space/apps/fe/src/utils/media-upload.ts +63 -0
- package/templates/space/apps/fe/src/utils/number.utils.ts +12 -0
- package/templates/space/apps/fe/src/utils/string.utils.ts +5 -0
- package/templates/space/apps/fe/src/vite-env.d.ts +1 -0
- package/templates/space/apps/fe/tsconfig.app.json +32 -0
- package/templates/space/apps/fe/tsconfig.json +9 -0
- package/templates/space/apps/fe/tsconfig.node.json +31 -0
- package/templates/space/apps/fe/vite.config.ts +94 -0
- package/templates/space/database.ts +33 -13
- package/templates/space/openapi.json +1819 -0
- package/templates/space/oxfmt.config.js +23 -0
- package/templates/space/package.json +6 -13
- package/templates/space/rulesync.jsonc +18 -0
- package/templates/space/tsconfig.json +2 -4
- package/templates/auth-chat/index.html +0 -201
- package/templates/auth-chat/src/main.tsx +0 -282
- package/templates/auth-chat/vite.config.ts +0 -7
- package/templates/backend/api/health.ts +0 -7
- package/templates/backend/api/launch.ts +0 -29
- package/templates/backend/api/me.ts +0 -14
- package/templates/backend/api/motto.ts +0 -9
- package/templates/backend/api/rockets.ts +0 -43
- package/templates/space/api/health.ts +0 -7
- package/templates/space/api/launch.ts +0 -29
- package/templates/space/api/me.ts +0 -14
- package/templates/space/api/motto.ts +0 -9
- package/templates/space/api/rockets.ts +0 -43
- package/templates/space/index.html +0 -138
- package/templates/space/src/main.tsx +0 -229
- 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,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
|
-
);
|