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,127 @@
|
|
|
1
|
+
# prisma migrate deploy
|
|
2
|
+
|
|
3
|
+
Applies pending migrations in production/staging environments.
|
|
4
|
+
|
|
5
|
+
## Command
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
prisma migrate deploy
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## What It Does
|
|
12
|
+
|
|
13
|
+
- Applies all pending migrations from `prisma/migrations/`
|
|
14
|
+
- Updates `_prisma_migrations` table
|
|
15
|
+
- Does NOT generate new migrations
|
|
16
|
+
- Does NOT run seed scripts
|
|
17
|
+
- Safe for CI/CD and production
|
|
18
|
+
|
|
19
|
+
## Options
|
|
20
|
+
|
|
21
|
+
| Option | Description |
|
|
22
|
+
|--------|-------------|
|
|
23
|
+
| `--schema` | Custom path to your Prisma schema |
|
|
24
|
+
| `--config` | Custom path to your Prisma config file |
|
|
25
|
+
|
|
26
|
+
## When to Use
|
|
27
|
+
|
|
28
|
+
- Production deployments
|
|
29
|
+
- Staging environments
|
|
30
|
+
- CI/CD pipelines
|
|
31
|
+
- Any non-development environment
|
|
32
|
+
|
|
33
|
+
## Examples
|
|
34
|
+
|
|
35
|
+
### Basic deployment
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
prisma migrate deploy
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### In CI/CD pipeline
|
|
42
|
+
|
|
43
|
+
```yaml
|
|
44
|
+
# GitHub Actions example
|
|
45
|
+
- name: Apply migrations
|
|
46
|
+
run: npx prisma migrate deploy
|
|
47
|
+
env:
|
|
48
|
+
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Docker deployment
|
|
52
|
+
|
|
53
|
+
```dockerfile
|
|
54
|
+
# Run migrations before starting app
|
|
55
|
+
CMD npx prisma migrate deploy && node dist/index.js
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Comparison with migrate dev
|
|
59
|
+
|
|
60
|
+
| Feature | migrate dev | migrate deploy |
|
|
61
|
+
|---------|-------------|----------------|
|
|
62
|
+
| Creates migrations | Yes | No |
|
|
63
|
+
| Applies migrations | Yes | Yes |
|
|
64
|
+
| Detects drift | Yes | No |
|
|
65
|
+
| Prompts for input | Yes | No |
|
|
66
|
+
| Uses shadow database | Yes | No |
|
|
67
|
+
| Safe for production | No | Yes |
|
|
68
|
+
| Resets on issues | Prompts | Fails |
|
|
69
|
+
|
|
70
|
+
## Production Workflow
|
|
71
|
+
|
|
72
|
+
1. **Development**: Create migrations locally
|
|
73
|
+
```bash
|
|
74
|
+
prisma migrate dev --name add_feature
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
2. **Commit**: Include migration files in version control
|
|
78
|
+
```bash
|
|
79
|
+
git add prisma/migrations
|
|
80
|
+
git commit -m "Add feature migration"
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
3. **Deploy**: Apply in production
|
|
84
|
+
```bash
|
|
85
|
+
prisma migrate deploy
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Error Handling
|
|
89
|
+
|
|
90
|
+
### Failed migration
|
|
91
|
+
|
|
92
|
+
If a migration fails, `migrate deploy` exits with error. The failed migration is marked as failed in `_prisma_migrations`.
|
|
93
|
+
|
|
94
|
+
To fix:
|
|
95
|
+
1. Resolve the issue (fix SQL, database state, etc.)
|
|
96
|
+
2. Mark as resolved: `prisma migrate resolve --applied <migration_name>`
|
|
97
|
+
3. Re-run: `prisma migrate deploy`
|
|
98
|
+
|
|
99
|
+
### Check status first
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
prisma migrate status
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Shows pending and applied migrations before deploying.
|
|
106
|
+
|
|
107
|
+
## Configuration
|
|
108
|
+
|
|
109
|
+
Ensure `prisma.config.ts` has the production database URL:
|
|
110
|
+
|
|
111
|
+
```typescript
|
|
112
|
+
import 'dotenv/config'
|
|
113
|
+
import { defineConfig, env } from 'prisma/config'
|
|
114
|
+
|
|
115
|
+
export default defineConfig({
|
|
116
|
+
datasource: {
|
|
117
|
+
url: env('DATABASE_URL'),
|
|
118
|
+
},
|
|
119
|
+
})
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Best Practices
|
|
123
|
+
|
|
124
|
+
1. Always run `migrate status` before `migrate deploy` in CI
|
|
125
|
+
2. Have a rollback plan (backup before migrations)
|
|
126
|
+
3. Test migrations in staging first
|
|
127
|
+
4. Never use `migrate dev` in production
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# prisma migrate dev
|
|
2
|
+
|
|
3
|
+
Creates and applies migrations during development. Requires a shadow database.
|
|
4
|
+
|
|
5
|
+
## Command
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
prisma migrate dev [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## What It Does
|
|
12
|
+
|
|
13
|
+
1. Runs existing migrations in shadow database to detect drift
|
|
14
|
+
2. Applies any pending migrations
|
|
15
|
+
3. Generates new migration from schema changes
|
|
16
|
+
4. Applies new migration to development database
|
|
17
|
+
5. Updates `_prisma_migrations` table
|
|
18
|
+
|
|
19
|
+
## Options
|
|
20
|
+
|
|
21
|
+
| Option | Description |
|
|
22
|
+
|--------|-------------|
|
|
23
|
+
| `--name` / `-n` | Name the migration |
|
|
24
|
+
| `--create-only` | Create a new migration but do not apply it |
|
|
25
|
+
| `--schema` | Custom path to your Prisma schema |
|
|
26
|
+
| `--config` | Custom path to your Prisma config file |
|
|
27
|
+
| `--url` | Override the datasource URL from the Prisma config file |
|
|
28
|
+
|
|
29
|
+
### Removed in v7
|
|
30
|
+
|
|
31
|
+
- `--skip-generate` - Run `prisma generate` explicitly
|
|
32
|
+
- `--skip-seed` - Run `prisma db seed` explicitly
|
|
33
|
+
|
|
34
|
+
## Examples
|
|
35
|
+
|
|
36
|
+
### Create and apply migration
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
prisma migrate dev
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Prompts for migration name if schema changed.
|
|
43
|
+
|
|
44
|
+
### Named migration
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
prisma migrate dev --name add_users_table
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Create without applying
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
prisma migrate dev --create-only
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Useful for reviewing migration SQL before applying.
|
|
57
|
+
|
|
58
|
+
### Full workflow (v7)
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
prisma migrate dev --name my_migration
|
|
62
|
+
prisma generate # Must run explicitly in v7
|
|
63
|
+
prisma db seed # Must run explicitly in v7
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Migration Files
|
|
67
|
+
|
|
68
|
+
Created in `prisma/migrations/`:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
prisma/migrations/
|
|
72
|
+
├── 20240115120000_add_users_table/
|
|
73
|
+
│ └── migration.sql
|
|
74
|
+
├── 20240116090000_add_posts/
|
|
75
|
+
│ └── migration.sql
|
|
76
|
+
└── migration_lock.toml
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Schema Drift Detection
|
|
80
|
+
|
|
81
|
+
If `migrate dev` detects drift (manual database changes or edited migrations), it prompts to reset:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
Drift detected: Your database schema is not in sync.
|
|
85
|
+
|
|
86
|
+
Do you want to reset your database? All data will be lost.
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## When to Use
|
|
90
|
+
|
|
91
|
+
- Local development
|
|
92
|
+
- Adding new models/fields
|
|
93
|
+
- Changing relations
|
|
94
|
+
- Creating indexes
|
|
95
|
+
|
|
96
|
+
## When NOT to Use
|
|
97
|
+
|
|
98
|
+
- Production deployments (use `migrate deploy`)
|
|
99
|
+
- CI/CD pipelines (use `migrate deploy`)
|
|
100
|
+
- MongoDB (use `db push` instead)
|
|
101
|
+
|
|
102
|
+
## Common Patterns
|
|
103
|
+
|
|
104
|
+
### After schema changes
|
|
105
|
+
|
|
106
|
+
```prisma
|
|
107
|
+
// schema.prisma - Add new field
|
|
108
|
+
model User {
|
|
109
|
+
id Int @id @default(autoincrement())
|
|
110
|
+
email String @unique
|
|
111
|
+
name String?
|
|
112
|
+
createdAt DateTime @default(now()) // New field
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
prisma migrate dev --name add_created_at
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Handling data loss warnings
|
|
121
|
+
|
|
122
|
+
When a migration would cause data loss:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
prisma migrate dev --name remove_field
|
|
126
|
+
# Warning: You are about to delete data...
|
|
127
|
+
# Accept with: --accept-data-loss
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Shadow Database
|
|
131
|
+
|
|
132
|
+
`migrate dev` requires a shadow database for drift detection. Configure in `prisma.config.ts`:
|
|
133
|
+
|
|
134
|
+
```typescript
|
|
135
|
+
export default defineConfig({
|
|
136
|
+
datasource: {
|
|
137
|
+
url: env('DATABASE_URL'),
|
|
138
|
+
shadowDatabaseUrl: env('SHADOW_DATABASE_URL'),
|
|
139
|
+
},
|
|
140
|
+
})
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
For local Prisma Postgres (`prisma dev`), shadow database is handled automatically.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# prisma migrate diff
|
|
2
|
+
|
|
3
|
+
Compares database schemas and generates diffs (SQL or summary).
|
|
4
|
+
|
|
5
|
+
## Command
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
prisma migrate diff [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## What It Does
|
|
12
|
+
|
|
13
|
+
- Compares two sources (`--from-...` and `--to-...`)
|
|
14
|
+
- Sources can be:
|
|
15
|
+
- Empty (`empty`)
|
|
16
|
+
- Schema file (`schema`)
|
|
17
|
+
- Migrations directory (`migrations`)
|
|
18
|
+
- Database URL (`url`) or Configured Datasource (`config-datasource`)
|
|
19
|
+
- Outputs the difference:
|
|
20
|
+
- Human-readable summary (default)
|
|
21
|
+
- SQL script (`--script`)
|
|
22
|
+
|
|
23
|
+
## Options
|
|
24
|
+
|
|
25
|
+
| Option | Description |
|
|
26
|
+
|--------|-------------|
|
|
27
|
+
| `--script` | Render SQL script to stdout |
|
|
28
|
+
| `--exit-code` | Exit 2 if changes detected, 0 if empty, 1 if error |
|
|
29
|
+
| `--config` | Custom path to your Prisma config file |
|
|
30
|
+
|
|
31
|
+
### Sources (Must provide one `from` and one `to`)
|
|
32
|
+
|
|
33
|
+
- `--from-empty`, `--to-empty`
|
|
34
|
+
- `--from-schema <path>`, `--to-schema <path>`
|
|
35
|
+
- `--from-migrations <path>`, `--to-migrations <path>`
|
|
36
|
+
- `--from-url <url>`, `--to-url <url>`
|
|
37
|
+
- `--from-config-datasource`, `--to-config-datasource` (uses `prisma.config.ts`)
|
|
38
|
+
|
|
39
|
+
## Examples
|
|
40
|
+
|
|
41
|
+
### Generate SQL for a schema change
|
|
42
|
+
|
|
43
|
+
Compare current production DB to your local schema:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
prisma migrate diff \
|
|
47
|
+
--from-url "$PROD_DB_URL" \
|
|
48
|
+
--to-schema ./prisma/schema.prisma \
|
|
49
|
+
--script
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Review pending migrations
|
|
53
|
+
|
|
54
|
+
Compare database state to migrations directory:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
prisma migrate diff \
|
|
58
|
+
--from-config-datasource \
|
|
59
|
+
--to-migrations ./prisma/migrations
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Create baseline migration
|
|
63
|
+
|
|
64
|
+
Compare empty state to current schema:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
prisma migrate diff \
|
|
68
|
+
--from-empty \
|
|
69
|
+
--to-schema ./prisma/schema.prisma \
|
|
70
|
+
--script > prisma/migrations/0_init/migration.sql
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Check for drift (CI)
|
|
74
|
+
|
|
75
|
+
Check if database matches schema:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
prisma migrate diff \
|
|
79
|
+
--from-config-datasource \
|
|
80
|
+
--to-schema ./prisma/schema.prisma \
|
|
81
|
+
--exit-code
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Use Cases
|
|
85
|
+
|
|
86
|
+
- **Forward-generating migrations**: Creating SQL without `migrate dev`.
|
|
87
|
+
- **Drift detection**: Checking if DB is in sync.
|
|
88
|
+
- **Baselining**: Creating initial migration from existing DB.
|
|
89
|
+
- **Debugging**: Understanding what `migrate dev` would do.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# prisma migrate reset
|
|
2
|
+
|
|
3
|
+
Resets your database and re-applies all migrations.
|
|
4
|
+
|
|
5
|
+
## Command
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
prisma migrate reset [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## What It Does
|
|
12
|
+
|
|
13
|
+
1. **Drops** the database (if possible) or deletes all data/tables
|
|
14
|
+
2. **Re-creates** the database
|
|
15
|
+
3. **Applies** all migrations from `prisma/migrations/`
|
|
16
|
+
4. **Runs** the seed script (if configured)
|
|
17
|
+
|
|
18
|
+
**Warning: All data will be lost.**
|
|
19
|
+
|
|
20
|
+
## Options
|
|
21
|
+
|
|
22
|
+
| Option | Description |
|
|
23
|
+
|--------|-------------|
|
|
24
|
+
| `--force` / `-f` | Skip confirmation prompt |
|
|
25
|
+
| `--schema` | Path to schema file |
|
|
26
|
+
| `--config` | Custom path to your Prisma config file |
|
|
27
|
+
|
|
28
|
+
## Examples
|
|
29
|
+
|
|
30
|
+
### Basic reset
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
prisma migrate reset
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Prompts for confirmation in interactive terminals.
|
|
37
|
+
|
|
38
|
+
### Force reset (CI/Automation)
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
prisma migrate reset --force
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### With custom schema
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
prisma migrate reset --schema=./custom/schema.prisma
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## When to Use
|
|
51
|
+
|
|
52
|
+
- **Development**: When you want a fresh start
|
|
53
|
+
- **Testing**: Resetting test database before suites
|
|
54
|
+
- **Drift Recovery**: When the database is out of sync and you can't migrate
|
|
55
|
+
|
|
56
|
+
## Behavior in v7
|
|
57
|
+
|
|
58
|
+
- In v6, `migrate reset` automatically ran `prisma generate`.
|
|
59
|
+
- In v7, you may need to run `prisma generate` separately if you want to update the client, though `reset` focuses on the database state.
|
|
60
|
+
- Seed script IS run by default after reset.
|
|
61
|
+
|
|
62
|
+
## Configuration
|
|
63
|
+
|
|
64
|
+
Configure seed script in `prisma.config.ts` to run it automatically after reset:
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
export default defineConfig({
|
|
68
|
+
migrations: {
|
|
69
|
+
seed: 'tsx prisma/seed.ts',
|
|
70
|
+
},
|
|
71
|
+
})
|
|
72
|
+
```
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# prisma migrate resolve
|
|
2
|
+
|
|
3
|
+
Resolves issues with database migrations, such as failed migrations or baselining.
|
|
4
|
+
|
|
5
|
+
## Command
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
prisma migrate resolve [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## What It Does
|
|
12
|
+
|
|
13
|
+
Updates the `_prisma_migrations` table to manually change the state of a migration. This is a recovery tool.
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
You must provide exactly one of `--applied` or `--rolled-back`.
|
|
18
|
+
|
|
19
|
+
| Option | Description |
|
|
20
|
+
|--------|-------------|
|
|
21
|
+
| `--applied <name>` | Mark a migration as **applied** (success) |
|
|
22
|
+
| `--rolled-back <name>` | Mark a migration as **rolled back** (ignored/failed) |
|
|
23
|
+
| `--schema` | Path to schema file |
|
|
24
|
+
| `--config` | Custom path to your Prisma config file |
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
### Mark as Applied (Baselining)
|
|
29
|
+
|
|
30
|
+
If you have existing tables and want to initialize migrations without running the SQL:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
prisma migrate resolve --applied 20240101000000_initial_migration
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
This tells Prisma "Assume this migration has already run".
|
|
37
|
+
|
|
38
|
+
### Mark as Rolled Back (Fixing Failures)
|
|
39
|
+
|
|
40
|
+
If a migration failed (e.g., syntax error) and you fixed the SQL or want to retry:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
prisma migrate resolve --rolled-back 20240115120000_failed_migration
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
This tells Prisma "Forget this migration run, let me try applying it again".
|
|
47
|
+
|
|
48
|
+
## Use Cases
|
|
49
|
+
|
|
50
|
+
1. **Baselining**: Adopting Prisma Migrate on an existing production database.
|
|
51
|
+
2. **Failed Migrations**: Recovering from a failed `migrate deploy` in production.
|
|
52
|
+
3. **Hotfixes**: reconciling manual database changes (rare).
|
|
53
|
+
|
|
54
|
+
## References
|
|
55
|
+
|
|
56
|
+
- [Baselining](https://www.prisma.io/docs/guides/database/developing-with-prisma-migrate/baselining)
|
|
57
|
+
- [Troubleshooting](https://www.prisma.io/docs/guides/database/production-troubleshooting)
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# prisma migrate status
|
|
2
|
+
|
|
3
|
+
Checks the status of your database migrations.
|
|
4
|
+
|
|
5
|
+
## Command
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
prisma migrate status [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## What It Does
|
|
12
|
+
|
|
13
|
+
- Connects to the database
|
|
14
|
+
- Checks the `_prisma_migrations` table
|
|
15
|
+
- Compares applied migrations with local migration files
|
|
16
|
+
- Reports:
|
|
17
|
+
- **Status**: Database is up-to-date or behind
|
|
18
|
+
- **Unapplied migrations**: Count of pending migrations
|
|
19
|
+
- **Missing migrations**: Migrations present in DB but missing locally
|
|
20
|
+
- **Failed migrations**: Any migrations that failed to apply
|
|
21
|
+
|
|
22
|
+
## Options
|
|
23
|
+
|
|
24
|
+
| Option | Description |
|
|
25
|
+
|--------|-------------|
|
|
26
|
+
| `--schema` | Path to schema file |
|
|
27
|
+
| `--config` | Custom path to your Prisma config file |
|
|
28
|
+
|
|
29
|
+
## Examples
|
|
30
|
+
|
|
31
|
+
### Check status
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
prisma migrate status
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Output example (Up to date):
|
|
38
|
+
```
|
|
39
|
+
Database schema is up to date!
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Output example (Pending):
|
|
43
|
+
```
|
|
44
|
+
Following migration have not yet been applied:
|
|
45
|
+
20240115120000_add_user
|
|
46
|
+
|
|
47
|
+
To apply migrations in development, run:
|
|
48
|
+
prisma migrate dev
|
|
49
|
+
|
|
50
|
+
To apply migrations in production, run:
|
|
51
|
+
prisma migrate deploy
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## When to Use
|
|
55
|
+
|
|
56
|
+
- **Debugging**: Why is `migrate dev` complaining about drift?
|
|
57
|
+
- **CI/CD**: Verify database state before deploying
|
|
58
|
+
- **Production**: Check if migrations are needed (`migrate deploy`) or if a deployment failed
|
|
59
|
+
|
|
60
|
+
## Exit Codes
|
|
61
|
+
|
|
62
|
+
- `0`: Success (may have pending migrations, but command ran successfully)
|
|
63
|
+
- `1`: Error
|
|
64
|
+
|
|
65
|
+
To check for pending migrations programmatically, you might need to parse the output or use `migrate diff` with exit code flags.
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# prisma studio
|
|
2
|
+
|
|
3
|
+
Opens a visual database browser for viewing and editing data.
|
|
4
|
+
|
|
5
|
+
## Command
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
prisma studio [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## What It Does
|
|
12
|
+
|
|
13
|
+
- Starts a web-based database GUI
|
|
14
|
+
- View all your models and records
|
|
15
|
+
- Create, update, and delete records
|
|
16
|
+
- Filter and sort data
|
|
17
|
+
- Navigate relations
|
|
18
|
+
|
|
19
|
+
## Options
|
|
20
|
+
|
|
21
|
+
| Option | Description | Default |
|
|
22
|
+
|--------|-------------|---------|
|
|
23
|
+
| `--port` / `-p` | Port to start Studio on | `5555` |
|
|
24
|
+
| `--browser` / `-b` | Browser to open Studio in | System default |
|
|
25
|
+
| `--config` | Custom path to your Prisma config file | - |
|
|
26
|
+
| `--url` | Database connection string (overrides the one in your Prisma config) | - |
|
|
27
|
+
|
|
28
|
+
## Examples
|
|
29
|
+
|
|
30
|
+
### Open Studio
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
prisma studio
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Opens at http://localhost:5555
|
|
37
|
+
|
|
38
|
+
### Custom port
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
prisma studio --port 3000
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Specific browser
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
prisma studio --browser firefox
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Don't open browser
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
BROWSER=none prisma studio
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Useful for remote servers.
|
|
57
|
+
|
|
58
|
+
## Features
|
|
59
|
+
|
|
60
|
+
### View Records
|
|
61
|
+
|
|
62
|
+
- See all records in table format
|
|
63
|
+
- Pagination for large datasets
|
|
64
|
+
- Column sorting
|
|
65
|
+
|
|
66
|
+
### Filter Data
|
|
67
|
+
|
|
68
|
+
- Filter by any field
|
|
69
|
+
- Multiple conditions
|
|
70
|
+
- Relation filtering
|
|
71
|
+
|
|
72
|
+
### Edit Records
|
|
73
|
+
|
|
74
|
+
- Click to edit inline
|
|
75
|
+
- Add new records
|
|
76
|
+
- Delete records (with confirmation)
|
|
77
|
+
|
|
78
|
+
### Navigate Relations
|
|
79
|
+
|
|
80
|
+
- Click relations to view related records
|
|
81
|
+
- See counts of related items
|
|
82
|
+
- Follow relation links
|
|
83
|
+
|
|
84
|
+
## Use Cases
|
|
85
|
+
|
|
86
|
+
- **Development**: Quick data inspection
|
|
87
|
+
- **Debugging**: Check data state
|
|
88
|
+
- **Testing**: Verify seed data
|
|
89
|
+
- **Demo**: Show data to stakeholders
|
|
90
|
+
|
|
91
|
+
## Limitations
|
|
92
|
+
|
|
93
|
+
- Development tool only
|
|
94
|
+
- Not for production use
|
|
95
|
+
- Limited to configured database
|
|
96
|
+
- No advanced queries (use Prisma Client for that)
|
|
97
|
+
|
|
98
|
+
## Common Workflow
|
|
99
|
+
|
|
100
|
+
1. Run migrations:
|
|
101
|
+
```bash
|
|
102
|
+
prisma migrate dev
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
2. Seed data:
|
|
106
|
+
```bash
|
|
107
|
+
prisma db seed
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
3. Open Studio to verify:
|
|
111
|
+
```bash
|
|
112
|
+
prisma studio
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
4. Make manual edits if needed
|
|
116
|
+
|
|
117
|
+
## Security Note
|
|
118
|
+
|
|
119
|
+
Studio provides direct database access. Only run on:
|
|
120
|
+
- Local development machines
|
|
121
|
+
- Secure internal networks
|
|
122
|
+
- Never expose publicly
|