create-huenei-template 0.2.18 → 0.3.1
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/templates/frontend/hub-pre-sales/.cursor/context/pre-sales.md +3 -2
- package/dist/templates/frontend/hub-pre-sales/.cursor/rules/architech.mdc +13 -1
- package/dist/templates/frontend/hub-pre-sales/.cursor/rules/component-patterns.mdc +1 -1
- package/dist/templates/frontend/hub-pre-sales/.cursor/rules/gsap-animations.mdc +46 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/rules/pre-sales-mode.mdc +2 -1
- package/dist/templates/frontend/hub-pre-sales/.cursor/rules/restrictions.mdc +3 -1
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/animate/SKILL.md +23 -10
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/delight/SKILL.md +3 -4
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-core/SKILL.md +254 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-frameworks/SKILL.md +266 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-performance/SKILL.md +79 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-plugins/SKILL.md +433 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-react/SKILL.md +136 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-scrolltrigger/SKILL.md +296 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-timeline/SKILL.md +107 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-utils/SKILL.md +284 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/overdrive/SKILL.md +1 -1
- package/dist/templates/frontend/hub-pre-sales/AGENTS.md +13 -3
- package/dist/templates/frontend/hub-pre-sales/README.md +2 -1
- package/dist/templates/frontend/hub-pre-sales/package.json +84 -82
- package/dist/templates/frontend/hub-pre-sales/src/lib/gsap.ts +6 -0
- package/dist/templates/frontend/pre-sales/.cursor/rules/architech.mdc +199 -199
- package/dist/templates/frontend/pre-sales/.cursor/rules/deployment-ready.mdc +52 -52
- package/dist/templates/frontend/pre-sales/.cursor/rules/domain-business-bootstrap.mdc +74 -74
- package/dist/templates/frontend/pre-sales/.cursor/rules/pre-sales-mode.mdc +104 -104
- package/dist/templates/frontend/pre-sales/.cursor/rules/separation-of-concerns.mdc +41 -41
- package/dist/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/SKILL.md +296 -296
- package/dist/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/resources/deploy-codex.sh +301 -301
- package/dist/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/resources/deploy.sh +301 -301
- package/dist/templates/frontend/pre-sales/src/__tests__/components/layout/sidebar.test.tsx +58 -58
- package/dist/templates/frontend/pre-sales/src/__tests__/lib/auth.test.ts +102 -102
- package/dist/templates/frontend/pre-sales/src/__tests__/routes/__root.test.tsx +72 -72
- package/dist/templates/frontend/pre-sales/src/__tests__/routes/_authenticated.test.tsx +57 -57
- package/dist/templates/frontend/pre-sales/src/components/layout/navbar.tsx +121 -121
- package/dist/templates/frontend/pre-sales/src/components/ui/combobox.tsx +308 -308
- package/dist/templates/frontend/pre-sales/src/components/ui/command.tsx +179 -179
- package/dist/templates/frontend/pre-sales/src/data/dashboard.ts +249 -249
- package/dist/templates/frontend/pre-sales/src/hooks/useTheme.ts +73 -73
- package/dist/templates/frontend/pre-sales/src/index.css +282 -282
- package/dist/templates/frontend/pre-sales/src/routes/__root.tsx +62 -62
- package/dist/templates/frontend/pre-sales/src/routes/auth/iniciar-sesion.tsx +173 -173
- package/dist/templates/frontend/react-vite/.npmrc.example +28 -0
- package/dist/templates/frontend/react-vite/README.md +17 -0
- package/dist/templates/frontend/react-vite/eslint.config.js +41 -31
- package/dist/templates/frontend/react-vite/package.json +2 -0
- package/dist/templates/frontend/react-vite/src/index.css +3 -15
- package/dist/templates/frontend/react-vite/src/main.tsx +36 -33
- package/dist/templates/frontend/react-vite/src/routes/__root.tsx +3 -3
- package/dist/templates/frontend/react-vite/src/routes/index.tsx +185 -187
- package/dist/templates/frontend/react-vite/src/routes/ui-components.tsx +698 -922
- package/dist/templates/frontend/react-vite/vite.config.ts +7 -2
- package/dist/templates/frontend/react-vite-help/.vscode/settings.json +26 -0
- package/dist/templates/mobile/expo-base/package.json +3 -2
- package/dist/templates/mobile/expo-base/pnpm-workspace.yaml +3 -0
- package/dist/templates/mobile/expo-base/src/features/auth/login-screen.tsx +144 -177
- package/dist/templates/mobile/expo-base/src/i18n/locales/en-US.json +136 -134
- package/dist/templates/mobile/expo-base/src/i18n/locales/es-AR.json +136 -134
- package/package.json +1 -1
- package/templates/frontend/hub-pre-sales/.cursor/context/pre-sales.md +3 -2
- package/templates/frontend/hub-pre-sales/.cursor/rules/architech.mdc +13 -1
- package/templates/frontend/hub-pre-sales/.cursor/rules/component-patterns.mdc +1 -1
- package/templates/frontend/hub-pre-sales/.cursor/rules/gsap-animations.mdc +46 -0
- package/templates/frontend/hub-pre-sales/.cursor/rules/pre-sales-mode.mdc +2 -1
- package/templates/frontend/hub-pre-sales/.cursor/rules/restrictions.mdc +3 -1
- package/templates/frontend/hub-pre-sales/.cursor/skills/animate/SKILL.md +23 -10
- package/templates/frontend/hub-pre-sales/.cursor/skills/delight/SKILL.md +3 -4
- package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-core/SKILL.md +254 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-frameworks/SKILL.md +266 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-performance/SKILL.md +79 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-plugins/SKILL.md +433 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-react/SKILL.md +136 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-scrolltrigger/SKILL.md +296 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-timeline/SKILL.md +107 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-utils/SKILL.md +284 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/overdrive/SKILL.md +1 -1
- package/templates/frontend/hub-pre-sales/AGENTS.md +13 -3
- package/templates/frontend/hub-pre-sales/README.md +2 -1
- package/templates/frontend/hub-pre-sales/package.json +84 -82
- package/templates/frontend/hub-pre-sales/pnpm-lock.yaml +6597 -6575
- package/templates/frontend/hub-pre-sales/skills-lock.json +53 -0
- package/templates/frontend/hub-pre-sales/src/lib/gsap.ts +6 -0
- package/templates/frontend/pre-sales/.cursor/rules/architech.mdc +199 -199
- package/templates/frontend/pre-sales/.cursor/rules/deployment-ready.mdc +52 -52
- package/templates/frontend/pre-sales/.cursor/rules/domain-business-bootstrap.mdc +74 -74
- package/templates/frontend/pre-sales/.cursor/rules/pre-sales-mode.mdc +104 -104
- package/templates/frontend/pre-sales/.cursor/rules/separation-of-concerns.mdc +41 -41
- package/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/SKILL.md +296 -296
- package/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/resources/deploy-codex.sh +301 -301
- package/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/resources/deploy.sh +301 -301
- package/templates/frontend/pre-sales/pnpm-lock.yaml +6448 -6448
- package/templates/frontend/pre-sales/skills-lock.json +10 -10
- package/templates/frontend/pre-sales/src/__tests__/components/layout/sidebar.test.tsx +58 -58
- package/templates/frontend/pre-sales/src/__tests__/lib/auth.test.ts +102 -102
- package/templates/frontend/pre-sales/src/__tests__/routes/__root.test.tsx +72 -72
- package/templates/frontend/pre-sales/src/__tests__/routes/_authenticated.test.tsx +57 -57
- package/templates/frontend/pre-sales/src/components/layout/navbar.tsx +121 -121
- package/templates/frontend/pre-sales/src/components/ui/combobox.tsx +308 -308
- package/templates/frontend/pre-sales/src/components/ui/command.tsx +179 -179
- package/templates/frontend/pre-sales/src/data/dashboard.ts +249 -249
- package/templates/frontend/pre-sales/src/hooks/useTheme.ts +73 -73
- package/templates/frontend/pre-sales/src/index.css +282 -282
- package/templates/frontend/pre-sales/src/routes/__root.tsx +62 -62
- package/templates/frontend/pre-sales/src/routes/auth/iniciar-sesion.tsx +173 -173
- package/templates/frontend/react-vite/.npmrc.example +28 -0
- package/templates/frontend/react-vite/README.md +17 -0
- package/templates/frontend/react-vite/eslint.config.js +41 -31
- package/templates/frontend/react-vite/package.json +2 -0
- package/templates/frontend/react-vite/pnpm-lock.yaml +535 -13
- package/templates/frontend/react-vite/src/index.css +3 -15
- package/templates/frontend/react-vite/src/main.tsx +36 -33
- package/templates/frontend/react-vite/src/routes/__root.tsx +3 -3
- package/templates/frontend/react-vite/src/routes/index.tsx +185 -187
- package/templates/frontend/react-vite/src/routes/ui-components.tsx +698 -922
- package/templates/frontend/react-vite/vite.config.ts +7 -2
- package/templates/frontend/react-vite-help/.vscode/settings.json +26 -0
- package/templates/mobile/expo-base/package.json +3 -2
- package/templates/mobile/expo-base/pnpm-lock.yaml +10240 -11354
- package/templates/mobile/expo-base/pnpm-workspace.yaml +3 -0
- package/templates/mobile/expo-base/src/features/auth/login-screen.tsx +144 -177
- package/templates/mobile/expo-base/src/i18n/locales/en-US.json +136 -134
- package/templates/mobile/expo-base/src/i18n/locales/es-AR.json +136 -134
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/agents/nestjs-code-reviewer.md +0 -54
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/agents/prisma-guardian.md +0 -67
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/agents/test-runner.md +0 -57
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/commands/new-endpoint.md +0 -209
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/commands/new-model.md +0 -201
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks/autoTestOnStop.ts +0 -127
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks/blockDangerous.ts +0 -98
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks/ensureTestsExist.ts +0 -405
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks/formatOnEdit.ts +0 -70
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks/protectSecrets.ts +0 -101
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks/sessionInit.ts +0 -104
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks/validatePrisma.ts +0 -121
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks.json +0 -46
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/agents/nestjs-code-reviewer.md +0 -54
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/agents/prisma-guardian.md +0 -67
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/agents/test-runner.md +0 -57
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/commands/new-endpoint.md +0 -209
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/commands/new-model.md +0 -201
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks/autoTestOnStop.ts +0 -127
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks/blockDangerous.ts +0 -98
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks/ensureTestsExist.ts +0 -405
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks/formatOnEdit.ts +0 -70
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks/protectSecrets.ts +0 -101
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks/sessionInit.ts +0 -104
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks/validatePrisma.ts +0 -121
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks.json +0 -46
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/agents/nestjs-code-reviewer.md +0 -23
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/agents/sequelize-guardian.md +0 -37
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/agents/test-runner.md +0 -33
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/commands/new-endpoint.md +0 -76
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/commands/new-model.md +0 -85
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/hooks/autoTestOnStop.ts +0 -127
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/hooks/blockDangerous.ts +0 -98
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/hooks/ensureTestsExist.ts +0 -397
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/hooks/formatOnEdit.ts +0 -66
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/hooks/protectSecrets.ts +0 -101
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/hooks/sessionInit.ts +0 -104
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/hooks.json +0 -41
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/agents/nestjs-code-reviewer.md +0 -23
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/agents/sequelize-guardian.md +0 -37
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/agents/test-runner.md +0 -33
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/commands/new-endpoint.md +0 -76
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/commands/new-model.md +0 -85
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/hooks/autoTestOnStop.ts +0 -127
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/hooks/blockDangerous.ts +0 -98
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/hooks/ensureTestsExist.ts +0 -397
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/hooks/formatOnEdit.ts +0 -66
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/hooks/protectSecrets.ts +0 -101
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/hooks/sessionInit.ts +0 -104
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/hooks.json +0 -41
- package/templates/backend/nestjs-api-postgres/.cursor/agents/nestjs-code-reviewer.md +0 -54
- package/templates/backend/nestjs-api-postgres/.cursor/agents/prisma-guardian.md +0 -62
- package/templates/backend/nestjs-api-postgres/.cursor/agents/security-auditor.md +0 -71
- package/templates/backend/nestjs-api-postgres/.cursor/agents/test-runner.md +0 -58
- package/templates/backend/nestjs-api-postgres/.cursor/commands/add-pagination.md +0 -235
- package/templates/backend/nestjs-api-postgres/.cursor/commands/add-seed.md +0 -160
- package/templates/backend/nestjs-api-postgres/.cursor/commands/add-tests.md +0 -322
- package/templates/backend/nestjs-api-postgres/.cursor/commands/new-endpoint.md +0 -209
- package/templates/backend/nestjs-api-postgres/.cursor/commands/new-guard.md +0 -195
- package/templates/backend/nestjs-api-postgres/.cursor/commands/new-interceptor.md +0 -188
- package/templates/backend/nestjs-api-postgres/.cursor/commands/new-middleware.md +0 -176
- package/templates/backend/nestjs-api-postgres/.cursor/commands/new-model.md +0 -201
- package/templates/backend/nestjs-api-postgres/.cursor/hooks/auto-retry.ts +0 -62
- package/templates/backend/nestjs-api-postgres/.cursor/hooks/block-dangerous.ts +0 -202
- package/templates/backend/nestjs-api-postgres/.cursor/hooks/format-and-validate.ts +0 -124
- package/templates/backend/nestjs-api-postgres/.cursor/hooks/protect-secrets.ts +0 -105
- package/templates/backend/nestjs-api-postgres/.cursor/hooks/session-context.ts +0 -130
- package/templates/backend/nestjs-api-postgres/.cursor/hooks.json +0 -36
- package/templates/backend/nestjs-api-postgres/.cursor/mcp.json +0 -21
- package/templates/backend/nestjs-api-sqlite/.cursor/agents/code-reviewer.md +0 -153
- package/templates/backend/nestjs-api-sqlite/.cursor/agents/nestjs-architect.md +0 -138
- package/templates/backend/nestjs-api-sqlite/.cursor/agents/prisma-analyst.md +0 -164
- package/templates/backend/nestjs-api-sqlite/.cursor/agents/security-auditor.md +0 -150
- package/templates/backend/nestjs-api-sqlite/.cursor/agents/test-engineer.md +0 -290
- package/templates/backend/nestjs-api-sqlite/.cursor/commands/add-pagination.md +0 -235
- package/templates/backend/nestjs-api-sqlite/.cursor/commands/add-seed.md +0 -172
- package/templates/backend/nestjs-api-sqlite/.cursor/commands/add-tests.md +0 -322
- package/templates/backend/nestjs-api-sqlite/.cursor/commands/new-endpoint.md +0 -209
- package/templates/backend/nestjs-api-sqlite/.cursor/commands/new-guard.md +0 -195
- package/templates/backend/nestjs-api-sqlite/.cursor/commands/new-interceptor.md +0 -188
- package/templates/backend/nestjs-api-sqlite/.cursor/commands/new-middleware.md +0 -176
- package/templates/backend/nestjs-api-sqlite/.cursor/commands/new-model.md +0 -201
- package/templates/backend/nestjs-api-sqlite/.cursor/hooks/auto-format.ts +0 -80
- package/templates/backend/nestjs-api-sqlite/.cursor/hooks/block-dangerous-commands.ts +0 -144
- package/templates/backend/nestjs-api-sqlite/.cursor/hooks/prisma-schema-watcher.ts +0 -64
- package/templates/backend/nestjs-api-sqlite/.cursor/hooks/protect-sensitive-files.ts +0 -122
- package/templates/backend/nestjs-api-sqlite/.cursor/hooks/session-context.ts +0 -105
- package/templates/backend/nestjs-api-sqlite/.cursor/hooks.json +0 -18
- package/templates/backend/nestjs-api-sqlite/.cursor/mcp.json +0 -17
- package/templates/backend/nestjs-api-sqlserver/.cursor/agents/nestjs-code-reviewer.md +0 -54
- package/templates/backend/nestjs-api-sqlserver/.cursor/agents/prisma-guardian.md +0 -67
- package/templates/backend/nestjs-api-sqlserver/.cursor/agents/test-runner.md +0 -57
- package/templates/backend/nestjs-api-sqlserver/.cursor/commands/new-endpoint.md +0 -209
- package/templates/backend/nestjs-api-sqlserver/.cursor/commands/new-model.md +0 -201
- package/templates/backend/nestjs-api-sqlserver/.cursor/hooks/autoTestOnStop.ts +0 -127
- package/templates/backend/nestjs-api-sqlserver/.cursor/hooks/blockDangerous.ts +0 -98
- package/templates/backend/nestjs-api-sqlserver/.cursor/hooks/ensureTestsExist.ts +0 -405
- package/templates/backend/nestjs-api-sqlserver/.cursor/hooks/formatOnEdit.ts +0 -70
- package/templates/backend/nestjs-api-sqlserver/.cursor/hooks/protectSecrets.ts +0 -101
- package/templates/backend/nestjs-api-sqlserver/.cursor/hooks/sessionInit.ts +0 -104
- package/templates/backend/nestjs-api-sqlserver/.cursor/hooks/validatePrisma.ts +0 -121
- package/templates/backend/nestjs-api-sqlserver/.cursor/hooks.json +0 -46
- package/templates/frontend/angular-base/.cursor/agents/accessibility-reviewer.md +0 -67
- package/templates/frontend/angular-base/.cursor/agents/angular-code-reviewer.md +0 -60
- package/templates/frontend/angular-base/.cursor/agents/qa-test-expert.md +0 -70
- package/templates/frontend/angular-base/.cursor/agents/security-auditor.md +0 -58
- package/templates/frontend/angular-base/.cursor/commands/add-e2e-test.md +0 -236
- package/templates/frontend/angular-base/.cursor/commands/new-component.md +0 -211
- package/templates/frontend/angular-base/.cursor/commands/new-form.md +0 -284
- package/templates/frontend/angular-base/.cursor/commands/new-interceptor.md +0 -257
- package/templates/frontend/angular-base/.cursor/commands/new-page.md +0 -215
- package/templates/frontend/angular-base/.cursor/commands/new-service.md +0 -203
- package/templates/frontend/angular-base/.cursor/hooks/auto-format.ts +0 -70
- package/templates/frontend/angular-base/.cursor/hooks/auto-test-on-stop.ts +0 -113
- package/templates/frontend/angular-base/.cursor/hooks/block-dangerous-commands.ts +0 -160
- package/templates/frontend/angular-base/.cursor/hooks/ensure-tests-exist.ts +0 -363
- package/templates/frontend/angular-base/.cursor/hooks/protect-sensitive-files.ts +0 -118
- package/templates/frontend/angular-base/.cursor/hooks/session-context.ts +0 -110
- package/templates/frontend/angular-base/.cursor/hooks.json +0 -41
- package/templates/frontend/angular-base/.cursor/mcp.json +0 -21
- package/templates/frontend/angular-nx/.cursor/agents/angular-code-reviewer.md +0 -64
- package/templates/frontend/angular-nx/.cursor/agents/ci-watcher.md +0 -480
- package/templates/frontend/angular-nx/.cursor/agents/nx-architecture-guardian.md +0 -69
- package/templates/frontend/angular-nx/.cursor/agents/qa-test-expert.md +0 -75
- package/templates/frontend/angular-nx/.cursor/agents/security-auditor.md +0 -61
- package/templates/frontend/angular-nx/.cursor/commands/ci-monitor.md +0 -428
- package/templates/frontend/angular-nx/.cursor/hooks/auto-format.ts +0 -70
- package/templates/frontend/angular-nx/.cursor/hooks/auto-test-on-stop.ts +0 -115
- package/templates/frontend/angular-nx/.cursor/hooks/block-dangerous-commands.ts +0 -188
- package/templates/frontend/angular-nx/.cursor/hooks/ensure-tests-exist.ts +0 -399
- package/templates/frontend/angular-nx/.cursor/hooks/protect-sensitive-files.ts +0 -128
- package/templates/frontend/angular-nx/.cursor/hooks/session-context.ts +0 -121
- package/templates/frontend/angular-nx/.cursor/hooks.json +0 -41
- package/templates/frontend/angular-nx/.cursor/mcp.json +0 -12
- package/templates/frontend/hub-pre-sales/.cursor/agents/frontend-senior.agent.md +0 -49
- package/templates/frontend/hub-pre-sales/.cursor/agents/pre-sales-builder.agent.md +0 -98
- package/templates/frontend/hub-pre-sales/.cursor/agents/pre-sales-demo-runner.agent.md +0 -36
- package/templates/frontend/hub-pre-sales/.cursor/agents/pre-sales-refactor.agent.md +0 -54
- package/templates/frontend/hub-pre-sales/.cursor/agents/pre-sales-validator.agent.md +0 -69
- package/templates/frontend/hub-pre-sales/.cursor/agents/qa-test-expert.agent.md +0 -48
- package/templates/frontend/hub-pre-sales/.cursor/agents/security-expert.agent.md +0 -39
- package/templates/frontend/hub-pre-sales/.cursor/agents/ux-ui-expert.agent.md +0 -45
- package/templates/frontend/hub-pre-sales/.cursor/commands/add-calendar.md +0 -151
- package/templates/frontend/hub-pre-sales/.cursor/commands/add-chart.md +0 -148
- package/templates/frontend/hub-pre-sales/.cursor/commands/add-dashboard.md +0 -135
- package/templates/frontend/hub-pre-sales/.cursor/commands/add-form.md +0 -128
- package/templates/frontend/hub-pre-sales/.cursor/commands/add-login.md +0 -160
- package/templates/frontend/hub-pre-sales/.cursor/commands/add-map.md +0 -172
- package/templates/frontend/hub-pre-sales/.cursor/commands/add-route.md +0 -211
- package/templates/frontend/hub-pre-sales/.cursor/commands/add-screen.md +0 -118
- package/templates/frontend/hub-pre-sales/.cursor/commands/add-table.md +0 -156
- package/templates/frontend/hub-pre-sales/.cursor/commands/add-tests.md +0 -269
- package/templates/frontend/hub-pre-sales/.cursor/commands/mock-backend.md +0 -139
- package/templates/frontend/hub-pre-sales/.cursor/commands/new-component.md +0 -192
- package/templates/frontend/hub-pre-sales/.cursor/commands/new-form.md +0 -268
- package/templates/frontend/hub-pre-sales/.cursor/commands/new-page.md +0 -203
- package/templates/frontend/hub-pre-sales/.cursor/commands/new-query.md +0 -287
- package/templates/frontend/hub-pre-sales/.cursor/commands/new-table.md +0 -299
- package/templates/frontend/hub-pre-sales/.cursor/commands/prepare-preview.md +0 -48
- package/templates/frontend/hub-pre-sales/.cursor/commands/refactor-ui.md +0 -94
- package/templates/frontend/hub-pre-sales/.cursor/commands/ver-demo.md +0 -58
- package/templates/frontend/hub-pre-sales/.cursor/hooks/checkFileLength.ts +0 -69
- package/templates/frontend/hub-pre-sales/.cursor/hooks/injectPreSalesContext.ts +0 -103
- package/templates/frontend/hub-pre-sales/.cursor/hooks.json +0 -23
- package/templates/frontend/hub-pre-sales/.cursor/mcp.json +0 -17
- package/templates/frontend/pre-sales/.cursor/agents/frontend-senior.agent.md +0 -49
- package/templates/frontend/pre-sales/.cursor/agents/pre-sales-builder.agent.md +0 -92
- package/templates/frontend/pre-sales/.cursor/agents/pre-sales-demo-runner.agent.md +0 -36
- package/templates/frontend/pre-sales/.cursor/agents/pre-sales-deploy.agent.md +0 -87
- package/templates/frontend/pre-sales/.cursor/agents/pre-sales-refactor.agent.md +0 -54
- package/templates/frontend/pre-sales/.cursor/agents/pre-sales-validator.agent.md +0 -69
- package/templates/frontend/pre-sales/.cursor/agents/qa-test-expert.agent.md +0 -48
- package/templates/frontend/pre-sales/.cursor/agents/security-expert.agent.md +0 -39
- package/templates/frontend/pre-sales/.cursor/agents/ux-ui-expert.agent.md +0 -45
- package/templates/frontend/pre-sales/.cursor/commands/add-calendar.md +0 -151
- package/templates/frontend/pre-sales/.cursor/commands/add-chart.md +0 -148
- package/templates/frontend/pre-sales/.cursor/commands/add-dashboard.md +0 -135
- package/templates/frontend/pre-sales/.cursor/commands/add-form.md +0 -128
- package/templates/frontend/pre-sales/.cursor/commands/add-login.md +0 -160
- package/templates/frontend/pre-sales/.cursor/commands/add-map.md +0 -172
- package/templates/frontend/pre-sales/.cursor/commands/add-route.md +0 -211
- package/templates/frontend/pre-sales/.cursor/commands/add-screen.md +0 -118
- package/templates/frontend/pre-sales/.cursor/commands/add-table.md +0 -156
- package/templates/frontend/pre-sales/.cursor/commands/add-tests.md +0 -269
- package/templates/frontend/pre-sales/.cursor/commands/deploy-demo.md +0 -73
- package/templates/frontend/pre-sales/.cursor/commands/mock-backend.md +0 -139
- package/templates/frontend/pre-sales/.cursor/commands/new-component.md +0 -192
- package/templates/frontend/pre-sales/.cursor/commands/new-form.md +0 -268
- package/templates/frontend/pre-sales/.cursor/commands/new-page.md +0 -203
- package/templates/frontend/pre-sales/.cursor/commands/new-query.md +0 -287
- package/templates/frontend/pre-sales/.cursor/commands/new-table.md +0 -299
- package/templates/frontend/pre-sales/.cursor/commands/prepare-deploy.md +0 -135
- package/templates/frontend/pre-sales/.cursor/commands/refactor-ui.md +0 -94
- package/templates/frontend/pre-sales/.cursor/commands/ver-demo.md +0 -58
- package/templates/frontend/pre-sales/.cursor/hooks/checkFileLength.ts +0 -69
- package/templates/frontend/pre-sales/.cursor/hooks/ensureTestsExist.ts +0 -220
- package/templates/frontend/pre-sales/.cursor/hooks/injectPreSalesContext.ts +0 -97
- package/templates/frontend/pre-sales/.cursor/hooks.json +0 -23
- package/templates/frontend/pre-sales/.cursor/mcp.json +0 -13
- package/templates/frontend/react-ssr/.cursor/agents/accessibility-reviewer.md +0 -22
- package/templates/frontend/react-ssr/.cursor/agents/nextjs-code-reviewer.md +0 -24
- package/templates/frontend/react-ssr/.cursor/agents/react-test-expert.md +0 -32
- package/templates/frontend/react-ssr/.cursor/agents/security-auditor.md +0 -25
- package/templates/frontend/react-ssr/.cursor/commands/new-component.md +0 -97
- package/templates/frontend/react-ssr/.cursor/commands/new-page.md +0 -95
- package/templates/frontend/react-ssr/.cursor/commands/new-prisma-model.md +0 -66
- package/templates/frontend/react-ssr/.cursor/commands/new-server-action.md +0 -89
- package/templates/frontend/react-ssr/.cursor/hooks/auto-format.ts +0 -64
- package/templates/frontend/react-ssr/.cursor/hooks/auto-test-on-stop.ts +0 -94
- package/templates/frontend/react-ssr/.cursor/hooks/block-dangerous-commands.ts +0 -120
- package/templates/frontend/react-ssr/.cursor/hooks/ensure-tests-exist.ts +0 -209
- package/templates/frontend/react-ssr/.cursor/hooks/protect-sensitive-files.ts +0 -101
- package/templates/frontend/react-ssr/.cursor/hooks/session-context.ts +0 -93
- package/templates/frontend/react-ssr/.cursor/hooks/tsconfig.json +0 -10
- package/templates/frontend/react-ssr/.cursor/hooks.json +0 -41
- package/templates/frontend/react-vite/.cursor/agents/frontend-senior.agent.md +0 -49
- package/templates/frontend/react-vite/.cursor/agents/qa-test-expert.agent.md +0 -126
- package/templates/frontend/react-vite/.cursor/agents/security-expert.agent.md +0 -39
- package/templates/frontend/react-vite/.cursor/agents/ux-ui-expert.agent.md +0 -45
- package/templates/frontend/react-vite/.cursor/commands/add-route.md +0 -211
- package/templates/frontend/react-vite/.cursor/commands/add-tests.md +0 -269
- package/templates/frontend/react-vite/.cursor/commands/new-component.md +0 -232
- package/templates/frontend/react-vite/.cursor/commands/new-form.md +0 -268
- package/templates/frontend/react-vite/.cursor/commands/new-page.md +0 -203
- package/templates/frontend/react-vite/.cursor/commands/new-query.md +0 -287
- package/templates/frontend/react-vite/.cursor/commands/new-table.md +0 -299
- package/templates/frontend/react-vite/.cursor/hooks/autoTestOnStop.ts +0 -117
- package/templates/frontend/react-vite/.cursor/hooks/blockDangerous.ts +0 -75
- package/templates/frontend/react-vite/.cursor/hooks/ensureTestsExist.ts +0 -306
- package/templates/frontend/react-vite/.cursor/hooks/formatOnEdit.ts +0 -49
- package/templates/frontend/react-vite/.cursor/hooks/protectSecrets.ts +0 -88
- package/templates/frontend/react-vite/.cursor/hooks/sessionInit.ts +0 -77
- package/templates/frontend/react-vite/.cursor/hooks.json +0 -41
- package/templates/frontend/react-vite/.cursor/mcp.json +0 -17
- package/templates/frontend/react-vite-help/.cursor/RECONSTRUCTION-PROMPT.md +0 -738
- package/templates/frontend/react-vite-help/.cursor/agents/frontend-senior.agent.md +0 -49
- package/templates/frontend/react-vite-help/.cursor/agents/qa-test-expert.agent.md +0 -49
- package/templates/frontend/react-vite-help/.cursor/agents/security-expert.agent.md +0 -39
- package/templates/frontend/react-vite-help/.cursor/agents/ux-ui-expert.agent.md +0 -45
- package/templates/frontend/react-vite-help/.cursor/commands/add-route.md +0 -211
- package/templates/frontend/react-vite-help/.cursor/commands/add-tests.md +0 -269
- package/templates/frontend/react-vite-help/.cursor/commands/new-component.md +0 -232
- package/templates/frontend/react-vite-help/.cursor/commands/new-form.md +0 -268
- package/templates/frontend/react-vite-help/.cursor/commands/new-page.md +0 -203
- package/templates/frontend/react-vite-help/.cursor/commands/new-query.md +0 -287
- package/templates/frontend/react-vite-help/.cursor/commands/new-table.md +0 -299
- package/templates/frontend/react-vite-help/.cursor/hooks/ensureTestsExist.ts +0 -220
- package/templates/frontend/react-vite-help/.cursor/hooks.json +0 -10
- package/templates/frontend/react-vite-help/.cursor/mcp.json +0 -17
- package/templates/mobile/expo-base/.cursor/agents/api-integration.md +0 -139
- package/templates/mobile/expo-base/.cursor/agents/feature-architect.md +0 -131
- package/templates/mobile/expo-base/.cursor/agents/i18n-manager.md +0 -147
- package/templates/mobile/expo-base/.cursor/agents/quality-reviewer.md +0 -137
- package/templates/mobile/expo-base/.cursor/agents/testing-specialist.md +0 -123
- package/templates/mobile/expo-base/.cursor/agents/theme-engineer.md +0 -106
- package/templates/mobile/expo-base/.cursor/commands/add-translation.md +0 -184
- package/templates/mobile/expo-base/.cursor/commands/new-api-service.md +0 -280
- package/templates/mobile/expo-base/.cursor/commands/new-component.md +0 -298
- package/templates/mobile/expo-base/.cursor/commands/new-hook.md +0 -291
- package/templates/mobile/expo-base/.cursor/commands/new-modal.md +0 -345
- package/templates/mobile/expo-base/.cursor/commands/new-screen.md +0 -267
- package/templates/mobile/expo-base/.cursor/commands/new-tab.md +0 -238
- package/templates/mobile/expo-base/.cursor/mcp.json +0 -21
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
# add-form
|
|
2
|
-
|
|
3
|
-
Actuá como un **asistente de construcción de demos** para un equipo de pre-venta que no tiene conocimientos técnicos.
|
|
4
|
-
|
|
5
|
-
Este comando crea un **formulario funcional** que valida datos y los guarda simuladamente.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Flujo interactivo (obligatorio)
|
|
10
|
-
|
|
11
|
-
1. Preguntar:
|
|
12
|
-
- ¿Para qué es este formulario? (ej: registrar un cliente, crear un pedido, enviar una consulta, editar un perfil)
|
|
13
|
-
2. Preguntar:
|
|
14
|
-
- ¿Qué información necesita recolectar? Describir cada campo:
|
|
15
|
-
- Nombre del campo (ej: "nombre completo", "email", "teléfono")
|
|
16
|
-
- ¿Es obligatorio? (Sí / No)
|
|
17
|
-
- Pedir al menos 2 campos, máximo 10
|
|
18
|
-
3. Preguntar:
|
|
19
|
-
- ¿Qué pasa cuando el usuario envía el formulario?
|
|
20
|
-
- Muestra un mensaje de éxito
|
|
21
|
-
- Redirige a otra pantalla
|
|
22
|
-
- Agrega el registro a una tabla existente
|
|
23
|
-
4. Preguntar:
|
|
24
|
-
- ¿Dónde se muestra este formulario?
|
|
25
|
-
- En una pantalla nueva (crear ruta)
|
|
26
|
-
- Dentro de una pantalla existente (como componente)
|
|
27
|
-
- En un diálogo/modal
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## Estructura a generar
|
|
32
|
-
|
|
33
|
-
```
|
|
34
|
-
src/
|
|
35
|
-
├── data/
|
|
36
|
-
│ └── {entidad}.ts # Seed data (si es nueva entidad)
|
|
37
|
-
├── components/
|
|
38
|
-
│ └── forms/
|
|
39
|
-
│ └── {NombreForm}/
|
|
40
|
-
│ ├── {NombreForm}.tsx # Componente del formulario
|
|
41
|
-
│ ├── {nombre}-schema.ts # Schema Zod de validación
|
|
42
|
-
│ └── index.ts
|
|
43
|
-
├── routes/
|
|
44
|
-
│ └── {ruta}.tsx # Solo si se crea pantalla nueva
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
---
|
|
48
|
-
|
|
49
|
-
## Reglas de generación
|
|
50
|
-
|
|
51
|
-
### Schema Zod
|
|
52
|
-
|
|
53
|
-
Crear en archivo separado con mensajes en español:
|
|
54
|
-
|
|
55
|
-
```typescript
|
|
56
|
-
import { z } from "zod";
|
|
57
|
-
|
|
58
|
-
export const contactoSchema = z.object({
|
|
59
|
-
nombreCompleto: z.string().min(2, "El nombre debe tener al menos 2 caracteres"),
|
|
60
|
-
email: z.string().email("Ingrese un email válido"),
|
|
61
|
-
telefono: z.string().min(8, "El teléfono debe tener al menos 8 dígitos").optional(),
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
export type ContactoFormData = z.infer<typeof contactoSchema>;
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
### Mapeo de campos del usuario a tipos
|
|
68
|
-
|
|
69
|
-
| El usuario dice | Tipo de input | Validación Zod |
|
|
70
|
-
|-----------------|---------------|----------------|
|
|
71
|
-
| nombre, texto | `text` | `z.string().min(2)` |
|
|
72
|
-
| email, correo | `email` | `z.string().email()` |
|
|
73
|
-
| teléfono, celular | `tel` | `z.string().min(8)` |
|
|
74
|
-
| contraseña, password | `password` | `z.string().min(8)` |
|
|
75
|
-
| número, cantidad, monto | `number` | `z.coerce.number().min(0)` |
|
|
76
|
-
| fecha | `date` | `z.string().date()` |
|
|
77
|
-
| descripción, comentario | `textarea` | `z.string().max(500)` |
|
|
78
|
-
| sí/no, activo/inactivo | `checkbox` | `z.boolean()` |
|
|
79
|
-
| opción entre varias | `select` | `z.enum(["opcion1", "opcion2"])` |
|
|
80
|
-
|
|
81
|
-
### Formulario
|
|
82
|
-
|
|
83
|
-
Usar React Hook Form + Zod + componentes de `src/components/ui/`:
|
|
84
|
-
|
|
85
|
-
```typescript
|
|
86
|
-
import { useForm } from "react-hook-form";
|
|
87
|
-
import { zodResolver } from "@hookform/resolvers/zod";
|
|
88
|
-
import { toast } from "react-toastify";
|
|
89
|
-
import { Button } from "@/components/ui/button";
|
|
90
|
-
import { Input } from "@/components/ui/input";
|
|
91
|
-
import { Label } from "@/components/ui/label";
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
### Submit Mock
|
|
95
|
-
|
|
96
|
-
El onSubmit siempre guarda en localStorage:
|
|
97
|
-
|
|
98
|
-
```typescript
|
|
99
|
-
const handleSubmit = (data: FormData) => {
|
|
100
|
-
const stored = localStorage.getItem(ENTIDAD_KEY);
|
|
101
|
-
const items = stored ? JSON.parse(stored) : [];
|
|
102
|
-
items.push({ ...data, id: crypto.randomUUID() });
|
|
103
|
-
localStorage.setItem(ENTIDAD_KEY, JSON.stringify(items));
|
|
104
|
-
toast.success("Guardado exitosamente");
|
|
105
|
-
};
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
---
|
|
109
|
-
|
|
110
|
-
## Restricciones
|
|
111
|
-
|
|
112
|
-
- Máximo 150 líneas por archivo
|
|
113
|
-
- Schema Zod SIEMPRE en archivo separado
|
|
114
|
-
- Mensajes de validación en español
|
|
115
|
-
- Usar componentes de `src/components/ui/` (Input, Label, Button, Textarea)
|
|
116
|
-
- Todo dato guardado en localStorage
|
|
117
|
-
- Notificación con react-toastify al enviar
|
|
118
|
-
|
|
119
|
-
---
|
|
120
|
-
|
|
121
|
-
## Mensajes finales obligatorios
|
|
122
|
-
|
|
123
|
-
Al finalizar, mostrar al usuario:
|
|
124
|
-
|
|
125
|
-
- Lista de archivos creados
|
|
126
|
-
- Los campos del formulario y sus validaciones
|
|
127
|
-
- Cómo usar el formulario (URL o cómo incluirlo en otra pantalla)
|
|
128
|
-
- Qué pasa con los datos enviados (se guardan en localStorage)
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
# add-login
|
|
2
|
-
|
|
3
|
-
Actuá como un **asistente de construcción de demos** para un equipo de pre-venta que no tiene conocimientos técnicos.
|
|
4
|
-
|
|
5
|
-
Este comando crea una **pantalla de inicio de sesión** funcional con autenticación simulada.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Flujo interactivo (obligatorio)
|
|
10
|
-
|
|
11
|
-
1. Preguntar:
|
|
12
|
-
- ¿Qué nombre tiene la aplicación? (se muestra en el título del login)
|
|
13
|
-
2. Preguntar:
|
|
14
|
-
- ¿Qué campos necesita el login?
|
|
15
|
-
- **Email + Contraseña** (estándar)
|
|
16
|
-
- **Usuario + Contraseña** (corporativo)
|
|
17
|
-
3. Preguntar:
|
|
18
|
-
- ¿Necesita enlace de "¿Olvidó su contraseña?"? (Sí / No)
|
|
19
|
-
4. Preguntar:
|
|
20
|
-
- ¿Necesita enlace de "Registrarse"? (Sí / No)
|
|
21
|
-
5. Preguntar:
|
|
22
|
-
- ¿A qué pantalla redirige después del login? (ej: dashboard, inicio, panel de control)
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## Estructura a generar
|
|
27
|
-
|
|
28
|
-
Verificar primero si ya existe `src/routes/auth/iniciar-sesion.tsx`. Si existe, preguntar si desea reemplazarlo o crear uno alternativo.
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
src/
|
|
32
|
-
├── data/
|
|
33
|
-
│ └── users.ts # Usuarios mock
|
|
34
|
-
├── components/
|
|
35
|
-
│ └── forms/
|
|
36
|
-
│ └── LoginForm/
|
|
37
|
-
│ ├── LoginForm.tsx # Formulario de login
|
|
38
|
-
│ ├── login-schema.ts # Schema Zod
|
|
39
|
-
│ └── index.ts
|
|
40
|
-
├── routes/
|
|
41
|
-
│ └── auth/
|
|
42
|
-
│ └── login.tsx # Ruta de login (o reusa existente)
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Reglas de generación
|
|
48
|
-
|
|
49
|
-
### Usuarios Mock
|
|
50
|
-
|
|
51
|
-
Crear usuarios de prueba en `src/data/users.ts`:
|
|
52
|
-
|
|
53
|
-
```typescript
|
|
54
|
-
export const USERS_KEY = "users";
|
|
55
|
-
|
|
56
|
-
export interface MockUser {
|
|
57
|
-
id: string;
|
|
58
|
-
email: string;
|
|
59
|
-
nombre: string;
|
|
60
|
-
password: string;
|
|
61
|
-
rol: "admin" | "usuario";
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export const usersSeed: MockUser[] = [
|
|
65
|
-
{
|
|
66
|
-
id: "1",
|
|
67
|
-
email: "admin@demo.com",
|
|
68
|
-
nombre: "Admin Demo",
|
|
69
|
-
password: "admin123",
|
|
70
|
-
rol: "admin",
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
id: "2",
|
|
74
|
-
email: "usuario@demo.com",
|
|
75
|
-
nombre: "Usuario Demo",
|
|
76
|
-
password: "usuario123",
|
|
77
|
-
rol: "usuario",
|
|
78
|
-
},
|
|
79
|
-
];
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
### Schema Zod
|
|
83
|
-
|
|
84
|
-
```typescript
|
|
85
|
-
import { z } from "zod";
|
|
86
|
-
|
|
87
|
-
export const loginSchema = z.object({
|
|
88
|
-
email: z.string().email("Ingrese un email válido"),
|
|
89
|
-
password: z.string().min(6, "La contraseña debe tener al menos 6 caracteres"),
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
export type LoginFormData = z.infer<typeof loginSchema>;
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
### Formulario de Login
|
|
96
|
-
|
|
97
|
-
Usar componentes de `src/components/ui/` y el hook `useAuth` existente en `src/hooks/useAuth.tsx`:
|
|
98
|
-
|
|
99
|
-
```typescript
|
|
100
|
-
import { useForm } from "react-hook-form";
|
|
101
|
-
import { zodResolver } from "@hookform/resolvers/zod";
|
|
102
|
-
import { useNavigate } from "@tanstack/react-router";
|
|
103
|
-
import { toast } from "react-toastify";
|
|
104
|
-
import { Button } from "@/components/ui/button";
|
|
105
|
-
import { Input } from "@/components/ui/input";
|
|
106
|
-
import { Label } from "@/components/ui/label";
|
|
107
|
-
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### Autenticación Mock
|
|
111
|
-
|
|
112
|
-
Usar el hook `useAuth` existente para manejar el estado de autenticación. La verificación compara contra los usuarios en localStorage:
|
|
113
|
-
|
|
114
|
-
```typescript
|
|
115
|
-
const handleLogin = (data: LoginFormData) => {
|
|
116
|
-
const users = JSON.parse(localStorage.getItem(USERS_KEY) || "[]");
|
|
117
|
-
const user = users.find(
|
|
118
|
-
(u: MockUser) => u.email === data.email && u.password === data.password
|
|
119
|
-
);
|
|
120
|
-
if (user) {
|
|
121
|
-
login(user);
|
|
122
|
-
toast.success(`Bienvenido, ${user.nombre}`);
|
|
123
|
-
navigate({ to: redirectPath });
|
|
124
|
-
} else {
|
|
125
|
-
toast.error("Email o contraseña incorrectos");
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
### Credenciales de Prueba
|
|
131
|
-
|
|
132
|
-
SIEMPRE mostrar al final las credenciales mock para facilitar la demo:
|
|
133
|
-
|
|
134
|
-
```
|
|
135
|
-
Credenciales de prueba:
|
|
136
|
-
- Admin: admin@demo.com / admin123
|
|
137
|
-
- Usuario: usuario@demo.com / usuario123
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
---
|
|
141
|
-
|
|
142
|
-
## Restricciones
|
|
143
|
-
|
|
144
|
-
- Máximo 150 líneas por archivo
|
|
145
|
-
- Usar hook `useAuth` existente (no crear otro)
|
|
146
|
-
- Autenticación contra localStorage (nunca API real)
|
|
147
|
-
- Redirigir después del login exitoso
|
|
148
|
-
- Mostrar error en caso de credenciales incorrectas
|
|
149
|
-
- Usar componentes de `src/components/ui/`
|
|
150
|
-
|
|
151
|
-
---
|
|
152
|
-
|
|
153
|
-
## Mensajes finales obligatorios
|
|
154
|
-
|
|
155
|
-
Al finalizar, mostrar al usuario:
|
|
156
|
-
|
|
157
|
-
- Archivos creados
|
|
158
|
-
- URL de acceso (ej: `http://localhost:5173/auth/login`)
|
|
159
|
-
- Credenciales de prueba para la demo
|
|
160
|
-
- A qué pantalla redirige después del login
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
# add-map
|
|
2
|
-
|
|
3
|
-
Actuá como un **asistente de construcción de demos** para un equipo de pre-venta que no tiene conocimientos técnicos.
|
|
4
|
-
|
|
5
|
-
Este comando crea un **componente visual de mapa** con marcadores simulados. Como no se pueden instalar dependencias externas de mapas, se genera una representación visual con CSS que simula un mapa.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Flujo interactivo (obligatorio)
|
|
10
|
-
|
|
11
|
-
1. Preguntar:
|
|
12
|
-
- ¿Qué representa el mapa? (ej: sucursales, puntos de entrega, ubicaciones de clientes, rutas de distribución)
|
|
13
|
-
2. Preguntar:
|
|
14
|
-
- ¿Qué información tiene cada marcador/ubicación?
|
|
15
|
-
- Nombre (siempre)
|
|
16
|
-
- Dirección (Sí / No)
|
|
17
|
-
- Estado o categoría (Sí / No)
|
|
18
|
-
- Información adicional (teléfono, horario, etc.)
|
|
19
|
-
3. Preguntar:
|
|
20
|
-
- ¿Necesita una lista lateral con las ubicaciones? (Sí / No)
|
|
21
|
-
4. Preguntar:
|
|
22
|
-
- ¿Dónde se muestra el mapa?
|
|
23
|
-
- En una pantalla nueva
|
|
24
|
-
- Dentro de una pantalla existente
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## Estructura a generar
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
src/
|
|
32
|
-
├── data/
|
|
33
|
-
│ └── {nombre}-locations.ts # Datos mock de ubicaciones
|
|
34
|
-
├── components/
|
|
35
|
-
│ └── features/
|
|
36
|
-
│ └── {nombre}-map/
|
|
37
|
-
│ ├── {Nombre}Map.tsx # Componente principal
|
|
38
|
-
│ ├── MapCanvas.tsx # Área visual del mapa
|
|
39
|
-
│ ├── LocationPin.tsx # Marcador individual
|
|
40
|
-
│ ├── LocationList.tsx # Lista lateral (si aplica)
|
|
41
|
-
│ └── index.ts
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
---
|
|
45
|
-
|
|
46
|
-
## Reglas de generación
|
|
47
|
-
|
|
48
|
-
### Datos Mock de Ubicaciones
|
|
49
|
-
|
|
50
|
-
```typescript
|
|
51
|
-
export const LOCATIONS_KEY = "ubicaciones";
|
|
52
|
-
|
|
53
|
-
export interface Location {
|
|
54
|
-
id: string;
|
|
55
|
-
nombre: string;
|
|
56
|
-
direccion: string;
|
|
57
|
-
categoria: "sucursal" | "cliente" | "deposito";
|
|
58
|
-
x: number;
|
|
59
|
-
y: number;
|
|
60
|
-
info?: string;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export const locationsSeed: Location[] = [
|
|
64
|
-
{
|
|
65
|
-
id: crypto.randomUUID(),
|
|
66
|
-
nombre: "Sucursal Centro",
|
|
67
|
-
direccion: "Av. Corrientes 1234, CABA",
|
|
68
|
-
categoria: "sucursal",
|
|
69
|
-
x: 45,
|
|
70
|
-
y: 35,
|
|
71
|
-
},
|
|
72
|
-
// Mínimo 6 ubicaciones con posiciones x,y entre 5-95 (porcentaje)
|
|
73
|
-
];
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### Mapa Visual (CSS)
|
|
77
|
-
|
|
78
|
-
Crear un área visual que simule un mapa con marcadores posicionados:
|
|
79
|
-
|
|
80
|
-
```typescript
|
|
81
|
-
<div className="relative w-full h-96 bg-base-200 rounded-lg border-2 border-base-300 overflow-hidden">
|
|
82
|
-
{/* Grilla de fondo simulando calles */}
|
|
83
|
-
<div className="absolute inset-0 opacity-10">
|
|
84
|
-
<div className="grid grid-cols-8 grid-rows-6 h-full">
|
|
85
|
-
{Array.from({ length: 48 }).map((_, i) => (
|
|
86
|
-
<div key={i} className="border border-base-content/20" />
|
|
87
|
-
))}
|
|
88
|
-
</div>
|
|
89
|
-
</div>
|
|
90
|
-
|
|
91
|
-
{/* Marcadores */}
|
|
92
|
-
{locations.map((loc) => (
|
|
93
|
-
<LocationPin key={loc.id} location={loc} onClick={() => setSelected(loc)} />
|
|
94
|
-
))}
|
|
95
|
-
</div>
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
### Marcador (Pin)
|
|
99
|
-
|
|
100
|
-
```typescript
|
|
101
|
-
import { MapPin } from "lucide-react";
|
|
102
|
-
|
|
103
|
-
const categoriaColors: Record<string, string> = {
|
|
104
|
-
sucursal: "text-primary",
|
|
105
|
-
cliente: "text-secondary",
|
|
106
|
-
deposito: "text-accent",
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
export const LocationPin: FC<{ location: Location; onClick: () => void }> = ({ location, onClick }) => (
|
|
110
|
-
<button
|
|
111
|
-
className={`absolute transform -translate-x-1/2 -translate-y-full cursor-pointer hover:scale-125 transition-transform ${categoriaColors[location.categoria]}`}
|
|
112
|
-
style={{ left: `${location.x}%`, top: `${location.y}%` }}
|
|
113
|
-
onClick={onClick}
|
|
114
|
-
title={location.nombre}
|
|
115
|
-
>
|
|
116
|
-
<MapPin className="h-6 w-6 fill-current" />
|
|
117
|
-
</button>
|
|
118
|
-
);
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
### Detalle de Ubicación Seleccionada
|
|
122
|
-
|
|
123
|
-
Al hacer clic en un marcador, mostrar la información en un card:
|
|
124
|
-
|
|
125
|
-
```typescript
|
|
126
|
-
{selected && (
|
|
127
|
-
<Card className="absolute bottom-4 left-4 right-4 md:left-auto md:right-4 md:w-72">
|
|
128
|
-
<CardHeader>
|
|
129
|
-
<CardTitle className="text-sm">{selected.nombre}</CardTitle>
|
|
130
|
-
</CardHeader>
|
|
131
|
-
<CardContent className="text-xs space-y-1">
|
|
132
|
-
<p>{selected.direccion}</p>
|
|
133
|
-
<Badge>{selected.categoria}</Badge>
|
|
134
|
-
{selected.info && <p>{selected.info}</p>}
|
|
135
|
-
</CardContent>
|
|
136
|
-
</Card>
|
|
137
|
-
)}
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
### Lista Lateral (si se solicita)
|
|
141
|
-
|
|
142
|
-
```typescript
|
|
143
|
-
<div className="flex flex-col lg:flex-row gap-4">
|
|
144
|
-
<div className="lg:w-2/3">{/* MapCanvas */}</div>
|
|
145
|
-
<div className="lg:w-1/3">
|
|
146
|
-
<LocationList locations={locations} onSelect={setSelected} selected={selected} />
|
|
147
|
-
</div>
|
|
148
|
-
</div>
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
---
|
|
152
|
-
|
|
153
|
-
## Restricciones
|
|
154
|
-
|
|
155
|
-
- Máximo 150 líneas por archivo
|
|
156
|
-
- NO instalar librerías de mapas (leaflet, mapbox, google-maps, etc.)
|
|
157
|
-
- Representación visual con CSS/Tailwind
|
|
158
|
-
- Posiciones x,y como porcentaje (0-100) para ubicar marcadores
|
|
159
|
-
- Datos mock en localStorage
|
|
160
|
-
- Iconos de Lucide React (`MapPin`)
|
|
161
|
-
|
|
162
|
-
---
|
|
163
|
-
|
|
164
|
-
## Mensajes finales obligatorios
|
|
165
|
-
|
|
166
|
-
Al finalizar, mostrar al usuario:
|
|
167
|
-
|
|
168
|
-
- Archivos creados
|
|
169
|
-
- URL de acceso o cómo incluirlo
|
|
170
|
-
- Aclarar que es una representación visual (no un mapa interactivo real)
|
|
171
|
-
- Cómo agregar más ubicaciones a los datos de ejemplo
|
|
172
|
-
- Las categorías de marcadores y sus colores
|
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
# add-route
|
|
2
|
-
|
|
3
|
-
Actuá como **arquitecto frontend senior especializado en React 19 y TanStack Router**.
|
|
4
|
-
|
|
5
|
-
Este comando debe **agregar una ruta al sistema de routing de TanStack Router**, generando el archivo de ruta y conectándolo correctamente con el árbol de rutas existente.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Flujo interactivo (obligatorio)
|
|
10
|
-
|
|
11
|
-
1. Preguntar:
|
|
12
|
-
- Ruta URL deseada (ej: `/settings`, `/users/$userId/edit`, `/admin/reports`)
|
|
13
|
-
2. Preguntar:
|
|
14
|
-
- Tipo de ruta:
|
|
15
|
-
- **Página** (ruta con componente propio)
|
|
16
|
-
- **Layout** (ruta contenedora con `<Outlet />`)
|
|
17
|
-
- **Index** (ruta index de un layout existente)
|
|
18
|
-
- **Redirect** (redirección a otra ruta)
|
|
19
|
-
3. Si es Página, preguntar:
|
|
20
|
-
- ¿Tiene parámetros de ruta? (ej: `$userId`, `$productId`)
|
|
21
|
-
- ¿Tiene search params? (ej: `?page=1&filter=active`)
|
|
22
|
-
4. Si es Layout, preguntar:
|
|
23
|
-
- ¿Qué elementos compartidos incluye? (header, sidebar, breadcrumbs)
|
|
24
|
-
5. Preguntar:
|
|
25
|
-
- ¿Requiere guard/autenticación? (Sí / No)
|
|
26
|
-
6. Preguntar:
|
|
27
|
-
- ¿Necesita loader (data fetching previo)? (Sí / No)
|
|
28
|
-
7. Validar:
|
|
29
|
-
- Que la ruta no exista ya en `src/routes/`
|
|
30
|
-
- Que la ruta padre exista (si es nested)
|
|
31
|
-
- Que el formato de ruta sea válido para TanStack Router
|
|
32
|
-
|
|
33
|
-
Si alguna validación falla, **detener la ejecución y explicar el error**.
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
## Estructura a generar
|
|
38
|
-
|
|
39
|
-
Según el tipo de ruta, crear en `src/routes/`:
|
|
40
|
-
|
|
41
|
-
### Página:
|
|
42
|
-
```
|
|
43
|
-
src/routes/{path}.tsx
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### Layout:
|
|
47
|
-
```
|
|
48
|
-
src/routes/{path}.tsx (layout con Outlet)
|
|
49
|
-
src/routes/{path}/index.tsx (index page)
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### Con ruta padre:
|
|
53
|
-
```
|
|
54
|
-
src/routes/{parent}/{child}.tsx
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
## Reglas generales
|
|
60
|
-
|
|
61
|
-
- Código **100% TypeScript** con strict mode
|
|
62
|
-
- Usar convenciones de file-based routing de TanStack Router
|
|
63
|
-
- Archivos de ruta usan `createFileRoute` o `createLazyFileRoute`
|
|
64
|
-
- Layouts usan `<Outlet />`
|
|
65
|
-
- Search params tipados con Zod (si aplica)
|
|
66
|
-
- No usar `any`
|
|
67
|
-
|
|
68
|
-
---
|
|
69
|
-
|
|
70
|
-
## Ruta de Página
|
|
71
|
-
|
|
72
|
-
```typescript
|
|
73
|
-
import { createFileRoute } from '@tanstack/react-router';
|
|
74
|
-
|
|
75
|
-
export const Route = createFileRoute('/{path}')({
|
|
76
|
-
component: RouteComponent,
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
function RouteComponent() {
|
|
80
|
-
return (
|
|
81
|
-
<div className="container mx-auto px-4 py-8">
|
|
82
|
-
<h1 className="text-2xl font-bold mb-6">Título</h1>
|
|
83
|
-
</div>
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
## Ruta Layout
|
|
91
|
-
|
|
92
|
-
```typescript
|
|
93
|
-
import { createFileRoute, Outlet } from '@tanstack/react-router';
|
|
94
|
-
|
|
95
|
-
export const Route = createFileRoute('/{path}')({
|
|
96
|
-
component: LayoutComponent,
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
function LayoutComponent() {
|
|
100
|
-
return (
|
|
101
|
-
<div className="flex min-h-screen">
|
|
102
|
-
<aside className="w-64 border-r p-4">
|
|
103
|
-
{/* Sidebar / navegación */}
|
|
104
|
-
</aside>
|
|
105
|
-
<main className="flex-1 p-6">
|
|
106
|
-
<Outlet />
|
|
107
|
-
</main>
|
|
108
|
-
</div>
|
|
109
|
-
);
|
|
110
|
-
}
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
---
|
|
114
|
-
|
|
115
|
-
## Con Search Params tipados
|
|
116
|
-
|
|
117
|
-
```typescript
|
|
118
|
-
import { createFileRoute } from '@tanstack/react-router';
|
|
119
|
-
import { z } from 'zod';
|
|
120
|
-
|
|
121
|
-
const searchSchema = z.object({
|
|
122
|
-
page: z.number().optional().default(1),
|
|
123
|
-
limit: z.number().optional().default(10),
|
|
124
|
-
filter: z.string().optional(),
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
export const Route = createFileRoute('/{path}')({
|
|
128
|
-
validateSearch: searchSchema,
|
|
129
|
-
component: RouteComponent,
|
|
130
|
-
});
|
|
131
|
-
|
|
132
|
-
function RouteComponent() {
|
|
133
|
-
const { page, limit, filter } = Route.useSearch();
|
|
134
|
-
// ...
|
|
135
|
-
}
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
---
|
|
139
|
-
|
|
140
|
-
## Con Loader
|
|
141
|
-
|
|
142
|
-
```typescript
|
|
143
|
-
import { createFileRoute } from '@tanstack/react-router';
|
|
144
|
-
import { queryClient } from '@/lib/query-client';
|
|
145
|
-
import { {name}ListQueryOptions } from '@/hooks/use-{name}';
|
|
146
|
-
|
|
147
|
-
export const Route = createFileRoute('/{path}')({
|
|
148
|
-
loader: () => queryClient.ensureQueryData({name}ListQueryOptions()),
|
|
149
|
-
component: RouteComponent,
|
|
150
|
-
pendingComponent: () => (
|
|
151
|
-
<div className="flex justify-center p-8">
|
|
152
|
-
<span className="loading loading-spinner loading-lg" />
|
|
153
|
-
</div>
|
|
154
|
-
),
|
|
155
|
-
});
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
---
|
|
159
|
-
|
|
160
|
-
## Redirect
|
|
161
|
-
|
|
162
|
-
```typescript
|
|
163
|
-
import { createFileRoute, redirect } from '@tanstack/react-router';
|
|
164
|
-
|
|
165
|
-
export const Route = createFileRoute('/{path}')({
|
|
166
|
-
beforeLoad: () => {
|
|
167
|
-
throw redirect({ to: '/{target}' });
|
|
168
|
-
},
|
|
169
|
-
});
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
---
|
|
173
|
-
|
|
174
|
-
## Con Guard de autenticación
|
|
175
|
-
|
|
176
|
-
```typescript
|
|
177
|
-
import { createFileRoute, redirect } from '@tanstack/react-router';
|
|
178
|
-
|
|
179
|
-
export const Route = createFileRoute('/{path}')({
|
|
180
|
-
beforeLoad: ({ context }) => {
|
|
181
|
-
if (!context.auth?.isAuthenticated) {
|
|
182
|
-
throw redirect({ to: '/login', search: { redirect: '/{path}' } });
|
|
183
|
-
}
|
|
184
|
-
},
|
|
185
|
-
component: RouteComponent,
|
|
186
|
-
});
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
---
|
|
190
|
-
|
|
191
|
-
## Mensajes finales obligatorios
|
|
192
|
-
|
|
193
|
-
Al finalizar, mostrar:
|
|
194
|
-
|
|
195
|
-
* Lista de archivos creados
|
|
196
|
-
* URL de acceso: `http://localhost:5173/{path}`
|
|
197
|
-
* Recordar ejecutar el dev server para que TanStack Router genere los tipos
|
|
198
|
-
* Si es layout, recordar crear rutas hijas
|
|
199
|
-
* Si usa loader, recordar crear el hook de query
|
|
200
|
-
|
|
201
|
-
---
|
|
202
|
-
|
|
203
|
-
## Criterios de calidad
|
|
204
|
-
|
|
205
|
-
* TanStack Router file-based routing correcto
|
|
206
|
-
* Search params tipados con Zod si aplica
|
|
207
|
-
* Loaders con TanStack Query
|
|
208
|
-
* Guards de autenticación si aplica
|
|
209
|
-
* Cumple ESLint y Prettier del proyecto
|
|
210
|
-
|
|
211
|
-
Este command debe **agregar rutas correctamente al sistema de TanStack Router manteniendo la consistencia del proyecto**.
|