create-huenei-template 0.2.16 → 0.2.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/dist/templates/frontend/pre-sales/.cursor/agents/pre-sales-builder.agent.md +92 -77
  2. package/dist/templates/frontend/pre-sales/.cursor/agents/pre-sales-demo-runner.agent.md +36 -0
  3. package/dist/templates/frontend/pre-sales/.cursor/agents/pre-sales-deploy.agent.md +87 -80
  4. package/dist/templates/frontend/pre-sales/.cursor/agents/qa-test-expert.agent.md +48 -49
  5. package/dist/templates/frontend/pre-sales/.cursor/commands/deploy-demo.md +73 -0
  6. package/dist/templates/frontend/pre-sales/.cursor/commands/new-component.md +192 -232
  7. package/dist/templates/frontend/pre-sales/.cursor/commands/prepare-deploy.md +135 -134
  8. package/dist/templates/frontend/pre-sales/.cursor/commands/ver-demo.md +58 -0
  9. package/dist/templates/frontend/pre-sales/.cursor/context/pre-sales.md +2 -0
  10. package/dist/templates/frontend/pre-sales/.cursor/hooks/injectPreSalesContext.ts +24 -1
  11. package/dist/templates/frontend/pre-sales/.cursor/hooks.json +23 -26
  12. package/dist/templates/frontend/pre-sales/.cursor/mcp.json +1 -5
  13. package/dist/templates/frontend/pre-sales/.cursor/rules/architech.mdc +199 -206
  14. package/dist/templates/frontend/pre-sales/.cursor/rules/component-patterns.mdc +4 -0
  15. package/dist/templates/frontend/pre-sales/.cursor/rules/deployment-ready.mdc +52 -52
  16. package/dist/templates/frontend/pre-sales/.cursor/rules/domain-business-bootstrap.mdc +74 -0
  17. package/dist/templates/frontend/pre-sales/.cursor/rules/pre-sales-mode.mdc +104 -60
  18. package/dist/templates/frontend/pre-sales/.cursor/rules/separation-of-concerns.mdc +41 -42
  19. package/dist/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/SKILL.md +296 -0
  20. package/dist/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/resources/deploy-codex.sh +301 -0
  21. package/dist/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/resources/deploy.sh +301 -0
  22. package/dist/templates/frontend/pre-sales/.impeccable.md +26 -0
  23. package/dist/templates/frontend/pre-sales/index.html +11 -2
  24. package/dist/templates/frontend/pre-sales/src/__tests__/components/layout/navbar.test.tsx +0 -1
  25. package/dist/templates/frontend/pre-sales/src/__tests__/components/layout/sidebar.test.tsx +58 -68
  26. package/dist/templates/frontend/pre-sales/src/__tests__/hooks/useAuth.test.tsx +2 -1
  27. package/dist/templates/frontend/pre-sales/src/__tests__/lib/auth.test.ts +102 -102
  28. package/dist/templates/frontend/pre-sales/src/__tests__/routes/__root.test.tsx +72 -72
  29. package/dist/templates/frontend/pre-sales/src/__tests__/routes/_authenticated.test.tsx +57 -58
  30. package/dist/templates/frontend/pre-sales/src/__tests__/routes/index.test.tsx +8 -43
  31. package/dist/templates/frontend/pre-sales/src/components/layout/navbar.tsx +121 -75
  32. package/dist/templates/frontend/pre-sales/src/components/layout/sidebar.tsx +42 -30
  33. package/dist/templates/frontend/pre-sales/src/components/providers/auth-provider.tsx +60 -0
  34. package/dist/templates/frontend/pre-sales/src/components/ui/button.tsx +1 -1
  35. package/dist/templates/frontend/pre-sales/src/components/ui/card.tsx +1 -1
  36. package/dist/templates/frontend/pre-sales/src/components/ui/combobox.tsx +308 -308
  37. package/dist/templates/frontend/pre-sales/src/components/ui/command.tsx +179 -182
  38. package/dist/templates/frontend/pre-sales/src/components/ui/input.tsx +2 -0
  39. package/dist/templates/frontend/pre-sales/src/components/ui/textarea.tsx +2 -0
  40. package/dist/templates/frontend/pre-sales/src/components/ui/theme-toggle.tsx +35 -0
  41. package/dist/templates/frontend/pre-sales/src/data/dashboard.ts +249 -255
  42. package/dist/templates/frontend/pre-sales/src/hooks/useAuth.ts +13 -0
  43. package/dist/templates/frontend/pre-sales/src/hooks/useTheme.ts +73 -0
  44. package/dist/templates/frontend/pre-sales/src/index.css +282 -134
  45. package/dist/templates/frontend/pre-sales/src/main.tsx +3 -2
  46. package/dist/templates/frontend/pre-sales/src/routes/__root.tsx +62 -54
  47. package/dist/templates/frontend/pre-sales/src/routes/_authenticated/app.tsx +20 -0
  48. package/dist/templates/frontend/pre-sales/src/routes/_authenticated.tsx +5 -4
  49. package/dist/templates/frontend/pre-sales/src/routes/auth/iniciar-sesion.tsx +173 -163
  50. package/dist/templates/frontend/pre-sales/src/routes/index.tsx +53 -198
  51. package/dist/templates/frontend/pre-sales/src/test/utils.tsx +2 -1
  52. package/dist/templates/frontend/pre-sales/src/vite-env.d.ts +11 -0
  53. package/package.json +1 -1
  54. package/templates/frontend/pre-sales/.cursor/agents/pre-sales-builder.agent.md +92 -77
  55. package/templates/frontend/pre-sales/.cursor/agents/pre-sales-demo-runner.agent.md +36 -0
  56. package/templates/frontend/pre-sales/.cursor/agents/pre-sales-deploy.agent.md +87 -80
  57. package/templates/frontend/pre-sales/.cursor/agents/qa-test-expert.agent.md +48 -49
  58. package/templates/frontend/pre-sales/.cursor/commands/deploy-demo.md +73 -0
  59. package/templates/frontend/pre-sales/.cursor/commands/new-component.md +192 -232
  60. package/templates/frontend/pre-sales/.cursor/commands/prepare-deploy.md +135 -134
  61. package/templates/frontend/pre-sales/.cursor/commands/ver-demo.md +58 -0
  62. package/templates/frontend/pre-sales/.cursor/context/pre-sales.md +2 -0
  63. package/templates/frontend/pre-sales/.cursor/hooks/injectPreSalesContext.ts +24 -1
  64. package/templates/frontend/pre-sales/.cursor/hooks.json +23 -26
  65. package/templates/frontend/pre-sales/.cursor/mcp.json +1 -5
  66. package/templates/frontend/pre-sales/.cursor/rules/architech.mdc +199 -206
  67. package/templates/frontend/pre-sales/.cursor/rules/component-patterns.mdc +4 -0
  68. package/templates/frontend/pre-sales/.cursor/rules/deployment-ready.mdc +52 -52
  69. package/templates/frontend/pre-sales/.cursor/rules/domain-business-bootstrap.mdc +74 -0
  70. package/templates/frontend/pre-sales/.cursor/rules/pre-sales-mode.mdc +104 -60
  71. package/templates/frontend/pre-sales/.cursor/rules/separation-of-concerns.mdc +41 -42
  72. package/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/SKILL.md +296 -0
  73. package/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/resources/deploy-codex.sh +301 -0
  74. package/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/resources/deploy.sh +301 -0
  75. package/templates/frontend/pre-sales/.impeccable.md +26 -0
  76. package/templates/frontend/pre-sales/index.html +11 -2
  77. package/templates/frontend/pre-sales/pnpm-lock.yaml +6448 -0
  78. package/templates/frontend/pre-sales/skills-lock.json +10 -0
  79. package/templates/frontend/pre-sales/src/__tests__/components/layout/navbar.test.tsx +0 -1
  80. package/templates/frontend/pre-sales/src/__tests__/components/layout/sidebar.test.tsx +58 -68
  81. package/templates/frontend/pre-sales/src/__tests__/hooks/useAuth.test.tsx +2 -1
  82. package/templates/frontend/pre-sales/src/__tests__/lib/auth.test.ts +102 -102
  83. package/templates/frontend/pre-sales/src/__tests__/routes/__root.test.tsx +72 -72
  84. package/templates/frontend/pre-sales/src/__tests__/routes/_authenticated.test.tsx +57 -58
  85. package/templates/frontend/pre-sales/src/__tests__/routes/index.test.tsx +8 -43
  86. package/templates/frontend/pre-sales/src/components/layout/navbar.tsx +121 -75
  87. package/templates/frontend/pre-sales/src/components/layout/sidebar.tsx +42 -30
  88. package/templates/frontend/pre-sales/src/components/providers/auth-provider.tsx +60 -0
  89. package/templates/frontend/pre-sales/src/components/ui/button.tsx +1 -1
  90. package/templates/frontend/pre-sales/src/components/ui/card.tsx +1 -1
  91. package/templates/frontend/pre-sales/src/components/ui/combobox.tsx +308 -308
  92. package/templates/frontend/pre-sales/src/components/ui/command.tsx +179 -182
  93. package/templates/frontend/pre-sales/src/components/ui/input.tsx +2 -0
  94. package/templates/frontend/pre-sales/src/components/ui/textarea.tsx +2 -0
  95. package/templates/frontend/pre-sales/src/components/ui/theme-toggle.tsx +35 -0
  96. package/templates/frontend/pre-sales/src/data/dashboard.ts +249 -255
  97. package/templates/frontend/pre-sales/src/hooks/useAuth.ts +13 -0
  98. package/templates/frontend/pre-sales/src/hooks/useTheme.ts +73 -0
  99. package/templates/frontend/pre-sales/src/index.css +282 -134
  100. package/templates/frontend/pre-sales/src/main.tsx +3 -2
  101. package/templates/frontend/pre-sales/src/routes/__root.tsx +62 -54
  102. package/templates/frontend/pre-sales/src/routes/_authenticated/app.tsx +20 -0
  103. package/templates/frontend/pre-sales/src/routes/_authenticated.tsx +5 -4
  104. package/templates/frontend/pre-sales/src/routes/auth/iniciar-sesion.tsx +173 -163
  105. package/templates/frontend/pre-sales/src/routes/index.tsx +53 -198
  106. package/templates/frontend/pre-sales/src/test/utils.tsx +2 -1
  107. package/templates/frontend/pre-sales/src/vite-env.d.ts +11 -0
