tvi-cli 0.1.4
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/README.md +147 -0
- package/dist/index.js +4315 -0
- package/package.json +75 -0
- package/templates/addons/biome/biome.json.hbs +83 -0
- package/templates/addons/husky/.husky/pre-commit +1 -0
- package/templates/addons/pwa/apps/web/next/public/favicon/apple-touch-icon.png +0 -0
- package/templates/addons/pwa/apps/web/next/public/favicon/favicon-96x96.png +0 -0
- package/templates/addons/pwa/apps/web/next/public/favicon/favicon.svg +6 -0
- package/templates/addons/pwa/apps/web/next/public/favicon/site.webmanifest.hbs +21 -0
- package/templates/addons/pwa/apps/web/next/public/favicon/web-app-manifest-192x192.png +0 -0
- package/templates/addons/pwa/apps/web/next/public/favicon/web-app-manifest-512x512.png +0 -0
- package/templates/addons/pwa/apps/web/next/src/app/manifest.ts.hbs +26 -0
- package/templates/addons/pwa/apps/web/vite/public/logo.png +0 -0
- package/templates/addons/pwa/apps/web/vite/pwa-assets.config.ts.hbs +12 -0
- package/templates/addons/turborepo/turbo.json.hbs +43 -0
- package/templates/api/orpc/native/utils/orpc.ts.hbs +35 -0
- package/templates/api/orpc/server/base/src/lib/context.ts.hbs +125 -0
- package/templates/api/orpc/server/base/src/lib/orpc.ts.hbs +21 -0
- package/templates/api/orpc/server/next/src/app/rpc/[...all]/route.ts.hbs +23 -0
- package/templates/api/orpc/web/nuxt/app/plugins/orpc.ts.hbs +35 -0
- package/templates/api/orpc/web/react/base/src/utils/orpc.ts.hbs +42 -0
- package/templates/api/orpc/web/solid/src/utils/orpc.ts.hbs +30 -0
- package/templates/api/orpc/web/svelte/src/lib/orpc.ts.hbs +31 -0
- package/templates/api/trpc/native/utils/trpc.ts.hbs +32 -0
- package/templates/api/trpc/server/base/src/lib/context.ts.hbs +127 -0
- package/templates/api/trpc/server/base/src/lib/trpc.ts.hbs +26 -0
- package/templates/api/trpc/server/next/src/app/trpc/[trpc]/route.ts +14 -0
- package/templates/api/trpc/web/react/base/src/utils/trpc.ts.hbs +97 -0
- package/templates/auth/native/native-base/lib/auth-client.ts.hbs +13 -0
- package/templates/auth/native/nativewind/app/(drawer)/index.tsx.hbs +95 -0
- package/templates/auth/native/nativewind/components/sign-in.tsx.hbs +93 -0
- package/templates/auth/native/nativewind/components/sign-up.tsx.hbs +104 -0
- package/templates/auth/native/unistyles/app/(drawer)/index.tsx.hbs +179 -0
- package/templates/auth/native/unistyles/components/sign-in.tsx.hbs +134 -0
- package/templates/auth/native/unistyles/components/sign-up.tsx.hbs +152 -0
- package/templates/auth/server/base/src/lib/auth.ts.hbs +141 -0
- package/templates/auth/server/db/drizzle/mysql/src/db/schema/auth.ts +58 -0
- package/templates/auth/server/db/drizzle/postgres/src/db/schema/auth.ts +47 -0
- package/templates/auth/server/db/drizzle/sqlite/src/db/schema/auth.ts +55 -0
- package/templates/auth/server/db/mongoose/mongodb/src/db/models/auth.model.ts +68 -0
- package/templates/auth/server/db/prisma/mongodb/prisma/schema/auth.prisma +59 -0
- package/templates/auth/server/db/prisma/mysql/prisma/schema/auth.prisma +59 -0
- package/templates/auth/server/db/prisma/postgres/prisma/schema/auth.prisma +59 -0
- package/templates/auth/server/db/prisma/sqlite/prisma/schema/auth.prisma +59 -0
- package/templates/auth/server/next/src/app/api/auth/[...all]/route.ts +4 -0
- package/templates/auth/web/nuxt/app/components/SignInForm.vue +77 -0
- package/templates/auth/web/nuxt/app/components/SignUpForm.vue +84 -0
- package/templates/auth/web/nuxt/app/components/UserMenu.vue +42 -0
- package/templates/auth/web/nuxt/app/middleware/auth.ts +12 -0
- package/templates/auth/web/nuxt/app/pages/dashboard.vue +27 -0
- package/templates/auth/web/nuxt/app/pages/login.vue +24 -0
- package/templates/auth/web/nuxt/app/plugins/auth-client.ts +16 -0
- package/templates/auth/web/react/base/src/lib/auth-client.ts.hbs +10 -0
- package/templates/auth/web/react/next/src/app/dashboard/page.tsx.hbs +47 -0
- package/templates/auth/web/react/next/src/app/login/page.tsx +16 -0
- package/templates/auth/web/react/next/src/components/sign-in-form.tsx +135 -0
- package/templates/auth/web/react/next/src/components/sign-up-form.tsx +160 -0
- package/templates/auth/web/react/next/src/components/theme-provider.tsx +11 -0
- package/templates/auth/web/react/next/src/components/user-menu.tsx +60 -0
- package/templates/auth/web/react/react-router/src/components/sign-in-form.tsx +135 -0
- package/templates/auth/web/react/react-router/src/components/sign-up-form.tsx +160 -0
- package/templates/auth/web/react/react-router/src/components/user-menu.tsx +60 -0
- package/templates/auth/web/react/react-router/src/routes/dashboard.tsx.hbs +40 -0
- package/templates/auth/web/react/react-router/src/routes/login.tsx +13 -0
- package/templates/auth/web/react/tanstack-router/src/components/sign-in-form.tsx +139 -0
- package/templates/auth/web/react/tanstack-router/src/components/sign-up-form.tsx +164 -0
- package/templates/auth/web/react/tanstack-router/src/components/user-menu.tsx +62 -0
- package/templates/auth/web/react/tanstack-router/src/routes/dashboard.tsx.hbs +47 -0
- package/templates/auth/web/react/tanstack-router/src/routes/login.tsx +18 -0
- package/templates/auth/web/react/tanstack-start/src/components/sign-in-form.tsx +139 -0
- package/templates/auth/web/react/tanstack-start/src/components/sign-up-form.tsx +164 -0
- package/templates/auth/web/react/tanstack-start/src/components/user-menu.tsx +62 -0
- package/templates/auth/web/react/tanstack-start/src/routes/dashboard.tsx.hbs +51 -0
- package/templates/auth/web/react/tanstack-start/src/routes/login.tsx +18 -0
- package/templates/auth/web/solid/src/components/sign-in-form.tsx +132 -0
- package/templates/auth/web/solid/src/components/sign-up-form.tsx +158 -0
- package/templates/auth/web/solid/src/components/user-menu.tsx.hbs +55 -0
- package/templates/auth/web/solid/src/lib/auth-client.ts +5 -0
- package/templates/auth/web/solid/src/routes/dashboard.tsx +38 -0
- package/templates/auth/web/solid/src/routes/login.tsx +23 -0
- package/templates/auth/web/svelte/src/components/SignInForm.svelte +108 -0
- package/templates/auth/web/svelte/src/components/SignUpForm.svelte +142 -0
- package/templates/auth/web/svelte/src/components/UserMenu.svelte +54 -0
- package/templates/auth/web/svelte/src/lib/auth-client.ts +6 -0
- package/templates/auth/web/svelte/src/routes/dashboard/+page.svelte +31 -0
- package/templates/auth/web/svelte/src/routes/login/+page.svelte +12 -0
- package/templates/backend/convex/packages/backend/_gitignore +2 -0
- package/templates/backend/convex/packages/backend/convex/README.md +90 -0
- package/templates/backend/convex/packages/backend/convex/healthCheck.ts +7 -0
- package/templates/backend/convex/packages/backend/convex/schema.ts +9 -0
- package/templates/backend/convex/packages/backend/convex/todos.ts +42 -0
- package/templates/backend/convex/packages/backend/convex/tsconfig.json +25 -0
- package/templates/backend/convex/packages/backend/package.json.hbs +17 -0
- package/templates/backend/server/elysia/src/index.ts.hbs +72 -0
- package/templates/backend/server/express/src/index.ts.hbs +88 -0
- package/templates/backend/server/fastify/src/index.ts.hbs +155 -0
- package/templates/backend/server/hono/src/index.ts.hbs +133 -0
- package/templates/backend/server/next/next-env.d.ts +5 -0
- package/templates/backend/server/next/next.config.ts +7 -0
- package/templates/backend/server/next/package.json.hbs +24 -0
- package/templates/backend/server/next/src/app/route.ts +5 -0
- package/templates/backend/server/next/src/middleware.ts +19 -0
- package/templates/backend/server/next/tsconfig.json.hbs +33 -0
- package/templates/backend/server/server-base/_gitignore +52 -0
- package/templates/backend/server/server-base/package.json.hbs +28 -0
- package/templates/backend/server/server-base/src/routers/index.ts.hbs +53 -0
- package/templates/backend/server/server-base/tsconfig.json.hbs +39 -0
- package/templates/base/_gitignore +2 -0
- package/templates/base/package.json.hbs +11 -0
- package/templates/db/drizzle/mysql/drizzle.config.ts.hbs +10 -0
- package/templates/db/drizzle/mysql/src/db/index.ts.hbs +20 -0
- package/templates/db/drizzle/postgres/drizzle.config.ts.hbs +10 -0
- package/templates/db/drizzle/postgres/src/db/index.ts.hbs +12 -0
- package/templates/db/drizzle/sqlite/drizzle.config.ts.hbs +24 -0
- package/templates/db/drizzle/sqlite/src/db/index.ts.hbs +35 -0
- package/templates/db/mongoose/mongodb/src/db/index.ts.hbs +9 -0
- package/templates/db/prisma/mongodb/prisma/index.ts.hbs +5 -0
- package/templates/db/prisma/mongodb/prisma/schema/schema.prisma +10 -0
- package/templates/db/prisma/mongodb/prisma.config.ts.hbs +8 -0
- package/templates/db/prisma/mysql/prisma/index.ts +5 -0
- package/templates/db/prisma/mysql/prisma/schema/schema.prisma +10 -0
- package/templates/db/prisma/mysql/prisma.config.ts +8 -0
- package/templates/db/prisma/postgres/prisma/index.ts +5 -0
- package/templates/db/prisma/postgres/prisma/schema/schema.prisma.hbs +13 -0
- package/templates/db/prisma/postgres/prisma.config.ts.hbs +12 -0
- package/templates/db/prisma/sqlite/prisma/index.ts +5 -0
- package/templates/db/prisma/sqlite/prisma/schema/schema.prisma +10 -0
- package/templates/db/prisma/sqlite/prisma.config.ts +8 -0
- package/templates/examples/ai/native/nativewind/app/(drawer)/ai.tsx.hbs +155 -0
- package/templates/examples/ai/native/nativewind/polyfills.js +25 -0
- package/templates/examples/ai/native/unistyles/app/(drawer)/ai.tsx.hbs +279 -0
- package/templates/examples/ai/native/unistyles/polyfills.js +25 -0
- package/templates/examples/ai/server/next/src/app/ai/route.ts +15 -0
- package/templates/examples/ai/web/nuxt/app/pages/ai.vue +63 -0
- package/templates/examples/ai/web/react/next/src/app/ai/page.tsx +67 -0
- package/templates/examples/ai/web/react/react-router/src/routes/ai.tsx +64 -0
- package/templates/examples/ai/web/react/tanstack-router/src/routes/ai.tsx +69 -0
- package/templates/examples/ai/web/react/tanstack-start/src/routes/ai.tsx +69 -0
- package/templates/examples/ai/web/svelte/src/routes/ai/+page.svelte +98 -0
- package/templates/examples/todo/native/nativewind/app/(drawer)/todos.tsx.hbs +295 -0
- package/templates/examples/todo/native/unistyles/app/(drawer)/todos.tsx.hbs +340 -0
- package/templates/examples/todo/server/drizzle/base/src/routers/todo.ts.hbs +79 -0
- package/templates/examples/todo/server/drizzle/mysql/src/db/schema/todo.ts +7 -0
- package/templates/examples/todo/server/drizzle/postgres/src/db/schema/todo.ts +7 -0
- package/templates/examples/todo/server/drizzle/sqlite/src/db/schema/todo.ts +7 -0
- package/templates/examples/todo/server/mongoose/base/src/routers/todo.ts.hbs +66 -0
- package/templates/examples/todo/server/mongoose/mongodb/src/db/models/todo.model.ts +24 -0
- package/templates/examples/todo/server/prisma/base/src/routers/todo.ts.hbs +118 -0
- package/templates/examples/todo/server/prisma/mongodb/prisma/schema/todo.prisma +7 -0
- package/templates/examples/todo/server/prisma/mysql/prisma/schema/todo.prisma +7 -0
- package/templates/examples/todo/server/prisma/postgres/prisma/schema/todo.prisma +7 -0
- package/templates/examples/todo/server/prisma/sqlite/prisma/schema/todo.prisma +7 -0
- package/templates/examples/todo/web/nuxt/app/pages/todos.vue +108 -0
- package/templates/examples/todo/web/react/next/src/app/todos/page.tsx.hbs +245 -0
- package/templates/examples/todo/web/react/react-router/src/routes/todos.tsx.hbs +242 -0
- package/templates/examples/todo/web/react/tanstack-router/src/routes/todos.tsx.hbs +247 -0
- package/templates/examples/todo/web/react/tanstack-start/src/routes/todos.tsx.hbs +268 -0
- package/templates/examples/todo/web/solid/src/routes/todos.tsx.hbs +132 -0
- package/templates/examples/todo/web/svelte/src/routes/todos/+page.svelte.hbs +317 -0
- package/templates/extras/_npmrc.hbs +5 -0
- package/templates/extras/pnpm-workspace.yaml +3 -0
- package/templates/frontend/native/native-base/assets/adaptive-icon.png +0 -0
- package/templates/frontend/native/native-base/assets/favicon.png +0 -0
- package/templates/frontend/native/native-base/assets/icon.png +0 -0
- package/templates/frontend/native/native-base/assets/splash.png +0 -0
- package/templates/frontend/native/nativewind/_gitignore +25 -0
- package/templates/frontend/native/nativewind/app/(drawer)/(tabs)/_layout.tsx +46 -0
- package/templates/frontend/native/nativewind/app/(drawer)/(tabs)/index.tsx +19 -0
- package/templates/frontend/native/nativewind/app/(drawer)/(tabs)/two.tsx +19 -0
- package/templates/frontend/native/nativewind/app/(drawer)/_layout.tsx.hbs +67 -0
- package/templates/frontend/native/nativewind/app/(drawer)/index.tsx.hbs +95 -0
- package/templates/frontend/native/nativewind/app/+html.tsx +47 -0
- package/templates/frontend/native/nativewind/app/+not-found.tsx +29 -0
- package/templates/frontend/native/nativewind/app/_layout.tsx.hbs +126 -0
- package/templates/frontend/native/nativewind/app/modal.tsx +14 -0
- package/templates/frontend/native/nativewind/app-env.d.ts +2 -0
- package/templates/frontend/native/nativewind/app.json +46 -0
- package/templates/frontend/native/nativewind/babel.config.js +11 -0
- package/templates/frontend/native/nativewind/components/container.tsx +8 -0
- package/templates/frontend/native/nativewind/components/header-button.tsx +26 -0
- package/templates/frontend/native/nativewind/components/tabbar-icon.tsx +8 -0
- package/templates/frontend/native/nativewind/global.css +50 -0
- package/templates/frontend/native/nativewind/lib/android-navigation-bar.tsx +11 -0
- package/templates/frontend/native/nativewind/lib/constants.ts +18 -0
- package/templates/frontend/native/nativewind/lib/use-color-scheme.ts +12 -0
- package/templates/frontend/native/nativewind/metro.config.js +59 -0
- package/templates/frontend/native/nativewind/package.json.hbs +49 -0
- package/templates/frontend/native/nativewind/tailwind.config.js +59 -0
- package/templates/frontend/native/nativewind/tsconfig.json.hbs +23 -0
- package/templates/frontend/native/unistyles/_gitignore +24 -0
- package/templates/frontend/native/unistyles/app/(drawer)/(tabs)/_layout.tsx +39 -0
- package/templates/frontend/native/unistyles/app/(drawer)/(tabs)/index.tsx +37 -0
- package/templates/frontend/native/unistyles/app/(drawer)/(tabs)/two.tsx +37 -0
- package/templates/frontend/native/unistyles/app/(drawer)/_layout.tsx.hbs +87 -0
- package/templates/frontend/native/unistyles/app/(drawer)/index.tsx.hbs +194 -0
- package/templates/frontend/native/unistyles/app/+html.tsx +48 -0
- package/templates/frontend/native/unistyles/app/+not-found.tsx +65 -0
- package/templates/frontend/native/unistyles/app/_layout.tsx.hbs +104 -0
- package/templates/frontend/native/unistyles/app/modal.tsx +33 -0
- package/templates/frontend/native/unistyles/app.json +44 -0
- package/templates/frontend/native/unistyles/babel.config.js +20 -0
- package/templates/frontend/native/unistyles/breakpoints.ts +9 -0
- package/templates/frontend/native/unistyles/components/container.tsx +15 -0
- package/templates/frontend/native/unistyles/components/header-button.tsx +36 -0
- package/templates/frontend/native/unistyles/components/tabbar-icon.tsx +8 -0
- package/templates/frontend/native/unistyles/expo-env.d.ts +3 -0
- package/templates/frontend/native/unistyles/index.js +2 -0
- package/templates/frontend/native/unistyles/metro.config.js +20 -0
- package/templates/frontend/native/unistyles/package.json.hbs +50 -0
- package/templates/frontend/native/unistyles/theme.ts +98 -0
- package/templates/frontend/native/unistyles/tsconfig.json.hbs +17 -0
- package/templates/frontend/native/unistyles/unistyles.ts +27 -0
- package/templates/frontend/nuxt/_gitignore +24 -0
- package/templates/frontend/nuxt/app/app.config.ts +15 -0
- package/templates/frontend/nuxt/app/app.vue +13 -0
- package/templates/frontend/nuxt/app/assets/css/main.css +2 -0
- package/templates/frontend/nuxt/app/components/Header.vue.hbs +45 -0
- package/templates/frontend/nuxt/app/components/Loader.vue +5 -0
- package/templates/frontend/nuxt/app/components/ModeToggle.vue +23 -0
- package/templates/frontend/nuxt/app/layouts/default.vue.hbs +11 -0
- package/templates/frontend/nuxt/app/pages/index.vue.hbs +57 -0
- package/templates/frontend/nuxt/app/plugins/vue-query.ts.hbs +44 -0
- package/templates/frontend/nuxt/nuxt.config.ts.hbs +19 -0
- package/templates/frontend/nuxt/package.json.hbs +25 -0
- package/templates/frontend/nuxt/public/favicon.ico +0 -0
- package/templates/frontend/nuxt/public/robots.txt +2 -0
- package/templates/frontend/nuxt/server/tsconfig.json +3 -0
- package/templates/frontend/nuxt/tsconfig.json.hbs +9 -0
- package/templates/frontend/react/next/next-env.d.ts.hbs +5 -0
- package/templates/frontend/react/next/next.config.ts.hbs +5 -0
- package/templates/frontend/react/next/package.json.hbs +34 -0
- package/templates/frontend/react/next/postcss.config.mjs.hbs +5 -0
- package/templates/frontend/react/next/src/app/favicon.ico +0 -0
- package/templates/frontend/react/next/src/app/layout.tsx.hbs +41 -0
- package/templates/frontend/react/next/src/app/page.tsx.hbs +68 -0
- package/templates/frontend/react/next/src/components/mode-toggle.tsx.hbs +39 -0
- package/templates/frontend/react/next/src/components/providers.tsx.hbs +56 -0
- package/templates/frontend/react/next/src/components/theme-provider.tsx.hbs +11 -0
- package/templates/frontend/react/next/tsconfig.json.hbs +33 -0
- package/templates/frontend/react/react-router/package.json.hbs +42 -0
- package/templates/frontend/react/react-router/public/favicon.ico +0 -0
- package/templates/frontend/react/react-router/react-router.config.ts +6 -0
- package/templates/frontend/react/react-router/src/components/mode-toggle.tsx +37 -0
- package/templates/frontend/react/react-router/src/components/theme-provider.tsx +73 -0
- package/templates/frontend/react/react-router/src/root.tsx.hbs +152 -0
- package/templates/frontend/react/react-router/src/routes/_index.tsx.hbs +74 -0
- package/templates/frontend/react/react-router/src/routes.ts +4 -0
- package/templates/frontend/react/react-router/tsconfig.json.hbs +32 -0
- package/templates/frontend/react/react-router/vite.config.ts.hbs +33 -0
- package/templates/frontend/react/tanstack-router/index.html +12 -0
- package/templates/frontend/react/tanstack-router/package.json.hbs +41 -0
- package/templates/frontend/react/tanstack-router/src/components/mode-toggle.tsx +37 -0
- package/templates/frontend/react/tanstack-router/src/components/theme-provider.tsx +73 -0
- package/templates/frontend/react/tanstack-router/src/main.tsx.hbs +66 -0
- package/templates/frontend/react/tanstack-router/src/routes/__root.tsx.hbs +100 -0
- package/templates/frontend/react/tanstack-router/src/routes/index.tsx.hbs +74 -0
- package/templates/frontend/react/tanstack-router/tsconfig.json.hbs +23 -0
- package/templates/frontend/react/tanstack-router/vite.config.ts.hbs +39 -0
- package/templates/frontend/react/tanstack-start/package.json.hbs +44 -0
- package/templates/frontend/react/tanstack-start/public/robots.txt +3 -0
- package/templates/frontend/react/tanstack-start/src/router.tsx.hbs +144 -0
- package/templates/frontend/react/tanstack-start/src/routes/__root.tsx.hbs +97 -0
- package/templates/frontend/react/tanstack-start/src/routes/index.tsx.hbs +74 -0
- package/templates/frontend/react/tanstack-start/tsconfig.json.hbs +33 -0
- package/templates/frontend/react/tanstack-start/vite.config.ts +8 -0
- package/templates/frontend/react/web-base/_gitignore +52 -0
- package/templates/frontend/react/web-base/components.json +21 -0
- package/templates/frontend/react/web-base/src/components/header.tsx.hbs +79 -0
- package/templates/frontend/react/web-base/src/components/loader.tsx +9 -0
- package/templates/frontend/react/web-base/src/components/ui/button.tsx +59 -0
- package/templates/frontend/react/web-base/src/components/ui/card.tsx +92 -0
- package/templates/frontend/react/web-base/src/components/ui/checkbox.tsx +30 -0
- package/templates/frontend/react/web-base/src/components/ui/dropdown-menu.tsx +257 -0
- package/templates/frontend/react/web-base/src/components/ui/input.tsx +21 -0
- package/templates/frontend/react/web-base/src/components/ui/label.tsx +22 -0
- package/templates/frontend/react/web-base/src/components/ui/skeleton.tsx +13 -0
- package/templates/frontend/react/web-base/src/components/ui/sonner.tsx +25 -0
- package/templates/frontend/react/web-base/src/index.css +134 -0
- package/templates/frontend/react/web-base/src/lib/utils.ts +6 -0
- package/templates/frontend/solid/_gitignore +7 -0
- package/templates/frontend/solid/index.html +13 -0
- package/templates/frontend/solid/package.json.hbs +27 -0
- package/templates/frontend/solid/public/robots.txt +3 -0
- package/templates/frontend/solid/src/components/header.tsx.hbs +38 -0
- package/templates/frontend/solid/src/components/loader.tsx +9 -0
- package/templates/frontend/solid/src/main.tsx.hbs +38 -0
- package/templates/frontend/solid/src/routes/__root.tsx.hbs +34 -0
- package/templates/frontend/solid/src/routes/index.tsx.hbs +61 -0
- package/templates/frontend/solid/src/styles.css +5 -0
- package/templates/frontend/solid/tsconfig.json.hbs +34 -0
- package/templates/frontend/solid/vite.config.js.hbs +39 -0
- package/templates/frontend/svelte/_gitignore +23 -0
- package/templates/frontend/svelte/_npmrc +1 -0
- package/templates/frontend/svelte/package.json.hbs +31 -0
- package/templates/frontend/svelte/src/app.css +5 -0
- package/templates/frontend/svelte/src/app.d.ts +13 -0
- package/templates/frontend/svelte/src/app.html +12 -0
- package/templates/frontend/svelte/src/components/Header.svelte.hbs +40 -0
- package/templates/frontend/svelte/src/lib/index.ts +1 -0
- package/templates/frontend/svelte/src/routes/+layout.svelte.hbs +54 -0
- package/templates/frontend/svelte/src/routes/+page.svelte.hbs +72 -0
- package/templates/frontend/svelte/static/favicon.png +0 -0
- package/templates/frontend/svelte/svelte.config.js +18 -0
- package/templates/frontend/svelte/tsconfig.json.hbs +24 -0
- package/templates/frontend/svelte/vite.config.ts +7 -0
- package/templates/runtime/workers/apps/server/wrangler.jsonc.hbs +34 -0
@@ -0,0 +1,61 @@
|
|
1
|
+
import { createFileRoute } from "@tanstack/solid-router";
|
2
|
+
{{#if (eq api "orpc")}}
|
3
|
+
import { useQuery } from "@tanstack/solid-query";
|
4
|
+
import { orpc } from "../utils/orpc";
|
5
|
+
import { Match, Switch } from "solid-js";
|
6
|
+
{{else}}
|
7
|
+
{{/if}}
|
8
|
+
|
9
|
+
export const Route = createFileRoute("/")({
|
10
|
+
component: App,
|
11
|
+
});
|
12
|
+
|
13
|
+
const TITLE_TEXT = `
|
14
|
+
TVI TypeScript Initializer
|
15
|
+
A CLI tool to quickly scaffold TypeScript projects with popular frameworks and libraries.
|
16
|
+
`;
|
17
|
+
|
18
|
+
function App() {
|
19
|
+
{{#if (eq api "orpc")}}
|
20
|
+
const healthCheck = useQuery(() => orpc.healthCheck.queryOptions());
|
21
|
+
{{/if}}
|
22
|
+
|
23
|
+
return (
|
24
|
+
<div class="container mx-auto max-w-3xl px-4 py-2">
|
25
|
+
<pre class="overflow-x-auto font-mono text-sm">{TITLE_TEXT}</pre>
|
26
|
+
<div class="grid gap-6">
|
27
|
+
{{#if (eq api "orpc")}}
|
28
|
+
<section class="rounded-lg border p-4">
|
29
|
+
<h2 class="mb-2 font-medium">API Status</h2>
|
30
|
+
<Switch>
|
31
|
+
<Match when={healthCheck.isPending}>
|
32
|
+
<div class="flex items-center gap-2">
|
33
|
+
<div class="h-2 w-2 rounded-full bg-gray-500 animate-pulse" />{" "}
|
34
|
+
<span class="text-sm text-muted-foreground">Checking...</span>
|
35
|
+
</div>
|
36
|
+
</Match>
|
37
|
+
<Match when={healthCheck.isError}>
|
38
|
+
<div class="flex items-center gap-2">
|
39
|
+
<div class="h-2 w-2 rounded-full bg-red-500" />
|
40
|
+
<span class="text-sm text-muted-foreground">Disconnected</span>
|
41
|
+
</div>
|
42
|
+
</Match>
|
43
|
+
<Match when={healthCheck.isSuccess}>
|
44
|
+
<div class="flex items-center gap-2">
|
45
|
+
<div
|
46
|
+
class={`h-2 w-2 rounded-full ${healthCheck.data ? "bg-green-500" : "bg-red-500"}`}
|
47
|
+
/>
|
48
|
+
<span class="text-sm text-muted-foreground">
|
49
|
+
{healthCheck.data
|
50
|
+
? "Connected"
|
51
|
+
: "Disconnected"}
|
52
|
+
</span>
|
53
|
+
</div>
|
54
|
+
</Match>
|
55
|
+
</Switch>
|
56
|
+
</section>
|
57
|
+
{{/if}}
|
58
|
+
</div>
|
59
|
+
</div>
|
60
|
+
);
|
61
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
{
|
2
|
+
"include": ["**/*.ts", "**/*.tsx"],
|
3
|
+
"compilerOptions": {
|
4
|
+
"target": "ES2022",
|
5
|
+
"jsx": "preserve",
|
6
|
+
"jsxImportSource": "solid-js",
|
7
|
+
"module": "ESNext",
|
8
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
9
|
+
"types": ["vite/client"],
|
10
|
+
|
11
|
+
"moduleResolution": "bundler",
|
12
|
+
"allowImportingTsExtensions": true,
|
13
|
+
"verbatimModuleSyntax": true,
|
14
|
+
"noEmit": true,
|
15
|
+
|
16
|
+
"skipLibCheck": true,
|
17
|
+
"strict": true,
|
18
|
+
"noUnusedLocals": true,
|
19
|
+
"noUnusedParameters": true,
|
20
|
+
"noFallthroughCasesInSwitch": true,
|
21
|
+
"noUncheckedSideEffectImports": true,
|
22
|
+
|
23
|
+
"rootDirs": ["."],
|
24
|
+
"baseUrl": ".",
|
25
|
+
"paths": {
|
26
|
+
"@/*": ["./src/*"]
|
27
|
+
}
|
28
|
+
},
|
29
|
+
{{#unless (or (eq backend "convex") (eq backend "none"))}}
|
30
|
+
"references": [{
|
31
|
+
"path": "../server"
|
32
|
+
}]
|
33
|
+
{{/unless}}
|
34
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { defineConfig } from "vite";
|
2
|
+
import { TanStackRouterVite } from "@tanstack/router-plugin/vite";
|
3
|
+
import solidPlugin from "vite-plugin-solid";
|
4
|
+
import tailwindcss from "@tailwindcss/vite";
|
5
|
+
import path from "node:path";
|
6
|
+
{{#if (includes addons "pwa")}}
|
7
|
+
import { VitePWA } from "vite-plugin-pwa";
|
8
|
+
{{/if}}
|
9
|
+
|
10
|
+
export default defineConfig({
|
11
|
+
plugins: [
|
12
|
+
TanStackRouterVite({ target: "solid", autoCodeSplitting: true }),
|
13
|
+
solidPlugin(),
|
14
|
+
tailwindcss(),
|
15
|
+
{{#if (includes addons "pwa")}}
|
16
|
+
VitePWA({
|
17
|
+
registerType: "autoUpdate",
|
18
|
+
manifest: {
|
19
|
+
name: "{{projectName}}",
|
20
|
+
short_name: "{{projectName}}",
|
21
|
+
description: "{{projectName}} - PWA Application",
|
22
|
+
theme_color: "#0c0c0c",
|
23
|
+
},
|
24
|
+
pwaAssets: {
|
25
|
+
disabled: false,
|
26
|
+
config: true,
|
27
|
+
},
|
28
|
+
devOptions: {
|
29
|
+
enabled: true,
|
30
|
+
},
|
31
|
+
}),
|
32
|
+
{{/if}}
|
33
|
+
],
|
34
|
+
resolve: {
|
35
|
+
alias: {
|
36
|
+
"@": path.resolve(__dirname, "./src"),
|
37
|
+
},
|
38
|
+
},
|
39
|
+
});
|
@@ -0,0 +1,23 @@
|
|
1
|
+
node_modules
|
2
|
+
|
3
|
+
# Output
|
4
|
+
.output
|
5
|
+
.vercel
|
6
|
+
.netlify
|
7
|
+
.wrangler
|
8
|
+
/.svelte-kit
|
9
|
+
/build
|
10
|
+
|
11
|
+
# OS
|
12
|
+
.DS_Store
|
13
|
+
Thumbs.db
|
14
|
+
|
15
|
+
# Env
|
16
|
+
.env
|
17
|
+
.env.*
|
18
|
+
!.env.example
|
19
|
+
!.env.test
|
20
|
+
|
21
|
+
# Vite
|
22
|
+
vite.config.js.timestamp-*
|
23
|
+
vite.config.ts.timestamp-*
|
@@ -0,0 +1 @@
|
|
1
|
+
engine-strict=true
|
@@ -0,0 +1,31 @@
|
|
1
|
+
{
|
2
|
+
"name": "web",
|
3
|
+
"private": true,
|
4
|
+
"version": "0.0.1",
|
5
|
+
"type": "module",
|
6
|
+
"scripts": {
|
7
|
+
"dev": "vite dev",
|
8
|
+
"build": "vite build",
|
9
|
+
"preview": "vite preview",
|
10
|
+
"prepare": "svelte-kit sync || echo ''",
|
11
|
+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
12
|
+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
|
13
|
+
},
|
14
|
+
"devDependencies": {
|
15
|
+
"@sveltejs/adapter-auto": "^6.0.0",
|
16
|
+
"@sveltejs/kit": "^2.20.7",
|
17
|
+
"@sveltejs/vite-plugin-svelte": "^5.0.3",
|
18
|
+
"@tailwindcss/vite": "^4.1.4",
|
19
|
+
"svelte": "^5.28.2",
|
20
|
+
"svelte-check": "^4.1.6",
|
21
|
+
"tailwindcss": "^4.1.4",
|
22
|
+
"typescript": "^5.8.3",
|
23
|
+
"@tanstack/svelte-query-devtools": "^5.74.6",
|
24
|
+
"vite": "^6.3.3"
|
25
|
+
},
|
26
|
+
"dependencies": {
|
27
|
+
"@tanstack/svelte-form": "^1.7.0",
|
28
|
+
"@tanstack/svelte-query": "^5.74.4",
|
29
|
+
"zod": "^3.25.16"
|
30
|
+
}
|
31
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
// See https://svelte.dev/docs/kit/types#app.d.ts
|
2
|
+
// for information about these interfaces
|
3
|
+
declare global {
|
4
|
+
namespace App {
|
5
|
+
// interface Error {}
|
6
|
+
// interface Locals {}
|
7
|
+
// interface PageData {}
|
8
|
+
// interface PageState {}
|
9
|
+
// interface Platform {}
|
10
|
+
}
|
11
|
+
}
|
12
|
+
|
13
|
+
export {};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8" />
|
5
|
+
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
7
|
+
%sveltekit.head%
|
8
|
+
</head>
|
9
|
+
<body data-sveltekit-preload-data="hover">
|
10
|
+
<div style="display: contents">%sveltekit.body%</div>
|
11
|
+
</body>
|
12
|
+
</html>
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<script lang="ts">
|
2
|
+
|
3
|
+
{{#if auth}}
|
4
|
+
import UserMenu from './UserMenu.svelte';
|
5
|
+
{{/if}}
|
6
|
+
const links = [
|
7
|
+
{ to: "/", label: "Home" },
|
8
|
+
{{#if auth}}
|
9
|
+
{ to: "/dashboard", label: "Dashboard" },
|
10
|
+
{{/if}}
|
11
|
+
{{#if (includes examples "todo")}}
|
12
|
+
{ to: "/todos", label: "Todos" },
|
13
|
+
{{/if}}
|
14
|
+
{{#if (includes examples "ai")}}
|
15
|
+
{ to: "/ai", label: "AI Chat" },
|
16
|
+
{{/if}}
|
17
|
+
];
|
18
|
+
|
19
|
+
</script>
|
20
|
+
|
21
|
+
<div>
|
22
|
+
<div class="flex flex-row items-center justify-between px-4 py-2 md:px-6">
|
23
|
+
<nav class="flex gap-4 text-lg">
|
24
|
+
{#each links as link (link.to)}
|
25
|
+
<a
|
26
|
+
href={link.to}
|
27
|
+
class=""
|
28
|
+
>
|
29
|
+
{link.label}
|
30
|
+
</a>
|
31
|
+
{/each}
|
32
|
+
</nav>
|
33
|
+
<div class="flex items-center gap-2">
|
34
|
+
{{#if auth}}
|
35
|
+
<UserMenu />
|
36
|
+
{{/if}}
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
<hr class="border-neutral-800" />
|
40
|
+
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
// place files you want to import through the `$lib` alias in this folder.
|
@@ -0,0 +1,54 @@
|
|
1
|
+
{{#if (eq backend "convex")}}
|
2
|
+
<script lang="ts">
|
3
|
+
import '../app.css';
|
4
|
+
import Header from '../components/Header.svelte';
|
5
|
+
import { PUBLIC_CONVEX_URL } from '$env/static/public';
|
6
|
+
import { setupConvex } from 'convex-svelte';
|
7
|
+
|
8
|
+
const { children } = $props();
|
9
|
+
setupConvex(PUBLIC_CONVEX_URL);
|
10
|
+
</script>
|
11
|
+
|
12
|
+
<div class="grid h-svh grid-rows-[auto_1fr]">
|
13
|
+
<Header />
|
14
|
+
<main class="overflow-y-auto">
|
15
|
+
{@render children()}
|
16
|
+
</main>
|
17
|
+
</div>
|
18
|
+
{{else}}
|
19
|
+
{{#if (eq api "orpc")}}
|
20
|
+
<script lang="ts">
|
21
|
+
import { QueryClientProvider } from '@tanstack/svelte-query';
|
22
|
+
import { SvelteQueryDevtools } from '@tanstack/svelte-query-devtools'
|
23
|
+
import '../app.css';
|
24
|
+
import { queryClient } from '$lib/orpc';
|
25
|
+
import Header from '../components/Header.svelte';
|
26
|
+
|
27
|
+
let { children } = $props();
|
28
|
+
</script>
|
29
|
+
|
30
|
+
<QueryClientProvider client={queryClient}>
|
31
|
+
<div class="grid h-svh grid-rows-[auto_1fr]">
|
32
|
+
<Header />
|
33
|
+
<main class="overflow-y-auto">
|
34
|
+
{@render children()}
|
35
|
+
</main>
|
36
|
+
</div>
|
37
|
+
<SvelteQueryDevtools />
|
38
|
+
</QueryClientProvider>
|
39
|
+
{{else}}
|
40
|
+
<script lang="ts">
|
41
|
+
import '../app.css';
|
42
|
+
import Header from '../components/Header.svelte';
|
43
|
+
|
44
|
+
let { children } = $props();
|
45
|
+
</script>
|
46
|
+
|
47
|
+
<div class="grid h-svh grid-rows-[auto_1fr]">
|
48
|
+
<Header />
|
49
|
+
<main class="overflow-y-auto">
|
50
|
+
{@render children()}
|
51
|
+
</main>
|
52
|
+
</div>
|
53
|
+
{{/if}}
|
54
|
+
{{/if}}
|
@@ -0,0 +1,72 @@
|
|
1
|
+
{{#if (eq backend "convex")}}
|
2
|
+
<script lang="ts">
|
3
|
+
import { useQuery } from 'convex-svelte';
|
4
|
+
import { api } from "@{{projectName}}/backend/convex/_generated/api";
|
5
|
+
|
6
|
+
const healthCheck = useQuery(api.healthCheck.get, {});
|
7
|
+
|
8
|
+
const TITLE_TEXT = `
|
9
|
+
TVI TypeScript Initializer
|
10
|
+
A CLI tool to quickly scaffold TypeScript projects with popular frameworks and libraries.
|
11
|
+
`;
|
12
|
+
|
13
|
+
</script>
|
14
|
+
|
15
|
+
<div class="container mx-auto max-w-3xl px-4 py-2">
|
16
|
+
<pre class="overflow-x-auto font-mono text-sm">{TITLE_TEXT}</pre>
|
17
|
+
<div class="grid gap-6">
|
18
|
+
<section class="rounded-lg border p-4">
|
19
|
+
<h2 class="mb-2 font-medium">API Status</h2>
|
20
|
+
<div class="flex items-center gap-2">
|
21
|
+
<div
|
22
|
+
class={`h-2 w-2 rounded-full ${healthCheck.data ? "bg-green-500" : "bg-red-500"}`}
|
23
|
+
></div>
|
24
|
+
<span class="text-muted-foreground text-sm">
|
25
|
+
{healthCheck.isLoading
|
26
|
+
? "Checking..."
|
27
|
+
: healthCheck.data
|
28
|
+
? "Connected"
|
29
|
+
: "Disconnected"}
|
30
|
+
</span>
|
31
|
+
</div>
|
32
|
+
</section>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
{{else}}
|
36
|
+
<script lang="ts">
|
37
|
+
{{#if (eq api "orpc")}}
|
38
|
+
import { orpc } from "$lib/orpc";
|
39
|
+
import { createQuery } from "@tanstack/svelte-query";
|
40
|
+
const healthCheck = createQuery(orpc.healthCheck.queryOptions());
|
41
|
+
{{/if}}
|
42
|
+
|
43
|
+
const TITLE_TEXT = `
|
44
|
+
TVI TypeScript Initializer
|
45
|
+
A CLI tool to quickly scaffold TypeScript projects with popular frameworks and libraries.
|
46
|
+
`;
|
47
|
+
|
48
|
+
</script>
|
49
|
+
|
50
|
+
<div class="container mx-auto max-w-3xl px-4 py-2">
|
51
|
+
<pre class="overflow-x-auto font-mono text-sm">{TITLE_TEXT}</pre>
|
52
|
+
<div class="grid gap-6">
|
53
|
+
{{#if (eq api "orpc")}}
|
54
|
+
<section class="rounded-lg border p-4">
|
55
|
+
<h2 class="mb-2 font-medium">API Status</h2>
|
56
|
+
<div class="flex items-center gap-2">
|
57
|
+
<div
|
58
|
+
class={`h-2 w-2 rounded-full ${$healthCheck.data ? "bg-green-500" : "bg-red-500"}`}
|
59
|
+
></div>
|
60
|
+
<span class="text-muted-foreground text-sm">
|
61
|
+
{$healthCheck.isLoading
|
62
|
+
? "Checking..."
|
63
|
+
: $healthCheck.data
|
64
|
+
? "Connected"
|
65
|
+
: "Disconnected"}
|
66
|
+
</span>
|
67
|
+
</div>
|
68
|
+
</section>
|
69
|
+
{{/if}}
|
70
|
+
</div>
|
71
|
+
</div>
|
72
|
+
{{/if}}
|
Binary file
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import adapter from '@sveltejs/adapter-auto';
|
2
|
+
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
3
|
+
|
4
|
+
/** @type {import('@sveltejs/kit').Config} */
|
5
|
+
const config = {
|
6
|
+
// Consult https://svelte.dev/docs/kit/integrations
|
7
|
+
// for more information about preprocessors
|
8
|
+
preprocess: vitePreprocess(),
|
9
|
+
|
10
|
+
kit: {
|
11
|
+
// adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
|
12
|
+
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
|
13
|
+
// See https://svelte.dev/docs/kit/adapters for more information about adapters.
|
14
|
+
adapter: adapter()
|
15
|
+
}
|
16
|
+
};
|
17
|
+
|
18
|
+
export default config;
|
@@ -0,0 +1,24 @@
|
|
1
|
+
{
|
2
|
+
"extends": "./.svelte-kit/tsconfig.json",
|
3
|
+
"compilerOptions": {
|
4
|
+
"allowJs": true,
|
5
|
+
"checkJs": true,
|
6
|
+
"esModuleInterop": true,
|
7
|
+
"forceConsistentCasingInFileNames": true,
|
8
|
+
"resolveJsonModule": true,
|
9
|
+
"skipLibCheck": true,
|
10
|
+
"sourceMap": true,
|
11
|
+
"strict": true,
|
12
|
+
"moduleResolution": "bundler"
|
13
|
+
},
|
14
|
+
{{#unless (or (eq backend "convex") (eq backend "none"))}}
|
15
|
+
"references": [{
|
16
|
+
"path": "../server"
|
17
|
+
}]
|
18
|
+
{{/unless}}
|
19
|
+
// Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
|
20
|
+
// except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
|
21
|
+
//
|
22
|
+
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
|
23
|
+
// from the referenced tsconfig.json - TypeScript does not merge them in
|
24
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
{
|
2
|
+
"name": "{{projectName}}-server",
|
3
|
+
"main": "src/index.ts",
|
4
|
+
"compatibility_date": "2025-06-15",
|
5
|
+
"compatibility_flags": ["nodejs_compat"],
|
6
|
+
"vars": {
|
7
|
+
"NODE_ENV": "production"
|
8
|
+
// Add public environment variables here
|
9
|
+
// Example: "CORS_ORIGIN": "https://your-domain.com"
|
10
|
+
}
|
11
|
+
// For sensitive data, use:
|
12
|
+
// wrangler secret put SECRET_NAME
|
13
|
+
// Don't add secrets to "vars" - they're visible in the dashboard!
|
14
|
+
|
15
|
+
{{#if (eq dbSetup "d1")}},
|
16
|
+
// To set up D1 database:
|
17
|
+
// 1. Run: wrangler login
|
18
|
+
// 2. Run: wrangler d1 create your-database-name
|
19
|
+
// 3. Copy the output and paste below
|
20
|
+
// Then run migrations:
|
21
|
+
// bun db:generate
|
22
|
+
// To apply migrations locally, run:
|
23
|
+
// wrangler d1 migrations apply YOUR_DB_NAME --local
|
24
|
+
"d1_databases": [
|
25
|
+
{
|
26
|
+
"binding": "DB",
|
27
|
+
"database_name": "YOUR_DB_NAME",
|
28
|
+
"database_id": "YOUR_DB_ID",
|
29
|
+
"preview_database_id": "local-test-db",
|
30
|
+
"migrations_dir": "./src/db/migrations"
|
31
|
+
}
|
32
|
+
]
|
33
|
+
{{/if}}
|
34
|
+
}
|