create-ej-app 6.0.0 → 8.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/cli.js +88 -14
- package/cli.ts +100 -17
- package/package.json +2 -2
- package/template/base/.env.example +11 -15
- package/template/base/Dockerfile +15 -0
- package/template/base/components.json +10 -5
- package/template/base/drizzle.config.ts +4 -5
- package/template/{new → base}/eslint.config.mjs +6 -1
- package/template/base/package.json +58 -75
- package/template/base/postcss.config.mjs +1 -4
- package/template/base/src/app/(admin)/layout.tsx +20 -0
- package/template/base/src/app/(app)/layout.tsx +13 -118
- package/template/base/src/app/(auth)/login/page.tsx +65 -42
- package/template/base/src/app/(marketing)/layout.tsx +7 -35
- package/template/base/src/app/(marketing)/page.tsx +2 -96
- package/template/base/src/app/(marketing)/privacy/page.tsx +3 -0
- package/template/base/src/app/(marketing)/terms/page.tsx +3 -0
- package/template/base/src/app/globals.css +118 -66
- package/template/base/src/app/layout.tsx +27 -12
- package/template/base/src/app/not-found.tsx +27 -0
- package/template/base/src/components/site-footer.tsx +16 -24
- package/template/base/src/components/ui/button.tsx +31 -27
- package/template/base/src/components/ui/card.tsx +83 -70
- package/template/base/src/components/ui/form.tsx +38 -47
- package/template/base/src/components/ui/input.tsx +16 -20
- package/template/base/src/components/ui/label.tsx +16 -18
- package/template/base/src/components/ui/separator.tsx +11 -14
- package/template/base/src/components/ui/sonner.tsx +22 -13
- package/template/base/src/db/index.ts +4 -11
- package/template/base/src/db/schema.ts +60 -268
- package/template/{new → base}/src/env.ts +2 -2
- package/template/{new → base}/src/lib/auth-client.ts +2 -0
- package/template/base/src/lib/auth.ts +64 -80
- package/template/base/src/lib/safe-action.ts +30 -6
- package/template/base/tsconfig.json +9 -7
- package/template/{prisma-advanced → old}/.env.example +10 -9
- package/template/{prisma → old}/components.json +1 -1
- package/template/old/drizzle.config.ts +11 -0
- package/template/old/package.json +87 -0
- package/template/old/postcss.config.mjs +8 -0
- package/template/{prisma-advanced → old}/src/app/(app)/layout.tsx +11 -3
- package/template/{prisma-advanced → old}/src/app/(auth)/login/page.tsx +2 -2
- package/template/{prisma → old}/src/app/(marketing)/page.tsx +8 -7
- package/template/old/src/app/layout.tsx +31 -0
- package/template/old/src/components/ui/sonner.tsx +31 -0
- package/template/old/src/db/index.ts +14 -0
- package/template/old/src/db/schema.ts +287 -0
- package/template/old/src/lib/auth.ts +89 -0
- package/template/old/src/lib/safe-action.ts +19 -0
- package/template/{prisma-advanced → old}/tsconfig.json +3 -2
- package/template/new/.env.example +0 -13
- package/template/new/components.json +0 -22
- package/template/new/drizzle.config.ts +0 -10
- package/template/new/package.json +0 -81
- package/template/new/postcss.config.mjs +0 -5
- package/template/new/src/app/(auth)/login/page.tsx +0 -72
- package/template/new/src/app/globals.css +0 -128
- package/template/new/src/app/layout.tsx +0 -50
- package/template/new/src/app/page.tsx +0 -3
- package/template/new/src/components/ui/button.tsx +0 -60
- package/template/new/src/components/ui/card.tsx +0 -92
- package/template/new/src/components/ui/form.tsx +0 -167
- package/template/new/src/components/ui/input.tsx +0 -21
- package/template/new/src/components/ui/label.tsx +0 -24
- package/template/new/src/components/ui/separator.tsx +0 -28
- package/template/new/src/components/ui/sonner.tsx +0 -40
- package/template/new/src/db/index.ts +0 -7
- package/template/new/src/db/schema.ts +0 -74
- package/template/new/src/lib/auth.ts +0 -67
- package/template/new/src/lib/safe-action.ts +0 -15
- package/template/new/tsconfig.json +0 -49
- package/template/prisma/.env.example +0 -16
- package/template/prisma/.eslintrc.cjs +0 -24
- package/template/prisma/next.config.mjs +0 -15
- package/template/prisma/package.json +0 -80
- package/template/prisma/postcss.config.cjs +0 -6
- package/template/prisma/prettier.config.ts +0 -11
- package/template/prisma/prisma/schema.prisma +0 -115
- package/template/prisma/public/next.svg +0 -1
- package/template/prisma/src/app/(app)/dashboard/page.tsx +0 -19
- package/template/prisma/src/app/(app)/layout.tsx +0 -90
- package/template/prisma/src/app/(app)/settings/actions.ts +0 -18
- package/template/prisma/src/app/(app)/settings/loading.tsx +0 -28
- package/template/prisma/src/app/(app)/settings/page.tsx +0 -28
- package/template/prisma/src/app/(app)/settings/render.tsx +0 -113
- package/template/prisma/src/app/(app)/tasks/[id]/actions.ts +0 -147
- package/template/prisma/src/app/(app)/tasks/[id]/page.tsx +0 -25
- package/template/prisma/src/app/(app)/tasks/[id]/render.tsx +0 -413
- package/template/prisma/src/app/(app)/tasks/actions.ts +0 -69
- package/template/prisma/src/app/(app)/tasks/page.tsx +0 -53
- package/template/prisma/src/app/(app)/tasks/render.tsx +0 -107
- package/template/prisma/src/app/(app)/users/[id]/actions.ts +0 -83
- package/template/prisma/src/app/(app)/users/[id]/page.tsx +0 -32
- package/template/prisma/src/app/(app)/users/[id]/render.tsx +0 -240
- package/template/prisma/src/app/(app)/users/actions.ts +0 -55
- package/template/prisma/src/app/(app)/users/page.tsx +0 -49
- package/template/prisma/src/app/(app)/users/render.tsx +0 -80
- package/template/prisma/src/app/(auth)/layout.tsx +0 -20
- package/template/prisma/src/app/(auth)/login/page.tsx +0 -49
- package/template/prisma/src/app/(auth)/login/user-auth-form.tsx +0 -152
- package/template/prisma/src/app/api/auth/[...nextauth]/route.ts +0 -7
- package/template/prisma/src/app/api/upload/route.ts +0 -36
- package/template/prisma/src/app/favicon.ico +0 -0
- package/template/prisma/src/app/layout.tsx +0 -34
- package/template/prisma/src/components/app-nav-command.tsx +0 -160
- package/template/prisma/src/components/dark-mode-toggle.tsx +0 -43
- package/template/prisma/src/components/data-table/data-table-column-header.tsx +0 -91
- package/template/prisma/src/components/data-table/data-table-faceted-filter.tsx +0 -149
- package/template/prisma/src/components/data-table/data-table-loading.tsx +0 -77
- package/template/prisma/src/components/data-table/data-table-pagination.tsx +0 -94
- package/template/prisma/src/components/data-table/data-table-toolbar.tsx +0 -78
- package/template/prisma/src/components/data-table/data-table-types.ts +0 -17
- package/template/prisma/src/components/data-table/data-table-view-options.tsx +0 -59
- package/template/prisma/src/components/data-table/data-table.tsx +0 -301
- package/template/prisma/src/components/data-table/simple-data-table.tsx +0 -109
- package/template/prisma/src/components/empty-placeholder.tsx +0 -78
- package/template/prisma/src/components/heading.tsx +0 -17
- package/template/prisma/src/components/icons.tsx +0 -85
- package/template/prisma/src/components/main-nav.tsx +0 -64
- package/template/prisma/src/components/mobile-nav.tsx +0 -50
- package/template/prisma/src/components/shell.tsx +0 -13
- package/template/prisma/src/components/side-nav.tsx +0 -51
- package/template/prisma/src/components/site-footer.tsx +0 -31
- package/template/prisma/src/components/system-info.tsx +0 -36
- package/template/prisma/src/components/theme-provider.tsx +0 -13
- package/template/prisma/src/components/ui/alert-dialog.tsx +0 -141
- package/template/prisma/src/components/ui/avatar.tsx +0 -50
- package/template/prisma/src/components/ui/badge.tsx +0 -36
- package/template/prisma/src/components/ui/button.tsx +0 -56
- package/template/prisma/src/components/ui/card.tsx +0 -79
- package/template/prisma/src/components/ui/checkbox.tsx +0 -30
- package/template/prisma/src/components/ui/command.tsx +0 -155
- package/template/prisma/src/components/ui/dialog.tsx +0 -122
- package/template/prisma/src/components/ui/dropdown-menu.tsx +0 -200
- package/template/prisma/src/components/ui/form.tsx +0 -176
- package/template/prisma/src/components/ui/input.tsx +0 -25
- package/template/prisma/src/components/ui/label.tsx +0 -26
- package/template/prisma/src/components/ui/popover.tsx +0 -31
- package/template/prisma/src/components/ui/select.tsx +0 -160
- package/template/prisma/src/components/ui/separator.tsx +0 -31
- package/template/prisma/src/components/ui/skeleton.tsx +0 -15
- package/template/prisma/src/components/ui/table.tsx +0 -117
- package/template/prisma/src/components/ui/textarea.tsx +0 -24
- package/template/prisma/src/components/ui/toast.tsx +0 -127
- package/template/prisma/src/components/ui/toaster.tsx +0 -35
- package/template/prisma/src/components/ui/use-toast.ts +0 -189
- package/template/prisma/src/components/user-account-nav.tsx +0 -60
- package/template/prisma/src/components/user-avatar.tsx +0 -25
- package/template/prisma/src/env.mjs +0 -78
- package/template/prisma/src/hooks/use-debounce.ts +0 -17
- package/template/prisma/src/hooks/use-lock-body.tsx +0 -12
- package/template/prisma/src/lib/auth.ts +0 -80
- package/template/prisma/src/lib/cn.ts +0 -4
- package/template/prisma/src/lib/db.ts +0 -20
- package/template/prisma/src/lib/delay.ts +0 -2
- package/template/prisma/src/lib/formatDate.ts +0 -11
- package/template/prisma/src/lib/generateLabel.ts +0 -5
- package/template/prisma/src/lib/siteConfig.ts +0 -4
- package/template/prisma/src/lib/storageClient.ts +0 -11
- package/template/prisma/src/styles/editor.css +0 -61
- package/template/prisma/src/styles/globals.css +0 -76
- package/template/prisma/src/types/UnwrapPromise.ts +0 -1
- package/template/prisma/tailwind.config.ts +0 -80
- package/template/prisma/tsconfig.json +0 -46
- package/template/prisma-advanced/.eslintrc.cjs +0 -24
- package/template/prisma-advanced/components.json +0 -17
- package/template/prisma-advanced/next.config.mjs +0 -15
- package/template/prisma-advanced/package.json +0 -80
- package/template/prisma-advanced/postcss.config.cjs +0 -6
- package/template/prisma-advanced/prettier.config.ts +0 -11
- package/template/prisma-advanced/prisma/schema.prisma +0 -154
- package/template/prisma-advanced/public/next.svg +0 -1
- package/template/prisma-advanced/src/app/(app)/dashboard/page.tsx +0 -19
- package/template/prisma-advanced/src/app/(app)/roles/[id]/actions.ts +0 -100
- package/template/prisma-advanced/src/app/(app)/roles/[id]/page.tsx +0 -36
- package/template/prisma-advanced/src/app/(app)/roles/[id]/render.tsx +0 -266
- package/template/prisma-advanced/src/app/(app)/roles/actions.ts +0 -67
- package/template/prisma-advanced/src/app/(app)/roles/page.tsx +0 -51
- package/template/prisma-advanced/src/app/(app)/roles/render.tsx +0 -70
- package/template/prisma-advanced/src/app/(app)/settings/actions.ts +0 -18
- package/template/prisma-advanced/src/app/(app)/settings/loading.tsx +0 -28
- package/template/prisma-advanced/src/app/(app)/settings/page.tsx +0 -28
- package/template/prisma-advanced/src/app/(app)/settings/render.tsx +0 -113
- package/template/prisma-advanced/src/app/(app)/tasks/[id]/actions.ts +0 -147
- package/template/prisma-advanced/src/app/(app)/tasks/[id]/page.tsx +0 -55
- package/template/prisma-advanced/src/app/(app)/tasks/[id]/render.tsx +0 -418
- package/template/prisma-advanced/src/app/(app)/tasks/actions.ts +0 -69
- package/template/prisma-advanced/src/app/(app)/tasks/page.tsx +0 -63
- package/template/prisma-advanced/src/app/(app)/tasks/render.tsx +0 -114
- package/template/prisma-advanced/src/app/(app)/users/[id]/actions.ts +0 -104
- package/template/prisma-advanced/src/app/(app)/users/[id]/page.tsx +0 -39
- package/template/prisma-advanced/src/app/(app)/users/[id]/render.tsx +0 -320
- package/template/prisma-advanced/src/app/(app)/users/actions.ts +0 -67
- package/template/prisma-advanced/src/app/(app)/users/page.tsx +0 -61
- package/template/prisma-advanced/src/app/(app)/users/render.tsx +0 -108
- package/template/prisma-advanced/src/app/(auth)/layout.tsx +0 -20
- package/template/prisma-advanced/src/app/(auth)/login/user-auth-form.tsx +0 -152
- package/template/prisma-advanced/src/app/(marketing)/layout.tsx +0 -42
- package/template/prisma-advanced/src/app/(marketing)/page.tsx +0 -96
- package/template/prisma-advanced/src/app/api/auth/[...nextauth]/route.ts +0 -7
- package/template/prisma-advanced/src/app/api/upload/route.ts +0 -36
- package/template/prisma-advanced/src/app/favicon.ico +0 -0
- package/template/prisma-advanced/src/app/layout.tsx +0 -34
- package/template/prisma-advanced/src/components/app-nav-command.tsx +0 -160
- package/template/prisma-advanced/src/components/dark-mode-toggle.tsx +0 -43
- package/template/prisma-advanced/src/components/data-table/data-table-column-header.tsx +0 -91
- package/template/prisma-advanced/src/components/data-table/data-table-faceted-filter.tsx +0 -149
- package/template/prisma-advanced/src/components/data-table/data-table-loading.tsx +0 -77
- package/template/prisma-advanced/src/components/data-table/data-table-pagination.tsx +0 -94
- package/template/prisma-advanced/src/components/data-table/data-table-toolbar.tsx +0 -78
- package/template/prisma-advanced/src/components/data-table/data-table-types.ts +0 -17
- package/template/prisma-advanced/src/components/data-table/data-table-view-options.tsx +0 -59
- package/template/prisma-advanced/src/components/data-table/data-table.tsx +0 -301
- package/template/prisma-advanced/src/components/data-table/simple-data-table.tsx +0 -109
- package/template/prisma-advanced/src/components/empty-placeholder.tsx +0 -78
- package/template/prisma-advanced/src/components/heading.tsx +0 -17
- package/template/prisma-advanced/src/components/icons.tsx +0 -85
- package/template/prisma-advanced/src/components/main-nav.tsx +0 -64
- package/template/prisma-advanced/src/components/shell.tsx +0 -13
- package/template/prisma-advanced/src/components/side-nav.tsx +0 -51
- package/template/prisma-advanced/src/components/system-info.tsx +0 -36
- package/template/prisma-advanced/src/components/theme-provider.tsx +0 -13
- package/template/prisma-advanced/src/components/ui/alert-dialog.tsx +0 -141
- package/template/prisma-advanced/src/components/ui/avatar.tsx +0 -50
- package/template/prisma-advanced/src/components/ui/badge.tsx +0 -36
- package/template/prisma-advanced/src/components/ui/checkbox.tsx +0 -30
- package/template/prisma-advanced/src/components/ui/command.tsx +0 -155
- package/template/prisma-advanced/src/components/ui/dialog.tsx +0 -122
- package/template/prisma-advanced/src/components/ui/dropdown-menu.tsx +0 -200
- package/template/prisma-advanced/src/components/ui/popover.tsx +0 -31
- package/template/prisma-advanced/src/components/ui/select.tsx +0 -160
- package/template/prisma-advanced/src/components/ui/skeleton.tsx +0 -15
- package/template/prisma-advanced/src/components/ui/table.tsx +0 -117
- package/template/prisma-advanced/src/components/ui/textarea.tsx +0 -24
- package/template/prisma-advanced/src/components/ui/toast.tsx +0 -127
- package/template/prisma-advanced/src/components/ui/toaster.tsx +0 -35
- package/template/prisma-advanced/src/components/ui/use-toast.ts +0 -189
- package/template/prisma-advanced/src/components/user-account-nav.tsx +0 -60
- package/template/prisma-advanced/src/components/user-avatar.tsx +0 -25
- package/template/prisma-advanced/src/env.mjs +0 -78
- package/template/prisma-advanced/src/hooks/use-debounce.ts +0 -17
- package/template/prisma-advanced/src/hooks/use-lock-body.tsx +0 -12
- package/template/prisma-advanced/src/lib/auth.ts +0 -180
- package/template/prisma-advanced/src/lib/cn.ts +0 -4
- package/template/prisma-advanced/src/lib/db.ts +0 -20
- package/template/prisma-advanced/src/lib/delay.ts +0 -2
- package/template/prisma-advanced/src/lib/formatDate.ts +0 -11
- package/template/prisma-advanced/src/lib/generateLabel.ts +0 -5
- package/template/prisma-advanced/src/lib/siteConfig.ts +0 -4
- package/template/prisma-advanced/src/lib/storageClient.ts +0 -11
- package/template/prisma-advanced/src/styles/editor.css +0 -61
- package/template/prisma-advanced/src/types/UnwrapPromise.ts +0 -1
- package/template/prisma-advanced/tailwind.config.ts +0 -80
- package/template/{new → base}/next.config.ts +0 -0
- package/template/{new → base}/public/placeholder.svg +0 -0
- package/template/{new → base}/src/app/(auth)/login/email-login-form.tsx +0 -0
- package/template/{new → base}/src/app/(auth)/login/social-login-buttons.tsx +0 -0
- package/template/{new → base}/src/app/api/auth/[...all]/route.ts +0 -0
- package/template/{new → base}/src/components/loader.tsx +0 -0
- package/template/{new → base}/src/components/react-query-provider.tsx +0 -0
- package/template/{new → base}/src/components/screen-size.tsx +0 -0
- package/template/{new → base}/src/components/theme-toggle.tsx +0 -0
- package/template/{new → base}/src/lib/toast-message.ts +0 -0
- package/template/{base → old}/.eslintrc.cjs +0 -0
- package/template/{base → old}/next.config.mjs +0 -0
- package/template/{new → old}/prettier.config.mjs +0 -0
- package/template/{base → old}/public/next.svg +0 -0
- package/template/{base → old}/public/vercel.svg +0 -0
- package/template/{base → old}/src/app/(app)/dashboard/layout.tsx +0 -0
- package/template/{base → old}/src/app/(app)/dashboard/page.tsx +0 -0
- package/template/{base → old}/src/app/(app)/roles/[id]/actions.ts +0 -0
- package/template/{base → old}/src/app/(app)/roles/[id]/page.tsx +0 -0
- package/template/{base → old}/src/app/(app)/roles/[id]/render.tsx +0 -0
- package/template/{base → old}/src/app/(app)/roles/[id]/validation.ts +0 -0
- package/template/{base → old}/src/app/(app)/roles/actions.ts +0 -0
- package/template/{base → old}/src/app/(app)/roles/page.tsx +0 -0
- package/template/{base → old}/src/app/(app)/roles/render.tsx +0 -0
- package/template/{base → old}/src/app/(app)/settings/actions.ts +0 -0
- package/template/{base → old}/src/app/(app)/settings/layout.tsx +0 -0
- package/template/{base → old}/src/app/(app)/settings/loading.tsx +0 -0
- package/template/{base → old}/src/app/(app)/settings/page.tsx +0 -0
- package/template/{base → old}/src/app/(app)/settings/render.tsx +0 -0
- package/template/{base → old}/src/app/(app)/settings/validation.ts +0 -0
- package/template/{base → old}/src/app/(app)/tasks/[id]/actions.ts +0 -0
- package/template/{base → old}/src/app/(app)/tasks/[id]/page.tsx +0 -0
- package/template/{base → old}/src/app/(app)/tasks/[id]/render.tsx +0 -0
- package/template/{base → old}/src/app/(app)/tasks/[id]/validation.ts +0 -0
- package/template/{base → old}/src/app/(app)/tasks/actions.ts +0 -0
- package/template/{base → old}/src/app/(app)/tasks/page.tsx +0 -0
- package/template/{base → old}/src/app/(app)/tasks/render.tsx +0 -0
- package/template/{base → old}/src/app/(app)/tasks/statusEnum.ts +0 -0
- package/template/{base → old}/src/app/(app)/users/[id]/actions.ts +0 -0
- package/template/{base → old}/src/app/(app)/users/[id]/page.tsx +0 -0
- package/template/{base → old}/src/app/(app)/users/[id]/render.tsx +0 -0
- package/template/{base → old}/src/app/(app)/users/[id]/validation.ts +0 -0
- package/template/{base → old}/src/app/(app)/users/actions.ts +0 -0
- package/template/{base → old}/src/app/(app)/users/page.tsx +0 -0
- package/template/{base → old}/src/app/(app)/users/render.tsx +0 -0
- package/template/{base → old}/src/app/(auth)/layout.tsx +0 -0
- package/template/{base → old}/src/app/(auth)/login/render.tsx +0 -0
- package/template/{prisma → old}/src/app/(marketing)/layout.tsx +1 -1
- /package/template/{base → old}/src/app/api/auth/[...nextauth]/route.ts +0 -0
- /package/template/{new → old}/src/app/favicon.ico +0 -0
- /package/template/{prisma-advanced/src/styles → old/src/app}/globals.css +0 -0
- /package/template/{base → old}/src/components/app-nav-command.tsx +0 -0
- /package/template/{base → old}/src/components/dark-mode-toggle.tsx +0 -0
- /package/template/{base → old}/src/components/data-table/data-table-column-header.tsx +0 -0
- /package/template/{base → old}/src/components/data-table/data-table-faceted-filter.tsx +0 -0
- /package/template/{base → old}/src/components/data-table/data-table-loading.tsx +0 -0
- /package/template/{base → old}/src/components/data-table/data-table-pagination.tsx +0 -0
- /package/template/{base → old}/src/components/data-table/data-table-toolbar.tsx +0 -0
- /package/template/{base → old}/src/components/data-table/data-table-types.ts +0 -0
- /package/template/{base → old}/src/components/data-table/data-table-view-options.tsx +0 -0
- /package/template/{base → old}/src/components/data-table/data-table.tsx +0 -0
- /package/template/{base → old}/src/components/data-table/simple-data-table.tsx +0 -0
- /package/template/{base → old}/src/components/empty-placeholder.tsx +0 -0
- /package/template/{base → old}/src/components/heading.tsx +0 -0
- /package/template/{base → old}/src/components/icons.tsx +0 -0
- /package/template/{base → old}/src/components/main-nav.tsx +0 -0
- /package/template/{base → old}/src/components/mobile-nav.tsx +0 -0
- /package/template/{base → old}/src/components/shell.tsx +0 -0
- /package/template/{base → old}/src/components/side-nav.tsx +0 -0
- /package/template/{prisma-advanced → old}/src/components/site-footer.tsx +0 -0
- /package/template/{base → old}/src/components/system-info.tsx +0 -0
- /package/template/{base → old}/src/components/ui/alert-dialog.tsx +0 -0
- /package/template/{base → old}/src/components/ui/avatar.tsx +0 -0
- /package/template/{base → old}/src/components/ui/badge.tsx +0 -0
- /package/template/{prisma-advanced → old}/src/components/ui/button.tsx +0 -0
- /package/template/{prisma-advanced → old}/src/components/ui/card.tsx +0 -0
- /package/template/{base → old}/src/components/ui/checkbox.tsx +0 -0
- /package/template/{base → old}/src/components/ui/command.tsx +0 -0
- /package/template/{base → old}/src/components/ui/dialog.tsx +0 -0
- /package/template/{base → old}/src/components/ui/dropdown-menu.tsx +0 -0
- /package/template/{prisma-advanced → old}/src/components/ui/form.tsx +0 -0
- /package/template/{prisma-advanced → old}/src/components/ui/input.tsx +0 -0
- /package/template/{prisma-advanced → old}/src/components/ui/label.tsx +0 -0
- /package/template/{base → old}/src/components/ui/popover.tsx +0 -0
- /package/template/{base → old}/src/components/ui/select.tsx +0 -0
- /package/template/{prisma-advanced → old}/src/components/ui/separator.tsx +0 -0
- /package/template/{base → old}/src/components/ui/skeleton.tsx +0 -0
- /package/template/{base → old}/src/components/ui/table.tsx +0 -0
- /package/template/{base → old}/src/components/user-account-nav.tsx +0 -0
- /package/template/{base → old}/src/components/user-avatar.tsx +0 -0
- /package/template/{base → old}/src/data-access/resource.ts +0 -0
- /package/template/{base → old}/src/data-access/role-permission.ts +0 -0
- /package/template/{base → old}/src/data-access/role.ts +0 -0
- /package/template/{base → old}/src/data-access/task.ts +0 -0
- /package/template/{base → old}/src/data-access/user.ts +0 -0
- /package/template/{base → old}/src/env.mjs +0 -0
- /package/template/{base → old}/src/hooks/use-debounce.tsx +0 -0
- /package/template/{base → old}/src/hooks/use-lock-body.tsx +0 -0
- /package/template/{new → old}/src/lib/cn.ts +0 -0
- /package/template/{base → old}/src/lib/currentUser.ts +0 -0
- /package/template/{new → old}/src/lib/delay.ts +0 -0
- /package/template/{base → old}/src/lib/formatDate.ts +0 -0
- /package/template/{base → old}/src/lib/generateLabel.ts +0 -0
- /package/template/{base → old}/src/lib/s3Client.ts +0 -0
- /package/template/{new → old}/src/lib/siteConfig.ts +0 -0
- /package/template/{base → old}/src/lib/sortOrderEnum.ts +0 -0
- /package/template/{base → old}/src/use-case/role-permission.ts +0 -0
- /package/template/{base → old}/src/use-case/role.ts +0 -0
- /package/template/{base → old}/src/use-case/task.ts +0 -0
- /package/template/{base → old}/src/use-case/user.ts +0 -0
- /package/template/{base → old}/tailwind.config.ts +0 -0
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import * as LabelPrimitive from '@radix-ui/react-label'
|
|
4
|
-
import { Slot } from '@radix-ui/react-slot'
|
|
5
|
-
import * as React from 'react'
|
|
6
|
-
import {
|
|
7
|
-
Controller,
|
|
8
|
-
FormProvider,
|
|
9
|
-
useFormContext,
|
|
10
|
-
useFormState,
|
|
11
|
-
type ControllerProps,
|
|
12
|
-
type FieldPath,
|
|
13
|
-
type FieldValues
|
|
14
|
-
} from 'react-hook-form'
|
|
15
|
-
|
|
16
|
-
import { Label } from '~/components/ui/label'
|
|
17
|
-
import { cn } from '~/lib/cn'
|
|
18
|
-
|
|
19
|
-
const Form = FormProvider
|
|
20
|
-
|
|
21
|
-
type FormFieldContextValue<
|
|
22
|
-
TFieldValues extends FieldValues = FieldValues,
|
|
23
|
-
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>
|
|
24
|
-
> = {
|
|
25
|
-
name: TName
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const FormFieldContext = React.createContext<FormFieldContextValue>(
|
|
29
|
-
{} as FormFieldContextValue
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
const FormField = <
|
|
33
|
-
TFieldValues extends FieldValues = FieldValues,
|
|
34
|
-
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>
|
|
35
|
-
>({
|
|
36
|
-
...props
|
|
37
|
-
}: ControllerProps<TFieldValues, TName>) => {
|
|
38
|
-
return (
|
|
39
|
-
<FormFieldContext.Provider value={{ name: props.name }}>
|
|
40
|
-
<Controller {...props} />
|
|
41
|
-
</FormFieldContext.Provider>
|
|
42
|
-
)
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const useFormField = () => {
|
|
46
|
-
const fieldContext = React.useContext(FormFieldContext)
|
|
47
|
-
const itemContext = React.useContext(FormItemContext)
|
|
48
|
-
const { getFieldState } = useFormContext()
|
|
49
|
-
const formState = useFormState({ name: fieldContext.name })
|
|
50
|
-
const fieldState = getFieldState(fieldContext.name, formState)
|
|
51
|
-
|
|
52
|
-
if (!fieldContext) {
|
|
53
|
-
throw new Error('useFormField should be used within <FormField>')
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const { id } = itemContext
|
|
57
|
-
|
|
58
|
-
return {
|
|
59
|
-
id,
|
|
60
|
-
name: fieldContext.name,
|
|
61
|
-
formItemId: `${id}-form-item`,
|
|
62
|
-
formDescriptionId: `${id}-form-item-description`,
|
|
63
|
-
formMessageId: `${id}-form-item-message`,
|
|
64
|
-
...fieldState
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
type FormItemContextValue = {
|
|
69
|
-
id: string
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
const FormItemContext = React.createContext<FormItemContextValue>(
|
|
73
|
-
{} as FormItemContextValue
|
|
74
|
-
)
|
|
75
|
-
|
|
76
|
-
function FormItem({ className, ...props }: React.ComponentProps<'div'>) {
|
|
77
|
-
const id = React.useId()
|
|
78
|
-
|
|
79
|
-
return (
|
|
80
|
-
<FormItemContext.Provider value={{ id }}>
|
|
81
|
-
<div
|
|
82
|
-
data-slot="form-item"
|
|
83
|
-
className={cn('grid gap-2', className)}
|
|
84
|
-
{...props}
|
|
85
|
-
/>
|
|
86
|
-
</FormItemContext.Provider>
|
|
87
|
-
)
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function FormLabel({
|
|
91
|
-
className,
|
|
92
|
-
...props
|
|
93
|
-
}: React.ComponentProps<typeof LabelPrimitive.Root>) {
|
|
94
|
-
const { error, formItemId } = useFormField()
|
|
95
|
-
|
|
96
|
-
return (
|
|
97
|
-
<Label
|
|
98
|
-
data-slot="form-label"
|
|
99
|
-
data-error={!!error}
|
|
100
|
-
className={cn('data-[error=true]:text-destructive', className)}
|
|
101
|
-
htmlFor={formItemId}
|
|
102
|
-
{...props}
|
|
103
|
-
/>
|
|
104
|
-
)
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
function FormControl({ ...props }: React.ComponentProps<typeof Slot>) {
|
|
108
|
-
const { error, formItemId, formDescriptionId, formMessageId } = useFormField()
|
|
109
|
-
|
|
110
|
-
return (
|
|
111
|
-
<Slot
|
|
112
|
-
data-slot="form-control"
|
|
113
|
-
id={formItemId}
|
|
114
|
-
aria-describedby={
|
|
115
|
-
!error
|
|
116
|
-
? `${formDescriptionId}`
|
|
117
|
-
: `${formDescriptionId} ${formMessageId}`
|
|
118
|
-
}
|
|
119
|
-
aria-invalid={!!error}
|
|
120
|
-
{...props}
|
|
121
|
-
/>
|
|
122
|
-
)
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
function FormDescription({ className, ...props }: React.ComponentProps<'p'>) {
|
|
126
|
-
const { formDescriptionId } = useFormField()
|
|
127
|
-
|
|
128
|
-
return (
|
|
129
|
-
<p
|
|
130
|
-
data-slot="form-description"
|
|
131
|
-
id={formDescriptionId}
|
|
132
|
-
className={cn('text-muted-foreground text-sm', className)}
|
|
133
|
-
{...props}
|
|
134
|
-
/>
|
|
135
|
-
)
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
function FormMessage({ className, ...props }: React.ComponentProps<'p'>) {
|
|
139
|
-
const { error, formMessageId } = useFormField()
|
|
140
|
-
const body = error ? String(error?.message ?? '') : props.children
|
|
141
|
-
|
|
142
|
-
if (!body) {
|
|
143
|
-
return null
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
return (
|
|
147
|
-
<p
|
|
148
|
-
data-slot="form-message"
|
|
149
|
-
id={formMessageId}
|
|
150
|
-
className={cn('text-destructive text-sm', className)}
|
|
151
|
-
{...props}
|
|
152
|
-
>
|
|
153
|
-
{body}
|
|
154
|
-
</p>
|
|
155
|
-
)
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
export {
|
|
159
|
-
Form,
|
|
160
|
-
FormControl,
|
|
161
|
-
FormDescription,
|
|
162
|
-
FormField,
|
|
163
|
-
FormItem,
|
|
164
|
-
FormLabel,
|
|
165
|
-
FormMessage,
|
|
166
|
-
useFormField
|
|
167
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as React from 'react'
|
|
2
|
-
|
|
3
|
-
import { cn } from '~/lib/cn'
|
|
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
|
-
'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
|
|
12
|
-
'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',
|
|
13
|
-
'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',
|
|
14
|
-
className
|
|
15
|
-
)}
|
|
16
|
-
{...props}
|
|
17
|
-
/>
|
|
18
|
-
)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export { Input }
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import * as LabelPrimitive from '@radix-ui/react-label'
|
|
4
|
-
import * as React from 'react'
|
|
5
|
-
|
|
6
|
-
import { cn } from '~/lib/cn'
|
|
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 }
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import * as SeparatorPrimitive from '@radix-ui/react-separator'
|
|
4
|
-
import * as React from 'react'
|
|
5
|
-
|
|
6
|
-
import { cn } from '~/lib/cn'
|
|
7
|
-
|
|
8
|
-
function Separator({
|
|
9
|
-
className,
|
|
10
|
-
orientation = 'horizontal',
|
|
11
|
-
decorative = true,
|
|
12
|
-
...props
|
|
13
|
-
}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
|
|
14
|
-
return (
|
|
15
|
-
<SeparatorPrimitive.Root
|
|
16
|
-
data-slot="separator"
|
|
17
|
-
decorative={decorative}
|
|
18
|
-
orientation={orientation}
|
|
19
|
-
className={cn(
|
|
20
|
-
'bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px',
|
|
21
|
-
className
|
|
22
|
-
)}
|
|
23
|
-
{...props}
|
|
24
|
-
/>
|
|
25
|
-
)
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export { Separator }
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
CircleCheckIcon,
|
|
5
|
-
InfoIcon,
|
|
6
|
-
Loader2Icon,
|
|
7
|
-
OctagonXIcon,
|
|
8
|
-
TriangleAlertIcon
|
|
9
|
-
} from 'lucide-react'
|
|
10
|
-
import { useTheme } from 'next-themes'
|
|
11
|
-
import { Toaster as Sonner, type ToasterProps } from 'sonner'
|
|
12
|
-
|
|
13
|
-
const Toaster = ({ ...props }: ToasterProps) => {
|
|
14
|
-
const { theme = 'system' } = useTheme()
|
|
15
|
-
|
|
16
|
-
return (
|
|
17
|
-
<Sonner
|
|
18
|
-
theme={theme as ToasterProps['theme']}
|
|
19
|
-
className="toaster group"
|
|
20
|
-
icons={{
|
|
21
|
-
success: <CircleCheckIcon className="size-4" />,
|
|
22
|
-
info: <InfoIcon className="size-4" />,
|
|
23
|
-
warning: <TriangleAlertIcon className="size-4" />,
|
|
24
|
-
error: <OctagonXIcon className="size-4" />,
|
|
25
|
-
loading: <Loader2Icon className="size-4 animate-spin" />
|
|
26
|
-
}}
|
|
27
|
-
style={
|
|
28
|
-
{
|
|
29
|
-
'--normal-bg': 'var(--popover)',
|
|
30
|
-
'--normal-text': 'var(--popover-foreground)',
|
|
31
|
-
'--normal-border': 'var(--border)',
|
|
32
|
-
'--border-radius': 'var(--radius)'
|
|
33
|
-
} as React.CSSProperties
|
|
34
|
-
}
|
|
35
|
-
{...props}
|
|
36
|
-
/>
|
|
37
|
-
)
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export { Toaster }
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { createId } from '@paralleldrive/cuid2'
|
|
2
|
-
import { boolean, pgTable, text, timestamp, varchar } from 'drizzle-orm/pg-core'
|
|
3
|
-
|
|
4
|
-
const commonFieldDefs = {
|
|
5
|
-
id: (prefix: string) =>
|
|
6
|
-
varchar('id')
|
|
7
|
-
.primaryKey()
|
|
8
|
-
.$defaultFn(() => prefix + '_' + createId()),
|
|
9
|
-
date: (name: string) =>
|
|
10
|
-
timestamp(name, {
|
|
11
|
-
mode: 'date',
|
|
12
|
-
withTimezone: true
|
|
13
|
-
}),
|
|
14
|
-
dates: {
|
|
15
|
-
createdAt: timestamp('created_at', {
|
|
16
|
-
mode: 'date',
|
|
17
|
-
withTimezone: true
|
|
18
|
-
})
|
|
19
|
-
.notNull()
|
|
20
|
-
.defaultNow(),
|
|
21
|
-
updatedAt: timestamp('updated_at', {
|
|
22
|
-
mode: 'date',
|
|
23
|
-
withTimezone: true
|
|
24
|
-
})
|
|
25
|
-
.notNull()
|
|
26
|
-
.defaultNow()
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export const usersTable = pgTable('users', {
|
|
31
|
-
id: commonFieldDefs.id('user'),
|
|
32
|
-
email: text('email').notNull().unique(),
|
|
33
|
-
name: text('name').notNull(),
|
|
34
|
-
emailVerified: boolean('email_verified').default(false).notNull(),
|
|
35
|
-
image: text('image'),
|
|
36
|
-
...commonFieldDefs.dates
|
|
37
|
-
})
|
|
38
|
-
|
|
39
|
-
export const sessionsTable = pgTable('sessions', {
|
|
40
|
-
id: commonFieldDefs.id('session'),
|
|
41
|
-
expiresAt: commonFieldDefs.date('expires_at').notNull(),
|
|
42
|
-
token: text('token').notNull().unique(),
|
|
43
|
-
ipAddress: text('ip_address'),
|
|
44
|
-
userAgent: text('user_agent'),
|
|
45
|
-
userId: text('user_id')
|
|
46
|
-
.notNull()
|
|
47
|
-
.references(() => usersTable.id, { onDelete: 'cascade' }),
|
|
48
|
-
...commonFieldDefs.dates
|
|
49
|
-
})
|
|
50
|
-
|
|
51
|
-
export const accountsTable = pgTable('accounts', {
|
|
52
|
-
id: commonFieldDefs.id('account'),
|
|
53
|
-
accountId: text('account_id').notNull(),
|
|
54
|
-
providerId: text('provider_id').notNull(),
|
|
55
|
-
userId: text('user_id')
|
|
56
|
-
.notNull()
|
|
57
|
-
.references(() => usersTable.id, { onDelete: 'cascade' }),
|
|
58
|
-
accessToken: text('access_token'),
|
|
59
|
-
refreshToken: text('refresh_token'),
|
|
60
|
-
idToken: text('id_token'),
|
|
61
|
-
accessTokenExpiresAt: commonFieldDefs.date('access_token_expires_at'),
|
|
62
|
-
refreshTokenExpiresAt: commonFieldDefs.date('refresh_token_expires_at'),
|
|
63
|
-
scope: text('scope'),
|
|
64
|
-
password: text('password'),
|
|
65
|
-
...commonFieldDefs.dates
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
export const verificationsTable = pgTable('verifications', {
|
|
69
|
-
id: commonFieldDefs.id('verification'),
|
|
70
|
-
identifier: text('identifier').notNull(),
|
|
71
|
-
value: text('value').notNull(),
|
|
72
|
-
expiresAt: commonFieldDefs.date('expires_at').notNull(),
|
|
73
|
-
...commonFieldDefs.dates
|
|
74
|
-
})
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { createId } from '@paralleldrive/cuid2'
|
|
2
|
-
import { betterAuth } from 'better-auth'
|
|
3
|
-
import { drizzleAdapter } from 'better-auth/adapters/drizzle'
|
|
4
|
-
import { lastLoginMethod, magicLink } from 'better-auth/plugins'
|
|
5
|
-
import { headers } from 'next/headers'
|
|
6
|
-
import { cache } from 'react'
|
|
7
|
-
import { db } from '~/db'
|
|
8
|
-
import {
|
|
9
|
-
accountsTable,
|
|
10
|
-
sessionsTable,
|
|
11
|
-
usersTable,
|
|
12
|
-
verificationsTable
|
|
13
|
-
} from '~/db/schema'
|
|
14
|
-
import { env } from '~/env'
|
|
15
|
-
|
|
16
|
-
export const auth = betterAuth({
|
|
17
|
-
database: drizzleAdapter(db, {
|
|
18
|
-
provider: 'pg',
|
|
19
|
-
schema: {
|
|
20
|
-
user: usersTable,
|
|
21
|
-
session: sessionsTable,
|
|
22
|
-
account: accountsTable,
|
|
23
|
-
verification: verificationsTable
|
|
24
|
-
}
|
|
25
|
-
}),
|
|
26
|
-
account: {
|
|
27
|
-
accountLinking: {
|
|
28
|
-
enabled: true
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
advanced: {
|
|
32
|
-
database: {
|
|
33
|
-
generateId: ({ model }) => `${model}_${createId()}`
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
socialProviders: {
|
|
37
|
-
github: {
|
|
38
|
-
prompt: 'select_account',
|
|
39
|
-
clientId: env.BETTER_AUTH_GITHUB_ID,
|
|
40
|
-
clientSecret: env.BETTER_AUTH_GITHUB_SECRET
|
|
41
|
-
},
|
|
42
|
-
google: {
|
|
43
|
-
prompt: 'select_account',
|
|
44
|
-
clientId: env.BETTER_AUTH_GOOGLE_ID,
|
|
45
|
-
clientSecret: env.BETTER_AUTH_GOOGLE_SECRET
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
plugins: [
|
|
49
|
-
magicLink({
|
|
50
|
-
sendMagicLink: async ({ email, token, url }) => {
|
|
51
|
-
console.warn('TODO: send email', {
|
|
52
|
-
email,
|
|
53
|
-
token,
|
|
54
|
-
url
|
|
55
|
-
})
|
|
56
|
-
}
|
|
57
|
-
}),
|
|
58
|
-
lastLoginMethod()
|
|
59
|
-
]
|
|
60
|
-
})
|
|
61
|
-
|
|
62
|
-
export const getAuthSession = cache(
|
|
63
|
-
async () =>
|
|
64
|
-
await auth.api.getSession({
|
|
65
|
-
headers: await headers()
|
|
66
|
-
})
|
|
67
|
-
)
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { createSafeActionClient } from 'next-safe-action'
|
|
2
|
-
import { getAuthSession } from './auth'
|
|
3
|
-
|
|
4
|
-
export const actionClient = createSafeActionClient().use(
|
|
5
|
-
async ({ next, ctx }) => {
|
|
6
|
-
const session = await getAuthSession()
|
|
7
|
-
|
|
8
|
-
return next({
|
|
9
|
-
ctx: {
|
|
10
|
-
...ctx,
|
|
11
|
-
user: session?.user
|
|
12
|
-
}
|
|
13
|
-
})
|
|
14
|
-
}
|
|
15
|
-
)
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2017",
|
|
4
|
-
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
|
5
|
-
"allowJs": true,
|
|
6
|
-
"checkJs": true,
|
|
7
|
-
"skipLibCheck": true,
|
|
8
|
-
"strict": true,
|
|
9
|
-
"noImplicitAny": true,
|
|
10
|
-
"strictNullChecks": true,
|
|
11
|
-
"strictFunctionTypes": true,
|
|
12
|
-
"noImplicitThis": true,
|
|
13
|
-
"noUncheckedIndexedAccess": true,
|
|
14
|
-
"noUnusedLocals": true,
|
|
15
|
-
"noUnusedParameters": true,
|
|
16
|
-
"noImplicitReturns": true,
|
|
17
|
-
"noFallthroughCasesInSwitch": true,
|
|
18
|
-
"forceConsistentCasingInFileNames": true,
|
|
19
|
-
"noEmit": true,
|
|
20
|
-
"esModuleInterop": true,
|
|
21
|
-
"module": "ESNext",
|
|
22
|
-
"moduleResolution": "bundler",
|
|
23
|
-
"resolveJsonModule": true,
|
|
24
|
-
"isolatedModules": true,
|
|
25
|
-
"jsx": "react-jsx",
|
|
26
|
-
"incremental": true,
|
|
27
|
-
"plugins": [
|
|
28
|
-
{
|
|
29
|
-
"name": "next"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"name": "workflow"
|
|
33
|
-
}
|
|
34
|
-
],
|
|
35
|
-
"paths": {
|
|
36
|
-
"~/*": ["./src/*"]
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
"include": [
|
|
40
|
-
"next-env.d.ts",
|
|
41
|
-
"**/*.ts",
|
|
42
|
-
"**/*.tsx",
|
|
43
|
-
".next/types/**/*.ts",
|
|
44
|
-
".next/dev/types/**/*.ts",
|
|
45
|
-
"**/*.cjs",
|
|
46
|
-
"**/*.mjs"
|
|
47
|
-
],
|
|
48
|
-
"exclude": ["node_modules"]
|
|
49
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/postgres?schema=public"
|
|
2
|
-
NEXTAUTH_SECRET="secret"
|
|
3
|
-
NEXTAUTH_URL="http://localhost:3000"
|
|
4
|
-
EMAIL_SERVER_HOST="example.com"
|
|
5
|
-
EMAIL_SERVER_PORT="123"
|
|
6
|
-
EMAIL_SERVER_USER="example@example.com"
|
|
7
|
-
EMAIL_SERVER_PASSWORD="password"
|
|
8
|
-
EMAIL_FROM="example@example.com"
|
|
9
|
-
GOOGLE_ID=""
|
|
10
|
-
GOOGLE_SECRET=""
|
|
11
|
-
GITHUB_ID=""
|
|
12
|
-
GITHUB_SECRET=""
|
|
13
|
-
FIREBASE_PROJECT_ID=""
|
|
14
|
-
FIREBASE_PRIVATE_KEY=""
|
|
15
|
-
FIREBASE_CLIENT_EMAIL=""
|
|
16
|
-
FIREBASE_STORAGE_BUCKET=""
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
2
|
-
const path = require('path')
|
|
3
|
-
|
|
4
|
-
/** @type {import("eslint").Linter.Config} */
|
|
5
|
-
const eslintConfig = {
|
|
6
|
-
overrides: [
|
|
7
|
-
{
|
|
8
|
-
extends: [],
|
|
9
|
-
files: ['*.ts', '*.tsx'],
|
|
10
|
-
parserOptions: {
|
|
11
|
-
project: path.join(__dirname, 'tsconfig.json')
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
],
|
|
15
|
-
parser: '@typescript-eslint/parser',
|
|
16
|
-
parserOptions: {
|
|
17
|
-
project: path.join(__dirname, 'tsconfig.json')
|
|
18
|
-
},
|
|
19
|
-
plugins: ['@typescript-eslint'],
|
|
20
|
-
extends: ['next/core-web-vitals'],
|
|
21
|
-
rules: {}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
module.exports = eslintConfig
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful
|
|
3
|
-
* for Docker builds.
|
|
4
|
-
*/
|
|
5
|
-
await import('./src/env.mjs')
|
|
6
|
-
|
|
7
|
-
/** @type {import('next').NextConfig} */
|
|
8
|
-
const nextConfig = {
|
|
9
|
-
i18n: {
|
|
10
|
-
locales: ['en'],
|
|
11
|
-
defaultLocale: 'en'
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export default nextConfig
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "my-app",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "A Legendary Next.js App",
|
|
5
|
-
"private": true,
|
|
6
|
-
"scripts": {
|
|
7
|
-
"postinstall": "prisma generate",
|
|
8
|
-
"lint": "next lint",
|
|
9
|
-
"dev": "next dev",
|
|
10
|
-
"build": "next build",
|
|
11
|
-
"start": "next start",
|
|
12
|
-
"db:push": "prisma db push",
|
|
13
|
-
"db:gen": "prisma generate",
|
|
14
|
-
"db:studio": "prisma studio"
|
|
15
|
-
},
|
|
16
|
-
"dependencies": {
|
|
17
|
-
"@editorjs/checklist": "^1.6.0",
|
|
18
|
-
"@editorjs/delimiter": "^1.4.0",
|
|
19
|
-
"@editorjs/editorjs": "^2.28.2",
|
|
20
|
-
"@editorjs/header": "^2.8.1",
|
|
21
|
-
"@editorjs/image": "^2.9.0",
|
|
22
|
-
"@editorjs/list": "^1.9.0",
|
|
23
|
-
"@editorjs/quote": "^2.6.0",
|
|
24
|
-
"@editorjs/table": "^2.3.0",
|
|
25
|
-
"@ejekanshjain/cloud-storage": "^3.2.0",
|
|
26
|
-
"@hookform/resolvers": "^3.3.3",
|
|
27
|
-
"@next-auth/prisma-adapter": "^1.0.7",
|
|
28
|
-
"@prisma/client": "^5.7.1",
|
|
29
|
-
"@radix-ui/react-alert-dialog": "^1.0.5",
|
|
30
|
-
"@radix-ui/react-avatar": "^1.0.4",
|
|
31
|
-
"@radix-ui/react-checkbox": "^1.0.4",
|
|
32
|
-
"@radix-ui/react-dialog": "^1.0.5",
|
|
33
|
-
"@radix-ui/react-dropdown-menu": "^2.0.6",
|
|
34
|
-
"@radix-ui/react-label": "^2.0.2",
|
|
35
|
-
"@radix-ui/react-popover": "^1.0.7",
|
|
36
|
-
"@radix-ui/react-select": "^2.0.0",
|
|
37
|
-
"@radix-ui/react-separator": "^1.0.3",
|
|
38
|
-
"@radix-ui/react-slot": "^1.0.2",
|
|
39
|
-
"@radix-ui/react-toast": "^1.1.5",
|
|
40
|
-
"@t3-oss/env-nextjs": "^0.7.1",
|
|
41
|
-
"@tailwindcss/typography": "^0.5.10",
|
|
42
|
-
"@tanstack/react-table": "^8.11.2",
|
|
43
|
-
"@types/eslint": "^8.56.0",
|
|
44
|
-
"@types/lodash": "^4.14.202",
|
|
45
|
-
"@types/node": "^20.10.5",
|
|
46
|
-
"@types/nodemailer": "^6.4.14",
|
|
47
|
-
"@types/react": "^18.2.46",
|
|
48
|
-
"@types/react-dom": "^18.2.18",
|
|
49
|
-
"@typescript-eslint/eslint-plugin": "^6.16.0",
|
|
50
|
-
"@typescript-eslint/parser": "^6.16.0",
|
|
51
|
-
"@vercel/analytics": "^1.1.1",
|
|
52
|
-
"@vercel/speed-insights": "^1.0.2",
|
|
53
|
-
"autoprefixer": "^10.4.16",
|
|
54
|
-
"class-variance-authority": "^0.7.0",
|
|
55
|
-
"clsx": "^2.0.0",
|
|
56
|
-
"cmdk": "^0.2.0",
|
|
57
|
-
"dayjs": "^1.11.10",
|
|
58
|
-
"editorjs-html": "^3.4.3",
|
|
59
|
-
"eslint": "^8.56.0",
|
|
60
|
-
"eslint-config-next": "^14.0.4",
|
|
61
|
-
"lodash": "^4.17.21",
|
|
62
|
-
"lucide-react": "^0.303.0",
|
|
63
|
-
"next": "^14.0.4",
|
|
64
|
-
"next-auth": "^4.24.5",
|
|
65
|
-
"next-themes": "^0.2.1",
|
|
66
|
-
"nodemailer": "^6.9.7",
|
|
67
|
-
"postcss": "^8.4.32",
|
|
68
|
-
"prettier": "^3.1.1",
|
|
69
|
-
"prettier-plugin-tailwindcss": "^0.5.10",
|
|
70
|
-
"prisma": "^5.7.1",
|
|
71
|
-
"react": "^18.2.0",
|
|
72
|
-
"react-dom": "^18.2.0",
|
|
73
|
-
"react-hook-form": "^7.49.2",
|
|
74
|
-
"tailwind-merge": "^2.2.0",
|
|
75
|
-
"tailwindcss": "^3.4.0",
|
|
76
|
-
"tailwindcss-animate": "^1.0.7",
|
|
77
|
-
"typescript": "^5.3.3",
|
|
78
|
-
"zod": "^3.22.4"
|
|
79
|
-
}
|
|
80
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Config } from 'prettier'
|
|
2
|
-
|
|
3
|
-
const prettierConfig: Config = {
|
|
4
|
-
plugins: [require.resolve('prettier-plugin-tailwindcss')],
|
|
5
|
-
arrowParens: 'avoid',
|
|
6
|
-
trailingComma: 'none',
|
|
7
|
-
semi: false,
|
|
8
|
-
singleQuote: true
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export default prettierConfig
|