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
|
@@ -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 @@
|
|
|
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,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
|
|
3
|
+
export const aliens = pgTable("aliens", {
|
|
8
4
|
id: uuid("id").primaryKey().defaultRandom(),
|
|
9
5
|
name: text("name").notNull(),
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
createdAt: timestamp("createdAt", { withTimezone: true }).defaultNow(),
|
|
7
|
+
updatedAt: timestamp("updatedAt", { withTimezone: true }).defaultNow(),
|
|
12
8
|
});
|
|
13
9
|
|
|
14
|
-
export const
|
|
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
|
-
|
|
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
|
-
|
|
40
|
+
userId: text("userId").notNull(),
|
|
21
41
|
createdAt: timestamp("createdAt", { withTimezone: true }).defaultNow(),
|
|
22
42
|
});
|
|
23
43
|
|
|
24
44
|
export default defineDatabase({
|
|
25
|
-
name: "
|
|
26
|
-
tables: { planets,
|
|
45
|
+
name: "tiny",
|
|
46
|
+
tables: { aliens, media, planets, planetLikes },
|
|
27
47
|
});
|