create-apppaaaul 2.0.11 → 2.0.13
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/README.md +20 -20
- package/dist/index.js +0 -0
- package/dist/index.js.map +1 -1
- package/dist/templates/nextjs-ts-clean/.cursor/rules/bootstrap-cursor-rules.mdc +44 -44
- package/dist/templates/nextjs-ts-clean/.cursor/rules/front-end-cursor-rules.mdc +37 -37
- package/dist/templates/nextjs-ts-clean/.cursor/rules/optimized-nextjs-typescript-best-practices-modern-ui-ux.mdc +57 -57
- package/dist/templates/{nextjs-ts-landing-drizzle → nextjs-ts-clean/project/.cursor}/rules/bootstrap-cursor-rules.mdc +44 -44
- package/dist/templates/{nextjs-ts-landing-drizzle → nextjs-ts-clean/project/.cursor}/rules/front-end-cursor-rules.mdc +37 -37
- package/dist/templates/{nextjs-ts-landing-prisma → nextjs-ts-clean/project/.cursor}/rules/optimized-nextjs-typescript-best-practices-modern-ui-ux.mdc +57 -57
- package/dist/templates/nextjs-ts-clean/project/.editorconfig +9 -9
- package/dist/templates/nextjs-ts-clean/project/.vscode/launch.json +28 -28
- package/dist/templates/nextjs-ts-clean/project/.vscode/settings.json +8 -8
- package/dist/templates/nextjs-ts-clean/project/README.md +15 -15
- package/dist/templates/nextjs-ts-clean/project/components.json +20 -20
- package/dist/templates/nextjs-ts-clean/project/eslint.config.mjs +21 -10
- package/dist/templates/nextjs-ts-clean/project/next.config.mjs +13 -13
- package/dist/templates/nextjs-ts-clean/project/package.json +48 -49
- package/dist/templates/nextjs-ts-clean/project/postcss.config.js +3 -3
- package/dist/templates/nextjs-ts-clean/project/src/app/globals.css +228 -228
- package/dist/templates/nextjs-ts-clean/project/src/app/layout.tsx +26 -26
- package/dist/templates/nextjs-ts-clean/project/src/app/page.tsx +5 -5
- package/dist/templates/nextjs-ts-clean/project/src/components/ui/button.tsx +49 -49
- package/dist/templates/nextjs-ts-clean/project/src/lib/utils.ts +6 -6
- package/dist/templates/nextjs-ts-clean/project/tailwind.config.ts +94 -94
- package/dist/templates/nextjs-ts-clean/project/tsconfig.json +26 -26
- package/dist/templates/nextjs-ts-landing/project/.editorconfig +9 -9
- package/dist/templates/nextjs-ts-landing/project/.vscode/launch.json +28 -28
- package/dist/templates/nextjs-ts-landing/project/.vscode/settings.json +8 -8
- package/dist/templates/{nextjs-ts-landing-prisma → nextjs-ts-landing-drizzle/project/.cursor}/rules/bootstrap-cursor-rules.mdc +44 -44
- package/dist/templates/{nextjs-ts-landing-prisma → nextjs-ts-landing-drizzle/project/.cursor}/rules/front-end-cursor-rules.mdc +37 -37
- package/dist/templates/nextjs-ts-landing-drizzle/{rules → project/.cursor/rules}/optimized-nextjs-typescript-best-practices-modern-ui-ux.mdc +57 -57
- package/dist/templates/nextjs-ts-landing-drizzle/project/.editorconfig +9 -9
- package/dist/templates/nextjs-ts-landing-drizzle/project/.vscode/launch.json +28 -28
- package/dist/templates/nextjs-ts-landing-drizzle/project/.vscode/settings.json +8 -8
- package/dist/templates/nextjs-ts-landing-drizzle/project/README.md +15 -15
- package/dist/templates/nextjs-ts-landing-drizzle/project/components.json +20 -20
- package/dist/templates/nextjs-ts-landing-drizzle/project/drizzle.config.ts +11 -11
- package/dist/templates/nextjs-ts-landing-drizzle/project/eslint.config.mjs +183 -0
- package/dist/templates/nextjs-ts-landing-drizzle/project/next.config.mjs +10 -10
- package/dist/templates/nextjs-ts-landing-drizzle/project/package.json +57 -58
- package/dist/templates/nextjs-ts-landing-drizzle/project/postcss.config.js +3 -3
- package/dist/templates/nextjs-ts-landing-drizzle/project/src/app/api/auth/[...nextauth]/route.ts +3 -3
- package/dist/templates/nextjs-ts-landing-drizzle/project/src/app/globals.css +161 -161
- package/dist/templates/nextjs-ts-landing-drizzle/project/src/app/layout.tsx +25 -25
- package/dist/templates/nextjs-ts-landing-drizzle/project/src/app/page.tsx +5 -5
- package/dist/templates/nextjs-ts-landing-drizzle/project/src/auth.ts +79 -79
- package/dist/templates/nextjs-ts-landing-drizzle/project/src/components/ui/button.tsx +49 -49
- package/dist/templates/nextjs-ts-landing-drizzle/project/src/db/index.ts +25 -25
- package/dist/templates/nextjs-ts-landing-drizzle/project/src/db/schema.ts +93 -93
- package/dist/templates/nextjs-ts-landing-drizzle/project/src/lib/utils.ts +6 -6
- package/dist/templates/nextjs-ts-landing-drizzle/project/tailwind.config.ts +80 -80
- package/dist/templates/nextjs-ts-landing-drizzle/project/tsconfig.json +27 -27
- package/dist/templates/nextjs-ts-landing-prisma/project/.cursor/rules/bootstrap-cursor-rules.mdc +45 -0
- package/dist/templates/nextjs-ts-landing-prisma/project/.cursor/rules/front-end-cursor-rules.mdc +38 -0
- package/dist/templates/nextjs-ts-landing-prisma/project/.cursor/rules/optimized-nextjs-typescript-best-practices-modern-ui-ux.mdc +58 -0
- package/dist/templates/nextjs-ts-landing-prisma/project/.editorconfig +9 -9
- package/dist/templates/nextjs-ts-landing-prisma/project/.vscode/launch.json +28 -28
- package/dist/templates/nextjs-ts-landing-prisma/project/.vscode/settings.json +8 -8
- package/dist/templates/nextjs-ts-landing-prisma/project/README.md +15 -15
- package/dist/templates/nextjs-ts-landing-prisma/project/components.json +20 -20
- package/dist/templates/nextjs-ts-landing-prisma/project/eslint.config.mjs +25 -14
- package/dist/templates/nextjs-ts-landing-prisma/project/next.config.mjs +10 -10
- package/dist/templates/nextjs-ts-landing-prisma/project/package.json +57 -59
- package/dist/templates/nextjs-ts-landing-prisma/project/postcss.config.mjs +3 -3
- package/dist/templates/nextjs-ts-landing-prisma/project/prisma/migrations/20250329125127_init/migration.sql +25 -25
- package/dist/templates/nextjs-ts-landing-prisma/project/prisma/migrations/migration_lock.toml +2 -2
- package/dist/templates/nextjs-ts-landing-prisma/project/prisma/schema.prisma +24 -24
- package/dist/templates/nextjs-ts-landing-prisma/project/src/app/api/auth/[...nextauth]/route.ts +3 -3
- package/dist/templates/nextjs-ts-landing-prisma/project/src/app/globals.css +205 -205
- package/dist/templates/nextjs-ts-landing-prisma/project/src/app/layout.tsx +26 -26
- package/dist/templates/nextjs-ts-landing-prisma/project/src/app/page.tsx +5 -5
- package/dist/templates/nextjs-ts-landing-prisma/project/src/auth.ts +31 -31
- package/dist/templates/nextjs-ts-landing-prisma/project/src/components/ui/button.tsx +49 -49
- package/dist/templates/nextjs-ts-landing-prisma/project/src/lib/db.ts +9 -9
- package/dist/templates/nextjs-ts-landing-prisma/project/src/lib/utils.ts +6 -6
- package/dist/templates/nextjs-ts-landing-prisma/project/tailwind.config.ts +80 -80
- package/dist/templates/nextjs-ts-landing-prisma/project/tsconfig.json +27 -27
- package/package.json +43 -43
- package/dist/templates/nextjs-ts-landing/project/.eslintrc.cjs +0 -101
|
@@ -1,161 +1,161 @@
|
|
|
1
|
-
@import "tailwindcss";
|
|
2
|
-
|
|
3
|
-
@layer base {
|
|
4
|
-
:root {
|
|
5
|
-
--background: 15 23 42; /* slate-900 */
|
|
6
|
-
--foreground: 241 245 249; /* slate-100 */
|
|
7
|
-
|
|
8
|
-
--card: 23 37 84; /* blue-950 */
|
|
9
|
-
--card-foreground: 241 245 249; /* slate-100 */
|
|
10
|
-
|
|
11
|
-
--popover: 23 37 84; /* blue-950 */
|
|
12
|
-
--popover-foreground: 241 245 249; /* slate-100 */
|
|
13
|
-
|
|
14
|
-
--primary: 37 99 235; /* blue-600 */
|
|
15
|
-
--primary-foreground: 241 245 249; /* slate-100 */
|
|
16
|
-
|
|
17
|
-
--secondary: 147 197 253; /* blue-300 */
|
|
18
|
-
--secondary-foreground: 15 23 42; /* slate-900 */
|
|
19
|
-
|
|
20
|
-
--muted: 51 65 85; /* slate-700 */
|
|
21
|
-
--muted-foreground: 148 163 184; /* slate-400 */
|
|
22
|
-
|
|
23
|
-
--accent: 147 197 253; /* blue-300 */
|
|
24
|
-
--accent-foreground: 15 23 42; /* slate-900 */
|
|
25
|
-
|
|
26
|
-
--destructive: 239 68 68; /* red-500 */
|
|
27
|
-
--destructive-foreground: 241 245 249; /* slate-100 */
|
|
28
|
-
|
|
29
|
-
--border: 147 197 253; /* blue-300 */
|
|
30
|
-
--input: 147 197 253; /* blue-300 */
|
|
31
|
-
--ring: 241 245 249; /* slate-100 */
|
|
32
|
-
|
|
33
|
-
--radius: 0.5rem;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
@layer base {
|
|
38
|
-
* {
|
|
39
|
-
@apply border-border;
|
|
40
|
-
}
|
|
41
|
-
body {
|
|
42
|
-
@apply bg-background text-foreground;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
@theme inline {
|
|
47
|
-
--radius-sm: calc(var(--radius) - 4px);
|
|
48
|
-
--radius-md: calc(var(--radius) - 2px);
|
|
49
|
-
--radius-lg: var(--radius);
|
|
50
|
-
--radius-xl: calc(var(--radius) + 4px);
|
|
51
|
-
--color-background: var(--background);
|
|
52
|
-
--color-foreground: var(--foreground);
|
|
53
|
-
--color-card: var(--card);
|
|
54
|
-
--color-card-foreground: var(--card-foreground);
|
|
55
|
-
--color-popover: var(--popover);
|
|
56
|
-
--color-popover-foreground: var(--popover-foreground);
|
|
57
|
-
--color-primary: var(--primary);
|
|
58
|
-
--color-primary-foreground: var(--primary-foreground);
|
|
59
|
-
--color-secondary: var(--secondary);
|
|
60
|
-
--color-secondary-foreground: var(--secondary-foreground);
|
|
61
|
-
--color-muted: var(--muted);
|
|
62
|
-
--color-muted-foreground: var(--muted-foreground);
|
|
63
|
-
--color-accent: var(--accent);
|
|
64
|
-
--color-accent-foreground: var(--accent-foreground);
|
|
65
|
-
--color-destructive: var(--destructive);
|
|
66
|
-
--color-border: var(--border);
|
|
67
|
-
--color-input: var(--input);
|
|
68
|
-
--color-ring: var(--ring);
|
|
69
|
-
--color-chart-1: var(--chart-1);
|
|
70
|
-
--color-chart-2: var(--chart-2);
|
|
71
|
-
--color-chart-3: var(--chart-3);
|
|
72
|
-
--color-chart-4: var(--chart-4);
|
|
73
|
-
--color-chart-5: var(--chart-5);
|
|
74
|
-
--color-sidebar: var(--sidebar);
|
|
75
|
-
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
76
|
-
--color-sidebar-primary: var(--sidebar-primary);
|
|
77
|
-
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
78
|
-
--color-sidebar-accent: var(--sidebar-accent);
|
|
79
|
-
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
80
|
-
--color-sidebar-border: var(--sidebar-border);
|
|
81
|
-
--color-sidebar-ring: var(--sidebar-ring);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
:root {
|
|
85
|
-
--radius: 0.625rem;
|
|
86
|
-
--background: oklch(1 0 0);
|
|
87
|
-
--foreground: oklch(0.145 0 0);
|
|
88
|
-
--card: oklch(1 0 0);
|
|
89
|
-
--card-foreground: oklch(0.145 0 0);
|
|
90
|
-
--popover: oklch(1 0 0);
|
|
91
|
-
--popover-foreground: oklch(0.145 0 0);
|
|
92
|
-
--primary: oklch(0.205 0 0);
|
|
93
|
-
--primary-foreground: oklch(0.985 0 0);
|
|
94
|
-
--secondary: oklch(0.97 0 0);
|
|
95
|
-
--secondary-foreground: oklch(0.205 0 0);
|
|
96
|
-
--muted: oklch(0.97 0 0);
|
|
97
|
-
--muted-foreground: oklch(0.556 0 0);
|
|
98
|
-
--accent: oklch(0.97 0 0);
|
|
99
|
-
--accent-foreground: oklch(0.205 0 0);
|
|
100
|
-
--destructive: oklch(0.577 0.245 27.325);
|
|
101
|
-
--border: oklch(0.922 0 0);
|
|
102
|
-
--input: oklch(0.922 0 0);
|
|
103
|
-
--ring: oklch(0.708 0 0);
|
|
104
|
-
--chart-1: oklch(0.646 0.222 41.116);
|
|
105
|
-
--chart-2: oklch(0.6 0.118 184.704);
|
|
106
|
-
--chart-3: oklch(0.398 0.07 227.392);
|
|
107
|
-
--chart-4: oklch(0.828 0.189 84.429);
|
|
108
|
-
--chart-5: oklch(0.769 0.188 70.08);
|
|
109
|
-
--sidebar: oklch(0.985 0 0);
|
|
110
|
-
--sidebar-foreground: oklch(0.145 0 0);
|
|
111
|
-
--sidebar-primary: oklch(0.205 0 0);
|
|
112
|
-
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
113
|
-
--sidebar-accent: oklch(0.97 0 0);
|
|
114
|
-
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
115
|
-
--sidebar-border: oklch(0.922 0 0);
|
|
116
|
-
--sidebar-ring: oklch(0.708 0 0);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.dark {
|
|
120
|
-
--background: oklch(0.145 0 0);
|
|
121
|
-
--foreground: oklch(0.985 0 0);
|
|
122
|
-
--card: oklch(0.205 0 0);
|
|
123
|
-
--card-foreground: oklch(0.985 0 0);
|
|
124
|
-
--popover: oklch(0.205 0 0);
|
|
125
|
-
--popover-foreground: oklch(0.985 0 0);
|
|
126
|
-
--primary: oklch(0.922 0 0);
|
|
127
|
-
--primary-foreground: oklch(0.205 0 0);
|
|
128
|
-
--secondary: oklch(0.269 0 0);
|
|
129
|
-
--secondary-foreground: oklch(0.985 0 0);
|
|
130
|
-
--muted: oklch(0.269 0 0);
|
|
131
|
-
--muted-foreground: oklch(0.708 0 0);
|
|
132
|
-
--accent: oklch(0.269 0 0);
|
|
133
|
-
--accent-foreground: oklch(0.985 0 0);
|
|
134
|
-
--destructive: oklch(0.704 0.191 22.216);
|
|
135
|
-
--border: oklch(1 0 0 / 10%);
|
|
136
|
-
--input: oklch(1 0 0 / 15%);
|
|
137
|
-
--ring: oklch(0.556 0 0);
|
|
138
|
-
--chart-1: oklch(0.488 0.243 264.376);
|
|
139
|
-
--chart-2: oklch(0.696 0.17 162.48);
|
|
140
|
-
--chart-3: oklch(0.769 0.188 70.08);
|
|
141
|
-
--chart-4: oklch(0.627 0.265 303.9);
|
|
142
|
-
--chart-5: oklch(0.645 0.246 16.439);
|
|
143
|
-
--sidebar: oklch(0.205 0 0);
|
|
144
|
-
--sidebar-foreground: oklch(0.985 0 0);
|
|
145
|
-
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
146
|
-
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
147
|
-
--sidebar-accent: oklch(0.269 0 0);
|
|
148
|
-
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
149
|
-
--sidebar-border: oklch(1 0 0 / 10%);
|
|
150
|
-
--sidebar-ring: oklch(0.556 0 0);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
@layer base {
|
|
154
|
-
* {
|
|
155
|
-
@apply border-border outline-ring/50;
|
|
156
|
-
}
|
|
157
|
-
body {
|
|
158
|
-
@apply bg-background text-foreground;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
|
|
3
|
+
@layer base {
|
|
4
|
+
:root {
|
|
5
|
+
--background: 15 23 42; /* slate-900 */
|
|
6
|
+
--foreground: 241 245 249; /* slate-100 */
|
|
7
|
+
|
|
8
|
+
--card: 23 37 84; /* blue-950 */
|
|
9
|
+
--card-foreground: 241 245 249; /* slate-100 */
|
|
10
|
+
|
|
11
|
+
--popover: 23 37 84; /* blue-950 */
|
|
12
|
+
--popover-foreground: 241 245 249; /* slate-100 */
|
|
13
|
+
|
|
14
|
+
--primary: 37 99 235; /* blue-600 */
|
|
15
|
+
--primary-foreground: 241 245 249; /* slate-100 */
|
|
16
|
+
|
|
17
|
+
--secondary: 147 197 253; /* blue-300 */
|
|
18
|
+
--secondary-foreground: 15 23 42; /* slate-900 */
|
|
19
|
+
|
|
20
|
+
--muted: 51 65 85; /* slate-700 */
|
|
21
|
+
--muted-foreground: 148 163 184; /* slate-400 */
|
|
22
|
+
|
|
23
|
+
--accent: 147 197 253; /* blue-300 */
|
|
24
|
+
--accent-foreground: 15 23 42; /* slate-900 */
|
|
25
|
+
|
|
26
|
+
--destructive: 239 68 68; /* red-500 */
|
|
27
|
+
--destructive-foreground: 241 245 249; /* slate-100 */
|
|
28
|
+
|
|
29
|
+
--border: 147 197 253; /* blue-300 */
|
|
30
|
+
--input: 147 197 253; /* blue-300 */
|
|
31
|
+
--ring: 241 245 249; /* slate-100 */
|
|
32
|
+
|
|
33
|
+
--radius: 0.5rem;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@layer base {
|
|
38
|
+
* {
|
|
39
|
+
@apply border-border;
|
|
40
|
+
}
|
|
41
|
+
body {
|
|
42
|
+
@apply bg-background text-foreground;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@theme inline {
|
|
47
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
48
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
49
|
+
--radius-lg: var(--radius);
|
|
50
|
+
--radius-xl: calc(var(--radius) + 4px);
|
|
51
|
+
--color-background: var(--background);
|
|
52
|
+
--color-foreground: var(--foreground);
|
|
53
|
+
--color-card: var(--card);
|
|
54
|
+
--color-card-foreground: var(--card-foreground);
|
|
55
|
+
--color-popover: var(--popover);
|
|
56
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
57
|
+
--color-primary: var(--primary);
|
|
58
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
59
|
+
--color-secondary: var(--secondary);
|
|
60
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
61
|
+
--color-muted: var(--muted);
|
|
62
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
63
|
+
--color-accent: var(--accent);
|
|
64
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
65
|
+
--color-destructive: var(--destructive);
|
|
66
|
+
--color-border: var(--border);
|
|
67
|
+
--color-input: var(--input);
|
|
68
|
+
--color-ring: var(--ring);
|
|
69
|
+
--color-chart-1: var(--chart-1);
|
|
70
|
+
--color-chart-2: var(--chart-2);
|
|
71
|
+
--color-chart-3: var(--chart-3);
|
|
72
|
+
--color-chart-4: var(--chart-4);
|
|
73
|
+
--color-chart-5: var(--chart-5);
|
|
74
|
+
--color-sidebar: var(--sidebar);
|
|
75
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
76
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
77
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
78
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
79
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
80
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
81
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
:root {
|
|
85
|
+
--radius: 0.625rem;
|
|
86
|
+
--background: oklch(1 0 0);
|
|
87
|
+
--foreground: oklch(0.145 0 0);
|
|
88
|
+
--card: oklch(1 0 0);
|
|
89
|
+
--card-foreground: oklch(0.145 0 0);
|
|
90
|
+
--popover: oklch(1 0 0);
|
|
91
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
92
|
+
--primary: oklch(0.205 0 0);
|
|
93
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
94
|
+
--secondary: oklch(0.97 0 0);
|
|
95
|
+
--secondary-foreground: oklch(0.205 0 0);
|
|
96
|
+
--muted: oklch(0.97 0 0);
|
|
97
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
98
|
+
--accent: oklch(0.97 0 0);
|
|
99
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
100
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
101
|
+
--border: oklch(0.922 0 0);
|
|
102
|
+
--input: oklch(0.922 0 0);
|
|
103
|
+
--ring: oklch(0.708 0 0);
|
|
104
|
+
--chart-1: oklch(0.646 0.222 41.116);
|
|
105
|
+
--chart-2: oklch(0.6 0.118 184.704);
|
|
106
|
+
--chart-3: oklch(0.398 0.07 227.392);
|
|
107
|
+
--chart-4: oklch(0.828 0.189 84.429);
|
|
108
|
+
--chart-5: oklch(0.769 0.188 70.08);
|
|
109
|
+
--sidebar: oklch(0.985 0 0);
|
|
110
|
+
--sidebar-foreground: oklch(0.145 0 0);
|
|
111
|
+
--sidebar-primary: oklch(0.205 0 0);
|
|
112
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
113
|
+
--sidebar-accent: oklch(0.97 0 0);
|
|
114
|
+
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
115
|
+
--sidebar-border: oklch(0.922 0 0);
|
|
116
|
+
--sidebar-ring: oklch(0.708 0 0);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.dark {
|
|
120
|
+
--background: oklch(0.145 0 0);
|
|
121
|
+
--foreground: oklch(0.985 0 0);
|
|
122
|
+
--card: oklch(0.205 0 0);
|
|
123
|
+
--card-foreground: oklch(0.985 0 0);
|
|
124
|
+
--popover: oklch(0.205 0 0);
|
|
125
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
126
|
+
--primary: oklch(0.922 0 0);
|
|
127
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
128
|
+
--secondary: oklch(0.269 0 0);
|
|
129
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
130
|
+
--muted: oklch(0.269 0 0);
|
|
131
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
132
|
+
--accent: oklch(0.269 0 0);
|
|
133
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
134
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
135
|
+
--border: oklch(1 0 0 / 10%);
|
|
136
|
+
--input: oklch(1 0 0 / 15%);
|
|
137
|
+
--ring: oklch(0.556 0 0);
|
|
138
|
+
--chart-1: oklch(0.488 0.243 264.376);
|
|
139
|
+
--chart-2: oklch(0.696 0.17 162.48);
|
|
140
|
+
--chart-3: oklch(0.769 0.188 70.08);
|
|
141
|
+
--chart-4: oklch(0.627 0.265 303.9);
|
|
142
|
+
--chart-5: oklch(0.645 0.246 16.439);
|
|
143
|
+
--sidebar: oklch(0.205 0 0);
|
|
144
|
+
--sidebar-foreground: oklch(0.985 0 0);
|
|
145
|
+
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
146
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
147
|
+
--sidebar-accent: oklch(0.269 0 0);
|
|
148
|
+
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
149
|
+
--sidebar-border: oklch(1 0 0 / 10%);
|
|
150
|
+
--sidebar-ring: oklch(0.556 0 0);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
@layer base {
|
|
154
|
+
* {
|
|
155
|
+
@apply border-border outline-ring/50;
|
|
156
|
+
}
|
|
157
|
+
body {
|
|
158
|
+
@apply bg-background text-foreground;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import type {Metadata} from "next";
|
|
2
|
-
import Link from "next/link";
|
|
3
|
-
|
|
4
|
-
import "./globals.css";
|
|
5
|
-
|
|
6
|
-
export const metadata: Metadata = {
|
|
7
|
-
title: "{{name}}",
|
|
8
|
-
description: "A project by Paaauldev",
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export default function RootLayout({children}: {children: React.ReactNode}) {
|
|
12
|
-
return (
|
|
13
|
-
<html lang="en">
|
|
14
|
-
<body className="bg-background container m-auto grid min-h-screen grid-rows-[auto,1fr,auto] px-4 font-sans antialiased">
|
|
15
|
-
<header className="text-xl font-bold leading-[4rem]">
|
|
16
|
-
<Link href="/">{{ name }}</Link>
|
|
17
|
-
</header>
|
|
18
|
-
<main className="py-8">{children}</main>
|
|
19
|
-
<footer className="text-center leading-[4rem] opacity-70">
|
|
20
|
-
© {new Date().getFullYear()} {{ name }}
|
|
21
|
-
</footer>
|
|
22
|
-
</body>
|
|
23
|
-
</html>
|
|
24
|
-
);
|
|
25
|
-
}
|
|
1
|
+
import type {Metadata} from "next";
|
|
2
|
+
import Link from "next/link";
|
|
3
|
+
|
|
4
|
+
import "./globals.css";
|
|
5
|
+
|
|
6
|
+
export const metadata: Metadata = {
|
|
7
|
+
title: "{{name}}",
|
|
8
|
+
description: "A project by Paaauldev",
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default function RootLayout({children}: {children: React.ReactNode}) {
|
|
12
|
+
return (
|
|
13
|
+
<html lang="en">
|
|
14
|
+
<body className="bg-background container m-auto grid min-h-screen grid-rows-[auto,1fr,auto] px-4 font-sans antialiased">
|
|
15
|
+
<header className="text-xl font-bold leading-[4rem]">
|
|
16
|
+
<Link href="/">{{ name }}</Link>
|
|
17
|
+
</header>
|
|
18
|
+
<main className="py-8">{children}</main>
|
|
19
|
+
<footer className="text-center leading-[4rem] opacity-70">
|
|
20
|
+
© {new Date().getFullYear()} {{ name }}
|
|
21
|
+
</footer>
|
|
22
|
+
</body>
|
|
23
|
+
</html>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {Button} from "@/components/ui/button";
|
|
2
|
-
|
|
3
|
-
export default function HomePage() {
|
|
4
|
-
return <Button>👋</Button>;
|
|
5
|
-
}
|
|
1
|
+
import {Button} from "@/components/ui/button";
|
|
2
|
+
|
|
3
|
+
export default function HomePage() {
|
|
4
|
+
return <Button>👋</Button>;
|
|
5
|
+
}
|
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
|
3
|
-
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
4
|
-
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
5
|
-
import { DrizzleAdapter } from "@auth/drizzle-adapter";
|
|
6
|
-
import NextAuth, { type User } from "next-auth";
|
|
7
|
-
import Credentials from "next-auth/providers/credentials";
|
|
8
|
-
|
|
9
|
-
import { getUserFromDb } from "./actions/user-actions";
|
|
10
|
-
import { db } from "./db";
|
|
11
|
-
|
|
12
|
-
export const { handlers, signIn, signOut, auth } = NextAuth({
|
|
13
|
-
adapter: DrizzleAdapter(db),
|
|
14
|
-
providers: [
|
|
15
|
-
Credentials({
|
|
16
|
-
// You can specify which fields should be submitted, by adding keys to the `credentials` object.
|
|
17
|
-
// e.g. domain, username, password, 2FA token, etc.
|
|
18
|
-
credentials: {
|
|
19
|
-
email: {},
|
|
20
|
-
password: {},
|
|
21
|
-
},
|
|
22
|
-
authorize: async (credentials) => {
|
|
23
|
-
let user = null;
|
|
24
|
-
|
|
25
|
-
// logic to salt and hash password
|
|
26
|
-
// const pwHash = saltAndHashPassword(credentials.password)
|
|
27
|
-
|
|
28
|
-
// logic to verify if user exists
|
|
29
|
-
user = await getUserFromDb(credentials.email as string, credentials.password as string);
|
|
30
|
-
|
|
31
|
-
if (!user) {
|
|
32
|
-
// No user found, so this is their first attempt to login
|
|
33
|
-
// meaning this is also the place you could do registration
|
|
34
|
-
throw new Error("User not found.");
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
if (!user.success) {
|
|
38
|
-
throw new Error(user.message);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// return user object with the their profile data
|
|
42
|
-
return user.data as unknown as User;
|
|
43
|
-
},
|
|
44
|
-
}),
|
|
45
|
-
],
|
|
46
|
-
secret: process.env.AUTH_SECRET,
|
|
47
|
-
session: {
|
|
48
|
-
strategy: "jwt",
|
|
49
|
-
maxAge: 30 * 24 * 60 * 60, // 30 days
|
|
50
|
-
},
|
|
51
|
-
callbacks: {
|
|
52
|
-
jwt({ token, user }) {
|
|
53
|
-
if (user) {
|
|
54
|
-
token.role = user.role;
|
|
55
|
-
token.email = user.email;
|
|
56
|
-
token.name = user.name;
|
|
57
|
-
token.surname = user.surname;
|
|
58
|
-
token.dni = user.dni;
|
|
59
|
-
token.phone = user.phone;
|
|
60
|
-
token.id = user.id;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
return token;
|
|
64
|
-
},
|
|
65
|
-
session({ session, token }) {
|
|
66
|
-
if (session.user) {
|
|
67
|
-
session.user.role = token.role as string;
|
|
68
|
-
session.user.email = token.email;
|
|
69
|
-
session.user.name = token.name;
|
|
70
|
-
session.user.surname = token.surname;
|
|
71
|
-
session.user.dni = token.dni;
|
|
72
|
-
session.user.phone = token.phone;
|
|
73
|
-
session.user.id = token.id;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
return session;
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
});
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
5
|
+
import { DrizzleAdapter } from "@auth/drizzle-adapter";
|
|
6
|
+
import NextAuth, { type User } from "next-auth";
|
|
7
|
+
import Credentials from "next-auth/providers/credentials";
|
|
8
|
+
|
|
9
|
+
import { getUserFromDb } from "./actions/user-actions";
|
|
10
|
+
import { db } from "./db";
|
|
11
|
+
|
|
12
|
+
export const { handlers, signIn, signOut, auth } = NextAuth({
|
|
13
|
+
adapter: DrizzleAdapter(db),
|
|
14
|
+
providers: [
|
|
15
|
+
Credentials({
|
|
16
|
+
// You can specify which fields should be submitted, by adding keys to the `credentials` object.
|
|
17
|
+
// e.g. domain, username, password, 2FA token, etc.
|
|
18
|
+
credentials: {
|
|
19
|
+
email: {},
|
|
20
|
+
password: {},
|
|
21
|
+
},
|
|
22
|
+
authorize: async (credentials) => {
|
|
23
|
+
let user = null;
|
|
24
|
+
|
|
25
|
+
// logic to salt and hash password
|
|
26
|
+
// const pwHash = saltAndHashPassword(credentials.password)
|
|
27
|
+
|
|
28
|
+
// logic to verify if user exists
|
|
29
|
+
user = await getUserFromDb(credentials.email as string, credentials.password as string);
|
|
30
|
+
|
|
31
|
+
if (!user) {
|
|
32
|
+
// No user found, so this is their first attempt to login
|
|
33
|
+
// meaning this is also the place you could do registration
|
|
34
|
+
throw new Error("User not found.");
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (!user.success) {
|
|
38
|
+
throw new Error(user.message);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// return user object with the their profile data
|
|
42
|
+
return user.data as unknown as User;
|
|
43
|
+
},
|
|
44
|
+
}),
|
|
45
|
+
],
|
|
46
|
+
secret: process.env.AUTH_SECRET,
|
|
47
|
+
session: {
|
|
48
|
+
strategy: "jwt",
|
|
49
|
+
maxAge: 30 * 24 * 60 * 60, // 30 days
|
|
50
|
+
},
|
|
51
|
+
callbacks: {
|
|
52
|
+
jwt({ token, user }) {
|
|
53
|
+
if (user) {
|
|
54
|
+
token.role = user.role;
|
|
55
|
+
token.email = user.email;
|
|
56
|
+
token.name = user.name;
|
|
57
|
+
token.surname = user.surname;
|
|
58
|
+
token.dni = user.dni;
|
|
59
|
+
token.phone = user.phone;
|
|
60
|
+
token.id = user.id;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return token;
|
|
64
|
+
},
|
|
65
|
+
session({ session, token }) {
|
|
66
|
+
if (session.user) {
|
|
67
|
+
session.user.role = token.role as string;
|
|
68
|
+
session.user.email = token.email;
|
|
69
|
+
session.user.name = token.name;
|
|
70
|
+
session.user.surname = token.surname;
|
|
71
|
+
session.user.dni = token.dni;
|
|
72
|
+
session.user.phone = token.phone;
|
|
73
|
+
session.user.id = token.id;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return session;
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
});
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import {Slot} from "@radix-ui/react-slot";
|
|
3
|
-
import {cva, type VariantProps} from "class-variance-authority";
|
|
4
|
-
|
|
5
|
-
import {cn} from "@/lib/utils";
|
|
6
|
-
|
|
7
|
-
const buttonVariants = cva(
|
|
8
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
9
|
-
{
|
|
10
|
-
variants: {
|
|
11
|
-
variant: {
|
|
12
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
13
|
-
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
14
|
-
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
15
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
16
|
-
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
17
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
18
|
-
},
|
|
19
|
-
size: {
|
|
20
|
-
default: "h-10 px-4 py-2",
|
|
21
|
-
sm: "h-9 rounded-md px-3",
|
|
22
|
-
lg: "h-11 rounded-md px-8",
|
|
23
|
-
icon: "h-10 w-10",
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
defaultVariants: {
|
|
27
|
-
variant: "default",
|
|
28
|
-
size: "default",
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
);
|
|
32
|
-
|
|
33
|
-
export interface ButtonProps
|
|
34
|
-
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
35
|
-
VariantProps<typeof buttonVariants> {
|
|
36
|
-
asChild?: boolean;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
40
|
-
({className, variant, size, asChild = false, ...props}, ref) => {
|
|
41
|
-
const Comp = asChild ? Slot : "button";
|
|
42
|
-
|
|
43
|
-
return <Comp ref={ref} className={cn(buttonVariants({variant, size, className}))} {...props} />;
|
|
44
|
-
},
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
Button.displayName = "Button";
|
|
48
|
-
|
|
49
|
-
export {Button, buttonVariants};
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import {Slot} from "@radix-ui/react-slot";
|
|
3
|
+
import {cva, type VariantProps} from "class-variance-authority";
|
|
4
|
+
|
|
5
|
+
import {cn} from "@/lib/utils";
|
|
6
|
+
|
|
7
|
+
const buttonVariants = cva(
|
|
8
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
9
|
+
{
|
|
10
|
+
variants: {
|
|
11
|
+
variant: {
|
|
12
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
13
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
14
|
+
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
15
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
16
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
17
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
18
|
+
},
|
|
19
|
+
size: {
|
|
20
|
+
default: "h-10 px-4 py-2",
|
|
21
|
+
sm: "h-9 rounded-md px-3",
|
|
22
|
+
lg: "h-11 rounded-md px-8",
|
|
23
|
+
icon: "h-10 w-10",
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
defaultVariants: {
|
|
27
|
+
variant: "default",
|
|
28
|
+
size: "default",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
export interface ButtonProps
|
|
34
|
+
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
35
|
+
VariantProps<typeof buttonVariants> {
|
|
36
|
+
asChild?: boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
40
|
+
({className, variant, size, asChild = false, ...props}, ref) => {
|
|
41
|
+
const Comp = asChild ? Slot : "button";
|
|
42
|
+
|
|
43
|
+
return <Comp ref={ref} className={cn(buttonVariants({variant, size, className}))} {...props} />;
|
|
44
|
+
},
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
Button.displayName = "Button";
|
|
48
|
+
|
|
49
|
+
export {Button, buttonVariants};
|