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.
Files changed (306) hide show
  1. package/README.md +147 -0
  2. package/dist/index.js +4315 -0
  3. package/package.json +75 -0
  4. package/templates/addons/biome/biome.json.hbs +83 -0
  5. package/templates/addons/husky/.husky/pre-commit +1 -0
  6. package/templates/addons/pwa/apps/web/next/public/favicon/apple-touch-icon.png +0 -0
  7. package/templates/addons/pwa/apps/web/next/public/favicon/favicon-96x96.png +0 -0
  8. package/templates/addons/pwa/apps/web/next/public/favicon/favicon.svg +6 -0
  9. package/templates/addons/pwa/apps/web/next/public/favicon/site.webmanifest.hbs +21 -0
  10. package/templates/addons/pwa/apps/web/next/public/favicon/web-app-manifest-192x192.png +0 -0
  11. package/templates/addons/pwa/apps/web/next/public/favicon/web-app-manifest-512x512.png +0 -0
  12. package/templates/addons/pwa/apps/web/next/src/app/manifest.ts.hbs +26 -0
  13. package/templates/addons/pwa/apps/web/vite/public/logo.png +0 -0
  14. package/templates/addons/pwa/apps/web/vite/pwa-assets.config.ts.hbs +12 -0
  15. package/templates/addons/turborepo/turbo.json.hbs +43 -0
  16. package/templates/api/orpc/native/utils/orpc.ts.hbs +35 -0
  17. package/templates/api/orpc/server/base/src/lib/context.ts.hbs +125 -0
  18. package/templates/api/orpc/server/base/src/lib/orpc.ts.hbs +21 -0
  19. package/templates/api/orpc/server/next/src/app/rpc/[...all]/route.ts.hbs +23 -0
  20. package/templates/api/orpc/web/nuxt/app/plugins/orpc.ts.hbs +35 -0
  21. package/templates/api/orpc/web/react/base/src/utils/orpc.ts.hbs +42 -0
  22. package/templates/api/orpc/web/solid/src/utils/orpc.ts.hbs +30 -0
  23. package/templates/api/orpc/web/svelte/src/lib/orpc.ts.hbs +31 -0
  24. package/templates/api/trpc/native/utils/trpc.ts.hbs +32 -0
  25. package/templates/api/trpc/server/base/src/lib/context.ts.hbs +127 -0
  26. package/templates/api/trpc/server/base/src/lib/trpc.ts.hbs +26 -0
  27. package/templates/api/trpc/server/next/src/app/trpc/[trpc]/route.ts +14 -0
  28. package/templates/api/trpc/web/react/base/src/utils/trpc.ts.hbs +97 -0
  29. package/templates/auth/native/native-base/lib/auth-client.ts.hbs +13 -0
  30. package/templates/auth/native/nativewind/app/(drawer)/index.tsx.hbs +95 -0
  31. package/templates/auth/native/nativewind/components/sign-in.tsx.hbs +93 -0
  32. package/templates/auth/native/nativewind/components/sign-up.tsx.hbs +104 -0
  33. package/templates/auth/native/unistyles/app/(drawer)/index.tsx.hbs +179 -0
  34. package/templates/auth/native/unistyles/components/sign-in.tsx.hbs +134 -0
  35. package/templates/auth/native/unistyles/components/sign-up.tsx.hbs +152 -0
  36. package/templates/auth/server/base/src/lib/auth.ts.hbs +141 -0
  37. package/templates/auth/server/db/drizzle/mysql/src/db/schema/auth.ts +58 -0
  38. package/templates/auth/server/db/drizzle/postgres/src/db/schema/auth.ts +47 -0
  39. package/templates/auth/server/db/drizzle/sqlite/src/db/schema/auth.ts +55 -0
  40. package/templates/auth/server/db/mongoose/mongodb/src/db/models/auth.model.ts +68 -0
  41. package/templates/auth/server/db/prisma/mongodb/prisma/schema/auth.prisma +59 -0
  42. package/templates/auth/server/db/prisma/mysql/prisma/schema/auth.prisma +59 -0
  43. package/templates/auth/server/db/prisma/postgres/prisma/schema/auth.prisma +59 -0
  44. package/templates/auth/server/db/prisma/sqlite/prisma/schema/auth.prisma +59 -0
  45. package/templates/auth/server/next/src/app/api/auth/[...all]/route.ts +4 -0
  46. package/templates/auth/web/nuxt/app/components/SignInForm.vue +77 -0
  47. package/templates/auth/web/nuxt/app/components/SignUpForm.vue +84 -0
  48. package/templates/auth/web/nuxt/app/components/UserMenu.vue +42 -0
  49. package/templates/auth/web/nuxt/app/middleware/auth.ts +12 -0
  50. package/templates/auth/web/nuxt/app/pages/dashboard.vue +27 -0
  51. package/templates/auth/web/nuxt/app/pages/login.vue +24 -0
  52. package/templates/auth/web/nuxt/app/plugins/auth-client.ts +16 -0
  53. package/templates/auth/web/react/base/src/lib/auth-client.ts.hbs +10 -0
  54. package/templates/auth/web/react/next/src/app/dashboard/page.tsx.hbs +47 -0
  55. package/templates/auth/web/react/next/src/app/login/page.tsx +16 -0
  56. package/templates/auth/web/react/next/src/components/sign-in-form.tsx +135 -0
  57. package/templates/auth/web/react/next/src/components/sign-up-form.tsx +160 -0
  58. package/templates/auth/web/react/next/src/components/theme-provider.tsx +11 -0
  59. package/templates/auth/web/react/next/src/components/user-menu.tsx +60 -0
  60. package/templates/auth/web/react/react-router/src/components/sign-in-form.tsx +135 -0
  61. package/templates/auth/web/react/react-router/src/components/sign-up-form.tsx +160 -0
  62. package/templates/auth/web/react/react-router/src/components/user-menu.tsx +60 -0
  63. package/templates/auth/web/react/react-router/src/routes/dashboard.tsx.hbs +40 -0
  64. package/templates/auth/web/react/react-router/src/routes/login.tsx +13 -0
  65. package/templates/auth/web/react/tanstack-router/src/components/sign-in-form.tsx +139 -0
  66. package/templates/auth/web/react/tanstack-router/src/components/sign-up-form.tsx +164 -0
  67. package/templates/auth/web/react/tanstack-router/src/components/user-menu.tsx +62 -0
  68. package/templates/auth/web/react/tanstack-router/src/routes/dashboard.tsx.hbs +47 -0
  69. package/templates/auth/web/react/tanstack-router/src/routes/login.tsx +18 -0
  70. package/templates/auth/web/react/tanstack-start/src/components/sign-in-form.tsx +139 -0
  71. package/templates/auth/web/react/tanstack-start/src/components/sign-up-form.tsx +164 -0
  72. package/templates/auth/web/react/tanstack-start/src/components/user-menu.tsx +62 -0
  73. package/templates/auth/web/react/tanstack-start/src/routes/dashboard.tsx.hbs +51 -0
  74. package/templates/auth/web/react/tanstack-start/src/routes/login.tsx +18 -0
  75. package/templates/auth/web/solid/src/components/sign-in-form.tsx +132 -0
  76. package/templates/auth/web/solid/src/components/sign-up-form.tsx +158 -0
  77. package/templates/auth/web/solid/src/components/user-menu.tsx.hbs +55 -0
  78. package/templates/auth/web/solid/src/lib/auth-client.ts +5 -0
  79. package/templates/auth/web/solid/src/routes/dashboard.tsx +38 -0
  80. package/templates/auth/web/solid/src/routes/login.tsx +23 -0
  81. package/templates/auth/web/svelte/src/components/SignInForm.svelte +108 -0
  82. package/templates/auth/web/svelte/src/components/SignUpForm.svelte +142 -0
  83. package/templates/auth/web/svelte/src/components/UserMenu.svelte +54 -0
  84. package/templates/auth/web/svelte/src/lib/auth-client.ts +6 -0
  85. package/templates/auth/web/svelte/src/routes/dashboard/+page.svelte +31 -0
  86. package/templates/auth/web/svelte/src/routes/login/+page.svelte +12 -0
  87. package/templates/backend/convex/packages/backend/_gitignore +2 -0
  88. package/templates/backend/convex/packages/backend/convex/README.md +90 -0
  89. package/templates/backend/convex/packages/backend/convex/healthCheck.ts +7 -0
  90. package/templates/backend/convex/packages/backend/convex/schema.ts +9 -0
  91. package/templates/backend/convex/packages/backend/convex/todos.ts +42 -0
  92. package/templates/backend/convex/packages/backend/convex/tsconfig.json +25 -0
  93. package/templates/backend/convex/packages/backend/package.json.hbs +17 -0
  94. package/templates/backend/server/elysia/src/index.ts.hbs +72 -0
  95. package/templates/backend/server/express/src/index.ts.hbs +88 -0
  96. package/templates/backend/server/fastify/src/index.ts.hbs +155 -0
  97. package/templates/backend/server/hono/src/index.ts.hbs +133 -0
  98. package/templates/backend/server/next/next-env.d.ts +5 -0
  99. package/templates/backend/server/next/next.config.ts +7 -0
  100. package/templates/backend/server/next/package.json.hbs +24 -0
  101. package/templates/backend/server/next/src/app/route.ts +5 -0
  102. package/templates/backend/server/next/src/middleware.ts +19 -0
  103. package/templates/backend/server/next/tsconfig.json.hbs +33 -0
  104. package/templates/backend/server/server-base/_gitignore +52 -0
  105. package/templates/backend/server/server-base/package.json.hbs +28 -0
  106. package/templates/backend/server/server-base/src/routers/index.ts.hbs +53 -0
  107. package/templates/backend/server/server-base/tsconfig.json.hbs +39 -0
  108. package/templates/base/_gitignore +2 -0
  109. package/templates/base/package.json.hbs +11 -0
  110. package/templates/db/drizzle/mysql/drizzle.config.ts.hbs +10 -0
  111. package/templates/db/drizzle/mysql/src/db/index.ts.hbs +20 -0
  112. package/templates/db/drizzle/postgres/drizzle.config.ts.hbs +10 -0
  113. package/templates/db/drizzle/postgres/src/db/index.ts.hbs +12 -0
  114. package/templates/db/drizzle/sqlite/drizzle.config.ts.hbs +24 -0
  115. package/templates/db/drizzle/sqlite/src/db/index.ts.hbs +35 -0
  116. package/templates/db/mongoose/mongodb/src/db/index.ts.hbs +9 -0
  117. package/templates/db/prisma/mongodb/prisma/index.ts.hbs +5 -0
  118. package/templates/db/prisma/mongodb/prisma/schema/schema.prisma +10 -0
  119. package/templates/db/prisma/mongodb/prisma.config.ts.hbs +8 -0
  120. package/templates/db/prisma/mysql/prisma/index.ts +5 -0
  121. package/templates/db/prisma/mysql/prisma/schema/schema.prisma +10 -0
  122. package/templates/db/prisma/mysql/prisma.config.ts +8 -0
  123. package/templates/db/prisma/postgres/prisma/index.ts +5 -0
  124. package/templates/db/prisma/postgres/prisma/schema/schema.prisma.hbs +13 -0
  125. package/templates/db/prisma/postgres/prisma.config.ts.hbs +12 -0
  126. package/templates/db/prisma/sqlite/prisma/index.ts +5 -0
  127. package/templates/db/prisma/sqlite/prisma/schema/schema.prisma +10 -0
  128. package/templates/db/prisma/sqlite/prisma.config.ts +8 -0
  129. package/templates/examples/ai/native/nativewind/app/(drawer)/ai.tsx.hbs +155 -0
  130. package/templates/examples/ai/native/nativewind/polyfills.js +25 -0
  131. package/templates/examples/ai/native/unistyles/app/(drawer)/ai.tsx.hbs +279 -0
  132. package/templates/examples/ai/native/unistyles/polyfills.js +25 -0
  133. package/templates/examples/ai/server/next/src/app/ai/route.ts +15 -0
  134. package/templates/examples/ai/web/nuxt/app/pages/ai.vue +63 -0
  135. package/templates/examples/ai/web/react/next/src/app/ai/page.tsx +67 -0
  136. package/templates/examples/ai/web/react/react-router/src/routes/ai.tsx +64 -0
  137. package/templates/examples/ai/web/react/tanstack-router/src/routes/ai.tsx +69 -0
  138. package/templates/examples/ai/web/react/tanstack-start/src/routes/ai.tsx +69 -0
  139. package/templates/examples/ai/web/svelte/src/routes/ai/+page.svelte +98 -0
  140. package/templates/examples/todo/native/nativewind/app/(drawer)/todos.tsx.hbs +295 -0
  141. package/templates/examples/todo/native/unistyles/app/(drawer)/todos.tsx.hbs +340 -0
  142. package/templates/examples/todo/server/drizzle/base/src/routers/todo.ts.hbs +79 -0
  143. package/templates/examples/todo/server/drizzle/mysql/src/db/schema/todo.ts +7 -0
  144. package/templates/examples/todo/server/drizzle/postgres/src/db/schema/todo.ts +7 -0
  145. package/templates/examples/todo/server/drizzle/sqlite/src/db/schema/todo.ts +7 -0
  146. package/templates/examples/todo/server/mongoose/base/src/routers/todo.ts.hbs +66 -0
  147. package/templates/examples/todo/server/mongoose/mongodb/src/db/models/todo.model.ts +24 -0
  148. package/templates/examples/todo/server/prisma/base/src/routers/todo.ts.hbs +118 -0
  149. package/templates/examples/todo/server/prisma/mongodb/prisma/schema/todo.prisma +7 -0
  150. package/templates/examples/todo/server/prisma/mysql/prisma/schema/todo.prisma +7 -0
  151. package/templates/examples/todo/server/prisma/postgres/prisma/schema/todo.prisma +7 -0
  152. package/templates/examples/todo/server/prisma/sqlite/prisma/schema/todo.prisma +7 -0
  153. package/templates/examples/todo/web/nuxt/app/pages/todos.vue +108 -0
  154. package/templates/examples/todo/web/react/next/src/app/todos/page.tsx.hbs +245 -0
  155. package/templates/examples/todo/web/react/react-router/src/routes/todos.tsx.hbs +242 -0
  156. package/templates/examples/todo/web/react/tanstack-router/src/routes/todos.tsx.hbs +247 -0
  157. package/templates/examples/todo/web/react/tanstack-start/src/routes/todos.tsx.hbs +268 -0
  158. package/templates/examples/todo/web/solid/src/routes/todos.tsx.hbs +132 -0
  159. package/templates/examples/todo/web/svelte/src/routes/todos/+page.svelte.hbs +317 -0
  160. package/templates/extras/_npmrc.hbs +5 -0
  161. package/templates/extras/pnpm-workspace.yaml +3 -0
  162. package/templates/frontend/native/native-base/assets/adaptive-icon.png +0 -0
  163. package/templates/frontend/native/native-base/assets/favicon.png +0 -0
  164. package/templates/frontend/native/native-base/assets/icon.png +0 -0
  165. package/templates/frontend/native/native-base/assets/splash.png +0 -0
  166. package/templates/frontend/native/nativewind/_gitignore +25 -0
  167. package/templates/frontend/native/nativewind/app/(drawer)/(tabs)/_layout.tsx +46 -0
  168. package/templates/frontend/native/nativewind/app/(drawer)/(tabs)/index.tsx +19 -0
  169. package/templates/frontend/native/nativewind/app/(drawer)/(tabs)/two.tsx +19 -0
  170. package/templates/frontend/native/nativewind/app/(drawer)/_layout.tsx.hbs +67 -0
  171. package/templates/frontend/native/nativewind/app/(drawer)/index.tsx.hbs +95 -0
  172. package/templates/frontend/native/nativewind/app/+html.tsx +47 -0
  173. package/templates/frontend/native/nativewind/app/+not-found.tsx +29 -0
  174. package/templates/frontend/native/nativewind/app/_layout.tsx.hbs +126 -0
  175. package/templates/frontend/native/nativewind/app/modal.tsx +14 -0
  176. package/templates/frontend/native/nativewind/app-env.d.ts +2 -0
  177. package/templates/frontend/native/nativewind/app.json +46 -0
  178. package/templates/frontend/native/nativewind/babel.config.js +11 -0
  179. package/templates/frontend/native/nativewind/components/container.tsx +8 -0
  180. package/templates/frontend/native/nativewind/components/header-button.tsx +26 -0
  181. package/templates/frontend/native/nativewind/components/tabbar-icon.tsx +8 -0
  182. package/templates/frontend/native/nativewind/global.css +50 -0
  183. package/templates/frontend/native/nativewind/lib/android-navigation-bar.tsx +11 -0
  184. package/templates/frontend/native/nativewind/lib/constants.ts +18 -0
  185. package/templates/frontend/native/nativewind/lib/use-color-scheme.ts +12 -0
  186. package/templates/frontend/native/nativewind/metro.config.js +59 -0
  187. package/templates/frontend/native/nativewind/package.json.hbs +49 -0
  188. package/templates/frontend/native/nativewind/tailwind.config.js +59 -0
  189. package/templates/frontend/native/nativewind/tsconfig.json.hbs +23 -0
  190. package/templates/frontend/native/unistyles/_gitignore +24 -0
  191. package/templates/frontend/native/unistyles/app/(drawer)/(tabs)/_layout.tsx +39 -0
  192. package/templates/frontend/native/unistyles/app/(drawer)/(tabs)/index.tsx +37 -0
  193. package/templates/frontend/native/unistyles/app/(drawer)/(tabs)/two.tsx +37 -0
  194. package/templates/frontend/native/unistyles/app/(drawer)/_layout.tsx.hbs +87 -0
  195. package/templates/frontend/native/unistyles/app/(drawer)/index.tsx.hbs +194 -0
  196. package/templates/frontend/native/unistyles/app/+html.tsx +48 -0
  197. package/templates/frontend/native/unistyles/app/+not-found.tsx +65 -0
  198. package/templates/frontend/native/unistyles/app/_layout.tsx.hbs +104 -0
  199. package/templates/frontend/native/unistyles/app/modal.tsx +33 -0
  200. package/templates/frontend/native/unistyles/app.json +44 -0
  201. package/templates/frontend/native/unistyles/babel.config.js +20 -0
  202. package/templates/frontend/native/unistyles/breakpoints.ts +9 -0
  203. package/templates/frontend/native/unistyles/components/container.tsx +15 -0
  204. package/templates/frontend/native/unistyles/components/header-button.tsx +36 -0
  205. package/templates/frontend/native/unistyles/components/tabbar-icon.tsx +8 -0
  206. package/templates/frontend/native/unistyles/expo-env.d.ts +3 -0
  207. package/templates/frontend/native/unistyles/index.js +2 -0
  208. package/templates/frontend/native/unistyles/metro.config.js +20 -0
  209. package/templates/frontend/native/unistyles/package.json.hbs +50 -0
  210. package/templates/frontend/native/unistyles/theme.ts +98 -0
  211. package/templates/frontend/native/unistyles/tsconfig.json.hbs +17 -0
  212. package/templates/frontend/native/unistyles/unistyles.ts +27 -0
  213. package/templates/frontend/nuxt/_gitignore +24 -0
  214. package/templates/frontend/nuxt/app/app.config.ts +15 -0
  215. package/templates/frontend/nuxt/app/app.vue +13 -0
  216. package/templates/frontend/nuxt/app/assets/css/main.css +2 -0
  217. package/templates/frontend/nuxt/app/components/Header.vue.hbs +45 -0
  218. package/templates/frontend/nuxt/app/components/Loader.vue +5 -0
  219. package/templates/frontend/nuxt/app/components/ModeToggle.vue +23 -0
  220. package/templates/frontend/nuxt/app/layouts/default.vue.hbs +11 -0
  221. package/templates/frontend/nuxt/app/pages/index.vue.hbs +57 -0
  222. package/templates/frontend/nuxt/app/plugins/vue-query.ts.hbs +44 -0
  223. package/templates/frontend/nuxt/nuxt.config.ts.hbs +19 -0
  224. package/templates/frontend/nuxt/package.json.hbs +25 -0
  225. package/templates/frontend/nuxt/public/favicon.ico +0 -0
  226. package/templates/frontend/nuxt/public/robots.txt +2 -0
  227. package/templates/frontend/nuxt/server/tsconfig.json +3 -0
  228. package/templates/frontend/nuxt/tsconfig.json.hbs +9 -0
  229. package/templates/frontend/react/next/next-env.d.ts.hbs +5 -0
  230. package/templates/frontend/react/next/next.config.ts.hbs +5 -0
  231. package/templates/frontend/react/next/package.json.hbs +34 -0
  232. package/templates/frontend/react/next/postcss.config.mjs.hbs +5 -0
  233. package/templates/frontend/react/next/src/app/favicon.ico +0 -0
  234. package/templates/frontend/react/next/src/app/layout.tsx.hbs +41 -0
  235. package/templates/frontend/react/next/src/app/page.tsx.hbs +68 -0
  236. package/templates/frontend/react/next/src/components/mode-toggle.tsx.hbs +39 -0
  237. package/templates/frontend/react/next/src/components/providers.tsx.hbs +56 -0
  238. package/templates/frontend/react/next/src/components/theme-provider.tsx.hbs +11 -0
  239. package/templates/frontend/react/next/tsconfig.json.hbs +33 -0
  240. package/templates/frontend/react/react-router/package.json.hbs +42 -0
  241. package/templates/frontend/react/react-router/public/favicon.ico +0 -0
  242. package/templates/frontend/react/react-router/react-router.config.ts +6 -0
  243. package/templates/frontend/react/react-router/src/components/mode-toggle.tsx +37 -0
  244. package/templates/frontend/react/react-router/src/components/theme-provider.tsx +73 -0
  245. package/templates/frontend/react/react-router/src/root.tsx.hbs +152 -0
  246. package/templates/frontend/react/react-router/src/routes/_index.tsx.hbs +74 -0
  247. package/templates/frontend/react/react-router/src/routes.ts +4 -0
  248. package/templates/frontend/react/react-router/tsconfig.json.hbs +32 -0
  249. package/templates/frontend/react/react-router/vite.config.ts.hbs +33 -0
  250. package/templates/frontend/react/tanstack-router/index.html +12 -0
  251. package/templates/frontend/react/tanstack-router/package.json.hbs +41 -0
  252. package/templates/frontend/react/tanstack-router/src/components/mode-toggle.tsx +37 -0
  253. package/templates/frontend/react/tanstack-router/src/components/theme-provider.tsx +73 -0
  254. package/templates/frontend/react/tanstack-router/src/main.tsx.hbs +66 -0
  255. package/templates/frontend/react/tanstack-router/src/routes/__root.tsx.hbs +100 -0
  256. package/templates/frontend/react/tanstack-router/src/routes/index.tsx.hbs +74 -0
  257. package/templates/frontend/react/tanstack-router/tsconfig.json.hbs +23 -0
  258. package/templates/frontend/react/tanstack-router/vite.config.ts.hbs +39 -0
  259. package/templates/frontend/react/tanstack-start/package.json.hbs +44 -0
  260. package/templates/frontend/react/tanstack-start/public/robots.txt +3 -0
  261. package/templates/frontend/react/tanstack-start/src/router.tsx.hbs +144 -0
  262. package/templates/frontend/react/tanstack-start/src/routes/__root.tsx.hbs +97 -0
  263. package/templates/frontend/react/tanstack-start/src/routes/index.tsx.hbs +74 -0
  264. package/templates/frontend/react/tanstack-start/tsconfig.json.hbs +33 -0
  265. package/templates/frontend/react/tanstack-start/vite.config.ts +8 -0
  266. package/templates/frontend/react/web-base/_gitignore +52 -0
  267. package/templates/frontend/react/web-base/components.json +21 -0
  268. package/templates/frontend/react/web-base/src/components/header.tsx.hbs +79 -0
  269. package/templates/frontend/react/web-base/src/components/loader.tsx +9 -0
  270. package/templates/frontend/react/web-base/src/components/ui/button.tsx +59 -0
  271. package/templates/frontend/react/web-base/src/components/ui/card.tsx +92 -0
  272. package/templates/frontend/react/web-base/src/components/ui/checkbox.tsx +30 -0
  273. package/templates/frontend/react/web-base/src/components/ui/dropdown-menu.tsx +257 -0
  274. package/templates/frontend/react/web-base/src/components/ui/input.tsx +21 -0
  275. package/templates/frontend/react/web-base/src/components/ui/label.tsx +22 -0
  276. package/templates/frontend/react/web-base/src/components/ui/skeleton.tsx +13 -0
  277. package/templates/frontend/react/web-base/src/components/ui/sonner.tsx +25 -0
  278. package/templates/frontend/react/web-base/src/index.css +134 -0
  279. package/templates/frontend/react/web-base/src/lib/utils.ts +6 -0
  280. package/templates/frontend/solid/_gitignore +7 -0
  281. package/templates/frontend/solid/index.html +13 -0
  282. package/templates/frontend/solid/package.json.hbs +27 -0
  283. package/templates/frontend/solid/public/robots.txt +3 -0
  284. package/templates/frontend/solid/src/components/header.tsx.hbs +38 -0
  285. package/templates/frontend/solid/src/components/loader.tsx +9 -0
  286. package/templates/frontend/solid/src/main.tsx.hbs +38 -0
  287. package/templates/frontend/solid/src/routes/__root.tsx.hbs +34 -0
  288. package/templates/frontend/solid/src/routes/index.tsx.hbs +61 -0
  289. package/templates/frontend/solid/src/styles.css +5 -0
  290. package/templates/frontend/solid/tsconfig.json.hbs +34 -0
  291. package/templates/frontend/solid/vite.config.js.hbs +39 -0
  292. package/templates/frontend/svelte/_gitignore +23 -0
  293. package/templates/frontend/svelte/_npmrc +1 -0
  294. package/templates/frontend/svelte/package.json.hbs +31 -0
  295. package/templates/frontend/svelte/src/app.css +5 -0
  296. package/templates/frontend/svelte/src/app.d.ts +13 -0
  297. package/templates/frontend/svelte/src/app.html +12 -0
  298. package/templates/frontend/svelte/src/components/Header.svelte.hbs +40 -0
  299. package/templates/frontend/svelte/src/lib/index.ts +1 -0
  300. package/templates/frontend/svelte/src/routes/+layout.svelte.hbs +54 -0
  301. package/templates/frontend/svelte/src/routes/+page.svelte.hbs +72 -0
  302. package/templates/frontend/svelte/static/favicon.png +0 -0
  303. package/templates/frontend/svelte/svelte.config.js +18 -0
  304. package/templates/frontend/svelte/tsconfig.json.hbs +24 -0
  305. package/templates/frontend/svelte/vite.config.ts +7 -0
  306. package/templates/runtime/workers/apps/server/wrangler.jsonc.hbs +34 -0