@@ -1,163 +1,173 @@
1
- import { createFileRoute, Link, useNavigate } from "@tanstack/react-router";
2
- import { useForm } from "react-hook-form";
3
- import { standardSchemaResolver } from "@hookform/resolvers/standard-schema";
4
- import * as z from "zod";
5
- import { toast } from "react-toastify";
6
- import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
7
- import { Button } from "@/components/ui/button";
8
- import { Input } from "@/components/ui/input";
9
- import { PasswordInput } from "@/components/ui/password-input";
10
- import {
11
- Form,
12
- FormControl,
13
- FormField,
14
- FormItem,
15
- FormLabel,
16
- FormMessage,
17
- } from "@/components/ui/form";
18
- import { Separator } from "@/components/ui/separator";
19
- import { LogIn, User, Lock } from "lucide-react";
20
- import { useAuth } from "@/hooks/useAuth";
21
-
22
- const loginSchema = z.object({
23
- username: z.string().min(1, "El usuario es requerido"),
24
- password: z.string().min(1, "La contraseña es requerida"),
25
- });
26
-
27
- type LoginFormValues = z.infer<typeof loginSchema>;
28
-
29
- export const Route = createFileRoute("/auth/iniciar-sesion")({
30
- component: RouteComponent,
31
- });
32
-
33
- function RouteComponent() {
34
- const { login } = useAuth();
35
- const navigate = useNavigate();
36
-
37
- const form = useForm<LoginFormValues>({
38
- resolver: standardSchemaResolver(loginSchema),
39
- defaultValues: {
40
- username: "",
41
- password: "",
42
- },
43
- });
44
-
45
- const onSubmit = async (data: LoginFormValues) => {
46
- const success = await login(data.username, data.password);
47
-
48
- if (success) {
49
- toast.success("Sesión iniciada correctamente");
50
- await navigate({ to: "/dashboard" });
51
- } else {
52
- toast.error("Credenciales inválidas. Verificá tu usuario y contraseña.");
53
- }
54
- };
55
-
56
- return (
57
- <div className="min-h-screen flex items-center justify-center bg-base-100 px-4 py-12">
58
- <div className="w-full max-w-md">
59
- <div className="text-center mb-8">
60
- <h1 className="text-3xl font-bold text-base-content mb-2">
61
- Iniciar Sesión
62
- </h1>
63
- <p className="text-base-content/70">
64
- Ingresá tus credenciales para acceder a tu cuenta
65
- </p>
66
- </div>
67
-
68
- <Card>
69
- <CardHeader>
70
- <CardTitle className="flex items-center gap-2">
71
- <LogIn className="h-5 w-5" />
72
- Acceso
73
- </CardTitle>
74
- <CardDescription>Completá los siguientes campos para iniciar sesión</CardDescription>
75
- </CardHeader>
76
- <CardContent>
77
- <Form {...form}>
78
- <form onSubmit={form.handleSubmit(onSubmit)} className="space-y-6">
79
- <FormField
80
- control={form.control}
81
- name="username"
82
- render={({ field }) => (
83
- <FormItem>
84
- <FormLabel className="flex items-center gap-2">
85
- <User className="h-4 w-4" />
86
- Usuario
87
- </FormLabel>
88
- <FormControl>
89
- <Input type="text" placeholder="tu usuario" autoComplete="username" {...field} />
90
- </FormControl>
91
- <FormMessage />
92
- </FormItem>
93
- )}
94
- />
95
-
96
- <FormField
97
- control={form.control}
98
- name="password"
99
- render={({ field }) => (
100
- <FormItem>
101
- <FormLabel className="flex items-center gap-2">
102
- <Lock className="h-4 w-4" />
103
- Contraseña
104
- </FormLabel>
105
- <FormControl>
106
- <PasswordInput placeholder="••••••••" autoComplete="current-password" {...field} />
107
- </FormControl>
108
- <FormMessage />
109
- </FormItem>
110
- )}
111
- />
112
-
113
- <div className="flex items-center justify-between text-sm">
114
- <label className="flex items-center gap-2 cursor-pointer">
115
- <input type="checkbox" className="rounded border-border" />
116
- <span className="text-base-content/70">Recordarme</span>
117
- </label>
118
- <Link
119
- to="/auth/recuperar-password"
120
- className="text-primary hover:underline"
121
- >
122
- ¿Olvidaste tu contraseña?
123
- </Link>
124
- </div>
125
-
126
- <Button
127
- type="submit"
128
- className="w-full"
129
- size="lg"
130
- disabled={form.formState.isSubmitting}
131
- >
132
- {form.formState.isSubmitting ? (
133
- <span className="loading loading-spinner loading-sm" />
134
- ) : (
135
- "Iniciar Sesión"
136
- )}
137
- </Button>
138
- </form>
139
- </Form>
140
-
141
- <div className="mt-6">
142
- <Separator />
143
- <div className="mt-6 text-center text-sm">
144
- <span className="text-base-content/70">¿No tenés una cuenta? </span>
145
- <Link to="/auth/registro" className="text-primary font-medium hover:underline">
146
- Registrate aquí
147
- </Link>
148
- </div>
149
- </div>
150
-
151
- <div className="mt-4 rounded-lg bg-base-200 p-3 text-center text-sm text-base-content/70">
152
- <p className="font-medium mb-1">Credenciales de prueba</p>
153
- <p>
154
- Usuario: <code className="font-mono text-primary">huenei</code> &mdash;
155
- Contraseña: <code className="font-mono text-primary">123</code>
156
- </p>
157
- </div>
158
- </CardContent>
159
- </Card>
160
- </div>
161
- </div>
162
- );
163
- }
1
+ import { createFileRoute, Link, useNavigate } from "@tanstack/react-router";
2
+ import { useForm } from "react-hook-form";
3
+ import { standardSchemaResolver } from "@hookform/resolvers/standard-schema";
4
+ import * as z from "zod";
5
+ import { toast } from "react-toastify";
6
+ import { Button } from "@/components/ui/button";
7
+ import { Input } from "@/components/ui/input";
8
+ import { PasswordInput } from "@/components/ui/password-input";
9
+ import {
10
+ Form,
11
+ FormControl,
12
+ FormField,
13
+ FormItem,
14
+ FormLabel,
15
+ FormMessage,
16
+ } from "@/components/ui/form";
17
+ import { useAuth } from "@/hooks/useAuth";
18
+
19
+ const loginSchema = z.object({
20
+ username: z.string().min(1, "El usuario es requerido"),
21
+ password: z.string().min(1, "La contraseña es requerida"),
22
+ });
23
+
24
+ type LoginFormValues = z.infer<typeof loginSchema>;
25
+
26
+ export const Route = createFileRoute("/auth/iniciar-sesion")({
27
+ component: RouteComponent,
28
+ });
29
+
30
+ function RouteComponent() {
31
+ const { login } = useAuth();
32
+ const navigate = useNavigate();
33
+
34
+ const form = useForm<LoginFormValues>({
35
+ resolver: standardSchemaResolver(loginSchema),
36
+ defaultValues: { username: "", password: "" },
37
+ });
38
+
39
+ const onSubmit = async (data: LoginFormValues) => {
40
+ const success = await login(data.username, data.password);
41
+ if (success) {
42
+ toast.success("Sesión iniciada correctamente");
43
+ await navigate({ to: "/" });
44
+ } else {
45
+ toast.error("Credenciales inválidas. Verificá tu usuario y contraseña.");
46
+ }
47
+ };
48
+
49
+ return (
50
+ <div className="grid min-h-screen lg:grid-cols-2">
51
+ {/* Branding panel */}
52
+ <div className="relative hidden flex-col justify-between overflow-hidden bg-secondary p-12 text-secondary-content lg:flex">
53
+ <div className="pointer-events-none absolute inset-0 bg-[radial-gradient(ellipse_at_70%_30%,oklch(72%_0.08_55/12%),transparent_60%)]" />
54
+
55
+ <div className="relative">
56
+ <Link to="/" className="font-display text-xl font-bold tracking-tight">
57
+ Huenei
58
+ </Link>
59
+ </div>
60
+
61
+ <div className="relative max-w-sm">
62
+ <h1 className="font-display text-4xl font-bold leading-tight tracking-tight">
63
+ Software que impulsa tu negocio
64
+ </h1>
65
+ <p className="mt-4 text-base leading-relaxed text-secondary-content/70">
66
+ Accedé al panel de gestión para visualizar métricas, proyectos y
67
+ el estado de tu operación en tiempo real.
68
+ </p>
69
+ </div>
70
+
71
+ <p className="relative text-xs text-secondary-content/40">
72
+ &copy; {new Date().getFullYear()} Huenei. Todos los derechos reservados.
73
+ </p>
74
+ </div>
75
+
76
+ {/* Form panel */}
77
+ <div className="flex items-center justify-center px-4 py-12">
78
+ <div className="w-full max-w-sm animate-fade-in-up">
79
+ <div className="mb-8 lg:hidden">
80
+ <Link to="/" className="font-display text-xl font-bold text-base-content">
81
+ Huenei
82
+ </Link>
83
+ </div>
84
+
85
+ <h2 className="font-display text-2xl font-bold tracking-tight text-base-content">
86
+ Iniciar sesión
87
+ </h2>
88
+ <p className="mt-2 text-sm text-base-content/50">
89
+ Ingresá tus credenciales para acceder a tu cuenta
90
+ </p>
91
+
92
+ <Form {...form}>
93
+ <form onSubmit={form.handleSubmit(onSubmit)} className="mt-8 space-y-5">
94
+ <FormField
95
+ control={form.control}
96
+ name="username"
97
+ render={({ field }) => (
98
+ <FormItem>
99
+ <FormLabel>Usuario</FormLabel>
100
+ <FormControl>
101
+ <Input
102
+ type="text"
103
+ placeholder="tu usuario"
104
+ autoComplete="username"
105
+ {...field}
106
+ />
107
+ </FormControl>
108
+ <FormMessage />
109
+ </FormItem>
110
+ )}
111
+ />
112
+
113
+ <FormField
114
+ control={form.control}
115
+ name="password"
116
+ render={({ field }) => (
117
+ <FormItem>
118
+ <div className="flex items-center justify-between">
119
+ <FormLabel>Contraseña</FormLabel>
120
+ <Link
121
+ to="/auth/recuperar-password"
122
+ className="text-xs text-primary hover:underline"
123
+ tabIndex={-1}
124
+ >
125
+ ¿Olvidaste tu contraseña?
126
+ </Link>
127
+ </div>
128
+ <FormControl>
129
+ <PasswordInput
130
+ placeholder="••••••••"
131
+ autoComplete="current-password"
132
+ {...field}
133
+ />
134
+ </FormControl>
135
+ <FormMessage />
136
+ </FormItem>
137
+ )}
138
+ />
139
+
140
+ <Button
141
+ type="submit"
142
+ className="w-full"
143
+ size="lg"
144
+ disabled={form.formState.isSubmitting}
145
+ >
146
+ {form.formState.isSubmitting ? (
147
+ <span className="loading loading-spinner loading-sm" />
148
+ ) : (
149
+ "Continuar"
150
+ )}
151
+ </Button>
152
+ </form>
153
+ </Form>
154
+
155
+ <p className="mt-8 text-center text-sm text-base-content/50">
156
+ ¿No tenés cuenta?{" "}
157
+ <Link to="/auth/registro" className="font-medium text-primary hover:underline">
158
+ Registrate
159
+ </Link>
160
+ </p>
161
+
162
+ <div className="mt-6 rounded-lg bg-base-200/60 px-4 py-3 text-center text-sm text-base-content/50">
163
+ <p className="font-medium text-base-content/70">Credenciales de prueba</p>
164
+ <p className="mt-0.5">
165
+ <code className="text-xs font-mono text-primary">huenei</code> /{" "}
166
+ <code className="text-xs font-mono text-primary">123</code>
167
+ </p>
168
+ </div>
169
+ </div>
170
+ </div>
171
+ </div>
172
+ );
173
+ }
@@ -1,213 +1,68 @@
1
- import { createFileRoute, Link } from "@tanstack/react-router";
2
- import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
3
- import { Button } from "@/components/ui/button";
4
- import { Badge } from "@/components/ui/badge";
5
- import {
6
- Code,
7
- Palette,
8
- Zap,
9
- Database,
10
- FileText,
11
- Route as RouteIcon,
12
- Settings,
13
- BookOpen,
14
- Table2,
15
- } from "lucide-react";
1
+ import { createFileRoute } from "@tanstack/react-router";
2
+ import { Keyboard, MessageSquare, Globe, FolderOpen, Terminal, Undo2, Redo2, Search } from "lucide-react";
16
3
 
