create-deesse-app 0.5.0 → 0.5.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/README.md +1 -2
- package/dist/src/copy.d.ts +1 -1
- package/dist/src/copy.d.ts.map +1 -1
- package/dist/src/copy.js +3 -1
- package/dist/src/copy.js.map +1 -1
- package/dist/src/index.js +0 -1
- package/dist/src/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/templates/default/src/app/(deesse)/admin/[[...slug]]/page.tsx +0 -2
- package/templates/without-admin/AGENTS.md +5 -5
- package/templates/without-admin/CLAUDE.md +1 -1
- package/templates/without-admin/README.md +36 -28
- package/templates/without-admin/components.json +25 -25
- package/templates/without-admin/drizzle.config.ts +1 -1
- package/templates/without-admin/eslint.config.mjs +18 -18
- package/templates/without-admin/next.config.ts +7 -0
- package/templates/without-admin/package-lock.json +11412 -0
- package/templates/without-admin/package.json +41 -50
- package/templates/without-admin/postcss.config.mjs +7 -7
- package/templates/without-admin/public/file.svg +1 -1
- package/templates/without-admin/public/globe.svg +1 -1
- package/templates/without-admin/public/nesalia.svg +2 -2
- package/templates/without-admin/public/next.svg +1 -0
- package/templates/without-admin/public/vercel.svg +1 -0
- package/templates/without-admin/public/window.svg +1 -1
- package/templates/without-admin/src/app/(deesse)/api/[...slug]/route.ts +5 -0
- package/templates/without-admin/src/app/(frontend)/(auth)/login/page.tsx +85 -0
- package/templates/without-admin/src/app/(frontend)/(auth)/signup/page.tsx +90 -0
- package/templates/without-admin/src/app/(frontend)/home/page.tsx +19 -0
- package/templates/without-admin/src/app/(frontend)/layout.tsx +14 -0
- package/templates/without-admin/src/app/{page.tsx → (frontend)/page.tsx} +1 -1
- package/templates/without-admin/src/app/globals.css +129 -129
- package/templates/without-admin/src/app/icon.svg +100 -100
- package/templates/without-admin/src/app/layout.tsx +37 -33
- package/templates/without-admin/src/components/header.tsx +123 -0
- package/templates/without-admin/src/components/password-input.tsx +50 -0
- package/templates/without-admin/src/components/providers/index.tsx +3 -1
- package/templates/without-admin/src/components/providers/theme-provider.tsx +1 -1
- package/templates/without-admin/src/components/ui/alert-dialog.tsx +199 -0
- package/templates/without-admin/src/components/ui/avatar.tsx +112 -0
- package/templates/without-admin/src/components/ui/button.tsx +67 -0
- package/templates/without-admin/src/components/ui/dialog.tsx +168 -0
- package/templates/without-admin/src/components/ui/dropdown-menu.tsx +269 -0
- package/templates/without-admin/src/components/ui/input.tsx +19 -0
- package/templates/without-admin/src/components/ui/label.tsx +24 -0
- package/templates/without-admin/src/components/ui/sonner.tsx +49 -0
- package/templates/without-admin/src/components/ui/tooltip.tsx +57 -0
- package/templates/without-admin/src/db/schema/auth-schema.ts +1 -1
- package/templates/without-admin/src/db/schema/index.ts +1 -0
- package/templates/without-admin/src/deesse.config.ts +1 -3
- package/templates/without-admin/src/lib/deesse.ts +1 -1
- package/templates/without-admin/src/lib/utils.ts +6 -6
- package/templates/without-admin/tsconfig.json +34 -35
- package/templates/minimal/.gitkeep +0 -0
- package/templates/without-admin/drizzle/0000_cheerful_clea.sql +0 -58
- package/templates/without-admin/drizzle/meta/0000_snapshot.json +0 -405
- package/templates/without-admin/drizzle/meta/_journal.json +0 -13
- package/templates/without-admin/skills-lock.json +0 -10
- package/templates/without-admin/src/deesse.pages.tsx +0 -1
- package/templates/without-admin/src/hooks/use-mobile.ts +0 -5
- package/templates/without-admin/src/lib/auth.ts +0 -3
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui"
|
|
5
|
+
|
|
6
|
+
import { cn } from "@/lib/utils"
|
|
7
|
+
import { CheckIcon, ChevronRightIcon } from "lucide-react"
|
|
8
|
+
|
|
9
|
+
function DropdownMenu({
|
|
10
|
+
...props
|
|
11
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {
|
|
12
|
+
return <DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...props} />
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function DropdownMenuPortal({
|
|
16
|
+
...props
|
|
17
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {
|
|
18
|
+
return (
|
|
19
|
+
<DropdownMenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function DropdownMenuTrigger({
|
|
24
|
+
...props
|
|
25
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {
|
|
26
|
+
return (
|
|
27
|
+
<DropdownMenuPrimitive.Trigger
|
|
28
|
+
data-slot="dropdown-menu-trigger"
|
|
29
|
+
{...props}
|
|
30
|
+
/>
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function DropdownMenuContent({
|
|
35
|
+
className,
|
|
36
|
+
align = "start",
|
|
37
|
+
sideOffset = 4,
|
|
38
|
+
...props
|
|
39
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {
|
|
40
|
+
return (
|
|
41
|
+
<DropdownMenuPrimitive.Portal>
|
|
42
|
+
<DropdownMenuPrimitive.Content
|
|
43
|
+
data-slot="dropdown-menu-content"
|
|
44
|
+
sideOffset={sideOffset}
|
|
45
|
+
align={align}
|
|
46
|
+
className={cn("z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:overflow-hidden data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className )}
|
|
47
|
+
{...props}
|
|
48
|
+
/>
|
|
49
|
+
</DropdownMenuPrimitive.Portal>
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function DropdownMenuGroup({
|
|
54
|
+
...props
|
|
55
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {
|
|
56
|
+
return (
|
|
57
|
+
<DropdownMenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function DropdownMenuItem({
|
|
62
|
+
className,
|
|
63
|
+
inset,
|
|
64
|
+
variant = "default",
|
|
65
|
+
...props
|
|
66
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
67
|
+
inset?: boolean
|
|
68
|
+
variant?: "default" | "destructive"
|
|
69
|
+
}) {
|
|
70
|
+
return (
|
|
71
|
+
<DropdownMenuPrimitive.Item
|
|
72
|
+
data-slot="dropdown-menu-item"
|
|
73
|
+
data-inset={inset}
|
|
74
|
+
data-variant={variant}
|
|
75
|
+
className={cn(
|
|
76
|
+
"group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",
|
|
77
|
+
className
|
|
78
|
+
)}
|
|
79
|
+
{...props}
|
|
80
|
+
/>
|
|
81
|
+
)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function DropdownMenuCheckboxItem({
|
|
85
|
+
className,
|
|
86
|
+
children,
|
|
87
|
+
checked,
|
|
88
|
+
inset,
|
|
89
|
+
...props
|
|
90
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem> & {
|
|
91
|
+
inset?: boolean
|
|
92
|
+
}) {
|
|
93
|
+
return (
|
|
94
|
+
<DropdownMenuPrimitive.CheckboxItem
|
|
95
|
+
data-slot="dropdown-menu-checkbox-item"
|
|
96
|
+
data-inset={inset}
|
|
97
|
+
className={cn(
|
|
98
|
+
"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
99
|
+
className
|
|
100
|
+
)}
|
|
101
|
+
checked={checked}
|
|
102
|
+
{...props}
|
|
103
|
+
>
|
|
104
|
+
<span
|
|
105
|
+
className="pointer-events-none absolute right-2 flex items-center justify-center"
|
|
106
|
+
data-slot="dropdown-menu-checkbox-item-indicator"
|
|
107
|
+
>
|
|
108
|
+
<DropdownMenuPrimitive.ItemIndicator>
|
|
109
|
+
<CheckIcon
|
|
110
|
+
/>
|
|
111
|
+
</DropdownMenuPrimitive.ItemIndicator>
|
|
112
|
+
</span>
|
|
113
|
+
{children}
|
|
114
|
+
</DropdownMenuPrimitive.CheckboxItem>
|
|
115
|
+
)
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function DropdownMenuRadioGroup({
|
|
119
|
+
...props
|
|
120
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {
|
|
121
|
+
return (
|
|
122
|
+
<DropdownMenuPrimitive.RadioGroup
|
|
123
|
+
data-slot="dropdown-menu-radio-group"
|
|
124
|
+
{...props}
|
|
125
|
+
/>
|
|
126
|
+
)
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function DropdownMenuRadioItem({
|
|
130
|
+
className,
|
|
131
|
+
children,
|
|
132
|
+
inset,
|
|
133
|
+
...props
|
|
134
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem> & {
|
|
135
|
+
inset?: boolean
|
|
136
|
+
}) {
|
|
137
|
+
return (
|
|
138
|
+
<DropdownMenuPrimitive.RadioItem
|
|
139
|
+
data-slot="dropdown-menu-radio-item"
|
|
140
|
+
data-inset={inset}
|
|
141
|
+
className={cn(
|
|
142
|
+
"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
143
|
+
className
|
|
144
|
+
)}
|
|
145
|
+
{...props}
|
|
146
|
+
>
|
|
147
|
+
<span
|
|
148
|
+
className="pointer-events-none absolute right-2 flex items-center justify-center"
|
|
149
|
+
data-slot="dropdown-menu-radio-item-indicator"
|
|
150
|
+
>
|
|
151
|
+
<DropdownMenuPrimitive.ItemIndicator>
|
|
152
|
+
<CheckIcon
|
|
153
|
+
/>
|
|
154
|
+
</DropdownMenuPrimitive.ItemIndicator>
|
|
155
|
+
</span>
|
|
156
|
+
{children}
|
|
157
|
+
</DropdownMenuPrimitive.RadioItem>
|
|
158
|
+
)
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function DropdownMenuLabel({
|
|
162
|
+
className,
|
|
163
|
+
inset,
|
|
164
|
+
...props
|
|
165
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
166
|
+
inset?: boolean
|
|
167
|
+
}) {
|
|
168
|
+
return (
|
|
169
|
+
<DropdownMenuPrimitive.Label
|
|
170
|
+
data-slot="dropdown-menu-label"
|
|
171
|
+
data-inset={inset}
|
|
172
|
+
className={cn(
|
|
173
|
+
"px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",
|
|
174
|
+
className
|
|
175
|
+
)}
|
|
176
|
+
{...props}
|
|
177
|
+
/>
|
|
178
|
+
)
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
function DropdownMenuSeparator({
|
|
182
|
+
className,
|
|
183
|
+
...props
|
|
184
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {
|
|
185
|
+
return (
|
|
186
|
+
<DropdownMenuPrimitive.Separator
|
|
187
|
+
data-slot="dropdown-menu-separator"
|
|
188
|
+
className={cn("-mx-1 my-1 h-px bg-border", className)}
|
|
189
|
+
{...props}
|
|
190
|
+
/>
|
|
191
|
+
)
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
function DropdownMenuShortcut({
|
|
195
|
+
className,
|
|
196
|
+
...props
|
|
197
|
+
}: React.ComponentProps<"span">) {
|
|
198
|
+
return (
|
|
199
|
+
<span
|
|
200
|
+
data-slot="dropdown-menu-shortcut"
|
|
201
|
+
className={cn(
|
|
202
|
+
"ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",
|
|
203
|
+
className
|
|
204
|
+
)}
|
|
205
|
+
{...props}
|
|
206
|
+
/>
|
|
207
|
+
)
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
function DropdownMenuSub({
|
|
211
|
+
...props
|
|
212
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {
|
|
213
|
+
return <DropdownMenuPrimitive.Sub data-slot="dropdown-menu-sub" {...props} />
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
function DropdownMenuSubTrigger({
|
|
217
|
+
className,
|
|
218
|
+
inset,
|
|
219
|
+
children,
|
|
220
|
+
...props
|
|
221
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
222
|
+
inset?: boolean
|
|
223
|
+
}) {
|
|
224
|
+
return (
|
|
225
|
+
<DropdownMenuPrimitive.SubTrigger
|
|
226
|
+
data-slot="dropdown-menu-sub-trigger"
|
|
227
|
+
data-inset={inset}
|
|
228
|
+
className={cn(
|
|
229
|
+
"flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
230
|
+
className
|
|
231
|
+
)}
|
|
232
|
+
{...props}
|
|
233
|
+
>
|
|
234
|
+
{children}
|
|
235
|
+
<ChevronRightIcon className="ml-auto" />
|
|
236
|
+
</DropdownMenuPrimitive.SubTrigger>
|
|
237
|
+
)
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
function DropdownMenuSubContent({
|
|
241
|
+
className,
|
|
242
|
+
...props
|
|
243
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {
|
|
244
|
+
return (
|
|
245
|
+
<DropdownMenuPrimitive.SubContent
|
|
246
|
+
data-slot="dropdown-menu-sub-content"
|
|
247
|
+
className={cn("z-50 min-w-[96px] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className )}
|
|
248
|
+
{...props}
|
|
249
|
+
/>
|
|
250
|
+
)
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export {
|
|
254
|
+
DropdownMenu,
|
|
255
|
+
DropdownMenuPortal,
|
|
256
|
+
DropdownMenuTrigger,
|
|
257
|
+
DropdownMenuContent,
|
|
258
|
+
DropdownMenuGroup,
|
|
259
|
+
DropdownMenuLabel,
|
|
260
|
+
DropdownMenuItem,
|
|
261
|
+
DropdownMenuCheckboxItem,
|
|
262
|
+
DropdownMenuRadioGroup,
|
|
263
|
+
DropdownMenuRadioItem,
|
|
264
|
+
DropdownMenuSeparator,
|
|
265
|
+
DropdownMenuShortcut,
|
|
266
|
+
DropdownMenuSub,
|
|
267
|
+
DropdownMenuSubTrigger,
|
|
268
|
+
DropdownMenuSubContent,
|
|
269
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
|
|
5
|
+
function Input({ className, type, ...props }: React.ComponentProps<"input">) {
|
|
6
|
+
return (
|
|
7
|
+
<input
|
|
8
|
+
type={type}
|
|
9
|
+
data-slot="input"
|
|
10
|
+
className={cn(
|
|
11
|
+
"h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
12
|
+
className
|
|
13
|
+
)}
|
|
14
|
+
{...props}
|
|
15
|
+
/>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { Input }
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import { Label as LabelPrimitive } from "radix-ui"
|
|
5
|
+
|
|
6
|
+
import { cn } from "@/lib/utils"
|
|
7
|
+
|
|
8
|
+
function Label({
|
|
9
|
+
className,
|
|
10
|
+
...props
|
|
11
|
+
}: React.ComponentProps<typeof LabelPrimitive.Root>) {
|
|
12
|
+
return (
|
|
13
|
+
<LabelPrimitive.Root
|
|
14
|
+
data-slot="label"
|
|
15
|
+
className={cn(
|
|
16
|
+
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
17
|
+
className
|
|
18
|
+
)}
|
|
19
|
+
{...props}
|
|
20
|
+
/>
|
|
21
|
+
)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { Label }
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { useTheme } from "next-themes"
|
|
4
|
+
import { Toaster as Sonner, type ToasterProps } from "sonner"
|
|
5
|
+
import { CircleCheckIcon, InfoIcon, TriangleAlertIcon, OctagonXIcon, Loader2Icon } from "lucide-react"
|
|
6
|
+
|
|
7
|
+
const Toaster = ({ ...props }: ToasterProps) => {
|
|
8
|
+
const { theme = "system" } = useTheme()
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<Sonner
|
|
12
|
+
theme={theme as ToasterProps["theme"]}
|
|
13
|
+
className="toaster group"
|
|
14
|
+
icons={{
|
|
15
|
+
success: (
|
|
16
|
+
<CircleCheckIcon className="size-4" />
|
|
17
|
+
),
|
|
18
|
+
info: (
|
|
19
|
+
<InfoIcon className="size-4" />
|
|
20
|
+
),
|
|
21
|
+
warning: (
|
|
22
|
+
<TriangleAlertIcon className="size-4" />
|
|
23
|
+
),
|
|
24
|
+
error: (
|
|
25
|
+
<OctagonXIcon className="size-4" />
|
|
26
|
+
),
|
|
27
|
+
loading: (
|
|
28
|
+
<Loader2Icon className="size-4 animate-spin" />
|
|
29
|
+
),
|
|
30
|
+
}}
|
|
31
|
+
style={
|
|
32
|
+
{
|
|
33
|
+
"--normal-bg": "var(--popover)",
|
|
34
|
+
"--normal-text": "var(--popover-foreground)",
|
|
35
|
+
"--normal-border": "var(--border)",
|
|
36
|
+
"--border-radius": "var(--radius)",
|
|
37
|
+
} as React.CSSProperties
|
|
38
|
+
}
|
|
39
|
+
toastOptions={{
|
|
40
|
+
classNames: {
|
|
41
|
+
toast: "cn-toast",
|
|
42
|
+
},
|
|
43
|
+
}}
|
|
44
|
+
{...props}
|
|
45
|
+
/>
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { Toaster }
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import { Tooltip as TooltipPrimitive } from "radix-ui"
|
|
5
|
+
|
|
6
|
+
import { cn } from "@/lib/utils"
|
|
7
|
+
|
|
8
|
+
function TooltipProvider({
|
|
9
|
+
delayDuration = 0,
|
|
10
|
+
...props
|
|
11
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {
|
|
12
|
+
return (
|
|
13
|
+
<TooltipPrimitive.Provider
|
|
14
|
+
data-slot="tooltip-provider"
|
|
15
|
+
delayDuration={delayDuration}
|
|
16
|
+
{...props}
|
|
17
|
+
/>
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function Tooltip({
|
|
22
|
+
...props
|
|
23
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Root>) {
|
|
24
|
+
return <TooltipPrimitive.Root data-slot="tooltip" {...props} />
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function TooltipTrigger({
|
|
28
|
+
...props
|
|
29
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {
|
|
30
|
+
return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function TooltipContent({
|
|
34
|
+
className,
|
|
35
|
+
sideOffset = 0,
|
|
36
|
+
children,
|
|
37
|
+
...props
|
|
38
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Content>) {
|
|
39
|
+
return (
|
|
40
|
+
<TooltipPrimitive.Portal>
|
|
41
|
+
<TooltipPrimitive.Content
|
|
42
|
+
data-slot="tooltip-content"
|
|
43
|
+
sideOffset={sideOffset}
|
|
44
|
+
className={cn(
|
|
45
|
+
"z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
46
|
+
className
|
|
47
|
+
)}
|
|
48
|
+
{...props}
|
|
49
|
+
>
|
|
50
|
+
{children}
|
|
51
|
+
<TooltipPrimitive.Arrow className="z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" />
|
|
52
|
+
</TooltipPrimitive.Content>
|
|
53
|
+
</TooltipPrimitive.Portal>
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./auth-schema";
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { defineConfig } from 'deesse';
|
|
2
2
|
import { drizzle } from 'drizzle-orm/node-postgres';
|
|
3
3
|
import { Pool } from 'pg';
|
|
4
|
-
import {
|
|
5
|
-
import { schema } from './db/schema/auth-schema';
|
|
4
|
+
import { schema } from './db/schema';
|
|
6
5
|
|
|
7
6
|
export const config = defineConfig({
|
|
8
7
|
name: "DeesseJS App",
|
|
@@ -12,7 +11,6 @@ export const config = defineConfig({
|
|
|
12
11
|
}),
|
|
13
12
|
schema,
|
|
14
13
|
}),
|
|
15
|
-
pages: deessePages,
|
|
16
14
|
secret: process.env.DEESSE_SECRET!,
|
|
17
15
|
auth: {
|
|
18
16
|
baseURL: process.env.NEXT_PUBLIC_BASE_URL || 'http://localhost:3000',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { clsx, type ClassValue } from "clsx"
|
|
2
|
-
import { twMerge } from "tailwind-merge"
|
|
3
|
-
|
|
4
|
-
export function cn(...inputs: ClassValue[]) {
|
|
5
|
-
return twMerge(clsx(inputs))
|
|
6
|
-
}
|
|
1
|
+
import { clsx, type ClassValue } from "clsx"
|
|
2
|
+
import { twMerge } from "tailwind-merge"
|
|
3
|
+
|
|
4
|
+
export function cn(...inputs: ClassValue[]) {
|
|
5
|
+
return twMerge(clsx(inputs))
|
|
6
|
+
}
|
|
@@ -1,35 +1,34 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2017",
|
|
4
|
-
"lib": ["dom", "dom.iterable", "esnext"],
|
|
5
|
-
"allowJs": true,
|
|
6
|
-
"skipLibCheck": true,
|
|
7
|
-
"strict": true,
|
|
8
|
-
"noEmit": true,
|
|
9
|
-
"esModuleInterop": true,
|
|
10
|
-
"module": "esnext",
|
|
11
|
-
"moduleResolution": "bundler",
|
|
12
|
-
"resolveJsonModule": true,
|
|
13
|
-
"isolatedModules": true,
|
|
14
|
-
"jsx": "react-jsx",
|
|
15
|
-
"incremental": true,
|
|
16
|
-
"plugins": [
|
|
17
|
-
{
|
|
18
|
-
"name": "next"
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
"paths": {
|
|
22
|
-
"@/*": ["./src/*"]
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
"**/*.
|
|
29
|
-
"
|
|
30
|
-
".next/types/**/*.ts",
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
]
|
|
34
|
-
|
|
35
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2017",
|
|
4
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
5
|
+
"allowJs": true,
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"noEmit": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"module": "esnext",
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"jsx": "react-jsx",
|
|
15
|
+
"incremental": true,
|
|
16
|
+
"plugins": [
|
|
17
|
+
{
|
|
18
|
+
"name": "next"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"paths": {
|
|
22
|
+
"@/*": ["./src/*"]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"include": [
|
|
26
|
+
"next-env.d.ts",
|
|
27
|
+
"**/*.ts",
|
|
28
|
+
"**/*.tsx",
|
|
29
|
+
".next/types/**/*.ts",
|
|
30
|
+
".next/dev/types/**/*.ts",
|
|
31
|
+
"**/*.mts"
|
|
32
|
+
],
|
|
33
|
+
"exclude": ["node_modules"]
|
|
34
|
+
}
|
|
File without changes
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
CREATE TABLE "account" (
|
|
2
|
-
"id" text PRIMARY KEY NOT NULL,
|
|
3
|
-
"account_id" text NOT NULL,
|
|
4
|
-
"provider_id" text NOT NULL,
|
|
5
|
-
"user_id" text NOT NULL,
|
|
6
|
-
"access_token" text,
|
|
7
|
-
"refresh_token" text,
|
|
8
|
-
"id_token" text,
|
|
9
|
-
"access_token_expires_at" timestamp,
|
|
10
|
-
"refresh_token_expires_at" timestamp,
|
|
11
|
-
"scope" text,
|
|
12
|
-
"password" text,
|
|
13
|
-
"created_at" timestamp DEFAULT now() NOT NULL,
|
|
14
|
-
"updated_at" timestamp NOT NULL
|
|
15
|
-
);
|
|
16
|
-
--> statement-breakpoint
|
|
17
|
-
CREATE TABLE "session" (
|
|
18
|
-
"id" text PRIMARY KEY NOT NULL,
|
|
19
|
-
"expires_at" timestamp NOT NULL,
|
|
20
|
-
"token" text NOT NULL,
|
|
21
|
-
"created_at" timestamp DEFAULT now() NOT NULL,
|
|
22
|
-
"updated_at" timestamp NOT NULL,
|
|
23
|
-
"ip_address" text,
|
|
24
|
-
"user_agent" text,
|
|
25
|
-
"user_id" text NOT NULL,
|
|
26
|
-
"impersonated_by" text,
|
|
27
|
-
CONSTRAINT "session_token_unique" UNIQUE("token")
|
|
28
|
-
);
|
|
29
|
-
--> statement-breakpoint
|
|
30
|
-
CREATE TABLE "user" (
|
|
31
|
-
"id" text PRIMARY KEY NOT NULL,
|
|
32
|
-
"name" text NOT NULL,
|
|
33
|
-
"email" text NOT NULL,
|
|
34
|
-
"email_verified" boolean DEFAULT false NOT NULL,
|
|
35
|
-
"image" text,
|
|
36
|
-
"created_at" timestamp DEFAULT now() NOT NULL,
|
|
37
|
-
"updated_at" timestamp DEFAULT now() NOT NULL,
|
|
38
|
-
"role" text,
|
|
39
|
-
"banned" boolean DEFAULT false,
|
|
40
|
-
"ban_reason" text,
|
|
41
|
-
"ban_expires" timestamp,
|
|
42
|
-
CONSTRAINT "user_email_unique" UNIQUE("email")
|
|
43
|
-
);
|
|
44
|
-
--> statement-breakpoint
|
|
45
|
-
CREATE TABLE "verification" (
|
|
46
|
-
"id" text PRIMARY KEY NOT NULL,
|
|
47
|
-
"identifier" text NOT NULL,
|
|
48
|
-
"value" text NOT NULL,
|
|
49
|
-
"expires_at" timestamp NOT NULL,
|
|
50
|
-
"created_at" timestamp DEFAULT now() NOT NULL,
|
|
51
|
-
"updated_at" timestamp DEFAULT now() NOT NULL
|
|
52
|
-
);
|
|
53
|
-
--> statement-breakpoint
|
|
54
|
-
ALTER TABLE "account" ADD CONSTRAINT "account_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
55
|
-
ALTER TABLE "session" ADD CONSTRAINT "session_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
56
|
-
CREATE INDEX "account_userId_idx" ON "account" USING btree ("user_id");--> statement-breakpoint
|
|
57
|
-
CREATE INDEX "session_userId_idx" ON "session" USING btree ("user_id");--> statement-breakpoint
|
|
58
|
-
CREATE INDEX "verification_identifier_idx" ON "verification" USING btree ("identifier");
|