create-ej-app 3.2.0 → 5.0.0
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/LICENSE +1 -1
- package/cli.js +5 -1
- package/cli.ts +40 -33
- package/package.json +4 -4
- package/template/base/.env.example +10 -9
- package/template/base/.eslintrc.cjs +17 -15
- package/template/base/components.json +1 -1
- package/template/base/drizzle.config.ts +11 -0
- package/template/base/next.config.mjs +1 -12
- package/template/base/package.json +63 -56
- package/template/base/postcss.config.mjs +8 -0
- package/template/base/prettier.config.mjs +11 -0
- package/template/base/public/vercel.svg +1 -0
- package/template/base/src/app/(app)/dashboard/layout.tsx +14 -0
- package/template/base/src/app/(app)/dashboard/page.tsx +0 -7
- package/template/base/src/app/(app)/layout.tsx +55 -20
- package/template/base/src/app/(app)/roles/[id]/actions.ts +59 -0
- package/template/base/src/app/(app)/roles/[id]/page.tsx +46 -0
- package/template/base/src/app/(app)/roles/[id]/render.tsx +264 -0
- package/template/base/src/app/(app)/roles/[id]/validation.ts +22 -0
- package/template/base/src/app/(app)/roles/actions.ts +33 -0
- package/template/base/src/app/(app)/roles/page.tsx +52 -0
- package/template/base/src/app/(app)/roles/render.tsx +80 -0
- package/template/base/src/app/(app)/settings/actions.ts +11 -12
- package/template/base/src/app/(app)/settings/layout.tsx +14 -0
- package/template/base/src/app/(app)/settings/page.tsx +1 -10
- package/template/base/src/app/(app)/settings/render.tsx +11 -17
- package/template/base/src/app/(app)/settings/validation.ts +5 -0
- package/template/base/src/app/(app)/tasks/[id]/actions.ts +69 -124
- package/template/base/src/app/(app)/tasks/[id]/page.tsx +37 -3
- package/template/base/src/app/(app)/tasks/[id]/render.tsx +162 -93
- package/template/base/src/app/(app)/tasks/[id]/validation.ts +18 -0
- package/template/base/src/app/(app)/tasks/actions.ts +34 -64
- package/template/base/src/app/(app)/tasks/page.tsx +15 -9
- package/template/base/src/app/(app)/tasks/render.tsx +28 -6
- package/template/base/src/app/(app)/tasks/statusEnum.ts +3 -0
- package/template/base/src/app/(app)/users/[id]/actions.ts +47 -62
- package/template/base/src/app/(app)/users/[id]/page.tsx +15 -8
- package/template/base/src/app/(app)/users/[id]/render.tsx +119 -34
- package/template/base/src/app/(app)/users/[id]/validation.ts +18 -0
- package/template/base/src/app/(app)/users/actions.ts +28 -49
- package/template/base/src/app/(app)/users/page.tsx +22 -9
- package/template/base/src/app/(app)/users/render.tsx +47 -3
- package/template/base/src/app/(auth)/layout.tsx +7 -0
- package/template/base/src/app/(auth)/login/page.tsx +2 -2
- package/template/base/src/app/(auth)/login/render.tsx +146 -0
- package/template/base/src/app/(marketing)/layout.tsx +1 -1
- package/template/base/src/app/(marketing)/page.tsx +8 -7
- package/template/base/src/app/favicon.ico +0 -0
- package/template/base/src/app/layout.tsx +14 -17
- package/template/base/src/components/app-nav-command.tsx +18 -0
- package/template/base/src/components/data-table/data-table-column-header.tsx +2 -2
- package/template/base/src/components/icons.tsx +21 -5
- package/template/base/src/components/ui/alert-dialog.tsx +1 -1
- package/template/base/src/components/ui/command.tsx +1 -1
- package/template/base/src/components/ui/dialog.tsx +1 -1
- package/template/base/src/components/ui/sonner.tsx +31 -0
- package/template/base/src/components/user-avatar.tsx +4 -2
- package/template/base/src/data-access/resource.ts +85 -0
- package/template/base/src/data-access/role-permission.ts +45 -0
- package/template/base/src/data-access/role.ts +105 -0
- package/template/base/src/data-access/task.ts +141 -0
- package/template/base/src/data-access/user.ts +141 -0
- package/template/base/src/db/index.ts +14 -0
- package/template/base/src/db/schema.ts +287 -0
- package/template/base/src/env.mjs +10 -30
- package/template/base/src/hooks/use-lock-body.tsx +2 -1
- package/template/base/src/lib/auth.ts +32 -23
- package/template/base/src/lib/currentUser.ts +8 -0
- package/template/base/src/lib/s3Client.ts +156 -0
- package/template/base/src/lib/safe-action.ts +19 -0
- package/template/base/src/lib/sortOrderEnum.ts +2 -0
- package/template/base/src/use-case/role-permission.ts +19 -0
- package/template/base/src/use-case/role.ts +110 -0
- package/template/base/src/use-case/task.ts +166 -0
- package/template/base/src/use-case/user.ts +121 -0
- package/template/base/tailwind.config.ts +5 -4
- package/template/base/tsconfig.json +3 -2
- package/template/new/.env.example +13 -0
- package/template/new/components.json +22 -0
- package/template/new/drizzle.config.ts +10 -0
- package/template/new/eslint.config.mjs +18 -0
- package/template/new/next.config.ts +14 -0
- package/template/new/package.json +81 -0
- package/template/new/postcss.config.mjs +5 -0
- package/template/new/prettier.config.mjs +11 -0
- package/template/new/public/placeholder.svg +1 -0
- package/template/new/src/app/(auth)/login/email-login-form.tsx +97 -0
- package/template/new/src/app/(auth)/login/page.tsx +72 -0
- package/template/new/src/app/(auth)/login/social-login-buttons.tsx +69 -0
- package/template/new/src/app/api/auth/[...all]/route.ts +4 -0
- package/template/new/src/app/favicon.ico +0 -0
- package/template/new/src/app/globals.css +128 -0
- package/template/new/src/app/layout.tsx +50 -0
- package/template/new/src/app/page.tsx +3 -0
- package/template/new/src/components/loader.tsx +25 -0
- package/template/new/src/components/react-query-provider.tsx +12 -0
- package/template/new/src/components/screen-size.tsx +40 -0
- package/template/new/src/components/theme-toggle.tsx +22 -0
- package/template/new/src/components/ui/button.tsx +60 -0
- package/template/new/src/components/ui/card.tsx +92 -0
- package/template/new/src/components/ui/form.tsx +167 -0
- package/template/new/src/components/ui/input.tsx +21 -0
- package/template/new/src/components/ui/label.tsx +24 -0
- package/template/new/src/components/ui/separator.tsx +28 -0
- package/template/new/src/components/ui/sonner.tsx +40 -0
- package/template/new/src/db/index.ts +7 -0
- package/template/new/src/db/schema.ts +74 -0
- package/template/new/src/env.ts +42 -0
- package/template/new/src/lib/auth-client.ts +18 -0
- package/template/new/src/lib/auth.ts +67 -0
- package/template/new/src/lib/safe-action.ts +15 -0
- package/template/new/src/lib/toast-message.ts +15 -0
- package/template/new/tsconfig.json +49 -0
- package/template/prisma/.env.example +16 -0
- package/template/prisma/.eslintrc.cjs +24 -0
- package/template/prisma/components.json +17 -0
- package/template/prisma/next.config.mjs +15 -0
- package/template/prisma/package.json +80 -0
- package/template/prisma/public/next.svg +1 -0
- package/template/prisma/src/app/(app)/dashboard/page.tsx +19 -0
- package/template/prisma/src/app/(app)/layout.tsx +90 -0
- package/template/prisma/src/app/(app)/settings/actions.ts +18 -0
- package/template/prisma/src/app/(app)/settings/loading.tsx +28 -0
- package/template/prisma/src/app/(app)/settings/page.tsx +28 -0
- package/template/prisma/src/app/(app)/settings/render.tsx +113 -0
- package/template/prisma/src/app/(app)/tasks/[id]/actions.ts +147 -0
- package/template/prisma/src/app/(app)/tasks/[id]/page.tsx +25 -0
- package/template/prisma/src/app/(app)/tasks/[id]/render.tsx +413 -0
- package/template/prisma/src/app/(app)/tasks/actions.ts +69 -0
- package/template/prisma/src/app/(app)/tasks/page.tsx +53 -0
- package/template/prisma/src/app/(app)/tasks/render.tsx +107 -0
- package/template/prisma/src/app/(app)/users/[id]/actions.ts +83 -0
- package/template/prisma/src/app/(app)/users/[id]/page.tsx +32 -0
- package/template/prisma/src/app/(app)/users/[id]/render.tsx +240 -0
- package/template/prisma/src/app/(app)/users/actions.ts +55 -0
- package/template/prisma/src/app/(app)/users/page.tsx +49 -0
- package/template/prisma/src/app/(app)/users/render.tsx +80 -0
- package/template/prisma/src/app/(auth)/layout.tsx +20 -0
- package/template/prisma/src/app/(auth)/login/page.tsx +49 -0
- package/template/prisma/src/app/(marketing)/layout.tsx +42 -0
- package/template/prisma/src/app/(marketing)/page.tsx +96 -0
- package/template/prisma/src/app/api/auth/[...nextauth]/route.ts +7 -0
- package/template/prisma/src/app/favicon.ico +0 -0
- package/template/prisma/src/app/layout.tsx +34 -0
- package/template/prisma/src/components/app-nav-command.tsx +160 -0
- package/template/prisma/src/components/dark-mode-toggle.tsx +43 -0
- package/template/prisma/src/components/data-table/data-table-column-header.tsx +91 -0
- package/template/prisma/src/components/data-table/data-table-faceted-filter.tsx +149 -0
- package/template/prisma/src/components/data-table/data-table-loading.tsx +77 -0
- package/template/prisma/src/components/data-table/data-table-pagination.tsx +94 -0
- package/template/prisma/src/components/data-table/data-table-toolbar.tsx +78 -0
- package/template/prisma/src/components/data-table/data-table-types.ts +17 -0
- package/template/prisma/src/components/data-table/data-table-view-options.tsx +59 -0
- package/template/prisma/src/components/data-table/data-table.tsx +301 -0
- package/template/prisma/src/components/data-table/simple-data-table.tsx +109 -0
- package/template/prisma/src/components/empty-placeholder.tsx +78 -0
- package/template/prisma/src/components/heading.tsx +17 -0
- package/template/prisma/src/components/icons.tsx +85 -0
- package/template/prisma/src/components/main-nav.tsx +64 -0
- package/template/prisma/src/components/shell.tsx +13 -0
- package/template/prisma/src/components/side-nav.tsx +51 -0
- package/template/prisma/src/components/site-footer.tsx +31 -0
- package/template/prisma/src/components/system-info.tsx +36 -0
- package/template/prisma/src/components/ui/alert-dialog.tsx +141 -0
- package/template/prisma/src/components/ui/avatar.tsx +50 -0
- package/template/prisma/src/components/ui/badge.tsx +36 -0
- package/template/prisma/src/components/ui/button.tsx +56 -0
- package/template/prisma/src/components/ui/card.tsx +79 -0
- package/template/prisma/src/components/ui/checkbox.tsx +30 -0
- package/template/prisma/src/components/ui/command.tsx +155 -0
- package/template/prisma/src/components/ui/dialog.tsx +122 -0
- package/template/prisma/src/components/ui/dropdown-menu.tsx +200 -0
- package/template/prisma/src/components/ui/form.tsx +176 -0
- package/template/prisma/src/components/ui/input.tsx +25 -0
- package/template/prisma/src/components/ui/label.tsx +26 -0
- package/template/prisma/src/components/ui/popover.tsx +31 -0
- package/template/prisma/src/components/ui/select.tsx +160 -0
- package/template/prisma/src/components/ui/separator.tsx +31 -0
- package/template/prisma/src/components/ui/skeleton.tsx +15 -0
- package/template/prisma/src/components/ui/table.tsx +117 -0
- package/template/prisma/src/components/user-account-nav.tsx +60 -0
- package/template/prisma/src/components/user-avatar.tsx +25 -0
- package/template/prisma/src/env.mjs +78 -0
- package/template/prisma/src/hooks/use-debounce.ts +17 -0
- package/template/prisma/src/hooks/use-lock-body.tsx +12 -0
- package/template/prisma/src/lib/auth.ts +80 -0
- package/template/prisma/src/lib/cn.ts +4 -0
- package/template/prisma/src/lib/delay.ts +2 -0
- package/template/prisma/src/lib/formatDate.ts +11 -0
- package/template/prisma/src/lib/generateLabel.ts +5 -0
- package/template/prisma/src/lib/siteConfig.ts +4 -0
- package/template/prisma/src/styles/globals.css +76 -0
- package/template/prisma/tailwind.config.ts +80 -0
- package/template/prisma/tsconfig.json +46 -0
- package/template/prisma-advanced/src/lib/cn.ts +4 -0
- package/template/prisma-advanced/src/lib/delay.ts +2 -0
- package/template/prisma-advanced/src/lib/siteConfig.ts +4 -0
- /package/template/{advanced/src/styles → base/src/app}/globals.css +0 -0
- /package/template/{advanced/src/hooks/use-debounce.ts → base/src/hooks/use-debounce.tsx} +0 -0
- /package/template/{advanced → new}/src/lib/cn.ts +0 -0
- /package/template/{advanced → new}/src/lib/delay.ts +0 -0
- /package/template/{advanced → new}/src/lib/siteConfig.ts +0 -0
- /package/template/{base → prisma}/postcss.config.cjs +0 -0
- /package/template/{base → prisma}/prettier.config.ts +0 -0
- /package/template/{base → prisma}/prisma/schema.prisma +0 -0
- /package/template/{base → prisma}/src/app/(auth)/login/user-auth-form.tsx +0 -0
- /package/template/{base → prisma}/src/app/api/upload/route.ts +0 -0
- /package/template/{advanced → prisma}/src/components/mobile-nav.tsx +0 -0
- /package/template/{base → prisma}/src/components/theme-provider.tsx +0 -0
- /package/template/{base → prisma}/src/components/ui/textarea.tsx +0 -0
- /package/template/{base → prisma}/src/components/ui/toast.tsx +0 -0
- /package/template/{base → prisma}/src/components/ui/toaster.tsx +0 -0
- /package/template/{base → prisma}/src/components/ui/use-toast.ts +0 -0
- /package/template/{base → prisma}/src/lib/db.ts +0 -0
- /package/template/{base → prisma}/src/lib/storageClient.ts +0 -0
- /package/template/{base → prisma}/src/styles/editor.css +0 -0
- /package/template/{base → prisma}/src/types/UnwrapPromise.ts +0 -0
- /package/template/{advanced → prisma-advanced}/.env.example +0 -0
- /package/template/{advanced → prisma-advanced}/.eslintrc.cjs +0 -0
- /package/template/{advanced → prisma-advanced}/components.json +0 -0
- /package/template/{advanced → prisma-advanced}/next.config.mjs +0 -0
- /package/template/{advanced → prisma-advanced}/package.json +0 -0
- /package/template/{advanced → prisma-advanced}/postcss.config.cjs +0 -0
- /package/template/{advanced → prisma-advanced}/prettier.config.ts +0 -0
- /package/template/{advanced → prisma-advanced}/prisma/schema.prisma +0 -0
- /package/template/{advanced → prisma-advanced}/public/next.svg +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/(app)/dashboard/page.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/(app)/layout.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/(app)/roles/[id]/actions.ts +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/(app)/roles/[id]/page.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/(app)/roles/[id]/render.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/(app)/roles/actions.ts +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/(app)/roles/page.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/(app)/roles/render.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/(app)/settings/actions.ts +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/(app)/settings/loading.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/(app)/settings/page.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/(app)/settings/render.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/(app)/tasks/[id]/actions.ts +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/(app)/tasks/[id]/page.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/(app)/tasks/[id]/render.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/(app)/tasks/actions.ts +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/(app)/tasks/page.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/(app)/tasks/render.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/(app)/users/[id]/actions.ts +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/(app)/users/[id]/page.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/(app)/users/[id]/render.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/(app)/users/actions.ts +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/(app)/users/page.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/(app)/users/render.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/(auth)/layout.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/(auth)/login/page.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/(auth)/login/user-auth-form.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/(marketing)/layout.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/(marketing)/page.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/api/auth/[...nextauth]/route.ts +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/api/upload/route.ts +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/favicon.ico +0 -0
- /package/template/{advanced → prisma-advanced}/src/app/layout.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/app-nav-command.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/dark-mode-toggle.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/data-table/data-table-column-header.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/data-table/data-table-faceted-filter.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/data-table/data-table-loading.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/data-table/data-table-pagination.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/data-table/data-table-toolbar.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/data-table/data-table-types.ts +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/data-table/data-table-view-options.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/data-table/data-table.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/data-table/simple-data-table.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/empty-placeholder.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/heading.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/icons.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/main-nav.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/shell.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/side-nav.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/site-footer.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/system-info.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/theme-provider.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/ui/alert-dialog.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/ui/avatar.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/ui/badge.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/ui/button.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/ui/card.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/ui/checkbox.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/ui/command.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/ui/dialog.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/ui/dropdown-menu.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/ui/form.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/ui/input.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/ui/label.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/ui/popover.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/ui/select.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/ui/separator.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/ui/skeleton.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/ui/table.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/ui/textarea.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/ui/toast.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/ui/toaster.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/ui/use-toast.ts +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/user-account-nav.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/components/user-avatar.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/env.mjs +0 -0
- /package/template/{base → prisma-advanced}/src/hooks/use-debounce.ts +0 -0
- /package/template/{advanced → prisma-advanced}/src/hooks/use-lock-body.tsx +0 -0
- /package/template/{advanced → prisma-advanced}/src/lib/auth.ts +0 -0
- /package/template/{advanced → prisma-advanced}/src/lib/db.ts +0 -0
- /package/template/{advanced → prisma-advanced}/src/lib/formatDate.ts +0 -0
- /package/template/{advanced → prisma-advanced}/src/lib/generateLabel.ts +0 -0
- /package/template/{advanced → prisma-advanced}/src/lib/storageClient.ts +0 -0
- /package/template/{advanced → prisma-advanced}/src/styles/editor.css +0 -0
- /package/template/{base → prisma-advanced}/src/styles/globals.css +0 -0
- /package/template/{advanced → prisma-advanced}/src/types/UnwrapPromise.ts +0 -0
- /package/template/{advanced → prisma-advanced}/tailwind.config.ts +0 -0
- /package/template/{advanced → prisma-advanced}/tsconfig.json +0 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createRole,
|
|
3
|
+
deleteRole,
|
|
4
|
+
getRoleByIdWithPermissions,
|
|
5
|
+
getRoles,
|
|
6
|
+
getRolesMini,
|
|
7
|
+
updateRole,
|
|
8
|
+
type RoleType
|
|
9
|
+
} from '@/data-access/role'
|
|
10
|
+
import {
|
|
11
|
+
RolePermissionType,
|
|
12
|
+
createRolePermissions,
|
|
13
|
+
deleteRolePermissionsByRoleId
|
|
14
|
+
} from '@/data-access/role-permission'
|
|
15
|
+
import { type UserType } from '@/data-access/user'
|
|
16
|
+
import { type SortOrderEnum } from '@/lib/sortOrderEnum'
|
|
17
|
+
|
|
18
|
+
type getRolesUseCaseInput = {
|
|
19
|
+
page: number
|
|
20
|
+
limit: number
|
|
21
|
+
sortBy?: keyof RoleType
|
|
22
|
+
sortOrder?: SortOrderEnum
|
|
23
|
+
filters?: {
|
|
24
|
+
name?: string
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const getRolesUseCase = async (
|
|
29
|
+
currentUserType: UserType['type'],
|
|
30
|
+
{ page, limit, sortBy, sortOrder, filters }: getRolesUseCaseInput
|
|
31
|
+
) => {
|
|
32
|
+
if (currentUserType !== 'Root') throw new Error('Unauthorized')
|
|
33
|
+
|
|
34
|
+
if (limit < 1 || limit > 1000) throw new Error('Invalid limit')
|
|
35
|
+
if (page < 1) throw new Error('Invalid page')
|
|
36
|
+
|
|
37
|
+
return await getRoles({
|
|
38
|
+
page,
|
|
39
|
+
limit,
|
|
40
|
+
sortBy,
|
|
41
|
+
sortOrder,
|
|
42
|
+
filters
|
|
43
|
+
})
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export const getRolesMiniUseCase = async (
|
|
47
|
+
currentUserType: UserType['type']
|
|
48
|
+
) => {
|
|
49
|
+
if (currentUserType !== 'Root') throw new Error('Unauthorized')
|
|
50
|
+
return await getRolesMini()
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export const getRoleByIdWithPermissionsUseCase = async (
|
|
54
|
+
currentUserType: UserType['type'],
|
|
55
|
+
id: string
|
|
56
|
+
) => {
|
|
57
|
+
if (currentUserType !== 'Root') throw new Error('Unauthorized')
|
|
58
|
+
return await getRoleByIdWithPermissions(id)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
type createRoleUseCaseInput = {
|
|
62
|
+
name: string
|
|
63
|
+
permissions: RolePermissionType['permission'][]
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export const createRoleUseCase = async (
|
|
67
|
+
currentUserType: UserType['type'],
|
|
68
|
+
data: createRoleUseCaseInput
|
|
69
|
+
) => {
|
|
70
|
+
if (currentUserType !== 'Root') throw new Error('Unauthorized')
|
|
71
|
+
const roleId = await createRole({
|
|
72
|
+
name: data.name
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
if (data.permissions.length)
|
|
76
|
+
await createRolePermissions({
|
|
77
|
+
roleId,
|
|
78
|
+
permissions: data.permissions
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
return roleId
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
type updateRoleUseCaseInput = createRoleUseCaseInput & {
|
|
85
|
+
id: string
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export const updateRoleUseCase = async (
|
|
89
|
+
currentUserType: UserType['type'],
|
|
90
|
+
data: updateRoleUseCaseInput
|
|
91
|
+
) => {
|
|
92
|
+
if (currentUserType !== 'Root') throw new Error('Unauthorized')
|
|
93
|
+
await updateRole({
|
|
94
|
+
id: data.id,
|
|
95
|
+
name: data.name
|
|
96
|
+
})
|
|
97
|
+
await deleteRolePermissionsByRoleId(data.id)
|
|
98
|
+
await createRolePermissions({
|
|
99
|
+
roleId: data.id,
|
|
100
|
+
permissions: data.permissions
|
|
101
|
+
})
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export const deleteRoleUseCase = async (
|
|
105
|
+
currentUserType: UserType['type'],
|
|
106
|
+
id: string
|
|
107
|
+
) => {
|
|
108
|
+
if (currentUserType !== 'Root') throw new Error('Unauthorized')
|
|
109
|
+
return await deleteRole(id)
|
|
110
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getResourcesByTaskId,
|
|
3
|
+
updateResourceByIds
|
|
4
|
+
} from '@/data-access/resource'
|
|
5
|
+
import {
|
|
6
|
+
TaskType,
|
|
7
|
+
createTask,
|
|
8
|
+
deleteTask,
|
|
9
|
+
getTaskByIdWithUser,
|
|
10
|
+
getTasksWithUser,
|
|
11
|
+
updateTask
|
|
12
|
+
} from '@/data-access/task'
|
|
13
|
+
import { CurrentUser } from '@/lib/currentUser'
|
|
14
|
+
import { deleteFile } from '@/lib/s3Client'
|
|
15
|
+
import { type SortOrderEnum } from '@/lib/sortOrderEnum'
|
|
16
|
+
import { checkForRolePermissionUseCase } from './role-permission'
|
|
17
|
+
|
|
18
|
+
const handleTaskImages = async (
|
|
19
|
+
imageIds: string[],
|
|
20
|
+
taskId: string,
|
|
21
|
+
updatedById: string
|
|
22
|
+
) => {
|
|
23
|
+
const prevImages = await getResourcesByTaskId(taskId)
|
|
24
|
+
|
|
25
|
+
for (const p of prevImages) {
|
|
26
|
+
if (imageIds.includes(p.id)) continue
|
|
27
|
+
await deleteFile(p.id)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (imageIds.length)
|
|
31
|
+
await updateResourceByIds({
|
|
32
|
+
ids: imageIds,
|
|
33
|
+
taskId,
|
|
34
|
+
updatedById
|
|
35
|
+
})
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
type getUsersUseCaseInput = {
|
|
39
|
+
page: number
|
|
40
|
+
limit: number
|
|
41
|
+
sortBy?: keyof TaskType
|
|
42
|
+
sortOrder?: SortOrderEnum
|
|
43
|
+
filters?: {
|
|
44
|
+
title?: string
|
|
45
|
+
status?: TaskType['status'][]
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export const getTasksWithUserUseCase = async (
|
|
50
|
+
currentUser: CurrentUser,
|
|
51
|
+
{ page, limit, sortBy, sortOrder, filters }: getUsersUseCaseInput
|
|
52
|
+
) => {
|
|
53
|
+
const c = await checkForRolePermissionUseCase(
|
|
54
|
+
currentUser.type,
|
|
55
|
+
currentUser.roleId,
|
|
56
|
+
'TaskList'
|
|
57
|
+
)
|
|
58
|
+
if (!c) throw new Error('Unauthorized')
|
|
59
|
+
|
|
60
|
+
if (limit < 1 || limit > 1000) throw new Error('Invalid limit')
|
|
61
|
+
if (page < 1) throw new Error('Invalid page')
|
|
62
|
+
|
|
63
|
+
return await getTasksWithUser({
|
|
64
|
+
page,
|
|
65
|
+
limit,
|
|
66
|
+
sortBy,
|
|
67
|
+
sortOrder,
|
|
68
|
+
filters: filters
|
|
69
|
+
? {
|
|
70
|
+
title: filters.title,
|
|
71
|
+
status: filters.status
|
|
72
|
+
}
|
|
73
|
+
: undefined
|
|
74
|
+
})
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export const getTaskByIdWithUserUseCase = async (
|
|
78
|
+
currentUser: CurrentUser,
|
|
79
|
+
id: string
|
|
80
|
+
) => {
|
|
81
|
+
const c = await checkForRolePermissionUseCase(
|
|
82
|
+
currentUser.type,
|
|
83
|
+
currentUser.roleId,
|
|
84
|
+
'TaskView'
|
|
85
|
+
)
|
|
86
|
+
if (!c) throw new Error('Unauthorized')
|
|
87
|
+
|
|
88
|
+
return await getTaskByIdWithUser(id)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
type createTaskUseCaseInput = {
|
|
92
|
+
title: string
|
|
93
|
+
description?: string | null
|
|
94
|
+
status: TaskType['status']
|
|
95
|
+
imageIds?: string[] | null
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export const createTaskUseCase = async (
|
|
99
|
+
currentUser: CurrentUser,
|
|
100
|
+
data: createTaskUseCaseInput
|
|
101
|
+
) => {
|
|
102
|
+
const c = await checkForRolePermissionUseCase(
|
|
103
|
+
currentUser.type,
|
|
104
|
+
currentUser.roleId,
|
|
105
|
+
'TaskCreate'
|
|
106
|
+
)
|
|
107
|
+
if (!c) throw new Error('Unauthorized')
|
|
108
|
+
|
|
109
|
+
const taskId = await createTask({
|
|
110
|
+
title: data.title,
|
|
111
|
+
description: data.description,
|
|
112
|
+
status: data.status,
|
|
113
|
+
createdById: currentUser.id
|
|
114
|
+
})
|
|
115
|
+
|
|
116
|
+
if (taskId)
|
|
117
|
+
await handleTaskImages(data.imageIds || [], taskId, currentUser.id)
|
|
118
|
+
|
|
119
|
+
return taskId
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
type updateTaskUseCaseInput = {
|
|
123
|
+
id: string
|
|
124
|
+
title?: string
|
|
125
|
+
description?: string | null
|
|
126
|
+
status?: TaskType['status']
|
|
127
|
+
imageIds?: string[] | null
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export const updateTaskUseCase = async (
|
|
131
|
+
currentUser: CurrentUser,
|
|
132
|
+
data: updateTaskUseCaseInput
|
|
133
|
+
) => {
|
|
134
|
+
const c = await checkForRolePermissionUseCase(
|
|
135
|
+
currentUser.type,
|
|
136
|
+
currentUser.roleId,
|
|
137
|
+
'TaskUpdate'
|
|
138
|
+
)
|
|
139
|
+
if (!c) throw new Error('Unauthorized')
|
|
140
|
+
|
|
141
|
+
const result = await updateTask({
|
|
142
|
+
id: data.id,
|
|
143
|
+
title: data.title,
|
|
144
|
+
description: data.description,
|
|
145
|
+
status: data.status,
|
|
146
|
+
updatedById: currentUser.id
|
|
147
|
+
})
|
|
148
|
+
|
|
149
|
+
await handleTaskImages(data.imageIds || [], data.id, currentUser.id)
|
|
150
|
+
|
|
151
|
+
return result
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export const deleteTaskUseCase = async (
|
|
155
|
+
currentUser: CurrentUser,
|
|
156
|
+
id: string
|
|
157
|
+
) => {
|
|
158
|
+
const c = await checkForRolePermissionUseCase(
|
|
159
|
+
currentUser.type,
|
|
160
|
+
currentUser.roleId,
|
|
161
|
+
'TaskDelete'
|
|
162
|
+
)
|
|
163
|
+
if (!c) throw new Error('Unauthorized')
|
|
164
|
+
|
|
165
|
+
return await deleteTask(id)
|
|
166
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import {
|
|
2
|
+
UserType,
|
|
3
|
+
createUser,
|
|
4
|
+
deleteUser,
|
|
5
|
+
getUserById,
|
|
6
|
+
getUsersWithRole,
|
|
7
|
+
updateUser
|
|
8
|
+
} from '@/data-access/user'
|
|
9
|
+
import { type SortOrderEnum } from '@/lib/sortOrderEnum'
|
|
10
|
+
|
|
11
|
+
type UpdateUserNameUseCaseInput = {
|
|
12
|
+
name: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const updateCurrentUserNameUseCase = async (
|
|
16
|
+
currentUserId: string,
|
|
17
|
+
data: UpdateUserNameUseCaseInput
|
|
18
|
+
) => {
|
|
19
|
+
await updateUser(currentUserId, {
|
|
20
|
+
name: data.name
|
|
21
|
+
})
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
type getUsersUseCaseInput = {
|
|
25
|
+
page: number
|
|
26
|
+
limit: number
|
|
27
|
+
sortBy?: keyof UserType
|
|
28
|
+
sortOrder?: SortOrderEnum
|
|
29
|
+
filters?: {
|
|
30
|
+
name?: string
|
|
31
|
+
email?: string
|
|
32
|
+
type?: UserType['type'][]
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const getUsersWithRoleUseCase = async (
|
|
37
|
+
currentUserType: UserType['type'],
|
|
38
|
+
{ page, limit, sortBy, sortOrder, filters }: getUsersUseCaseInput
|
|
39
|
+
) => {
|
|
40
|
+
if (currentUserType !== 'Root') throw new Error('Unauthorized')
|
|
41
|
+
|
|
42
|
+
if (limit < 1 || limit > 1000) throw new Error('Invalid limit')
|
|
43
|
+
if (page < 1) throw new Error('Invalid page')
|
|
44
|
+
|
|
45
|
+
return await getUsersWithRole({
|
|
46
|
+
page,
|
|
47
|
+
limit,
|
|
48
|
+
sortBy,
|
|
49
|
+
sortOrder,
|
|
50
|
+
filters: filters
|
|
51
|
+
? {
|
|
52
|
+
name: filters.name,
|
|
53
|
+
email: filters.email,
|
|
54
|
+
type: filters.type
|
|
55
|
+
}
|
|
56
|
+
: undefined
|
|
57
|
+
})
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export const getUserByIdUseCase = async (
|
|
61
|
+
currentUserType: UserType['type'],
|
|
62
|
+
id: string
|
|
63
|
+
) => {
|
|
64
|
+
if (currentUserType !== 'Root') throw new Error('Unauthorized')
|
|
65
|
+
|
|
66
|
+
return await getUserById(id)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
type createUserUseCaseInput = {
|
|
70
|
+
name?: string | null
|
|
71
|
+
email: string
|
|
72
|
+
type: UserType['type']
|
|
73
|
+
roleId?: string | null
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export const createUserUseCase = async (
|
|
77
|
+
currentUserType: UserType['type'],
|
|
78
|
+
data: createUserUseCaseInput
|
|
79
|
+
) => {
|
|
80
|
+
if (currentUserType !== 'Root') throw new Error('Unauthorized')
|
|
81
|
+
|
|
82
|
+
if (data.type === 'Root') data.roleId = null
|
|
83
|
+
|
|
84
|
+
data.email = data.email.trim().toLowerCase()
|
|
85
|
+
|
|
86
|
+
return await createUser({
|
|
87
|
+
name: data.name,
|
|
88
|
+
email: data.email,
|
|
89
|
+
type: data.type,
|
|
90
|
+
roleId: data.roleId
|
|
91
|
+
})
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
type updateUserUseCaseInput = {
|
|
95
|
+
name: string
|
|
96
|
+
type: UserType['type']
|
|
97
|
+
roleId?: string | null
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export const updateUserUseCase = async (
|
|
101
|
+
currentUserType: UserType['type'],
|
|
102
|
+
id: string,
|
|
103
|
+
data: updateUserUseCaseInput
|
|
104
|
+
) => {
|
|
105
|
+
if (currentUserType !== 'Root') throw new Error('Unauthorized')
|
|
106
|
+
|
|
107
|
+
await updateUser(id, {
|
|
108
|
+
name: data.name,
|
|
109
|
+
type: data.type,
|
|
110
|
+
roleId: data.roleId
|
|
111
|
+
})
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export const deleteUserUseCase = async (
|
|
115
|
+
currentUserType: UserType['type'],
|
|
116
|
+
id: string
|
|
117
|
+
) => {
|
|
118
|
+
if (currentUserType !== 'Root') throw new Error('Unauthorized')
|
|
119
|
+
|
|
120
|
+
await deleteUser(id)
|
|
121
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Config } from 'tailwindcss'
|
|
2
|
+
import { fontFamily } from 'tailwindcss/defaultTheme'
|
|
2
3
|
|
|
3
4
|
const config = {
|
|
4
5
|
darkMode: ['class'],
|
|
@@ -13,10 +14,10 @@ const config = {
|
|
|
13
14
|
}
|
|
14
15
|
},
|
|
15
16
|
extend: {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
extend: {
|
|
18
|
+
fontFamily: {
|
|
19
|
+
sans: ['var(--font-geist-sans)', ...fontFamily.sans]
|
|
20
|
+
}
|
|
20
21
|
},
|
|
21
22
|
colors: {
|
|
22
23
|
border: 'hsl(var(--border))',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"target": "
|
|
3
|
+
"target": "ES2022",
|
|
4
4
|
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
|
5
5
|
"allowJs": true,
|
|
6
6
|
"checkJs": true,
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"noEmit": true,
|
|
20
20
|
"esModuleInterop": true,
|
|
21
21
|
"module": "ESNext",
|
|
22
|
-
"moduleResolution": "
|
|
22
|
+
"moduleResolution": "bundler",
|
|
23
23
|
"resolveJsonModule": true,
|
|
24
24
|
"isolatedModules": true,
|
|
25
25
|
"jsx": "preserve",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"next-env.d.ts",
|
|
39
39
|
"**/*.ts",
|
|
40
40
|
"**/*.tsx",
|
|
41
|
+
"**/*.js",
|
|
41
42
|
"**/*.cjs",
|
|
42
43
|
"**/*.mjs",
|
|
43
44
|
".next/types/**/*.ts"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
NODE_ENV="production"
|
|
2
|
+
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/postgres"
|
|
3
|
+
BETTER_AUTH_URL="http://localhost:3000"
|
|
4
|
+
BETTER_AUTH_SECRET="secret"
|
|
5
|
+
BETTER_AUTH_GITHUB_ID="github_id"
|
|
6
|
+
BETTER_AUTH_GITHUB_SECRET="github_secret"
|
|
7
|
+
BETTER_AUTH_GOOGLE_ID="google_id"
|
|
8
|
+
BETTER_AUTH_GOOGLE_SECRET="google_secret"
|
|
9
|
+
EMAIL_SERVER_USER="username"
|
|
10
|
+
EMAIL_SERVER_PASSWORD="password"
|
|
11
|
+
EMAIL_SERVER_HOST="smtp.example.com"
|
|
12
|
+
EMAIL_SERVER_PORT="465"
|
|
13
|
+
EMAIL_FROM="no-reply@example.com"
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema.json",
|
|
3
|
+
"style": "new-york",
|
|
4
|
+
"rsc": true,
|
|
5
|
+
"tsx": true,
|
|
6
|
+
"tailwind": {
|
|
7
|
+
"config": "",
|
|
8
|
+
"css": "src/app/globals.css",
|
|
9
|
+
"baseColor": "neutral",
|
|
10
|
+
"cssVariables": true,
|
|
11
|
+
"prefix": ""
|
|
12
|
+
},
|
|
13
|
+
"iconLibrary": "lucide",
|
|
14
|
+
"aliases": {
|
|
15
|
+
"components": "~/components",
|
|
16
|
+
"utils": "~/lib/cn",
|
|
17
|
+
"ui": "~/components/ui",
|
|
18
|
+
"lib": "~/lib",
|
|
19
|
+
"hooks": "~/hooks"
|
|
20
|
+
},
|
|
21
|
+
"registries": {}
|
|
22
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// @ts-ignore
|
|
2
|
+
import nextVitals from 'eslint-config-next/core-web-vitals'
|
|
3
|
+
// import nextTs from 'eslint-config-next/typescript'
|
|
4
|
+
import { defineConfig, globalIgnores } from 'eslint/config'
|
|
5
|
+
|
|
6
|
+
const eslintConfig = defineConfig([
|
|
7
|
+
...nextVitals,
|
|
8
|
+
// ...nextTs,
|
|
9
|
+
globalIgnores([
|
|
10
|
+
'node_modules/**',
|
|
11
|
+
'.next/**',
|
|
12
|
+
'out/**',
|
|
13
|
+
'build/**',
|
|
14
|
+
'next-env.d.ts'
|
|
15
|
+
])
|
|
16
|
+
])
|
|
17
|
+
|
|
18
|
+
export default eslintConfig
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import bundleAnalyzer from '@next/bundle-analyzer'
|
|
2
|
+
import type { NextConfig } from 'next'
|
|
3
|
+
import { withWorkflow } from 'workflow/next'
|
|
4
|
+
import { env } from '~/env'
|
|
5
|
+
|
|
6
|
+
const nextConfig: NextConfig = {
|
|
7
|
+
reactCompiler: true
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const withBundleAnalyzer = bundleAnalyzer({
|
|
11
|
+
enabled: env.ANALYZE === 'true'
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
export default withWorkflow(withBundleAnalyzer(nextConfig))
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "my-app",
|
|
3
|
+
"description": "A Legendary Next.js App",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"private": true,
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "next dev",
|
|
8
|
+
"build": "next build",
|
|
9
|
+
"analyze": "ANALYZE=true next build --webpack",
|
|
10
|
+
"start": "next start",
|
|
11
|
+
"lint": "eslint",
|
|
12
|
+
"format": "prettier --write \"./src/**/*.{js,cjs,mjs,jsx,ts,tsx}\"",
|
|
13
|
+
"db:push": "drizzle-kit push",
|
|
14
|
+
"db:studio": "drizzle-kit studio",
|
|
15
|
+
"gen:auth": "bunx @better-auth/cli generate"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@hookform/resolvers": "5.2.2",
|
|
19
|
+
"@next/third-parties": "16.0.1",
|
|
20
|
+
"@paralleldrive/cuid2": "3.0.4",
|
|
21
|
+
"@radix-ui/react-avatar": "1.1.11",
|
|
22
|
+
"@radix-ui/react-checkbox": "1.3.3",
|
|
23
|
+
"@radix-ui/react-collapsible": "1.1.12",
|
|
24
|
+
"@radix-ui/react-dialog": "1.1.15",
|
|
25
|
+
"@radix-ui/react-dropdown-menu": "2.1.16",
|
|
26
|
+
"@radix-ui/react-label": "2.1.8",
|
|
27
|
+
"@radix-ui/react-popover": "1.1.15",
|
|
28
|
+
"@radix-ui/react-radio-group": "1.3.8",
|
|
29
|
+
"@radix-ui/react-select": "2.2.6",
|
|
30
|
+
"@radix-ui/react-separator": "1.1.8",
|
|
31
|
+
"@radix-ui/react-slider": "1.3.6",
|
|
32
|
+
"@radix-ui/react-slot": "1.2.4",
|
|
33
|
+
"@t3-oss/env-nextjs": "0.13.8",
|
|
34
|
+
"@tanstack/react-query": "5.90.7",
|
|
35
|
+
"better-auth": "1.3.34",
|
|
36
|
+
"class-variance-authority": "0.7.1",
|
|
37
|
+
"clsx": "2.1.1",
|
|
38
|
+
"date-fns": "4.1.0",
|
|
39
|
+
"decimal.js": "10.6.0",
|
|
40
|
+
"drizzle-orm": "0.44.7",
|
|
41
|
+
"lucide-react": "0.552.0",
|
|
42
|
+
"next": "16.0.1",
|
|
43
|
+
"next-safe-action": "8.0.11",
|
|
44
|
+
"next-themes": "0.4.6",
|
|
45
|
+
"nextjs-toploader": "3.9.17",
|
|
46
|
+
"nodemailer": "7.0.10",
|
|
47
|
+
"postgres": "3.4.7",
|
|
48
|
+
"react": "19.2.0",
|
|
49
|
+
"react-day-picker": "9.11.1",
|
|
50
|
+
"react-dom": "19.2.0",
|
|
51
|
+
"react-hook-form": "7.66.0",
|
|
52
|
+
"sonner": "2.0.7",
|
|
53
|
+
"tailwind-merge": "3.3.1",
|
|
54
|
+
"tw-animate-css": "1.4.0",
|
|
55
|
+
"workflow": "4.0.1-beta.11",
|
|
56
|
+
"zod": "4.1.12"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@next/bundle-analyzer": "16.0.1",
|
|
60
|
+
"@tailwindcss/postcss": "4.1.16",
|
|
61
|
+
"@types/bun": "1.3.1",
|
|
62
|
+
"@types/react": "19.2.2",
|
|
63
|
+
"@types/react-dom": "19.2.2",
|
|
64
|
+
"babel-plugin-react-compiler": "1.0.0",
|
|
65
|
+
"drizzle-kit": "0.31.6",
|
|
66
|
+
"eslint": "9.39.1",
|
|
67
|
+
"eslint-config-next": "16.0.1",
|
|
68
|
+
"prettier": "3.6.2",
|
|
69
|
+
"prettier-plugin-organize-imports": "4.3.0",
|
|
70
|
+
"prettier-plugin-tailwindcss": "0.7.1",
|
|
71
|
+
"tailwindcss": "4.1.16",
|
|
72
|
+
"typescript": "5.9.3"
|
|
73
|
+
},
|
|
74
|
+
"trustedDependencies": [
|
|
75
|
+
"@swc/core",
|
|
76
|
+
"@tailwindcss/oxide",
|
|
77
|
+
"esbuild",
|
|
78
|
+
"sharp",
|
|
79
|
+
"unrs-resolver"
|
|
80
|
+
]
|
|
81
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** @type {import('prettier').Config & import('prettier-plugin-tailwindcss').PluginOptions} */
|
|
2
|
+
const config = {
|
|
3
|
+
plugins: ['prettier-plugin-organize-imports', 'prettier-plugin-tailwindcss'],
|
|
4
|
+
arrowParens: 'avoid',
|
|
5
|
+
trailingComma: 'none',
|
|
6
|
+
semi: false,
|
|
7
|
+
singleQuote: true,
|
|
8
|
+
tabWidth: 2
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default config
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="1200" fill="none"><rect width="1200" height="1200" fill="#EAEAEA" rx="3"/><g opacity=".5"><g opacity=".5"><path fill="#FAFAFA" d="M600.709 736.5c-75.454 0-136.621-61.167-136.621-136.62 0-75.454 61.167-136.621 136.621-136.621 75.453 0 136.62 61.167 136.62 136.621 0 75.453-61.167 136.62-136.62 136.62Z"/><path stroke="#C9C9C9" stroke-width="2.418" d="M600.709 736.5c-75.454 0-136.621-61.167-136.621-136.62 0-75.454 61.167-136.621 136.621-136.621 75.453 0 136.62 61.167 136.62 136.621 0 75.453-61.167 136.62-136.62 136.62Z"/></g><path stroke="url(#a)" stroke-width="2.418" d="M0-1.209h553.581" transform="scale(1 -1) rotate(45 1163.11 91.165)"/><path stroke="url(#b)" stroke-width="2.418" d="M404.846 598.671h391.726"/><path stroke="url(#c)" stroke-width="2.418" d="M599.5 795.742V404.017"/><path stroke="url(#d)" stroke-width="2.418" d="m795.717 796.597-391.441-391.44"/><path fill="#fff" d="M600.709 656.704c-31.384 0-56.825-25.441-56.825-56.824 0-31.384 25.441-56.825 56.825-56.825 31.383 0 56.824 25.441 56.824 56.825 0 31.383-25.441 56.824-56.824 56.824Z"/><g clip-path="url(#e)"><path fill="#666" fill-rule="evenodd" d="M616.426 586.58h-31.434v16.176l3.553-3.554.531-.531h9.068l.074-.074 8.463-8.463h2.565l7.18 7.181V586.58Zm-15.715 14.654 3.698 3.699 1.283 1.282-2.565 2.565-1.282-1.283-5.2-5.199h-6.066l-5.514 5.514-.073.073v2.876a2.418 2.418 0 0 0 2.418 2.418h26.598a2.418 2.418 0 0 0 2.418-2.418v-8.317l-8.463-8.463-7.181 7.181-.071.072Zm-19.347 5.442v4.085a6.045 6.045 0 0 0 6.046 6.045h26.598a6.044 6.044 0 0 0 6.045-6.045v-7.108l1.356-1.355-1.282-1.283-.074-.073v-17.989h-38.689v23.43l-.146.146.146.147Z" clip-rule="evenodd"/></g><path stroke="#C9C9C9" stroke-width="2.418" d="M600.709 656.704c-31.384 0-56.825-25.441-56.825-56.824 0-31.384 25.441-56.825 56.825-56.825 31.383 0 56.824 25.441 56.824 56.825 0 31.383-25.441 56.824-56.824 56.824Z"/></g><defs><linearGradient id="a" x1="554.061" x2="-.48" y1=".083" y2=".087" gradientUnits="userSpaceOnUse"><stop stop-color="#C9C9C9" stop-opacity="0"/><stop offset=".208" stop-color="#C9C9C9"/><stop offset=".792" stop-color="#C9C9C9"/><stop offset="1" stop-color="#C9C9C9" stop-opacity="0"/></linearGradient><linearGradient id="b" x1="796.912" x2="404.507" y1="599.963" y2="599.965" gradientUnits="userSpaceOnUse"><stop stop-color="#C9C9C9" stop-opacity="0"/><stop offset=".208" stop-color="#C9C9C9"/><stop offset=".792" stop-color="#C9C9C9"/><stop offset="1" stop-color="#C9C9C9" stop-opacity="0"/></linearGradient><linearGradient id="c" x1="600.792" x2="600.794" y1="403.677" y2="796.082" gradientUnits="userSpaceOnUse"><stop stop-color="#C9C9C9" stop-opacity="0"/><stop offset=".208" stop-color="#C9C9C9"/><stop offset=".792" stop-color="#C9C9C9"/><stop offset="1" stop-color="#C9C9C9" stop-opacity="0"/></linearGradient><linearGradient id="d" x1="404.85" x2="796.972" y1="403.903" y2="796.02" gradientUnits="userSpaceOnUse"><stop stop-color="#C9C9C9" stop-opacity="0"/><stop offset=".208" stop-color="#C9C9C9"/><stop offset=".792" stop-color="#C9C9C9"/><stop offset="1" stop-color="#C9C9C9" stop-opacity="0"/></linearGradient><clipPath id="e"><path fill="#fff" d="M581.364 580.535h38.689v38.689h-38.689z"/></clipPath></defs></svg>
|