17
4
  export const Route = createFileRoute("/")({
18
5
  component: Index,
19
6
  });
20
7
 
8
+ const shortcuts = [
9
+ { keys: ["Ctrl", "Alt", "B"], label: "Abrir chat de agente", icon: MessageSquare },
10
+ { keys: ["Ctrl", "Shift", "B"], label: "Abrir navegador", icon: Globe },
11
+ { keys: ["Ctrl", "B"], label: "Ver carpeta de archivos", icon: FolderOpen },
12
+ { keys: ["Ctrl", "`"], label: "Abrir/cerrar terminal", icon: Terminal },
13
+ { keys: ["Ctrl", "Shift", "P"], label: "Paleta de comandos", icon: Search },
14
+ { keys: ["Ctrl", "Z"], label: "Deshacer cambio", icon: Undo2 },
15
+ { keys: ["Ctrl", "Shift", "Z"], label: "Rehacer cambio", icon: Redo2 },
16
+ { keys: ["Ctrl", "S"], label: "Guardar archivo", icon: Keyboard },
17
+ ];
18
+
19
+ function Kbd({ children }: { children: React.ReactNode }) {
20
+ return (
21
+ <kbd className="inline-flex items-center justify-center min-w-7 px-1.5 py-0.5 rounded-md bg-base-200 border border-base-300/60 text-[0.7rem] font-mono font-semibold text-base-content/80 shadow-[0_1px_0_1px_oklch(92%_0.012_260)]">
22
+ {children}
23
+ </kbd>
24
+ );
25
+ }
26
+
21
27
  function Index() {
22
28
  return (
23
- <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-16">
24
- <div className="text-center mb-16">
25
- <h2 className="text-5xl font-bold text-base-content mb-6">Huenei Frontend</h2>
26
- <p className="text-xl text-base-content/70 max-w-2xl mx-auto mb-6">
27
- Plantilla estandarizada para los proyectos de frontend
29
+ <div className="flex min-h-screen flex-col items-center justify-center px-4">
30
+ <div className="w-full max-w-2xl text-center">
31
+ <h1 className="animate-fade-in-up stagger-1 font-display text-5xl font-bold tracking-tight text-base-content sm:text-6xl">
32
+ Pre-sale Template
33
+ </h1>
34
+
35
+ <p className="animate-fade-in-up stagger-2 mt-6 text-lg leading-relaxed text-base-content/55 max-w-xl mx-auto">
36
+ Comienza dandole instrucciones precisas y detalladas sobre el dominio de negocio a un
37
+ agente de Cursor en <strong className="text-base-content/90">Modo Plan</strong>. Responde
38
+ sus preguntas y mira el resultado.
28
39
  </p>
29
- <div className="flex flex-wrap justify-center gap-2 mb-6">
30
- <Badge variant="outline">Vite</Badge>
31
- <Badge variant="outline">React 19</Badge>
32
- <Badge variant="outline">TypeScript</Badge>
33
- <Badge variant="outline">Zod</Badge>
34
- <Badge variant="outline">Tailwind CSS v4</Badge>
35
- <Badge variant="outline">TanStack Query</Badge>
36
- <Badge variant="outline">TanStack Router</Badge>
37
- <Badge variant="outline">TanStack Table</Badge>
38
- <Badge variant="outline">shadcn/ui</Badge>
39
- <Badge variant="outline">Vitest</Badge>
40
- </div>
41
- </div>
42
40
 
43
- {/* CTA Section */}
44
- <Card className="bg-primary border-0 text-primary-content mb-8">
45
- <CardContent className="pt-8 pb-8 text-center">
46
- <h3 className="text-3xl font-bold mb-4">¿Listo para comenzar?</h3>
47
- <p className="text-primary-content/90 mb-6 max-w-2xl mx-auto">
48
- Este template está listo para ser personalizado según las necesidades de tu proyecto.
49
- Consulta la documentación completa para conocer todas las características y mejores
50
- prácticas.
41
+ <div className="animate-fade-in-up stagger-3 mt-12">
42
+ <p className="text-xs font-bold uppercase tracking-widest text-base-content/35 mb-4">
43
+ Atajos de teclado
51
44
  </p>
52
- <div className="flex flex-col sm:flex-row gap-4 justify-center">
53
- <Link to="/documentacion">
54
- <Button
55
- size="default"
56
- variant="ghost"
57
- className="bg-base-100 text-primary hover:bg-base-200 w-full sm:w-auto"
45
+
46
+ <div className="grid grid-cols-1 sm:grid-cols-2 gap-2">
47
+ {shortcuts.map((s) => (
48
+ <div
49
+ key={s.label}
50
+ className="flex items-center gap-3 rounded-lg border border-base-300/50 bg-base-100 px-4 py-3 text-left transition-colors duration-(--duration-fast) hover:bg-base-200/50"
58
51
  >
59
- <BookOpen className="w-4 h-4 mr-2" />
60
- Ver Documentación
61
- </Button>
62
- </Link>
52
+ <s.icon className="size-4 shrink-0 text-base-content/35" />
53
+ <span className="flex-1 text-sm text-base-content/65">{s.label}</span>
54
+ <div className="flex items-center gap-1">
55
+ {s.keys.map((k, i) => (
56
+ <span key={i} className="flex items-center gap-1">
57
+ {i > 0 && <span className="text-base-content/25 text-xs">+</span>}
58
+ <Kbd>{k}</Kbd>
59
+ </span>
60
+ ))}
61
+ </div>
62
+ </div>
63
+ ))}
63
64
  </div>
64
- </CardContent>
65
- </Card>
66
-
67
- {/* Features Grid */}
68
- <div className="grid md:grid-cols-2 lg:grid-cols-4 gap-6 mb-16">
69
- <Card className="hover:shadow-lg transition-shadow">
70
- <CardHeader>
71
- <div className="w-12 h-12 bg-accent/10 rounded-lg flex items-center justify-center mb-4">
72
- <Code className="w-6 h-6 text-accent" />
73
- </div>
74
- <CardTitle>React 19 + TypeScript</CardTitle>
75
- <CardDescription>
76
- Framework moderno con React Compiler habilitado y type safety estricto.
77
- </CardDescription>
78
- </CardHeader>
79
- </Card>
80
-
81
- <Card className="hover:shadow-lg transition-shadow">
82
- <CardHeader>
83
- <div className="w-12 h-12 bg-info/10 rounded-lg flex items-center justify-center mb-4">
84
- <Database className="w-6 h-6 text-info" />
85
- </div>
86
- <CardTitle>TanStack Query</CardTitle>
87
- <CardDescription>
88
- Manejo de estado del servidor, caché y sincronización de datos con DevTools.
89
- </CardDescription>
90
- </CardHeader>
91
- </Card>
92
-
93
- <Card className="hover:shadow-lg transition-shadow">
94
- <CardHeader>
95
- <div className="w-12 h-12 bg-success/10 rounded-lg flex items-center justify-center mb-4">
96
- <RouteIcon className="w-6 h-6 text-success" />
97
- </div>
98
- <CardTitle>TanStack Router</CardTitle>
99
- <CardDescription>
100
- Enrutamiento type-safe con file-based routing y preload automático.
101
- </CardDescription>
102
- </CardHeader>
103
- </Card>
104
-
105
- <Card className="hover:shadow-lg transition-shadow">
106
- <CardHeader>
107
- <div className="w-12 h-12 bg-primary/10 rounded-lg flex items-center justify-center mb-4">
108
- <Table2 className="w-6 h-6 text-primary" />
109
- </div>
110
- <CardTitle>TanStack Table</CardTitle>
111
- <CardDescription>
112
- Tablas headless con ordenamiento, filtro global y DataTable integrado en los
113
- componentes UI.
114
- </CardDescription>
115
- </CardHeader>
116
- </Card>
117
-
118
- <Card className="hover:shadow-lg transition-shadow">
119
- <CardHeader>
120
- <div className="w-12 h-12 bg-warning/10 rounded-lg flex items-center justify-center mb-4">
121
- <Palette className="w-6 h-6 text-warning" />
122
- </div>
123
- <CardTitle>Tailwind CSS v4</CardTitle>
124
- <CardDescription>
125
- Framework CSS utility-first con configuración moderna usando @theme.
126
- </CardDescription>
127
- </CardHeader>
128
- </Card>
129
-
130
- <Card className="hover:shadow-lg transition-shadow">
131
- <CardHeader>
132
- <div className="w-12 h-12 bg-secondary/10 rounded-lg flex items-center justify-center mb-4">
133
- <Code className="w-6 h-6 text-secondary" />
134
- </div>
135
- <CardTitle>shadcn/ui</CardTitle>
136
- <CardDescription>
137
- Componentes UI reutilizables construidos con Radix UI y Tailwind CSS.
138
- </CardDescription>
139
- </CardHeader>
140
- </Card>
141
-
142
- <Card className="hover:shadow-lg transition-shadow">
143
- <CardHeader>
144
- <div className="w-12 h-12 bg-error/10 rounded-lg flex items-center justify-center mb-4">
145
- <FileText className="w-6 h-6 text-error" />
146
- </div>
147
- <CardTitle>Zod</CardTitle>
148
- <CardDescription>
149
- Validación de esquemas TypeScript-first con integración para React Hook Form.
150
- </CardDescription>
151
- </CardHeader>
152
- </Card>
153
-
154
- <Card className="hover:shadow-lg transition-shadow">
155
- <CardHeader>
156
- <div className="w-12 h-12 bg-neutral/10 rounded-lg flex items-center justify-center mb-4">
157
- <Settings className="w-6 h-6 text-neutral" />
158
- </div>
159
- <CardTitle>Vitest</CardTitle>
160
- <CardDescription>
161
- Testing rápido con React Testing Library para componentes y lógica.
162
- </CardDescription>
163
- </CardHeader>
164
- </Card>
165
- </div>
166
-
167
- {/* Quick Start Section */}
168
- <div className="grid md:grid-cols-2 gap-6 mb-16">
169
- <Card>
170
- <CardHeader>
171
- <CardTitle>Requisitos previos</CardTitle>
172
- <CardDescription>Lo que necesitas para comenzar con este template</CardDescription>
173
- </CardHeader>
174
- <CardContent>
175
- <ul className="list-disc list-inside space-y-2 text-base-content/70">
176
- <li>Node.js 18+</li>
177
- <li>pnpm</li>
178
- <li>Conocimientos básicos de React y TypeScript</li>
179
- <li>
180
- <strong className="text-base-content">Cursor IDE</strong> (recomendado para mejor
181
- experiencia de desarrollo)
182
- </li>
183
- </ul>
184
- </CardContent>
185
- </Card>
186
-
187
- <Card>
188
- <CardHeader>
189
- <CardTitle>Comandos rápidos</CardTitle>
190
- <CardDescription>Scripts principales para desarrollo y producción</CardDescription>
191
- </CardHeader>
192
- <CardContent className="space-y-3">
193
- <h3 className="text-base font-semibold mb-3">Instalar dependencias</h3>
194
- <div className="bg-base-200 rounded-lg p-3 font-mono text-sm text-base-content">
195
- <code>pnpm install</code>
196
- </div>
197
- <h3 className="text-base font-semibold mb-3">Ejecutar en desarrollo</h3>
198
- <div className="bg-base-200 rounded-lg p-3 font-mono text-sm text-base-content">
199
- <code>pnpm dev</code>
200
- </div>
201
- <h3 className="text-base font-semibold mb-3">Build para producción</h3>
202
- <div className="bg-base-200 rounded-lg p-3 font-mono text-sm text-base-content">
203
- <code>pnpm build</code>
204
- </div>
205
- <h3 className="text-base font-semibold mb-3">Ejecutar tests</h3>
206
- <div className="bg-base-200 rounded-lg p-3 font-mono text-sm text-base-content">
207
- <code>pnpm test</code>
208
- </div>
209
- </CardContent>
210
- </Card>
65
+ </div>
211
66
  </div>
212
67
  </div>
213
68
  );
@@ -1,7 +1,8 @@
1
1
  import { render, type RenderOptions } from '@testing-library/react'
2
2
  import userEvent from '@testing-library/user-event'
3
3
  import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
4
- import { AuthProvider, type AuthState } from '@/hooks/useAuth'
4
+ import { AuthProvider } from '@/components/providers/auth-provider'
5
+ import type { AuthState } from '@/hooks/useAuth'
5
6
 
6
7
  function createTestQueryClient() {
7
8
  return new QueryClient({
@@ -0,0 +1,11 @@
1
+ /// <reference types="vite/client" />
2
+
3
+ interface ViewTransition {
4
+ finished: Promise<void>;
5
+ ready: Promise<void>;
6
+ updateCallbackDone: Promise<void>;
7
+ }
8
+
9
+ interface Document {
10
+ startViewTransition?(callback: () => void | Promise<void>): ViewTransition;
11
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-huenei-template",
3
- "version": "0.2.16",
3
+ "version": "0.2.17",
4
4
  "packageManager": "pnpm@9.15.5",
5
5
  "type": "module",
6
6
  "bin": {