create-huenei-template 0.2.13 → 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.
- package/dist/config/templates.js +7 -0
- package/dist/templates/cursor/.cursor/agents/config-drift-analyzer.md +152 -0
- package/dist/templates/cursor/.cursor/commands/actualizar-reglas.md +580 -0
- package/dist/templates/frontend/react-ssr/.cursor/agents/accessibility-reviewer.md +22 -0
- package/dist/templates/frontend/react-ssr/.cursor/agents/nextjs-code-reviewer.md +24 -0
- package/dist/templates/frontend/react-ssr/.cursor/agents/react-test-expert.md +32 -0
- package/dist/templates/frontend/react-ssr/.cursor/agents/security-auditor.md +25 -0
- package/dist/templates/frontend/react-ssr/.cursor/commands/new-component.md +97 -0
- package/dist/templates/frontend/react-ssr/.cursor/commands/new-page.md +95 -0
- package/dist/templates/frontend/react-ssr/.cursor/commands/new-prisma-model.md +66 -0
- package/dist/templates/frontend/react-ssr/.cursor/commands/new-server-action.md +89 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/auto-format.ts +64 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/auto-test-on-stop.ts +94 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/block-dangerous-commands.ts +120 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/ensure-tests-exist.ts +209 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/protect-sensitive-files.ts +101 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/session-context.ts +93 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/tsconfig.json +10 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks.json +41 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/auth-patterns.mdc +48 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/code-quality.mdc +39 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/naming-conventions.mdc +32 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/nextjs-architecture.mdc +51 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/prisma-standards.mdc +53 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/react-conventions.mdc +52 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/testing-conventions.mdc +53 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/ui-stack.mdc +47 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/authjs-skills/SKILL.md +1149 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/SKILL.md +189 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/daisyUI5.skill +0 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/creating-components.md +412 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/data-display.md +341 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/feedback.md +240 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/input.md +283 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/layout.md +275 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/navigation.md +338 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/scripts/daisy-meta.ts +220 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/scripts/generate-daisy-safelist.ts +152 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/docker-expert/SKILL.md +413 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/nextjs-app-router-patterns/SKILL.md +537 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/SKILL.md +243 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-execute.md +75 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-pull.md +185 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-push.md +148 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-seed.md +191 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/debug.md +46 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/dev.md +157 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/format.md +48 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/generate.md +147 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/init.md +118 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-deploy.md +127 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-dev.md +143 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-diff.md +89 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-reset.md +72 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-resolve.md +57 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-status.md +65 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/studio.md +122 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/validate.md +53 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/SKILL.md +216 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/client-methods.md +221 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/constructor.md +185 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/filters.md +256 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/model-queries.md +281 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/query-options.md +276 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/raw-queries.md +194 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/relations.md +308 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/transactions.md +184 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/AGENTS.md +97 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/README.md +138 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/SKILL.md +116 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/assets/templates/_template.md +26 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/_sections.md +46 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-devtools-performance.md +69 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-formprovider-memo.md +78 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-testing-wrapper.md +63 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-complete-default-objects.md +66 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-separate-crud-operations.md +76 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-unique-fieldarray-per-name.md +58 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-use-field-id-as-key.md +54 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-virtualization-formprovider.md +64 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-avoid-double-registration.md +46 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-controller-field-props.md +56 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-local-state-combination.md +69 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-single-usecontroller-per-component.md +62 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-usecontroller-isolation.md +64 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-async-default-values.md +69 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-default-values.md +57 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-revalidate-mode.md +48 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-should-unregister.md +62 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-useeffect-dependency.md +54 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-validation-mode.md +51 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-avoid-isvalid-with-onsubmit.md +58 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-destructure-formstate.md +48 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-getfieldstate-for-single-field.md +49 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-subscribe-to-specific-fields.md +54 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-useformstate-isolation.md +62 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-mui-controller-pattern.md +59 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-shadcn-form-import.md +64 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-shadcn-select-wiring.md +64 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-value-transform.md +59 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-avoid-watch-in-render.md +48 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-deep-subscription.md +62 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-useformcontext-sparingly.md +58 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-default-value.md +50 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-over-watch.md +58 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-with-getvalues.md +54 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-watch-specific-fields.md +54 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-delay-error.md +52 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-dynamic-schema-factory.md +57 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-error-message-strategy.md +65 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-inline-vs-resolver.md +63 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-native-validation.md +60 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-resolver-caching.md +58 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/recharts/SKILL.md +713 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/recharts/references/api_reference.md +1121 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/recharts/references/best_practices.md +782 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/recharts/references/examples.md +940 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/SKILL.md +114 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-gc-time.md +93 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-invalidation.md +116 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-placeholder-vs-initial.md +156 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-stale-time.md +80 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/err-error-boundaries.md +150 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/inf-page-params.md +132 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-invalidate-queries.md +118 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-mutation-state.md +169 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-optimistic-updates.md +137 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/network-mode.md +179 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/parallel-use-queries.md +152 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/perf-select-transform.md +144 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/persist-queries.md +194 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/pf-intent-prefetch.md +143 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-array-structure.md +50 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-factory-pattern.md +102 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-hierarchical-organization.md +76 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-include-dependencies.md +62 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-serializable.md +93 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/query-cancellation.md +171 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/ssr-dehydration.md +158 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-table/SKILL.md +582 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/zod-4/SKILL.md +216 -0
- package/dist/templates/frontend/react-ssr/.dockerignore +14 -0
- package/dist/templates/frontend/react-ssr/.env.example +9 -0
- package/dist/templates/frontend/react-ssr/.husky/pre-commit +1 -0
- package/dist/templates/frontend/react-ssr/Dockerfile +41 -0
- package/dist/templates/frontend/react-ssr/README.md +121 -0
- package/dist/templates/frontend/react-ssr/components.json +22 -0
- package/dist/templates/frontend/react-ssr/docker-compose.yml +21 -0
- package/dist/templates/frontend/react-ssr/eslint.config.mjs +26 -0
- package/dist/templates/frontend/react-ssr/next.config.ts +7 -0
- package/dist/templates/frontend/react-ssr/package.json +86 -0
- package/dist/templates/frontend/react-ssr/postcss.config.mjs +5 -0
- package/dist/templates/frontend/react-ssr/prisma/schema.prisma +75 -0
- package/dist/templates/frontend/react-ssr/prisma/seed.ts +109 -0
- package/dist/templates/frontend/react-ssr/prisma.config.ts +17 -0
- package/dist/templates/frontend/react-ssr/skills-lock.json +65 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/components/ui/badge.test.tsx +26 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/components/ui/button.test.tsx +38 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/components/ui/card.test.tsx +39 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/components/ui/input.test.tsx +32 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/hooks/useLocalStorage.test.ts +53 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/lib/queryClient.test.ts +19 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/lib/utils.test.ts +24 -0
- package/dist/templates/frontend/react-ssr/src/actions/auth.ts +91 -0
- package/dist/templates/frontend/react-ssr/src/actions/contacto.ts +46 -0
- package/dist/templates/frontend/react-ssr/src/actions/proyectos.ts +159 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/dashboard/dashboard-client.tsx +321 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/dashboard/page.tsx +48 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/layout.tsx +34 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/perfil/page.tsx +85 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/proyectos-crud/page.tsx +23 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/proyectos-crud/proyectos-crud-client.tsx +472 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/ui-components/page.tsx +358 -0
- package/dist/templates/frontend/react-ssr/src/app/api/auth/[...nextauth]/route.ts +3 -0
- package/dist/templates/frontend/react-ssr/src/app/auth/iniciar-sesion/page.tsx +148 -0
- package/dist/templates/frontend/react-ssr/src/app/auth/recuperar-password/page.tsx +100 -0
- package/dist/templates/frontend/react-ssr/src/app/auth/registro/page.tsx +154 -0
- package/dist/templates/frontend/react-ssr/src/app/contacto/contacto-form.tsx +189 -0
- package/dist/templates/frontend/react-ssr/src/app/contacto/page.tsx +11 -0
- package/dist/templates/frontend/react-ssr/src/app/globals.css +99 -0
- package/dist/templates/frontend/react-ssr/src/app/layout.tsx +22 -0
- package/dist/templates/frontend/react-ssr/src/app/loading.tsx +7 -0
- package/dist/templates/frontend/react-ssr/src/app/not-found.tsx +14 -0
- package/dist/templates/frontend/react-ssr/src/app/page.tsx +331 -0
- package/dist/templates/frontend/react-ssr/src/app/proyectos/page.tsx +178 -0
- package/dist/templates/frontend/react-ssr/src/auth.ts +64 -0
- package/dist/templates/frontend/react-ssr/src/components/layout/navbar.tsx +68 -0
- package/dist/templates/frontend/react-ssr/src/components/layout/sidebar.tsx +109 -0
- package/dist/templates/frontend/react-ssr/src/components/layout/sign-out-button.tsx +16 -0
- package/dist/templates/frontend/react-ssr/src/components/providers.tsx +33 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/avatar.tsx +53 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/badge.tsx +42 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/breadcrumb.tsx +114 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/button.tsx +58 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/card.tsx +95 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/dialog.tsx +136 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/form.tsx +168 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/input.tsx +22 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/label.tsx +26 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/password-input.tsx +43 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/separator.tsx +30 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/table.tsx +240 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/tabs.tsx +76 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/textarea.tsx +21 -0
- package/dist/templates/frontend/react-ssr/src/data/dashboard.ts +179 -0
- package/dist/templates/frontend/react-ssr/src/hooks/useLocalStorage.ts +38 -0
- package/dist/templates/frontend/react-ssr/src/lib/prisma.ts +24 -0
- package/dist/templates/frontend/react-ssr/src/lib/queryClient.ts +25 -0
- package/dist/templates/frontend/react-ssr/src/lib/utils.ts +6 -0
- package/dist/templates/frontend/react-ssr/src/proxy.ts +31 -0
- package/dist/templates/frontend/react-ssr/src/test/mocks/next-navigation.ts +16 -0
- package/dist/templates/frontend/react-ssr/src/test/setup.ts +1 -0
- package/dist/templates/frontend/react-ssr/src/test/utils.tsx +30 -0
- package/dist/templates/frontend/react-ssr/src/types/index.ts +36 -0
- package/dist/templates/frontend/react-ssr/tsconfig.json +41 -0
- package/dist/templates/frontend/react-ssr/vitest.config.ts +41 -0
- package/package.json +1 -1
- package/templates/cursor/.cursor/agents/config-drift-analyzer.md +152 -0
- package/templates/cursor/.cursor/commands/actualizar-reglas.md +580 -0
- package/templates/frontend/react-ssr/.cursor/agents/accessibility-reviewer.md +22 -0
- package/templates/frontend/react-ssr/.cursor/agents/nextjs-code-reviewer.md +24 -0
- package/templates/frontend/react-ssr/.cursor/agents/react-test-expert.md +32 -0
- package/templates/frontend/react-ssr/.cursor/agents/security-auditor.md +25 -0
- package/templates/frontend/react-ssr/.cursor/commands/new-component.md +97 -0
- package/templates/frontend/react-ssr/.cursor/commands/new-page.md +95 -0
- package/templates/frontend/react-ssr/.cursor/commands/new-prisma-model.md +66 -0
- package/templates/frontend/react-ssr/.cursor/commands/new-server-action.md +89 -0
- package/templates/frontend/react-ssr/.cursor/hooks/auto-format.ts +64 -0
- package/templates/frontend/react-ssr/.cursor/hooks/auto-test-on-stop.ts +94 -0
- package/templates/frontend/react-ssr/.cursor/hooks/block-dangerous-commands.ts +120 -0
- package/templates/frontend/react-ssr/.cursor/hooks/ensure-tests-exist.ts +209 -0
- package/templates/frontend/react-ssr/.cursor/hooks/protect-sensitive-files.ts +101 -0
- package/templates/frontend/react-ssr/.cursor/hooks/session-context.ts +93 -0
- package/templates/frontend/react-ssr/.cursor/hooks/tsconfig.json +10 -0
- package/templates/frontend/react-ssr/.cursor/hooks.json +41 -0
- package/templates/frontend/react-ssr/.cursor/rules/auth-patterns.mdc +48 -0
- package/templates/frontend/react-ssr/.cursor/rules/code-quality.mdc +39 -0
- package/templates/frontend/react-ssr/.cursor/rules/naming-conventions.mdc +32 -0
- package/templates/frontend/react-ssr/.cursor/rules/nextjs-architecture.mdc +51 -0
- package/templates/frontend/react-ssr/.cursor/rules/prisma-standards.mdc +53 -0
- package/templates/frontend/react-ssr/.cursor/rules/react-conventions.mdc +52 -0
- package/templates/frontend/react-ssr/.cursor/rules/testing-conventions.mdc +53 -0
- package/templates/frontend/react-ssr/.cursor/rules/ui-stack.mdc +47 -0
- package/templates/frontend/react-ssr/.cursor/skills/authjs-skills/SKILL.md +1149 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/SKILL.md +189 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/daisyUI5.skill +0 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/creating-components.md +412 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/data-display.md +341 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/feedback.md +240 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/input.md +283 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/layout.md +275 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/navigation.md +338 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/scripts/daisy-meta.ts +220 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/scripts/generate-daisy-safelist.ts +152 -0
- package/templates/frontend/react-ssr/.cursor/skills/docker-expert/SKILL.md +413 -0
- package/templates/frontend/react-ssr/.cursor/skills/nextjs-app-router-patterns/SKILL.md +537 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/SKILL.md +243 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-execute.md +75 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-pull.md +185 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-push.md +148 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-seed.md +191 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/debug.md +46 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/dev.md +157 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/format.md +48 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/generate.md +147 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/init.md +118 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-deploy.md +127 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-dev.md +143 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-diff.md +89 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-reset.md +72 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-resolve.md +57 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-status.md +65 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/studio.md +122 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/validate.md +53 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/SKILL.md +216 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/client-methods.md +221 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/constructor.md +185 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/filters.md +256 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/model-queries.md +281 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/query-options.md +276 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/raw-queries.md +194 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/relations.md +308 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/transactions.md +184 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/AGENTS.md +97 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/README.md +138 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/SKILL.md +116 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/assets/templates/_template.md +26 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/_sections.md +46 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-devtools-performance.md +69 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-formprovider-memo.md +78 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-testing-wrapper.md +63 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-complete-default-objects.md +66 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-separate-crud-operations.md +76 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-unique-fieldarray-per-name.md +58 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-use-field-id-as-key.md +54 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-virtualization-formprovider.md +64 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-avoid-double-registration.md +46 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-controller-field-props.md +56 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-local-state-combination.md +69 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-single-usecontroller-per-component.md +62 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-usecontroller-isolation.md +64 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-async-default-values.md +69 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-default-values.md +57 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-revalidate-mode.md +48 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-should-unregister.md +62 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-useeffect-dependency.md +54 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-validation-mode.md +51 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-avoid-isvalid-with-onsubmit.md +58 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-destructure-formstate.md +48 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-getfieldstate-for-single-field.md +49 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-subscribe-to-specific-fields.md +54 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-useformstate-isolation.md +62 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-mui-controller-pattern.md +59 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-shadcn-form-import.md +64 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-shadcn-select-wiring.md +64 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-value-transform.md +59 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-avoid-watch-in-render.md +48 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-deep-subscription.md +62 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-useformcontext-sparingly.md +58 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-default-value.md +50 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-over-watch.md +58 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-with-getvalues.md +54 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-watch-specific-fields.md +54 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-delay-error.md +52 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-dynamic-schema-factory.md +57 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-error-message-strategy.md +65 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-inline-vs-resolver.md +63 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-native-validation.md +60 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-resolver-caching.md +58 -0
- package/templates/frontend/react-ssr/.cursor/skills/recharts/SKILL.md +713 -0
- package/templates/frontend/react-ssr/.cursor/skills/recharts/references/api_reference.md +1121 -0
- package/templates/frontend/react-ssr/.cursor/skills/recharts/references/best_practices.md +782 -0
- package/templates/frontend/react-ssr/.cursor/skills/recharts/references/examples.md +940 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/SKILL.md +114 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-gc-time.md +93 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-invalidation.md +116 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-placeholder-vs-initial.md +156 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-stale-time.md +80 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/err-error-boundaries.md +150 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/inf-page-params.md +132 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-invalidate-queries.md +118 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-mutation-state.md +169 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-optimistic-updates.md +137 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/network-mode.md +179 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/parallel-use-queries.md +152 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/perf-select-transform.md +144 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/persist-queries.md +194 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/pf-intent-prefetch.md +143 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-array-structure.md +50 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-factory-pattern.md +102 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-hierarchical-organization.md +76 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-include-dependencies.md +62 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-serializable.md +93 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/query-cancellation.md +171 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/ssr-dehydration.md +158 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-table/SKILL.md +582 -0
- package/templates/frontend/react-ssr/.cursor/skills/zod-4/SKILL.md +216 -0
- package/templates/frontend/react-ssr/.dockerignore +14 -0
- package/templates/frontend/react-ssr/.env.example +9 -0
- package/templates/frontend/react-ssr/.husky/pre-commit +1 -0
- package/templates/frontend/react-ssr/Dockerfile +41 -0
- package/templates/frontend/react-ssr/README.md +121 -0
- package/templates/frontend/react-ssr/components.json +22 -0
- package/templates/frontend/react-ssr/docker-compose.yml +21 -0
- package/templates/frontend/react-ssr/eslint.config.mjs +26 -0
- package/templates/frontend/react-ssr/next.config.ts +7 -0
- package/templates/frontend/react-ssr/package.json +86 -0
- package/templates/frontend/react-ssr/postcss.config.mjs +5 -0
- package/templates/frontend/react-ssr/prisma/schema.prisma +75 -0
- package/templates/frontend/react-ssr/prisma/seed.ts +109 -0
- package/templates/frontend/react-ssr/prisma.config.ts +17 -0
- package/templates/frontend/react-ssr/skills-lock.json +65 -0
- package/templates/frontend/react-ssr/src/__tests__/components/ui/badge.test.tsx +26 -0
- package/templates/frontend/react-ssr/src/__tests__/components/ui/button.test.tsx +38 -0
- package/templates/frontend/react-ssr/src/__tests__/components/ui/card.test.tsx +39 -0
- package/templates/frontend/react-ssr/src/__tests__/components/ui/input.test.tsx +32 -0
- package/templates/frontend/react-ssr/src/__tests__/hooks/useLocalStorage.test.ts +53 -0
- package/templates/frontend/react-ssr/src/__tests__/lib/queryClient.test.ts +19 -0
- package/templates/frontend/react-ssr/src/__tests__/lib/utils.test.ts +24 -0
- package/templates/frontend/react-ssr/src/actions/auth.ts +91 -0
- package/templates/frontend/react-ssr/src/actions/contacto.ts +46 -0
- package/templates/frontend/react-ssr/src/actions/proyectos.ts +159 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/dashboard/dashboard-client.tsx +321 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/dashboard/page.tsx +48 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/layout.tsx +34 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/perfil/page.tsx +85 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/proyectos-crud/page.tsx +23 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/proyectos-crud/proyectos-crud-client.tsx +472 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/ui-components/page.tsx +358 -0
- package/templates/frontend/react-ssr/src/app/api/auth/[...nextauth]/route.ts +3 -0
- package/templates/frontend/react-ssr/src/app/auth/iniciar-sesion/page.tsx +148 -0
- package/templates/frontend/react-ssr/src/app/auth/recuperar-password/page.tsx +100 -0
- package/templates/frontend/react-ssr/src/app/auth/registro/page.tsx +154 -0
- package/templates/frontend/react-ssr/src/app/contacto/contacto-form.tsx +189 -0
- package/templates/frontend/react-ssr/src/app/contacto/page.tsx +11 -0
- package/templates/frontend/react-ssr/src/app/globals.css +99 -0
- package/templates/frontend/react-ssr/src/app/layout.tsx +22 -0
- package/templates/frontend/react-ssr/src/app/loading.tsx +7 -0
- package/templates/frontend/react-ssr/src/app/not-found.tsx +14 -0
- package/templates/frontend/react-ssr/src/app/page.tsx +331 -0
- package/templates/frontend/react-ssr/src/app/proyectos/page.tsx +178 -0
- package/templates/frontend/react-ssr/src/auth.ts +64 -0
- package/templates/frontend/react-ssr/src/components/layout/navbar.tsx +68 -0
- package/templates/frontend/react-ssr/src/components/layout/sidebar.tsx +109 -0
- package/templates/frontend/react-ssr/src/components/layout/sign-out-button.tsx +16 -0
- package/templates/frontend/react-ssr/src/components/providers.tsx +33 -0
- package/templates/frontend/react-ssr/src/components/ui/avatar.tsx +53 -0
- package/templates/frontend/react-ssr/src/components/ui/badge.tsx +42 -0
- package/templates/frontend/react-ssr/src/components/ui/breadcrumb.tsx +114 -0
- package/templates/frontend/react-ssr/src/components/ui/button.tsx +58 -0
- package/templates/frontend/react-ssr/src/components/ui/card.tsx +95 -0
- package/templates/frontend/react-ssr/src/components/ui/dialog.tsx +136 -0
- package/templates/frontend/react-ssr/src/components/ui/form.tsx +168 -0
- package/templates/frontend/react-ssr/src/components/ui/input.tsx +22 -0
- package/templates/frontend/react-ssr/src/components/ui/label.tsx +26 -0
- package/templates/frontend/react-ssr/src/components/ui/password-input.tsx +43 -0
- package/templates/frontend/react-ssr/src/components/ui/separator.tsx +30 -0
- package/templates/frontend/react-ssr/src/components/ui/table.tsx +240 -0
- package/templates/frontend/react-ssr/src/components/ui/tabs.tsx +76 -0
- package/templates/frontend/react-ssr/src/components/ui/textarea.tsx +21 -0
- package/templates/frontend/react-ssr/src/data/dashboard.ts +179 -0
- package/templates/frontend/react-ssr/src/hooks/useLocalStorage.ts +38 -0
- package/templates/frontend/react-ssr/src/lib/prisma.ts +24 -0
- package/templates/frontend/react-ssr/src/lib/queryClient.ts +25 -0
- package/templates/frontend/react-ssr/src/lib/utils.ts +6 -0
- package/templates/frontend/react-ssr/src/proxy.ts +31 -0
- package/templates/frontend/react-ssr/src/test/mocks/next-navigation.ts +16 -0
- package/templates/frontend/react-ssr/src/test/setup.ts +1 -0
- package/templates/frontend/react-ssr/src/test/utils.tsx +30 -0
- package/templates/frontend/react-ssr/src/types/index.ts +36 -0
- package/templates/frontend/react-ssr/tsconfig.json +41 -0
- 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 @@
|
|
|
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,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,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
|
+
}
|