create-huenei-template 0.2.14 → 0.2.15

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 (428) hide show
  1. package/dist/config/templates.js +7 -0
  2. package/dist/templates/frontend/react-ssr/.cursor/agents/accessibility-reviewer.md +22 -0
  3. package/dist/templates/frontend/react-ssr/.cursor/agents/nextjs-code-reviewer.md +24 -0
  4. package/dist/templates/frontend/react-ssr/.cursor/agents/react-test-expert.md +32 -0
  5. package/dist/templates/frontend/react-ssr/.cursor/agents/security-auditor.md +25 -0
  6. package/dist/templates/frontend/react-ssr/.cursor/commands/new-component.md +97 -0
  7. package/dist/templates/frontend/react-ssr/.cursor/commands/new-page.md +95 -0
  8. package/dist/templates/frontend/react-ssr/.cursor/commands/new-prisma-model.md +66 -0
  9. package/dist/templates/frontend/react-ssr/.cursor/commands/new-server-action.md +89 -0
  10. package/dist/templates/frontend/react-ssr/.cursor/hooks/auto-format.ts +64 -0
  11. package/dist/templates/frontend/react-ssr/.cursor/hooks/auto-test-on-stop.ts +94 -0
  12. package/dist/templates/frontend/react-ssr/.cursor/hooks/block-dangerous-commands.ts +120 -0
  13. package/dist/templates/frontend/react-ssr/.cursor/hooks/ensure-tests-exist.ts +209 -0
  14. package/dist/templates/frontend/react-ssr/.cursor/hooks/protect-sensitive-files.ts +101 -0
  15. package/dist/templates/frontend/react-ssr/.cursor/hooks/session-context.ts +93 -0
  16. package/dist/templates/frontend/react-ssr/.cursor/hooks/tsconfig.json +10 -0
  17. package/dist/templates/frontend/react-ssr/.cursor/hooks.json +41 -0
  18. package/dist/templates/frontend/react-ssr/.cursor/rules/auth-patterns.mdc +48 -0
  19. package/dist/templates/frontend/react-ssr/.cursor/rules/code-quality.mdc +39 -0
  20. package/dist/templates/frontend/react-ssr/.cursor/rules/naming-conventions.mdc +32 -0
  21. package/dist/templates/frontend/react-ssr/.cursor/rules/nextjs-architecture.mdc +51 -0
  22. package/dist/templates/frontend/react-ssr/.cursor/rules/prisma-standards.mdc +53 -0
  23. package/dist/templates/frontend/react-ssr/.cursor/rules/react-conventions.mdc +52 -0
  24. package/dist/templates/frontend/react-ssr/.cursor/rules/testing-conventions.mdc +53 -0
  25. package/dist/templates/frontend/react-ssr/.cursor/rules/ui-stack.mdc +47 -0
  26. package/dist/templates/frontend/react-ssr/.cursor/skills/authjs-skills/SKILL.md +1149 -0
  27. package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/SKILL.md +189 -0
  28. package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/daisyUI5.skill +0 -0
  29. package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/creating-components.md +412 -0
  30. package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/data-display.md +341 -0
  31. package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/feedback.md +240 -0
  32. package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/input.md +283 -0
  33. package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/layout.md +275 -0
  34. package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/navigation.md +338 -0
  35. package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/scripts/daisy-meta.ts +220 -0
  36. package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/scripts/generate-daisy-safelist.ts +152 -0
  37. package/dist/templates/frontend/react-ssr/.cursor/skills/docker-expert/SKILL.md +413 -0
  38. package/dist/templates/frontend/react-ssr/.cursor/skills/nextjs-app-router-patterns/SKILL.md +537 -0
  39. package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/SKILL.md +243 -0
  40. package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-execute.md +75 -0
  41. package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-pull.md +185 -0
  42. package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-push.md +148 -0
  43. package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-seed.md +191 -0
  44. package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/debug.md +46 -0
  45. package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/dev.md +157 -0
  46. package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/format.md +48 -0
  47. package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/generate.md +147 -0
  48. package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/init.md +118 -0
  49. package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-deploy.md +127 -0
  50. package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-dev.md +143 -0
  51. package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-diff.md +89 -0
  52. package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-reset.md +72 -0
  53. package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-resolve.md +57 -0
  54. package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-status.md +65 -0
  55. package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/studio.md +122 -0
  56. package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/validate.md +53 -0
  57. package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/SKILL.md +216 -0
  58. package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/client-methods.md +221 -0
  59. package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/constructor.md +185 -0
  60. package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/filters.md +256 -0
  61. package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/model-queries.md +281 -0
  62. package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/query-options.md +276 -0
  63. package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/raw-queries.md +194 -0
  64. package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/relations.md +308 -0
  65. package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/transactions.md +184 -0
  66. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/AGENTS.md +97 -0
  67. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/README.md +138 -0
  68. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/SKILL.md +116 -0
  69. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/assets/templates/_template.md +26 -0
  70. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/_sections.md +46 -0
  71. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-devtools-performance.md +69 -0
  72. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-formprovider-memo.md +78 -0
  73. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-testing-wrapper.md +63 -0
  74. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-complete-default-objects.md +66 -0
  75. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-separate-crud-operations.md +76 -0
  76. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-unique-fieldarray-per-name.md +58 -0
  77. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-use-field-id-as-key.md +54 -0
  78. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-virtualization-formprovider.md +64 -0
  79. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-avoid-double-registration.md +46 -0
  80. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-controller-field-props.md +56 -0
  81. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-local-state-combination.md +69 -0
  82. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-single-usecontroller-per-component.md +62 -0
  83. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-usecontroller-isolation.md +64 -0
  84. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-async-default-values.md +69 -0
  85. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-default-values.md +57 -0
  86. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-revalidate-mode.md +48 -0
  87. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-should-unregister.md +62 -0
  88. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-useeffect-dependency.md +54 -0
  89. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-validation-mode.md +51 -0
  90. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-avoid-isvalid-with-onsubmit.md +58 -0
  91. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-destructure-formstate.md +48 -0
  92. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-getfieldstate-for-single-field.md +49 -0
  93. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-subscribe-to-specific-fields.md +54 -0
  94. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-useformstate-isolation.md +62 -0
  95. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-mui-controller-pattern.md +59 -0
  96. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-shadcn-form-import.md +64 -0
  97. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-shadcn-select-wiring.md +64 -0
  98. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-value-transform.md +59 -0
  99. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-avoid-watch-in-render.md +48 -0
  100. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-deep-subscription.md +62 -0
  101. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-useformcontext-sparingly.md +58 -0
  102. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-default-value.md +50 -0
  103. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-over-watch.md +58 -0
  104. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-with-getvalues.md +54 -0
  105. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-watch-specific-fields.md +54 -0
  106. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-delay-error.md +52 -0
  107. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-dynamic-schema-factory.md +57 -0
  108. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-error-message-strategy.md +65 -0
  109. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-inline-vs-resolver.md +63 -0
  110. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-native-validation.md +60 -0
  111. package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-resolver-caching.md +58 -0
  112. package/dist/templates/frontend/react-ssr/.cursor/skills/recharts/SKILL.md +713 -0
  113. package/dist/templates/frontend/react-ssr/.cursor/skills/recharts/references/api_reference.md +1121 -0
  114. package/dist/templates/frontend/react-ssr/.cursor/skills/recharts/references/best_practices.md +782 -0
  115. package/dist/templates/frontend/react-ssr/.cursor/skills/recharts/references/examples.md +940 -0
  116. package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/SKILL.md +114 -0
  117. package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-gc-time.md +93 -0
  118. package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-invalidation.md +116 -0
  119. package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-placeholder-vs-initial.md +156 -0
  120. package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-stale-time.md +80 -0
  121. package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/err-error-boundaries.md +150 -0
  122. package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/inf-page-params.md +132 -0
  123. package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-invalidate-queries.md +118 -0
  124. package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-mutation-state.md +169 -0
  125. package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-optimistic-updates.md +137 -0
  126. package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/network-mode.md +179 -0
  127. package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/parallel-use-queries.md +152 -0
  128. package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/perf-select-transform.md +144 -0
  129. package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/persist-queries.md +194 -0
  130. package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/pf-intent-prefetch.md +143 -0
  131. package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-array-structure.md +50 -0
  132. package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-factory-pattern.md +102 -0
  133. package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-hierarchical-organization.md +76 -0
  134. package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-include-dependencies.md +62 -0
  135. package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-serializable.md +93 -0
  136. package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/query-cancellation.md +171 -0
  137. package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/ssr-dehydration.md +158 -0
  138. package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-table/SKILL.md +582 -0
  139. package/dist/templates/frontend/react-ssr/.cursor/skills/zod-4/SKILL.md +216 -0
  140. package/dist/templates/frontend/react-ssr/.dockerignore +14 -0
  141. package/dist/templates/frontend/react-ssr/.env.example +9 -0
  142. package/dist/templates/frontend/react-ssr/.husky/pre-commit +1 -0
  143. package/dist/templates/frontend/react-ssr/Dockerfile +41 -0
  144. package/dist/templates/frontend/react-ssr/README.md +121 -0
  145. package/dist/templates/frontend/react-ssr/components.json +22 -0
  146. package/dist/templates/frontend/react-ssr/docker-compose.yml +21 -0
  147. package/dist/templates/frontend/react-ssr/eslint.config.mjs +26 -0
  148. package/dist/templates/frontend/react-ssr/next.config.ts +7 -0
  149. package/dist/templates/frontend/react-ssr/package.json +86 -0
  150. package/dist/templates/frontend/react-ssr/postcss.config.mjs +5 -0
  151. package/dist/templates/frontend/react-ssr/prisma/schema.prisma +75 -0
  152. package/dist/templates/frontend/react-ssr/prisma/seed.ts +109 -0
  153. package/dist/templates/frontend/react-ssr/prisma.config.ts +17 -0
  154. package/dist/templates/frontend/react-ssr/skills-lock.json +65 -0
  155. package/dist/templates/frontend/react-ssr/src/__tests__/components/ui/badge.test.tsx +26 -0
  156. package/dist/templates/frontend/react-ssr/src/__tests__/components/ui/button.test.tsx +38 -0
  157. package/dist/templates/frontend/react-ssr/src/__tests__/components/ui/card.test.tsx +39 -0
  158. package/dist/templates/frontend/react-ssr/src/__tests__/components/ui/input.test.tsx +32 -0
  159. package/dist/templates/frontend/react-ssr/src/__tests__/hooks/useLocalStorage.test.ts +53 -0
  160. package/dist/templates/frontend/react-ssr/src/__tests__/lib/queryClient.test.ts +19 -0
  161. package/dist/templates/frontend/react-ssr/src/__tests__/lib/utils.test.ts +24 -0
  162. package/dist/templates/frontend/react-ssr/src/actions/auth.ts +91 -0
  163. package/dist/templates/frontend/react-ssr/src/actions/contacto.ts +46 -0
  164. package/dist/templates/frontend/react-ssr/src/actions/proyectos.ts +159 -0
  165. package/dist/templates/frontend/react-ssr/src/app/(authenticated)/dashboard/dashboard-client.tsx +321 -0
  166. package/dist/templates/frontend/react-ssr/src/app/(authenticated)/dashboard/page.tsx +48 -0
  167. package/dist/templates/frontend/react-ssr/src/app/(authenticated)/layout.tsx +34 -0
  168. package/dist/templates/frontend/react-ssr/src/app/(authenticated)/perfil/page.tsx +85 -0
  169. package/dist/templates/frontend/react-ssr/src/app/(authenticated)/proyectos-crud/page.tsx +23 -0
  170. package/dist/templates/frontend/react-ssr/src/app/(authenticated)/proyectos-crud/proyectos-crud-client.tsx +472 -0
  171. package/dist/templates/frontend/react-ssr/src/app/(authenticated)/ui-components/page.tsx +358 -0
  172. package/dist/templates/frontend/react-ssr/src/app/api/auth/[...nextauth]/route.ts +3 -0
  173. package/dist/templates/frontend/react-ssr/src/app/auth/iniciar-sesion/page.tsx +148 -0
  174. package/dist/templates/frontend/react-ssr/src/app/auth/recuperar-password/page.tsx +100 -0
  175. package/dist/templates/frontend/react-ssr/src/app/auth/registro/page.tsx +154 -0
  176. package/dist/templates/frontend/react-ssr/src/app/contacto/contacto-form.tsx +189 -0
  177. package/dist/templates/frontend/react-ssr/src/app/contacto/page.tsx +11 -0
  178. package/dist/templates/frontend/react-ssr/src/app/globals.css +99 -0
  179. package/dist/templates/frontend/react-ssr/src/app/layout.tsx +22 -0
  180. package/dist/templates/frontend/react-ssr/src/app/loading.tsx +7 -0
  181. package/dist/templates/frontend/react-ssr/src/app/not-found.tsx +14 -0
  182. package/dist/templates/frontend/react-ssr/src/app/page.tsx +331 -0
  183. package/dist/templates/frontend/react-ssr/src/app/proyectos/page.tsx +178 -0
  184. package/dist/templates/frontend/react-ssr/src/auth.ts +64 -0
  185. package/dist/templates/frontend/react-ssr/src/components/layout/navbar.tsx +68 -0
  186. package/dist/templates/frontend/react-ssr/src/components/layout/sidebar.tsx +109 -0
  187. package/dist/templates/frontend/react-ssr/src/components/layout/sign-out-button.tsx +16 -0
  188. package/dist/templates/frontend/react-ssr/src/components/providers.tsx +33 -0
  189. package/dist/templates/frontend/react-ssr/src/components/ui/avatar.tsx +53 -0
  190. package/dist/templates/frontend/react-ssr/src/components/ui/badge.tsx +42 -0
  191. package/dist/templates/frontend/react-ssr/src/components/ui/breadcrumb.tsx +114 -0
  192. package/dist/templates/frontend/react-ssr/src/components/ui/button.tsx +58 -0
  193. package/dist/templates/frontend/react-ssr/src/components/ui/card.tsx +95 -0
  194. package/dist/templates/frontend/react-ssr/src/components/ui/dialog.tsx +136 -0
  195. package/dist/templates/frontend/react-ssr/src/components/ui/form.tsx +168 -0
  196. package/dist/templates/frontend/react-ssr/src/components/ui/input.tsx +22 -0
  197. package/dist/templates/frontend/react-ssr/src/components/ui/label.tsx +26 -0
  198. package/dist/templates/frontend/react-ssr/src/components/ui/password-input.tsx +43 -0
  199. package/dist/templates/frontend/react-ssr/src/components/ui/separator.tsx +30 -0
  200. package/dist/templates/frontend/react-ssr/src/components/ui/table.tsx +240 -0
  201. package/dist/templates/frontend/react-ssr/src/components/ui/tabs.tsx +76 -0
  202. package/dist/templates/frontend/react-ssr/src/components/ui/textarea.tsx +21 -0
  203. package/dist/templates/frontend/react-ssr/src/data/dashboard.ts +179 -0
  204. package/dist/templates/frontend/react-ssr/src/hooks/useLocalStorage.ts +38 -0
  205. package/dist/templates/frontend/react-ssr/src/lib/prisma.ts +24 -0
  206. package/dist/templates/frontend/react-ssr/src/lib/queryClient.ts +25 -0
  207. package/dist/templates/frontend/react-ssr/src/lib/utils.ts +6 -0
  208. package/dist/templates/frontend/react-ssr/src/proxy.ts +31 -0
  209. package/dist/templates/frontend/react-ssr/src/test/mocks/next-navigation.ts +16 -0
  210. package/dist/templates/frontend/react-ssr/src/test/setup.ts +1 -0
  211. package/dist/templates/frontend/react-ssr/src/test/utils.tsx +30 -0
  212. package/dist/templates/frontend/react-ssr/src/types/index.ts +36 -0
  213. package/dist/templates/frontend/react-ssr/tsconfig.json +41 -0
  214. package/dist/templates/frontend/react-ssr/vitest.config.ts +41 -0
  215. package/package.json +1 -1
  216. package/templates/frontend/react-ssr/.cursor/agents/accessibility-reviewer.md +22 -0
  217. package/templates/frontend/react-ssr/.cursor/agents/nextjs-code-reviewer.md +24 -0
  218. package/templates/frontend/react-ssr/.cursor/agents/react-test-expert.md +32 -0
  219. package/templates/frontend/react-ssr/.cursor/agents/security-auditor.md +25 -0
  220. package/templates/frontend/react-ssr/.cursor/commands/new-component.md +97 -0
  221. package/templates/frontend/react-ssr/.cursor/commands/new-page.md +95 -0
  222. package/templates/frontend/react-ssr/.cursor/commands/new-prisma-model.md +66 -0
  223. package/templates/frontend/react-ssr/.cursor/commands/new-server-action.md +89 -0
  224. package/templates/frontend/react-ssr/.cursor/hooks/auto-format.ts +64 -0
  225. package/templates/frontend/react-ssr/.cursor/hooks/auto-test-on-stop.ts +94 -0
  226. package/templates/frontend/react-ssr/.cursor/hooks/block-dangerous-commands.ts +120 -0
  227. package/templates/frontend/react-ssr/.cursor/hooks/ensure-tests-exist.ts +209 -0
  228. package/templates/frontend/react-ssr/.cursor/hooks/protect-sensitive-files.ts +101 -0
  229. package/templates/frontend/react-ssr/.cursor/hooks/session-context.ts +93 -0
  230. package/templates/frontend/react-ssr/.cursor/hooks/tsconfig.json +10 -0
  231. package/templates/frontend/react-ssr/.cursor/hooks.json +41 -0
  232. package/templates/frontend/react-ssr/.cursor/rules/auth-patterns.mdc +48 -0
  233. package/templates/frontend/react-ssr/.cursor/rules/code-quality.mdc +39 -0
  234. package/templates/frontend/react-ssr/.cursor/rules/naming-conventions.mdc +32 -0
  235. package/templates/frontend/react-ssr/.cursor/rules/nextjs-architecture.mdc +51 -0
  236. package/templates/frontend/react-ssr/.cursor/rules/prisma-standards.mdc +53 -0
  237. package/templates/frontend/react-ssr/.cursor/rules/react-conventions.mdc +52 -0
  238. package/templates/frontend/react-ssr/.cursor/rules/testing-conventions.mdc +53 -0
  239. package/templates/frontend/react-ssr/.cursor/rules/ui-stack.mdc +47 -0
  240. package/templates/frontend/react-ssr/.cursor/skills/authjs-skills/SKILL.md +1149 -0
  241. package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/SKILL.md +189 -0
  242. package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/daisyUI5.skill +0 -0
  243. package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/creating-components.md +412 -0
  244. package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/data-display.md +341 -0
  245. package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/feedback.md +240 -0
  246. package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/input.md +283 -0
  247. package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/layout.md +275 -0
  248. package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/navigation.md +338 -0
  249. package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/scripts/daisy-meta.ts +220 -0
  250. package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/scripts/generate-daisy-safelist.ts +152 -0
  251. package/templates/frontend/react-ssr/.cursor/skills/docker-expert/SKILL.md +413 -0
  252. package/templates/frontend/react-ssr/.cursor/skills/nextjs-app-router-patterns/SKILL.md +537 -0
  253. package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/SKILL.md +243 -0
  254. package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-execute.md +75 -0
  255. package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-pull.md +185 -0
  256. package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-push.md +148 -0
  257. package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-seed.md +191 -0
  258. package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/debug.md +46 -0
  259. package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/dev.md +157 -0
  260. package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/format.md +48 -0
  261. package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/generate.md +147 -0
  262. package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/init.md +118 -0
  263. package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-deploy.md +127 -0
  264. package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-dev.md +143 -0
  265. package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-diff.md +89 -0
  266. package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-reset.md +72 -0
  267. package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-resolve.md +57 -0
  268. package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-status.md +65 -0
  269. package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/studio.md +122 -0
  270. package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/validate.md +53 -0
  271. package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/SKILL.md +216 -0
  272. package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/client-methods.md +221 -0
  273. package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/constructor.md +185 -0
  274. package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/filters.md +256 -0
  275. package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/model-queries.md +281 -0
  276. package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/query-options.md +276 -0
  277. package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/raw-queries.md +194 -0
  278. package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/relations.md +308 -0
  279. package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/transactions.md +184 -0
  280. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/AGENTS.md +97 -0
  281. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/README.md +138 -0
  282. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/SKILL.md +116 -0
  283. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/assets/templates/_template.md +26 -0
  284. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/_sections.md +46 -0
  285. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-devtools-performance.md +69 -0
  286. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-formprovider-memo.md +78 -0
  287. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-testing-wrapper.md +63 -0
  288. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-complete-default-objects.md +66 -0
  289. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-separate-crud-operations.md +76 -0
  290. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-unique-fieldarray-per-name.md +58 -0
  291. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-use-field-id-as-key.md +54 -0
  292. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-virtualization-formprovider.md +64 -0
  293. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-avoid-double-registration.md +46 -0
  294. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-controller-field-props.md +56 -0
  295. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-local-state-combination.md +69 -0
  296. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-single-usecontroller-per-component.md +62 -0
  297. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-usecontroller-isolation.md +64 -0
  298. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-async-default-values.md +69 -0
  299. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-default-values.md +57 -0
  300. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-revalidate-mode.md +48 -0
  301. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-should-unregister.md +62 -0
  302. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-useeffect-dependency.md +54 -0
  303. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-validation-mode.md +51 -0
  304. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-avoid-isvalid-with-onsubmit.md +58 -0
  305. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-destructure-formstate.md +48 -0
  306. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-getfieldstate-for-single-field.md +49 -0
  307. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-subscribe-to-specific-fields.md +54 -0
  308. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-useformstate-isolation.md +62 -0
  309. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-mui-controller-pattern.md +59 -0
  310. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-shadcn-form-import.md +64 -0
  311. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-shadcn-select-wiring.md +64 -0
  312. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-value-transform.md +59 -0
  313. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-avoid-watch-in-render.md +48 -0
  314. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-deep-subscription.md +62 -0
  315. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-useformcontext-sparingly.md +58 -0
  316. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-default-value.md +50 -0
  317. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-over-watch.md +58 -0
  318. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-with-getvalues.md +54 -0
  319. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-watch-specific-fields.md +54 -0
  320. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-delay-error.md +52 -0
  321. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-dynamic-schema-factory.md +57 -0
  322. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-error-message-strategy.md +65 -0
  323. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-inline-vs-resolver.md +63 -0
  324. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-native-validation.md +60 -0
  325. package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-resolver-caching.md +58 -0
  326. package/templates/frontend/react-ssr/.cursor/skills/recharts/SKILL.md +713 -0
  327. package/templates/frontend/react-ssr/.cursor/skills/recharts/references/api_reference.md +1121 -0
  328. package/templates/frontend/react-ssr/.cursor/skills/recharts/references/best_practices.md +782 -0
  329. package/templates/frontend/react-ssr/.cursor/skills/recharts/references/examples.md +940 -0
  330. package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/SKILL.md +114 -0
  331. package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-gc-time.md +93 -0
  332. package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-invalidation.md +116 -0
  333. package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-placeholder-vs-initial.md +156 -0
  334. package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-stale-time.md +80 -0
  335. package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/err-error-boundaries.md +150 -0
  336. package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/inf-page-params.md +132 -0
  337. package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-invalidate-queries.md +118 -0
  338. package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-mutation-state.md +169 -0
  339. package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-optimistic-updates.md +137 -0
  340. package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/network-mode.md +179 -0
  341. package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/parallel-use-queries.md +152 -0
  342. package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/perf-select-transform.md +144 -0
  343. package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/persist-queries.md +194 -0
  344. package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/pf-intent-prefetch.md +143 -0
  345. package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-array-structure.md +50 -0
  346. package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-factory-pattern.md +102 -0
  347. package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-hierarchical-organization.md +76 -0
  348. package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-include-dependencies.md +62 -0
  349. package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-serializable.md +93 -0
  350. package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/query-cancellation.md +171 -0
  351. package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/ssr-dehydration.md +158 -0
  352. package/templates/frontend/react-ssr/.cursor/skills/tanstack-table/SKILL.md +582 -0
  353. package/templates/frontend/react-ssr/.cursor/skills/zod-4/SKILL.md +216 -0
  354. package/templates/frontend/react-ssr/.dockerignore +14 -0
  355. package/templates/frontend/react-ssr/.env.example +9 -0
  356. package/templates/frontend/react-ssr/.husky/pre-commit +1 -0
  357. package/templates/frontend/react-ssr/Dockerfile +41 -0
  358. package/templates/frontend/react-ssr/README.md +121 -0
  359. package/templates/frontend/react-ssr/components.json +22 -0
  360. package/templates/frontend/react-ssr/docker-compose.yml +21 -0
  361. package/templates/frontend/react-ssr/eslint.config.mjs +26 -0
  362. package/templates/frontend/react-ssr/next.config.ts +7 -0
  363. package/templates/frontend/react-ssr/package.json +86 -0
  364. package/templates/frontend/react-ssr/postcss.config.mjs +5 -0
  365. package/templates/frontend/react-ssr/prisma/schema.prisma +75 -0
  366. package/templates/frontend/react-ssr/prisma/seed.ts +109 -0
  367. package/templates/frontend/react-ssr/prisma.config.ts +17 -0
  368. package/templates/frontend/react-ssr/skills-lock.json +65 -0
  369. package/templates/frontend/react-ssr/src/__tests__/components/ui/badge.test.tsx +26 -0
  370. package/templates/frontend/react-ssr/src/__tests__/components/ui/button.test.tsx +38 -0
  371. package/templates/frontend/react-ssr/src/__tests__/components/ui/card.test.tsx +39 -0
  372. package/templates/frontend/react-ssr/src/__tests__/components/ui/input.test.tsx +32 -0
  373. package/templates/frontend/react-ssr/src/__tests__/hooks/useLocalStorage.test.ts +53 -0
  374. package/templates/frontend/react-ssr/src/__tests__/lib/queryClient.test.ts +19 -0
  375. package/templates/frontend/react-ssr/src/__tests__/lib/utils.test.ts +24 -0
  376. package/templates/frontend/react-ssr/src/actions/auth.ts +91 -0
  377. package/templates/frontend/react-ssr/src/actions/contacto.ts +46 -0
  378. package/templates/frontend/react-ssr/src/actions/proyectos.ts +159 -0
  379. package/templates/frontend/react-ssr/src/app/(authenticated)/dashboard/dashboard-client.tsx +321 -0
  380. package/templates/frontend/react-ssr/src/app/(authenticated)/dashboard/page.tsx +48 -0
  381. package/templates/frontend/react-ssr/src/app/(authenticated)/layout.tsx +34 -0
  382. package/templates/frontend/react-ssr/src/app/(authenticated)/perfil/page.tsx +85 -0
  383. package/templates/frontend/react-ssr/src/app/(authenticated)/proyectos-crud/page.tsx +23 -0
  384. package/templates/frontend/react-ssr/src/app/(authenticated)/proyectos-crud/proyectos-crud-client.tsx +472 -0
  385. package/templates/frontend/react-ssr/src/app/(authenticated)/ui-components/page.tsx +358 -0
  386. package/templates/frontend/react-ssr/src/app/api/auth/[...nextauth]/route.ts +3 -0
  387. package/templates/frontend/react-ssr/src/app/auth/iniciar-sesion/page.tsx +148 -0
  388. package/templates/frontend/react-ssr/src/app/auth/recuperar-password/page.tsx +100 -0
  389. package/templates/frontend/react-ssr/src/app/auth/registro/page.tsx +154 -0
  390. package/templates/frontend/react-ssr/src/app/contacto/contacto-form.tsx +189 -0
  391. package/templates/frontend/react-ssr/src/app/contacto/page.tsx +11 -0
  392. package/templates/frontend/react-ssr/src/app/globals.css +99 -0
  393. package/templates/frontend/react-ssr/src/app/layout.tsx +22 -0
  394. package/templates/frontend/react-ssr/src/app/loading.tsx +7 -0
  395. package/templates/frontend/react-ssr/src/app/not-found.tsx +14 -0
  396. package/templates/frontend/react-ssr/src/app/page.tsx +331 -0
  397. package/templates/frontend/react-ssr/src/app/proyectos/page.tsx +178 -0
  398. package/templates/frontend/react-ssr/src/auth.ts +64 -0
  399. package/templates/frontend/react-ssr/src/components/layout/navbar.tsx +68 -0
  400. package/templates/frontend/react-ssr/src/components/layout/sidebar.tsx +109 -0
  401. package/templates/frontend/react-ssr/src/components/layout/sign-out-button.tsx +16 -0
  402. package/templates/frontend/react-ssr/src/components/providers.tsx +33 -0
  403. package/templates/frontend/react-ssr/src/components/ui/avatar.tsx +53 -0
  404. package/templates/frontend/react-ssr/src/components/ui/badge.tsx +42 -0
  405. package/templates/frontend/react-ssr/src/components/ui/breadcrumb.tsx +114 -0
  406. package/templates/frontend/react-ssr/src/components/ui/button.tsx +58 -0
  407. package/templates/frontend/react-ssr/src/components/ui/card.tsx +95 -0
  408. package/templates/frontend/react-ssr/src/components/ui/dialog.tsx +136 -0
  409. package/templates/frontend/react-ssr/src/components/ui/form.tsx +168 -0
  410. package/templates/frontend/react-ssr/src/components/ui/input.tsx +22 -0
  411. package/templates/frontend/react-ssr/src/components/ui/label.tsx +26 -0
  412. package/templates/frontend/react-ssr/src/components/ui/password-input.tsx +43 -0
  413. package/templates/frontend/react-ssr/src/components/ui/separator.tsx +30 -0
  414. package/templates/frontend/react-ssr/src/components/ui/table.tsx +240 -0
  415. package/templates/frontend/react-ssr/src/components/ui/tabs.tsx +76 -0
  416. package/templates/frontend/react-ssr/src/components/ui/textarea.tsx +21 -0
  417. package/templates/frontend/react-ssr/src/data/dashboard.ts +179 -0
  418. package/templates/frontend/react-ssr/src/hooks/useLocalStorage.ts +38 -0
  419. package/templates/frontend/react-ssr/src/lib/prisma.ts +24 -0
  420. package/templates/frontend/react-ssr/src/lib/queryClient.ts +25 -0
  421. package/templates/frontend/react-ssr/src/lib/utils.ts +6 -0
  422. package/templates/frontend/react-ssr/src/proxy.ts +31 -0
  423. package/templates/frontend/react-ssr/src/test/mocks/next-navigation.ts +16 -0
  424. package/templates/frontend/react-ssr/src/test/setup.ts +1 -0
  425. package/templates/frontend/react-ssr/src/test/utils.tsx +30 -0
  426. package/templates/frontend/react-ssr/src/types/index.ts +36 -0
  427. package/templates/frontend/react-ssr/tsconfig.json +41 -0
  428. package/templates/frontend/react-ssr/vitest.config.ts +41 -0