@@ -0,0 +1,68 @@
1
+ "use client"
2
+ {{#if (eq backend "convex")}}
3
+ import { useQuery } from "convex/react";
4
+ import { api } from "@{{projectName}}/backend/convex/_generated/api";
5
+ {{else if (or (eq api "orpc") (eq api "trpc"))}}
6
+ import { useQuery } from "@tanstack/react-query";
7
+ {{#if (eq api "orpc")}}
8
+ import { orpc } from "@/utils/orpc";
9
+ {{/if}}
10
+ {{#if (eq api "trpc")}}
11
+ import { trpc } from "@/utils/trpc";
12
+ {{/if}}
13
+ {{/if}}
14
+
15
+ const TITLE_TEXT = `
16
+ TVI TypeScript Initializer
17
+ A CLI tool to quickly scaffold TypeScript projects with popular frameworks and libraries.
18
+ `;
19
+
20
+ export default function Home() {
21
+ {{#if (eq backend "convex")}}
22
+ const healthCheck = useQuery(api.healthCheck.get);
23
+ {{else if (eq api "orpc")}}
24
+ const healthCheck = useQuery(orpc.healthCheck.queryOptions());
25
+ {{else if (eq api "trpc")}}
26
+ const healthCheck = useQuery(trpc.healthCheck.queryOptions());
27
+ {{/if}}
28
+
29
+ return (
30
+ <div className="container mx-auto max-w-3xl px-4 py-2">
31
+ <pre className="overflow-x-auto font-mono text-sm">{TITLE_TEXT}</pre>
32
+ <div className="grid gap-6">
33
+ <section className="rounded-lg border p-4">
34
+ <h2 className="mb-2 font-medium">API Status</h2>
35
+ {{#if (eq backend "convex")}}
36
+ <div className="flex items-center gap-2">
37
+ <div
38
+ className={`h-2 w-2 rounded-full ${healthCheck === "OK" ? "bg-green-500" : healthCheck === undefined ? "bg-orange-400" : "bg-red-500"}`}
39
+ />
40
+ <span className="text-sm text-muted-foreground">
41
+ {healthCheck === undefined
42
+ ? "Checking..."
43
+ : healthCheck === "OK"
44
+ ? "Connected"
45
+ : "Error"}
46
+ </span>
47
+ </div>
48
+ {{else}}
49
+ {{#unless (eq api "none")}}
50
+ <div className="flex items-center gap-2">
51
+ <div
52
+ className={`h-2 w-2 rounded-full ${healthCheck.data ? "bg-green-500" : "bg-red-500"}`}
53
+ />
54
+ <span className="text-sm text-muted-foreground">
55
+ {healthCheck.isLoading
56
+ ? "Checking..."
57
+ : healthCheck.data
58
+ ? "Connected"
59
+ : "Disconnected"}
60
+ </span>
61
+ </div>
62
+ {{/unless}}
63
+ {{/if}}
64
+ </section>
65
+ </div>
66
+ </div>
67
+ );
68
+ }
@@ -0,0 +1,39 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { Moon, Sun } from "lucide-react"
5
+ import { useTheme } from "next-themes"
6
+ import { Button } from "@/components/ui/button"
7
+ import {
8
+ DropdownMenu,
9
+ DropdownMenuContent,
10
+ DropdownMenuItem,
11
+ DropdownMenuTrigger,
12
+ } from "@/components/ui/dropdown-menu"
13
+
14
+ export function ModeToggle() {
15
+ const { setTheme } = useTheme()
16
+
17
+ return (
18
+ <DropdownMenu>
19
+ <DropdownMenuTrigger asChild>
20
+ <Button variant="outline" size="icon">
21
+ <Sun className="h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" />
22
+ <Moon className="absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" />
23
+ <span className="sr-only">Toggle theme</span>
24
+ </Button>
25
+ </DropdownMenuTrigger>
26
+ <DropdownMenuContent align="end">
27
+ <DropdownMenuItem onClick={() => setTheme("light")}>
28
+ Light
29
+ </DropdownMenuItem>
30
+ <DropdownMenuItem onClick={() => setTheme("dark")}>
31
+ Dark
32
+ </DropdownMenuItem>
33
+ <DropdownMenuItem onClick={() => setTheme("system")}>
34
+ System
35
+ </DropdownMenuItem>
36
+ </DropdownMenuContent>
37
+ </DropdownMenu>
38
+ )
39
+ }
@@ -0,0 +1,56 @@
1
+ "use client";
2
+
3
+ {{#if (eq backend "convex")}}
4
+ import { ConvexProvider, ConvexReactClient } from "convex/react";
5
+ {{else}}
6
+ {{#unless (eq api "none")}}
7
+ import { QueryClientProvider } from "@tanstack/react-query";
8
+ import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
9
+ {{#if (eq api "orpc")}}
10
+ import { queryClient } from "@/utils/orpc";
11
+ {{/if}}
12
+ {{#if (eq api "trpc")}}
13
+ import { queryClient } from "@/utils/trpc";
14
+ {{/if}}
15
+ {{/unless}}
16
+ {{/if}}
17
+ import { ThemeProvider } from "./theme-provider";
18
+ import { Toaster } from "./ui/sonner";
19
+
20
+ {{#if (eq backend "convex")}}
21
+ const convex = new ConvexReactClient(process.env.NEXT_PUBLIC_CONVEX_URL!);
22
+ {{/if}}
23
+
24
+ export default function Providers({
25
+ children
26
+ }: {
27
+ children: React.ReactNode
28
+ }) {
29
+ return (
30
+ <ThemeProvider
31
+ attribute="class"
32
+ defaultTheme="system"
33
+ enableSystem
34
+ disableTransitionOnChange
35
+ >
36
+ {{#if (eq backend "convex")}}
37
+ <ConvexProvider client={convex}>{children}</ConvexProvider>
38
+ {{else}}
39
+ {{#unless (eq api "none")}}
40
+ <QueryClientProvider client={queryClient}>
41
+ {{#if (eq api "orpc")}}
42
+ {children}
43
+ {{/if}}
44
+ {{#if (eq api "trpc")}}
45
+ {children}
46
+ {{/if}}
47
+ <ReactQueryDevtools />
48
+ </QueryClientProvider>
49
+ {{else}}
50
+ {children}
51
+ {{/unless}}
52
+ {{/if}}
53
+ <Toaster richColors />
54
+ </ThemeProvider>
55
+ );
56
+ }
@@ -0,0 +1,11 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { ThemeProvider as NextThemesProvider } from "next-themes"
5
+
6
+ export function ThemeProvider({
7
+ children,
8
+ ...props
9
+ }: React.ComponentProps<typeof NextThemesProvider>) {
10
+ return <NextThemesProvider {...props}>{children}</NextThemesProvider>
11
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2017",
4
+ "lib": ["dom", "dom.iterable", "esnext"],
5
+ "allowJs": true,
6
+ "skipLibCheck": true,
7
+ "strict": true,
8
+ "noEmit": true,
9
+ "esModuleInterop": true,
10
+ "module": "esnext",
11
+ "moduleResolution": "bundler",
12
+ "resolveJsonModule": true,
13
+ "isolatedModules": true,
14
+ "verbatimModuleSyntax": true,
15
+ "jsx": "preserve",
16
+ "incremental": true,
17
+ "plugins": [
18
+ {
19
+ "name": "next"
20
+ }
21
+ ],
22
+ "paths": {
23
+ "@/*": ["./src/*"]
24
+ }
25
+ },
26
+ "include": ["./next-env.d.ts", "./**/*.ts", "./**/*.tsx", "./.next/types/**/*.ts"],
27
+ "exclude": ["./node_modules"],
28
+ {{#unless (or (eq backend "convex") (eq backend "none"))}}
29
+ "references": [{
30
+ "path": "../server"
31
+ }]
32
+ {{/unless}}
33
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "web",
3
+ "private": true,
4
+ "type": "module",
5
+ "scripts": {
6
+ "build": "react-router build",
7
+ "dev": "react-router dev",
8
+ "start": "react-router-serve ./build/server/index.js",
9
+ "typecheck": "react-router typegen && tsc"
10
+ },
11
+ "dependencies": {
12
+ "radix-ui": "^1.4.2",
13
+ "@react-router/fs-routes": "^7.6.1",
14
+ "@react-router/node": "^7.6.1",
15
+ "@react-router/serve": "^7.6.1",
16
+ "@tanstack/react-form": "^1.12.0",
17
+ "class-variance-authority": "^0.7.1",
18
+ "clsx": "^2.1.1",
19
+ "isbot": "^5.1.28",
20
+ "lucide-react": "^0.511.0",
21
+ "next-themes": "^0.4.6",
22
+ "react": "19.0.0",
23
+ "react-dom": "19.0.0",
24
+ "react-router": "^7.6.1",
25
+ "sonner": "^2.0.3",
26
+ "tailwind-merge": "^3.3.0",
27
+ "tw-animate-css": "^1.3.2",
28
+ "zod": "^3.25.42"
29
+ },
30
+ "devDependencies": {
31
+ "@react-router/dev": "^7.6.1",
32
+ "@tailwindcss/vite": "^4.1.8",
33
+ "@types/node": "^20",
34
+ "@types/react": "^19.0.12",
35
+ "@types/react-dom": "^19.0.4",
36
+ "react-router-devtools": "^1.1.0",
37
+ "tailwindcss": "^4.1.8",
38
+ "typescript": "^5.8.3",
39
+ "vite": "^6.3.5",
40
+ "vite-tsconfig-paths": "^5.1.4"
41
+ }
42
+ }
@@ -0,0 +1,6 @@
1
+ import type { Config } from "@react-router/dev/config";
2
+
3
+ export default {
4
+ ssr: false,
5
+ appDirectory: "src",
6
+ } satisfies Config;
@@ -0,0 +1,37 @@
1
+ import { Moon, Sun } from "lucide-react";
2
+
3
+ import { Button } from "@/components/ui/button";
4
+ import {
5
+ DropdownMenu,
6
+ DropdownMenuContent,
7
+ DropdownMenuItem,
8
+ DropdownMenuTrigger,
9
+ } from "@/components/ui/dropdown-menu";
10
+ import { useTheme } from "@/components/theme-provider";
11
+
12
+ export function ModeToggle() {
13
+ const { setTheme } = useTheme();
14
+
15
+ return (
16
+ <DropdownMenu>
17
+ <DropdownMenuTrigger asChild>
18
+ <Button variant="outline" size="icon">
19
+ <Sun className="h-[1.2rem] w-[1.2rem] scale-100 rotate-0 transition-all dark:scale-0 dark:-rotate-90" />
20
+ <Moon className="absolute h-[1.2rem] w-[1.2rem] scale-0 rotate-90 transition-all dark:scale-100 dark:rotate-0" />
21
+ <span className="sr-only">Toggle theme</span>
22
+ </Button>
23
+ </DropdownMenuTrigger>
24
+ <DropdownMenuContent align="end">
25
+ <DropdownMenuItem onClick={() => setTheme("light")}>
26
+ Light
27
+ </DropdownMenuItem>
28
+ <DropdownMenuItem onClick={() => setTheme("dark")}>
29
+ Dark
30
+ </DropdownMenuItem>
31
+ <DropdownMenuItem onClick={() => setTheme("system")}>
32
+ System
33
+ </DropdownMenuItem>
34
+ </DropdownMenuContent>
35
+ </DropdownMenu>
36
+ );
37
+ }
@@ -0,0 +1,73 @@
1
+ import { createContext, useContext, useEffect, useState } from "react";
2
+
3
+ type Theme = "dark" | "light" | "system";
4
+
5
+ type ThemeProviderProps = {
6
+ children: React.ReactNode;
7
+ defaultTheme?: Theme;
8
+ storageKey?: string;
9
+ };
10
+
11
+ type ThemeProviderState = {
12
+ theme: Theme;
13
+ setTheme: (theme: Theme) => void;
14
+ };
15
+
16
+ const initialState: ThemeProviderState = {
17
+ theme: "system",
18
+ setTheme: () => null,
19
+ };
20
+
21
+ const ThemeProviderContext = createContext<ThemeProviderState>(initialState);
22
+
23
+ export function ThemeProvider({
24
+ children,
25
+ defaultTheme = "system",
26
+ storageKey = "vite-ui-theme",
27
+ ...props
28
+ }: ThemeProviderProps) {
29
+ const [theme, setTheme] = useState<Theme>(
30
+ () => (localStorage.getItem(storageKey) as Theme) || defaultTheme
31
+ );
32
+
33
+ useEffect(() => {
34
+ const root = window.document.documentElement;
35
+
36
+ root.classList.remove("light", "dark");
37
+
38
+ if (theme === "system") {
39
+ const systemTheme = window.matchMedia("(prefers-color-scheme: dark)")
40
+ .matches
41
+ ? "dark"
42
+ : "light";
43
+
44
+ root.classList.add(systemTheme);
45
+ return;
46
+ }
47
+
48
+ root.classList.add(theme);
49
+ }, [theme]);
50
+
51
+ const value = {
52
+ theme,
53
+ setTheme: (theme: Theme) => {
54
+ localStorage.setItem(storageKey, theme);
55
+ setTheme(theme);
56
+ },
57
+ };
58
+
59
+ return (
60
+ <ThemeProviderContext.Provider {...props} value={value}>
61
+ {children}
62
+ </ThemeProviderContext.Provider>
63
+ );
64
+ }
65
+
66
+ export const useTheme = () => {
67
+ const context = useContext(ThemeProviderContext);
68
+
69
+ if (context === undefined)
70
+ throw new Error("useTheme must be used within a ThemeProvider");
71
+
72
+ return context;
73
+ };
@@ -0,0 +1,152 @@
1
+ import {
2
+ isRouteErrorResponse,
3
+ Links,
4
+ Meta,
5
+ Outlet,
6
+ Scripts,
7
+ ScrollRestoration,
8
+ } from "react-router";
9
+ import type { Route } from "./+types/root";
10
+ import "./index.css";
11
+ import Header from "./components/header";
12
+ import { ThemeProvider } from "./components/theme-provider";
13
+ import { Toaster } from "./components/ui/sonner";
14
+
15
+ {{#if (eq backend "convex")}}
16
+ import { ConvexProvider, ConvexReactClient } from "convex/react";
17
+ {{else}}
18
+ {{#unless (eq api "none")}}
19
+ import { QueryClientProvider } from "@tanstack/react-query";
20
+ import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
21
+ {{#if (eq api "orpc")}}
22
+ import { queryClient } from "./utils/orpc";
23
+ {{/if}}
24
+ {{#if (eq api "trpc")}}
25
+ import { queryClient } from "./utils/trpc";
26
+ {{/if}}
27
+ {{/unless}}
28
+ {{/if}}
29
+
30
+ export const links: Route.LinksFunction = () => [
31
+ {
32
+ rel: "preconnect",
33
+ href: "https://fonts.googleapis.com",
34
+ },
35
+ {
36
+ rel: "preconnect",
37
+ href: "https://fonts.gstatic.com",
38
+ crossOrigin: "anonymous",
39
+ },
40
+ {
41
+ rel: "stylesheet",
42
+ href: "https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap",
43
+ },
44
+ ];
45
+
46
+ export function Layout({ children }: { children: React.ReactNode }) {
47
+ return (
48
+ <html lang="en">
49
+ <head>
50
+ <meta charSet="utf-8" />
51
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
52
+ <Meta />
53
+ <Links />
54
+ </head>
55
+ <body>
56
+ {children}
57
+ <ScrollRestoration />
58
+ <Scripts />
59
+ </body>
60
+ </html>
61
+ );
62
+ }
63
+
64
+ {{#if (eq backend "convex")}}
65
+ export default function App() {
66
+ const convex = new ConvexReactClient(
67
+ import.meta.env.VITE_CONVEX_URL as string,
68
+ );
69
+ return (
70
+ <ConvexProvider client={convex}>
71
+ <ThemeProvider defaultTheme="dark" storageKey="vite-ui-theme">
72
+ <div className="grid grid-rows-[auto_1fr] h-svh">
73
+ <Header />
74
+ <Outlet />
75
+ </div>
76
+ <Toaster richColors />
77
+ </ThemeProvider>
78
+ </ConvexProvider>
79
+ );
80
+ }
81
+ {{else if (eq api "orpc")}}
82
+ export default function App() {
83
+ return (
84
+ <QueryClientProvider client={queryClient}>
85
+ <ThemeProvider defaultTheme="dark" storageKey="vite-ui-theme">
86
+ <div className="grid grid-rows-[auto_1fr] h-svh">
87
+ <Header />
88
+ <Outlet />
89
+ </div>
90
+ <Toaster richColors />
91
+ </ThemeProvider>
92
+ <ReactQueryDevtools position="bottom" buttonPosition="bottom-right" />
93
+ </QueryClientProvider>
94
+ );
95
+ }
96
+ {{else if (eq api "trpc")}}
97
+ export default function App() {
98
+ return (
99
+ <QueryClientProvider client={queryClient}>
100
+ <ThemeProvider defaultTheme="dark" storageKey="vite-ui-theme">
101
+ <div className="grid grid-rows-[auto_1fr] h-svh">
102
+ <Header />
103
+ <Outlet />
104
+ </div>
105
+ <Toaster richColors />
106
+ </ThemeProvider>
107
+ <ReactQueryDevtools position="bottom" buttonPosition="bottom-right" />
108
+ </QueryClientProvider>
109
+ );
110
+ }
111
+ {{else}}
112
+ export default function App() {
113
+ return (
114
+ <ThemeProvider defaultTheme="dark" storageKey="vite-ui-theme">
115
+ <div className="grid grid-rows-[auto_1fr] h-svh">
116
+ <Header />
117
+ <Outlet />
118
+ </div>
119
+ <Toaster richColors />
120
+ </ThemeProvider>
121
+ );
122
+ }
123
+ {{/if}}
124
+
125
+ export function ErrorBoundary({ error }: Route.ErrorBoundaryProps) {
126
+ let message = "Oops!";
127
+ let details = "An unexpected error occurred.";
128
+ let stack: string | undefined;
129
+
130
+ if (isRouteErrorResponse(error)) {
131
+ message = error.status === 404 ? "404" : "Error";
132
+ details =
133
+ error.status === 404
134
+ ? "The requested page could not be found."
135
+ : error.statusText || details;
136
+ } else if (import.meta.env.DEV && error && error instanceof Error) {
137
+ details = error.message;
138
+ stack = error.stack;
139
+ }
140
+
141
+ return (
142
+ <main className="pt-16 p-4 container mx-auto">
143
+ <h1>{message}</h1>
144
+ <p>{details}</p>
145
+ {stack && (
146
+ <pre className="w-full p-4 overflow-x-auto">
147
+ <code>{stack}</code>
148
+ </pre>
149
+ )}
150
+ </main>
151
+ );
152
+ }
@@ -0,0 +1,74 @@
1
+ import type { Route } from "./+types/_index";
2
+ {{#if (eq backend "convex")}}
3
+ import { useQuery } from "convex/react";
4
+ import { api } from "@{{projectName}}/backend/convex/_generated/api";
5
+ {{else if (or (eq api "orpc") (eq api "trpc"))}}
6
+ import { useQuery } from "@tanstack/react-query";
7
+ {{#if (eq api "orpc")}}
8
+ import { orpc } from "@/utils/orpc";
9
+ {{/if}}
10
+ {{#if (eq api "trpc")}}
11
+ import { trpc } from "@/utils/trpc";
12
+ {{/if}}
13
+ {{/if}}
14
+
15
+ const TITLE_TEXT = `
16
+ TVI TypeScript Initializer
17
+ A CLI tool to quickly scaffold TypeScript projects with popular frameworks and libraries.
18
+ `;
19
+
20
+ export function meta({}: Route.MetaArgs) {
21
+ return [{ title: "My App" }, { name: "description", content: "My App" }];
22
+ }
23
+
24
+ export default function Home() {
25
+ {{#if (eq backend "convex")}}
26
+ const healthCheck = useQuery(api.healthCheck.get);
27
+ {{else if (eq api "orpc")}}
28
+ const healthCheck = useQuery(orpc.healthCheck.queryOptions());
29
+ {{else if (eq api "trpc")}}
30
+ const healthCheck = useQuery(trpc.healthCheck.queryOptions());
31
+ {{/if}}
32
+
33
+ return (
34
+ <div className="container mx-auto max-w-3xl px-4 py-2">
35
+ <pre className="overflow-x-auto font-mono text-sm">{TITLE_TEXT}</pre>
36
+ <div className="grid gap-6">
37
+ <section className="rounded-lg border p-4">
38
+ <h2 className="mb-2 font-medium">API Status</h2>
39
+ {{#if (eq backend "convex")}}
40
+ <div className="flex items-center gap-2">
41
+ <div
42
+ className={`h-2 w-2 rounded-full ${healthCheck === "OK" ? "bg-green-500" : healthCheck === undefined ? "bg-orange-400" : "bg-red-500"}`}
43
+ />
44
+ <span className="text-sm text-muted-foreground">
45
+ {healthCheck === undefined
46
+ ? "Checking..."
47
+ : healthCheck === "OK"
48
+ ? "Connected"
49
+ : "Error"}
50
+ </span>
51
+ </div>
52
+ {{else}}
53
+ {{#unless (eq api "none")}}
54
+ <div className="flex items-center gap-2">
55
+ <div
56
+ className={`h-2 w-2 rounded-full ${
57
+ healthCheck.data ? "bg-green-500" : "bg-red-500"
58
+ }`}
59
+ />
60
+ <span className="text-sm text-muted-foreground">
61
+ {healthCheck.isLoading
62
+ ? "Checking..."
63
+ : healthCheck.data
64
+ ? "Connected"
65
+ : "Disconnected"}
66
+ </span>
67
+ </div>
68
+ {{/unless}}
69
+ {{/if}}
70
+ </section>
71
+ </div>
72
+ </div>
73
+ );
74
+ }
@@ -0,0 +1,4 @@
1
+ import { type RouteConfig } from "@react-router/dev/routes";
2
+ import { flatRoutes } from "@react-router/fs-routes";
3
+
4
+ export default flatRoutes() satisfies RouteConfig;
@@ -0,0 +1,32 @@
1
+ {
2
+ "include": [
3
+ "**/*",
4
+ "**/.server/**/*",
5
+ "**/.client/**/*",
6
+ ".react-router/types/**/*"
7
+ ],
8
+ "compilerOptions": {
9
+ "lib": ["DOM", "DOM.Iterable", "ES2022"],
10
+ "types": ["node", "vite/client"],
11
+ "target": "ES2022",
12
+ "module": "ES2022",
13
+ "moduleResolution": "bundler",
14
+ "jsx": "react-jsx",
15
+ "rootDirs": [".", "./.react-router/types"],
16
+ "baseUrl": ".",
17
+ "paths": {
18
+ "@/*": ["./src/*"]
19
+ },
20
+ "esModuleInterop": true,
21
+ "verbatimModuleSyntax": true,
22
+ "noEmit": true,
23
+ "resolveJsonModule": true,
24
+ "skipLibCheck": true,
25
+ "strict": true
26
+ },
27
+ {{#unless (or (eq backend "convex") (eq backend "none"))}}
28
+ "references": [{
29
+ "path": "../server"
30
+ }]
31
+ {{/unless}}
32
+ }
@@ -0,0 +1,33 @@
1
+ {{#if (includes addons "pwa")}}
2
+ import { VitePWA } from "vite-plugin-pwa";
3
+ {{/if}}
4
+ import { reactRouter } from "@react-router/dev/vite";
5
+ import tailwindcss from "@tailwindcss/vite";
6
+ import { defineConfig } from "vite";
7
+ import tsconfigPaths from "vite-tsconfig-paths";
8
+
9
+ export default defineConfig({
10
+ plugins: [
11
+ tailwindcss(),
12
+ reactRouter(),
13
+ tsconfigPaths(),
14
+ {{#if (includes addons "pwa")}}
15
+ VitePWA({
16
+ registerType: "autoUpdate",
17
+ manifest: {
18
+ name: "{{projectName}}",
19
+ short_name: "{{projectName}}",
20
+ description: "{{projectName}} - PWA Application",
21
+ theme_color: "#0c0c0c",
22
+ },
23
+ pwaAssets: {
24
+ disabled: false,
25
+ config: true,
26
+ },
27
+ devOptions: {
28
+ enabled: true,
29
+ },
30
+ }),
31
+ {{/if}}
32
+ ],
33
+ });