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
package/cli.js
CHANGED
|
@@ -13,12 +13,49 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
14
|
};
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
const child_process_1 = require("child_process");
|
|
16
17
|
const commander_1 = require("commander");
|
|
17
18
|
const enquirer_1 = require("enquirer");
|
|
18
19
|
const fs_1 = __importDefault(require("fs"));
|
|
19
20
|
const path_1 = __importDefault(require("path"));
|
|
20
21
|
//@ts-ignore
|
|
21
22
|
const copy_dir_1 = __importDefault(require("copy-dir"));
|
|
23
|
+
const detectPackageManager = () => {
|
|
24
|
+
const userAgent = process.env.npm_config_user_agent;
|
|
25
|
+
if (userAgent) {
|
|
26
|
+
if (userAgent.startsWith('pnpm'))
|
|
27
|
+
return 'pnpm';
|
|
28
|
+
if (userAgent.startsWith('yarn'))
|
|
29
|
+
return 'yarn';
|
|
30
|
+
if (userAgent.startsWith('bun'))
|
|
31
|
+
return 'bun';
|
|
32
|
+
}
|
|
33
|
+
return 'npm';
|
|
34
|
+
};
|
|
35
|
+
const getInstallCommand = (packageManager) => {
|
|
36
|
+
switch (packageManager) {
|
|
37
|
+
case 'pnpm':
|
|
38
|
+
return 'pnpm i';
|
|
39
|
+
case 'yarn':
|
|
40
|
+
return 'yarn';
|
|
41
|
+
case 'bun':
|
|
42
|
+
return 'bun i';
|
|
43
|
+
default:
|
|
44
|
+
return 'npm i';
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const getDevCommand = (packageManager) => {
|
|
48
|
+
switch (packageManager) {
|
|
49
|
+
case 'pnpm':
|
|
50
|
+
return 'pnpm dev';
|
|
51
|
+
case 'yarn':
|
|
52
|
+
return 'yarn dev';
|
|
53
|
+
case 'bun':
|
|
54
|
+
return 'bun dev';
|
|
55
|
+
default:
|
|
56
|
+
return 'npm run dev';
|
|
57
|
+
}
|
|
58
|
+
};
|
|
22
59
|
commander_1.program.action(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
23
60
|
const response = yield (0, enquirer_1.prompt)([
|
|
24
61
|
{
|
|
@@ -31,7 +68,7 @@ commander_1.program.action(() => __awaiter(void 0, void 0, void 0, function* ()
|
|
|
31
68
|
type: 'input',
|
|
32
69
|
name: 'description',
|
|
33
70
|
message: 'Enter a description for the project:',
|
|
34
|
-
initial: 'A Legendary App'
|
|
71
|
+
initial: 'A Legendary Next.js App'
|
|
35
72
|
},
|
|
36
73
|
{
|
|
37
74
|
type: 'select',
|
|
@@ -40,24 +77,22 @@ commander_1.program.action(() => __awaiter(void 0, void 0, void 0, function* ()
|
|
|
40
77
|
choices: [
|
|
41
78
|
{
|
|
42
79
|
name: 'base',
|
|
43
|
-
message: 'Base setup with
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
name: 'prisma',
|
|
47
|
-
message: 'Base setup with ts, shadcn, prisma, auth, editor.js'
|
|
80
|
+
message: 'Base setup with Next 16, Better Auth, shadcn and Drizzle'
|
|
48
81
|
},
|
|
49
82
|
{
|
|
50
|
-
name: '
|
|
51
|
-
message: '
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
name: 'new',
|
|
55
|
-
message: 'Advanced new setup with next 16, Better Auth and Drizzle ORM'
|
|
83
|
+
name: 'old',
|
|
84
|
+
message: 'old setup with ts, shadcn, auth, drizzle'
|
|
56
85
|
}
|
|
57
86
|
]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
type: 'select',
|
|
90
|
+
name: 'git',
|
|
91
|
+
message: 'Initialize a git repository?',
|
|
92
|
+
choices: ['yes', 'no']
|
|
58
93
|
}
|
|
59
94
|
]);
|
|
60
|
-
const { projectName, description, template } = response;
|
|
95
|
+
const { projectName, description, template, git } = response;
|
|
61
96
|
const projectDir = path_1.default.join(process.cwd(), projectName);
|
|
62
97
|
if (fs_1.default.existsSync(projectDir)) {
|
|
63
98
|
console.error(`Error: Directory '${projectName}' already exists.`);
|
|
@@ -79,6 +114,45 @@ commander_1.program.action(() => __awaiter(void 0, void 0, void 0, function* ()
|
|
|
79
114
|
const envExampleFile = path_1.default.join(projectDir, '.env.example');
|
|
80
115
|
const envExample = fs_1.default.readFileSync(envExampleFile, 'utf-8');
|
|
81
116
|
fs_1.default.writeFileSync(path_1.default.join(projectDir, '.env'), envExample);
|
|
82
|
-
|
|
117
|
+
fs_1.default.writeFileSync(path_1.default.join(projectDir, '.gitignore'), `node_modules
|
|
118
|
+
.next
|
|
119
|
+
out
|
|
120
|
+
build
|
|
121
|
+
next-env.d.ts
|
|
122
|
+
.DS_Store
|
|
123
|
+
.env
|
|
124
|
+
`);
|
|
125
|
+
fs_1.default.writeFileSync(path_1.default.join(projectDir, 'README.md'), `# ${projectName}
|
|
126
|
+
|
|
127
|
+
${description}
|
|
128
|
+
`);
|
|
129
|
+
if (git === 'yes') {
|
|
130
|
+
try {
|
|
131
|
+
(0, child_process_1.execSync)('git init', { cwd: projectDir, stdio: 'inherit' });
|
|
132
|
+
}
|
|
133
|
+
catch (err) {
|
|
134
|
+
console.error('Error initializing git repository:', err);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
const pm = detectPackageManager();
|
|
138
|
+
const installCommand = getInstallCommand(pm);
|
|
139
|
+
const devCommand = getDevCommand(pm);
|
|
140
|
+
console.log(`
|
|
141
|
+
Created a new app called '${projectName}' 🎉
|
|
142
|
+
|
|
143
|
+
To open the project in vscode run:
|
|
144
|
+
|
|
145
|
+
code ${projectName}
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
To get started, run the following commands:
|
|
149
|
+
cd ${projectName}
|
|
150
|
+
|
|
151
|
+
${installCommand}
|
|
152
|
+
|
|
153
|
+
${devCommand}
|
|
154
|
+
|
|
155
|
+
Happy coding! 🚀
|
|
156
|
+
`);
|
|
83
157
|
}));
|
|
84
158
|
commander_1.program.parse(process.argv);
|
package/cli.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
import { execSync } from 'child_process'
|
|
3
4
|
import { program } from 'commander'
|
|
4
5
|
import { prompt } from 'enquirer'
|
|
5
6
|
import fs from 'fs'
|
|
@@ -11,6 +12,45 @@ interface Response {
|
|
|
11
12
|
projectName: string
|
|
12
13
|
description: string
|
|
13
14
|
template: string
|
|
15
|
+
git: string
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const detectPackageManager = () => {
|
|
19
|
+
const userAgent = process.env.npm_config_user_agent
|
|
20
|
+
|
|
21
|
+
if (userAgent) {
|
|
22
|
+
if (userAgent.startsWith('pnpm')) return 'pnpm'
|
|
23
|
+
if (userAgent.startsWith('yarn')) return 'yarn'
|
|
24
|
+
if (userAgent.startsWith('bun')) return 'bun'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return 'npm'
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const getInstallCommand = (packageManager: string) => {
|
|
31
|
+
switch (packageManager) {
|
|
32
|
+
case 'pnpm':
|
|
33
|
+
return 'pnpm i'
|
|
34
|
+
case 'yarn':
|
|
35
|
+
return 'yarn'
|
|
36
|
+
case 'bun':
|
|
37
|
+
return 'bun i'
|
|
38
|
+
default:
|
|
39
|
+
return 'npm i'
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const getDevCommand = (packageManager: string) => {
|
|
44
|
+
switch (packageManager) {
|
|
45
|
+
case 'pnpm':
|
|
46
|
+
return 'pnpm dev'
|
|
47
|
+
case 'yarn':
|
|
48
|
+
return 'yarn dev'
|
|
49
|
+
case 'bun':
|
|
50
|
+
return 'bun dev'
|
|
51
|
+
default:
|
|
52
|
+
return 'npm run dev'
|
|
53
|
+
}
|
|
14
54
|
}
|
|
15
55
|
|
|
16
56
|
program.action(async () => {
|
|
@@ -25,7 +65,7 @@ program.action(async () => {
|
|
|
25
65
|
type: 'input',
|
|
26
66
|
name: 'description',
|
|
27
67
|
message: 'Enter a description for the project:',
|
|
28
|
-
initial: 'A Legendary App'
|
|
68
|
+
initial: 'A Legendary Next.js App'
|
|
29
69
|
},
|
|
30
70
|
{
|
|
31
71
|
type: 'select',
|
|
@@ -34,28 +74,23 @@ program.action(async () => {
|
|
|
34
74
|
choices: [
|
|
35
75
|
{
|
|
36
76
|
name: 'base',
|
|
37
|
-
message:
|
|
38
|
-
'Base setup with ts, shadcn, auth, drizzle, User Types and ACLs (roles & permissions)'
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
name: 'prisma',
|
|
42
|
-
message: 'Base setup with ts, shadcn, prisma, auth, editor.js'
|
|
77
|
+
message: 'Base setup with Next 16, Better Auth, shadcn and Drizzle'
|
|
43
78
|
},
|
|
44
79
|
{
|
|
45
|
-
name: '
|
|
46
|
-
message:
|
|
47
|
-
'Advanced setup with User Types and ACLs (roles & permissions)'
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
name: 'new',
|
|
51
|
-
message:
|
|
52
|
-
'Advanced new setup with next 16, Better Auth and Drizzle ORM'
|
|
80
|
+
name: 'old',
|
|
81
|
+
message: 'old setup with ts, shadcn, auth, drizzle'
|
|
53
82
|
}
|
|
54
83
|
]
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
type: 'select',
|
|
87
|
+
name: 'git',
|
|
88
|
+
message: 'Initialize a git repository?',
|
|
89
|
+
choices: ['yes', 'no']
|
|
55
90
|
}
|
|
56
91
|
])
|
|
57
92
|
|
|
58
|
-
const { projectName, description, template } = response
|
|
93
|
+
const { projectName, description, template, git } = response
|
|
59
94
|
|
|
60
95
|
const projectDir = path.join(process.cwd(), projectName)
|
|
61
96
|
|
|
@@ -85,8 +120,56 @@ program.action(async () => {
|
|
|
85
120
|
const envExample = fs.readFileSync(envExampleFile, 'utf-8')
|
|
86
121
|
fs.writeFileSync(path.join(projectDir, '.env'), envExample)
|
|
87
122
|
|
|
123
|
+
fs.writeFileSync(
|
|
124
|
+
path.join(projectDir, '.gitignore'),
|
|
125
|
+
`node_modules
|
|
126
|
+
.next
|
|
127
|
+
out
|
|
128
|
+
build
|
|
129
|
+
next-env.d.ts
|
|
130
|
+
.DS_Store
|
|
131
|
+
.env
|
|
132
|
+
`
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
fs.writeFileSync(
|
|
136
|
+
path.join(projectDir, 'README.md'),
|
|
137
|
+
`# ${projectName}
|
|
138
|
+
|
|
139
|
+
${description}
|
|
140
|
+
`
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
if (git === 'yes') {
|
|
144
|
+
try {
|
|
145
|
+
execSync('git init', { cwd: projectDir, stdio: 'inherit' })
|
|
146
|
+
} catch (err) {
|
|
147
|
+
console.error('Error initializing git repository:', err)
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
const pm = detectPackageManager()
|
|
152
|
+
const installCommand = getInstallCommand(pm)
|
|
153
|
+
const devCommand = getDevCommand(pm)
|
|
154
|
+
|
|
88
155
|
console.log(
|
|
89
|
-
`
|
|
156
|
+
`
|
|
157
|
+
Created a new app called '${projectName}' 🎉
|
|
158
|
+
|
|
159
|
+
To open the project in vscode run:
|
|
160
|
+
|
|
161
|
+
code ${projectName}
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
To get started, run the following commands:
|
|
165
|
+
cd ${projectName}
|
|
166
|
+
|
|
167
|
+
${installCommand}
|
|
168
|
+
|
|
169
|
+
${devCommand}
|
|
170
|
+
|
|
171
|
+
Happy coding! 🚀
|
|
172
|
+
`
|
|
90
173
|
)
|
|
91
174
|
})
|
|
92
175
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-ej-app",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "Bootstrap a next.js app with my preferred setup",
|
|
5
5
|
"main": "cli.js",
|
|
6
6
|
"scripts": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"enquirer": "^2.4.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@types/node": "^
|
|
38
|
+
"@types/node": "^25.0.1",
|
|
39
39
|
"typescript": "^5.9.3"
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
APP_ENV="production"
|
|
2
2
|
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/postgres"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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"
|
|
8
10
|
EMAIL_SERVER_PASSWORD="password"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
GITHUB_ID="id"
|
|
13
|
-
GITHUB_SECRET="secret"
|
|
14
|
-
S3_REGION="ap-south-1"
|
|
15
|
-
S3_BUCKET="bucket"
|
|
16
|
-
S3_ACCESS_KEY="key"
|
|
17
|
-
S3_SECRET_KEY="secret"
|
|
11
|
+
EMAIL_SERVER_HOST="smtp.example.com"
|
|
12
|
+
EMAIL_SERVER_PORT="465"
|
|
13
|
+
EMAIL_FROM="no-reply@example.com"
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://ui.shadcn.com/schema.json",
|
|
3
|
-
"style": "
|
|
3
|
+
"style": "new-york",
|
|
4
4
|
"rsc": true,
|
|
5
5
|
"tsx": true,
|
|
6
6
|
"tailwind": {
|
|
7
|
-
"config": "
|
|
7
|
+
"config": "",
|
|
8
8
|
"css": "src/app/globals.css",
|
|
9
9
|
"baseColor": "neutral",
|
|
10
10
|
"cssVariables": true,
|
|
11
11
|
"prefix": ""
|
|
12
12
|
},
|
|
13
|
+
"iconLibrary": "lucide",
|
|
13
14
|
"aliases": {
|
|
14
|
-
"components": "
|
|
15
|
-
"utils": "
|
|
16
|
-
|
|
15
|
+
"components": "~/components",
|
|
16
|
+
"utils": "~/lib/cn",
|
|
17
|
+
"ui": "~/components/ui",
|
|
18
|
+
"lib": "~/lib",
|
|
19
|
+
"hooks": "~/hooks"
|
|
20
|
+
},
|
|
21
|
+
"registries": {}
|
|
17
22
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineConfig } from 'drizzle-kit'
|
|
2
|
+
import { env } from '~/env'
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export default {
|
|
4
|
+
export default defineConfig({
|
|
6
5
|
schema: './src/db/schema.ts',
|
|
7
6
|
dialect: 'postgresql',
|
|
8
7
|
dbCredentials: {
|
|
9
8
|
url: env.DATABASE_URL
|
|
10
9
|
}
|
|
11
|
-
}
|
|
10
|
+
})
|
|
@@ -1,87 +1,70 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "my-app",
|
|
3
|
-
"version": "1.0.0",
|
|
4
3
|
"description": "A Legendary Next.js App",
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"private": true,
|
|
6
6
|
"scripts": {
|
|
7
|
-
"format": "prettier --write \"src/**/*.{js,cjs,mjs,jsx,ts,tsx}\"",
|
|
8
|
-
"lint": "next lint",
|
|
9
7
|
"dev": "next dev",
|
|
10
8
|
"build": "next build",
|
|
9
|
+
"analyze": "ANALYZE=true next build --webpack",
|
|
11
10
|
"start": "next start",
|
|
12
|
-
"
|
|
11
|
+
"lint": "eslint",
|
|
12
|
+
"format": "prettier --write \"./src/**/*.{js,cjs,mjs,jsx,ts,tsx}\"",
|
|
13
13
|
"db:push": "drizzle-kit push",
|
|
14
|
-
"db:studio": "drizzle-kit studio"
|
|
14
|
+
"db:studio": "drizzle-kit studio",
|
|
15
|
+
"gen:auth": "bunx @better-auth/cli generate"
|
|
15
16
|
},
|
|
16
17
|
"dependencies": {
|
|
17
|
-
"@
|
|
18
|
-
"@
|
|
19
|
-
"@
|
|
20
|
-
"@
|
|
21
|
-
"@
|
|
22
|
-
"@
|
|
23
|
-
"@
|
|
24
|
-
"@
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"@
|
|
47
|
-
"@
|
|
48
|
-
"@types/
|
|
49
|
-
"@types/
|
|
50
|
-
"@types/react
|
|
51
|
-
"@
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
"nextjs-toploader": "^1.6.12",
|
|
70
|
-
"nodemailer": "^6.9.14",
|
|
71
|
-
"postcss": "^8.4.38",
|
|
72
|
-
"postcss-load-config": "^6.0.1",
|
|
73
|
-
"postgres": "^3.4.4",
|
|
74
|
-
"prettier": "^3.3.2",
|
|
75
|
-
"prettier-plugin-organize-imports": "^3.2.4",
|
|
76
|
-
"prettier-plugin-tailwindcss": "^0.6.5",
|
|
77
|
-
"react": "^18.3.1",
|
|
78
|
-
"react-dom": "^18.3.1",
|
|
79
|
-
"react-hook-form": "^7.52.0",
|
|
80
|
-
"sonner": "^1.5.0",
|
|
81
|
-
"tailwind-merge": "^2.3.0",
|
|
82
|
-
"tailwindcss": "^3.4.4",
|
|
83
|
-
"tailwindcss-animate": "^1.0.7",
|
|
84
|
-
"typescript": "^5.5.2",
|
|
85
|
-
"zod": "^3.23.8"
|
|
86
|
-
}
|
|
18
|
+
"@hookform/resolvers": "5.2.2",
|
|
19
|
+
"@next/third-parties": "16.0.10",
|
|
20
|
+
"@paralleldrive/cuid2": "3.0.4",
|
|
21
|
+
"@radix-ui/react-label": "2.1.8",
|
|
22
|
+
"@radix-ui/react-separator": "1.1.8",
|
|
23
|
+
"@radix-ui/react-slot": "1.2.4",
|
|
24
|
+
"@t3-oss/env-nextjs": "0.13.8",
|
|
25
|
+
"@tanstack/react-query": "5.90.12",
|
|
26
|
+
"better-auth": "1.4.6",
|
|
27
|
+
"class-variance-authority": "0.7.1",
|
|
28
|
+
"clsx": "2.1.1",
|
|
29
|
+
"drizzle-orm": "0.45.1",
|
|
30
|
+
"lucide-react": "0.561.0",
|
|
31
|
+
"next": "16.0.10",
|
|
32
|
+
"next-safe-action": "8.0.11",
|
|
33
|
+
"next-themes": "0.4.6",
|
|
34
|
+
"nextjs-toploader": "3.9.17",
|
|
35
|
+
"nodemailer": "7.0.11",
|
|
36
|
+
"postgres": "3.4.7",
|
|
37
|
+
"react": "19.2.3",
|
|
38
|
+
"react-dom": "19.2.3",
|
|
39
|
+
"react-hook-form": "7.68.0",
|
|
40
|
+
"sonner": "2.0.7",
|
|
41
|
+
"tailwind-merge": "3.4.0",
|
|
42
|
+
"tw-animate-css": "1.4.0",
|
|
43
|
+
"workflow": "4.0.1-beta.29",
|
|
44
|
+
"zod": "4.1.13"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@next/bundle-analyzer": "16.0.10",
|
|
48
|
+
"@tailwindcss/postcss": "4.1.18",
|
|
49
|
+
"@types/bun": "1.3.4",
|
|
50
|
+
"@types/nodemailer": "7.0.4",
|
|
51
|
+
"@types/react": "19.2.7",
|
|
52
|
+
"@types/react-dom": "19.2.3",
|
|
53
|
+
"babel-plugin-react-compiler": "1.0.0",
|
|
54
|
+
"drizzle-kit": "0.31.8",
|
|
55
|
+
"eslint": "9.39.2",
|
|
56
|
+
"eslint-config-next": "16.0.10",
|
|
57
|
+
"prettier": "3.7.4",
|
|
58
|
+
"prettier-plugin-organize-imports": "4.3.0",
|
|
59
|
+
"prettier-plugin-tailwindcss": "0.7.2",
|
|
60
|
+
"tailwindcss": "4.1.18",
|
|
61
|
+
"typescript": "5.9.3"
|
|
62
|
+
},
|
|
63
|
+
"trustedDependencies": [
|
|
64
|
+
"@swc/core",
|
|
65
|
+
"@tailwindcss/oxide",
|
|
66
|
+
"esbuild",
|
|
67
|
+
"sharp",
|
|
68
|
+
"unrs-resolver"
|
|
69
|
+
]
|
|
87
70
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { notFound } from 'next/navigation'
|
|
2
|
+
import { getAuthSession } from '~/lib/auth'
|
|
3
|
+
|
|
4
|
+
export default async function Layout({
|
|
5
|
+
children
|
|
6
|
+
}: Readonly<{
|
|
7
|
+
children: React.ReactNode
|
|
8
|
+
}>) {
|
|
9
|
+
const authSession = await getAuthSession()
|
|
10
|
+
|
|
11
|
+
if (!authSession?.isAdmin) {
|
|
12
|
+
notFound()
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<div className="flex min-h-screen flex-col">
|
|
17
|
+
<main className="flex-1">{children}</main>
|
|
18
|
+
</div>
|
|
19
|
+
)
|
|
20
|
+
}
|