@@ -0,0 +1,216 @@
1
+ ---
2
+ name: zod-4
3
+ description: >
4
+ Zod 4 schema validation patterns.
5
+ Trigger: When creating or updating Zod v4 schemas for validation/parsing (forms, request payloads, adapters), including v3 -> v4 migration patterns.
6
+ license: Apache-2.0
7
+ metadata:
8
+ author: prowler-cloud
9
+ version: "1.0"
10
+ scope: [root, ui]
11
+ auto_invoke: "Creating Zod schemas"
12
+ allowed-tools: Read, Edit, Write, Glob, Grep, Bash, WebFetch, WebSearch, Task
13
+ ---
14
+
15
+ ## Breaking Changes from Zod 3
16
+
17
+ ```typescript
18
+ // ❌ Zod 3 (OLD)
19
+ z.string().email()
20
+ z.string().uuid()
21
+ z.string().url()
22
+ z.string().nonempty()
23
+ z.object({ name: z.string() }).required_error("Required")
24
+
25
+ // ✅ Zod 4 (NEW)
26
+ z.email()
27
+ z.uuid()
28
+ z.url()
29
+ z.string().min(1)
30
+ z.object({ name: z.string() }, { error: "Required" })
31
+ ```
32
+
33
+ ## Basic Schemas
34
+
35
+ ```typescript
36
+ import { z } from "zod";
37
+
38
+ // Primitives
39
+ const stringSchema = z.string();
40
+ const numberSchema = z.number();
41
+ const booleanSchema = z.boolean();
42
+ const dateSchema = z.date();
43
+
44
+ // Top-level validators (Zod 4)
45
+ const emailSchema = z.email();
46
+ const uuidSchema = z.uuid();
47
+ const urlSchema = z.url();
48
+
49
+ // With constraints
50
+ const nameSchema = z.string().min(1).max(100);
51
+ const ageSchema = z.number().int().positive().max(150);
52
+ const priceSchema = z.number().min(0).multipleOf(0.01);
53
+ ```
54
+
55
+ ## Object Schemas
56
+
57
+ ```typescript
58
+ const userSchema = z.object({
59
+ id: z.uuid(),
60
+ email: z.email({ error: "Invalid email address" }),
61
+ name: z.string().min(1, { error: "Name is required" }),
62
+ age: z.number().int().positive().optional(),
63
+ role: z.enum(["admin", "user", "guest"]),
64
+ metadata: z.record(z.string(), z.unknown()).optional(),
65
+ });
66
+
67
+ type User = z.infer<typeof userSchema>;
68
+
69
+ // Parsing
70
+ const user = userSchema.parse(data); // Throws on error
71
+ const result = userSchema.safeParse(data); // Returns { success, data/error }
72
+
73
+ if (result.success) {
74
+ console.log(result.data);
75
+ } else {
76
+ console.log(result.error.issues);
77
+ }
78
+ ```
79
+
80
+ ## Arrays and Records
81
+
82
+ ```typescript
83
+ // Arrays
84
+ const tagsSchema = z.array(z.string()).min(1).max(10);
85
+ const numbersSchema = z.array(z.number()).nonempty();
86
+
87
+ // Records (objects with dynamic keys)
88
+ const scoresSchema = z.record(z.string(), z.number());
89
+ // { [key: string]: number }
90
+
91
+ // Tuples
92
+ const coordinatesSchema = z.tuple([z.number(), z.number()]);
93
+ // [number, number]
94
+ ```
95
+
96
+ ## Unions and Discriminated Unions
97
+
98
+ ```typescript
99
+ // Simple union
100
+ const stringOrNumber = z.union([z.string(), z.number()]);
101
+
102
+ // Discriminated union (more efficient)
103
+ const resultSchema = z.discriminatedUnion("status", [
104
+ z.object({ status: z.literal("success"), data: z.unknown() }),
105
+ z.object({ status: z.literal("error"), error: z.string() }),
106
+ ]);
107
+ ```
108
+
109
+ ## Transformations
110
+
111
+ ```typescript
112
+ // Transform during parsing
113
+ const lowercaseEmail = z.email().transform(email => email.toLowerCase());
114
+
115
+ // Coercion (convert types)
116
+ const numberFromString = z.coerce.number(); // "42" → 42
117
+ const dateFromString = z.coerce.date(); // "2024-01-01" → Date
118
+
119
+ // Preprocessing
120
+ const trimmedString = z.preprocess(
121
+ val => typeof val === "string" ? val.trim() : val,
122
+ z.string()
123
+ );
124
+ ```
125
+
126
+ ## Refinements
127
+
128
+ ```typescript
129
+ const passwordSchema = z.string()
130
+ .min(8)
131
+ .refine(val => /[A-Z]/.test(val), {
132
+ message: "Must contain uppercase letter",
133
+ })
134
+ .refine(val => /[0-9]/.test(val), {
135
+ message: "Must contain number",
136
+ });
137
+
138
+ // With superRefine for multiple errors
139
+ const formSchema = z.object({
140
+ password: z.string(),
141
+ confirmPassword: z.string(),
142
+ }).superRefine((data, ctx) => {
143
+ if (data.password !== data.confirmPassword) {
144
+ ctx.addIssue({
145
+ code: z.ZodIssueCode.custom,
146
+ message: "Passwords don't match",
147
+ path: ["confirmPassword"],
148
+ });
149
+ }
150
+ });
151
+ ```
152
+
153
+ ## Optional and Nullable
154
+
155
+ ```typescript
156
+ // Optional (T | undefined)
157
+ z.string().optional()
158
+
159
+ // Nullable (T | null)
160
+ z.string().nullable()
161
+
162
+ // Both (T | null | undefined)
163
+ z.string().nullish()
164
+
165
+ // Default values
166
+ z.string().default("unknown")
167
+ z.number().default(() => Math.random())
168
+ ```
169
+
170
+ ## Error Handling
171
+
172
+ ```typescript
173
+ // Zod 4: Use 'error' param instead of 'message'
174
+ const schema = z.object({
175
+ name: z.string({ error: "Name must be a string" }),
176
+ email: z.email({ error: "Invalid email format" }),
177
+ age: z.number().min(18, { error: "Must be 18 or older" }),
178
+ });
179
+
180
+ // Custom error map
181
+ const customSchema = z.string({
182
+ error: (issue) => {
183
+ if (issue.code === "too_small") {
184
+ return "String is too short";
185
+ }
186
+ return "Invalid string";
187
+ },
188
+ });
189
+ ```
190
+
191
+ ## React Hook Form Integration
192
+
193
+ ```typescript
194
+ import { useForm } from "react-hook-form";
195
+ import { zodResolver } from "@hookform/resolvers/zod";
196
+
197
+ const schema = z.object({
198
+ email: z.email(),
199
+ password: z.string().min(8),
200
+ });
201
+
202
+ type FormData = z.infer<typeof schema>;
203
+
204
+ function Form() {
205
+ const { register, handleSubmit, formState: { errors } } = useForm<FormData>({
206
+ resolver: zodResolver(schema),
207
+ });
208
+
209
+ return (
210
+ <form onSubmit={handleSubmit(onSubmit)}>
211
+ <input {...register("email")} />
212
+ {errors.email && <span>{errors.email.message}</span>}
213
+ </form>
214
+ );
215
+ }
216
+ ```
@@ -0,0 +1,14 @@
1
+ node_modules
2
+ .next
3
+ .git
4
+ .gitignore
5
+ .dockerignore
6
+ Dockerfile
7
+ docker-compose.yml
8
+ README.md
9
+ .env*.local
10
+ coverage
11
+ prisma/migrations
12
+ .husky
13
+ .vscode
14
+ .idea
@@ -0,0 +1,9 @@
1
+ # Database
2
+ DATABASE_URL="mysql://huenei:huenei_password@localhost:3307/huenei_db"
3
+
4
+ # Auth.js
5
+ AUTH_SECRET="generate-with-openssl-rand-base64-32"
6
+ AUTH_TRUST_HOST=true
7
+
8
+ # App
9
+ NEXT_PUBLIC_APP_URL="http://localhost:3000"
@@ -0,0 +1 @@
1
+ npx lint-staged
@@ -0,0 +1,41 @@
1
+ FROM node:22-alpine AS base
2
+
3
+ FROM base AS deps
4
+ RUN apk add --no-cache libc6-compat
5
+ WORKDIR /app
6
+
7
+ COPY package.json pnpm-lock.yaml* ./
8
+ COPY prisma ./prisma/
9
+ RUN corepack enable pnpm && pnpm install --frozen-lockfile
10
+ RUN npx prisma generate
11
+
12
+ FROM base AS builder
13
+ WORKDIR /app
14
+ COPY --from=deps /app/node_modules ./node_modules
15
+ COPY . .
16
+
17
+ ENV NEXT_TELEMETRY_DISABLED=1
18
+ RUN corepack enable pnpm && pnpm build
19
+
20
+ FROM base AS runner
21
+ WORKDIR /app
22
+
23
+ ENV NODE_ENV=production
24
+ ENV NEXT_TELEMETRY_DISABLED=1
25
+
26
+ RUN addgroup --system --gid 1001 nodejs
27
+ RUN adduser --system --uid 1001 nextjs
28
+
29
+ COPY --from=builder /app/public ./public
30
+ COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
31
+ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
32
+ COPY --from=builder /app/prisma ./prisma
33
+
34
+ USER nextjs
35
+
36
+ EXPOSE 3000
37
+
38
+ ENV PORT=3000
39
+ ENV HOSTNAME="0.0.0.0"
40
+
41
+ CMD ["node", "server.js"]
@@ -0,0 +1,121 @@
1
+ # Huenei React SSR (Next.js)
2
+
3
+ Template de frontend con **Next.js 16**, App Router, Server Components, Server Actions, autenticación con Auth.js y base de datos MySQL con Prisma ORM.
4
+
5
+ ## Stack
6
+
7
+ | Tecnología | Versión | Uso |
8
+ |-----------|---------|-----|
9
+ | Next.js | 16 | Framework (App Router, SSR, Server Actions) |
10
+ | React | 19 | UI Library |
11
+ | TypeScript | 5.9 | Type Safety |
12
+ | Auth.js | v5 | Autenticación (Credentials + JWT) |
13
+ | Prisma | 6+ | ORM (MySQL) |
14
+ | MySQL | 8.4 | Base de datos (Docker) |
15
+ | Tailwind CSS | v4 | Estilos utility-first |
16
+ | DaisyUI | 5 | Componentes CSS (tema Huenei) |
17
+ | shadcn/ui | latest | Componentes React (Radix UI) |
18
+ | TanStack Query | v5 | Estado servidor client-side |
19
+ | TanStack Table | v8 | Tablas con sort/filter |
20
+ | React Hook Form | v7 | Formularios |
21
+ | Zod | v4 | Validación de schemas |
22
+ | Recharts | v3 | Gráficos |
23
+ | Vitest | v4 | Testing |
24
+ | Testing Library | v16 | Testing de componentes |
25
+
26
+ ## Requisitos
27
+
28
+ - Node.js 20+
29
+ - pnpm
30
+ - Docker (para MySQL)
31
+
32
+ ## Setup rápido
33
+
34
+ ```bash
35
+ # 1. Levantar MySQL
36
+ docker compose up -d
37
+
38
+ # 2. Instalar dependencias
39
+ pnpm install
40
+
41
+ # 3. Configurar variables de entorno
42
+ cp .env.example .env
43
+
44
+ # 4. Inicializar base de datos
45
+ pnpm db:push
46
+ pnpm db:seed
47
+
48
+ # 5. Ejecutar en desarrollo
49
+ pnpm dev
50
+ ```
51
+
52
+ La aplicación estará disponible en `http://localhost:3000`.
53
+
54
+ ## Credenciales de prueba
55
+
56
+ | Email | Password |
57
+ |-------|----------|
58
+ | admin@huenei.com | 123456 |
59
+ | dev@huenei.com | 123456 |
60
+
61
+ ## Scripts
62
+
63
+ | Script | Descripción |
64
+ |--------|-------------|
65
+ | `pnpm dev` | Servidor de desarrollo (Turbopack) |
66
+ | `pnpm build` | Build de producción |
67
+ | `pnpm start` | Ejecutar build de producción |
68
+ | `pnpm lint` | Ejecutar ESLint |
69
+ | `pnpm test` | Ejecutar tests con Vitest |
70
+ | `pnpm test:coverage` | Tests con reporte de coverage |
71
+ | `pnpm db:generate` | Generar Prisma Client |
72
+ | `pnpm db:migrate` | Ejecutar migraciones |
73
+ | `pnpm db:push` | Push schema a la DB (dev) |
74
+ | `pnpm db:seed` | Cargar datos de ejemplo |
75
+ | `pnpm db:studio` | Abrir Prisma Studio |
76
+
77
+ ## Estructura
78
+
79
+ ```
80
+ src/
81
+ ├── app/ # App Router
82
+ │ ├── api/auth/ # Auth.js route handler
83
+ │ ├── auth/ # Páginas de autenticación
84
+ │ ├── (authenticated)/ # Rutas protegidas con sidebar
85
+ │ │ ├── dashboard/ # Dashboard con gráficos
86
+ │ │ ├── perfil/ # Perfil de usuario
87
+ │ │ ├── proyectos-crud/ # CRUD de proyectos (Server Actions)
88
+ │ │ └── ui-components/ # Showcase de componentes
89
+ │ ├── contacto/ # Formulario de contacto
90
+ │ ├── layout.tsx # Root layout
91
+ │ └── page.tsx # Home page
92
+ ├── actions/ # Server Actions
93
+ │ ├── auth.ts # signIn, signOut, register
94
+ │ ├── proyectos.ts # CRUD con Zod + revalidación
95
+ │ └── contacto.ts # Envío de formulario
96
+ ├── auth.ts # Configuración Auth.js
97
+ ├── middleware.ts # Protección de rutas
98
+ ├── components/
99
+ │ ├── layout/ # Navbar, Sidebar
100
+ │ ├── providers.tsx # QueryClient, Session, Toast
101
+ │ └── ui/ # 14 componentes shadcn/ui
102
+ ├── hooks/ # Custom hooks
103
+ ├── lib/ # Prisma client, utils, queryClient
104
+ ├── data/ # Datos estáticos del dashboard
105
+ └── types/ # Tipos TypeScript
106
+ ```
107
+
108
+ ## Deployment (Docker)
109
+
110
+ ```bash
111
+ # Build de la imagen
112
+ docker build -t huenei-react-ssr .
113
+
114
+ # Ejecutar
115
+ docker run -p 3000:3000 \
116
+ -e DATABASE_URL="mysql://user:pass@host:3306/db" \
117
+ -e AUTH_SECRET="your-secret" \
118
+ huenei-react-ssr
119
+ ```
120
+
121
+ El Dockerfile usa multi-stage build con standalone output para imágenes optimizadas.
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema.json",
3
+ "style": "new-york",
4
+ "rsc": true,
5
+ "tsx": true,
6
+ "tailwind": {
7
+ "config": "",
8
+ "css": "src/app/globals.css",
9
+ "baseColor": "neutral",
10
+ "cssVariables": true,
11
+ "prefix": ""
12
+ },
13
+ "iconLibrary": "lucide",
14
+ "aliases": {
15
+ "components": "@/components",
16
+ "utils": "@/lib/utils",
17
+ "ui": "@/components/ui",
18
+ "lib": "@/lib",
19
+ "hooks": "@/hooks"
20
+ },
21
+ "registries": {}
22
+ }
@@ -0,0 +1,21 @@
1
+ services:
2
+ mysql:
3
+ image: mysql:8.4
4
+ restart: unless-stopped
5
+ environment:
6
+ MYSQL_ROOT_PASSWORD: rootpassword
7
+ MYSQL_DATABASE: huenei_db
8
+ MYSQL_USER: huenei
9
+ MYSQL_PASSWORD: huenei_password
10
+ ports:
11
+ - "3307:3306"
12
+ volumes:
13
+ - mysql_data:/var/lib/mysql
14
+ healthcheck:
15
+ test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
16
+ interval: 10s
17
+ timeout: 5s
18
+ retries: 5
19
+
20
+ volumes:
21
+ mysql_data:
@@ -0,0 +1,26 @@
1
+ import js from "@eslint/js";
2
+ import tseslint from "typescript-eslint";
3
+ import prettier from "eslint-config-prettier";
4
+ import { defineConfig, globalIgnores } from "eslint/config";
5
+ import nextPlugin from "eslint-config-next";
6
+
7
+ export default defineConfig([
8
+ globalIgnores([".next", "node_modules", "coverage"]),
9
+
10
+ {
11
+ files: ["**/*.{ts,tsx}"],
12
+ languageOptions: {
13
+ ecmaVersion: "latest",
14
+ sourceType: "module",
15
+ },
16
+ extends: [
17
+ js.configs.recommended,
18
+ ...tseslint.configs.recommended,
19
+ prettier,
20
+ ],
21
+ rules: {
22
+ "@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
23
+ "@typescript-eslint/no-explicit-any": "error",
24
+ },
25
+ },
26
+ ]);
@@ -0,0 +1,7 @@
1
+ import type { NextConfig } from "next";
2
+
3
+ const nextConfig: NextConfig = {
4
+ output: "standalone",
5
+ };
6
+
7
+ export default nextConfig;
@@ -0,0 +1,86 @@
1
+ {
2
+ "name": "huenei-react-ssr",
3
+ "private": true,
4
+ "version": "0.0.0",
5
+ "scripts": {
6
+ "dev": "next dev --turbopack",
7
+ "build": "next build",
8
+ "start": "next start",
9
+ "lint": "next lint",
10
+ "test": "vitest",
11
+ "test:coverage": "vitest run --coverage",
12
+ "db:generate": "prisma generate",
13
+ "db:migrate": "prisma migrate dev",
14
+ "db:push": "prisma db push",
15
+ "db:seed": "prisma db seed",
16
+ "db:studio": "prisma studio",
17
+ "prepare": "husky"
18
+ },
19
+ "lint-staged": {
20
+ "*.{ts,tsx}": [
21
+ "eslint --fix",
22
+ "prettier --write"
23
+ ],
24
+ "*.{json,css,md}": [
25
+ "prettier --write"
26
+ ]
27
+ },
28
+ "dependencies": {
29
+ "@auth/prisma-adapter": "^2.9.1",
30
+ "@hookform/resolvers": "^5.2.2",
31
+ "@prisma/adapter-mariadb": "^7.5.0",
32
+ "@prisma/client": "^7.5.0",
33
+ "@radix-ui/react-dialog": "^1.1.14",
34
+ "@radix-ui/react-label": "^2.1.8",
35
+ "@radix-ui/react-separator": "^1.1.8",
36
+ "@radix-ui/react-slot": "^1.2.4",
37
+ "@radix-ui/react-tabs": "^1.1.13",
38
+ "@tanstack/react-query": "^5.90.16",
39
+ "@tanstack/react-table": "^8.21.3",
40
+ "bcryptjs": "^2.4.3",
41
+ "class-variance-authority": "^0.7.1",
42
+ "clsx": "^2.1.1",
43
+ "lucide-react": "^0.562.0",
44
+ "next": "^16.1.7",
45
+ "next-auth": "^5.0.0-beta.25",
46
+ "radix-ui": "^1.4.3",
47
+ "react": "^19.2.0",
48
+ "react-dom": "^19.2.0",
49
+ "react-hook-form": "^7.71.0",
50
+ "react-toastify": "^11.0.5",
51
+ "recharts": "^3.7.0",
52
+ "tailwind-merge": "^3.4.0",
53
+ "tailwindcss": "^4.1.18",
54
+ "zod": "^4.3.5"
55
+ },
56
+ "devDependencies": {
57
+ "@eslint/js": "^9.39.1",
58
+ "@tailwindcss/postcss": "^4.1.18",
59
+ "@tanstack/react-query-devtools": "^5.91.2",
60
+ "@testing-library/jest-dom": "^6.9.1",
61
+ "@testing-library/react": "^16.3.1",
62
+ "@testing-library/user-event": "^14.6.1",
63
+ "@types/bcryptjs": "^2.4.6",
64
+ "@types/jsdom": "^27.0.0",
65
+ "@types/node": "^24.10.1",
66
+ "@types/react": "^19.2.5",
67
+ "@types/react-dom": "^19.2.3",
68
+ "@vitest/coverage-v8": "^4.0.18",
69
+ "@vitest/ui": "^4.0.17",
70
+ "daisyui": "^5.5.14",
71
+ "eslint": "^9.39.1",
72
+ "eslint-config-next": "^16.1.7",
73
+ "eslint-config-prettier": "^10.1.5",
74
+ "husky": "^9.1.7",
75
+ "jsdom": "^27.4.0",
76
+ "lint-staged": "^16.2.7",
77
+ "prettier": "^3.5.3",
78
+ "dotenv": "^16.5.0",
79
+ "prisma": "^7.5.0",
80
+ "tsx": "^4.19.2",
81
+ "tw-animate-css": "^1.4.0",
82
+ "typescript": "~5.9.3",
83
+ "typescript-eslint": "^8.46.4",
84
+ "vitest": "^4.0.17"
85
+ }
86
+ }
@@ -0,0 +1,5 @@
1
+ export default {
2
+ plugins: {
3
+ "@tailwindcss/postcss": {},
4
+ },
5
+ };
@@ -0,0 +1,75 @@
1
+ generator client {
2
+ provider = "prisma-client-js"
3
+ }
4
+
5
+ datasource db {
6
+ provider = "mysql"
7
+ }
8
+
9
+ model User {
10
+ id String @id @default(cuid())
11
+ name String?
12
+ email String @unique
13
+ emailVerified DateTime?
14
+ password String
15
+ image String?
16
+ createdAt DateTime @default(now())
17
+ updatedAt DateTime @updatedAt
18
+
19
+ accounts Account[]
20
+ sessions Session[]
21
+ proyectos Proyecto[]
22
+ }
23
+
24
+ model Account {
25
+ id String @id @default(cuid())
26
+ userId String
27
+ type String
28
+ provider String
29
+ providerAccountId String
30
+ refresh_token String? @db.Text
31
+ access_token String? @db.Text
32
+ expires_at Int?
33
+ token_type String?
34
+ scope String?
35
+ id_token String? @db.Text
36
+ session_state String?
37
+
38
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
39
+
40
+ @@unique([provider, providerAccountId])
41
+ }
42
+
43
+ model Session {
44
+ id String @id @default(cuid())
45
+ sessionToken String @unique
46
+ userId String
47
+ expires DateTime
48
+
49
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
50
+ }
51
+
52
+ model VerificationToken {
53
+ identifier String
54
+ token String @unique
55
+ expires DateTime
56
+
57
+ @@unique([identifier, token])
58
+ }
59
+
60
+ model Proyecto {
61
+ id String @id @default(cuid())
62
+ titulo String
63
+ descripcion String @db.Text
64
+ tecnologias String
65
+ estado String @default("En Desarrollo")
66
+ presupuesto Float @default(0)
67
+ fecha DateTime @default(now())
68
+ userId String
69
+ createdAt DateTime @default(now())
70
+ updatedAt DateTime @updatedAt
71
+
72
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
73
+
74
+ @@index([userId])
75
+ }