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,125 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { redirect } from 'next/navigation'
|
|
2
|
+
import { getAuthSession } from '~/lib/auth'
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import { checkForRolePermissionUseCase } from '@/use-case/role-permission'
|
|
4
|
+
export default async function Layout({
|
|
5
|
+
children
|
|
6
|
+
}: Readonly<{
|
|
7
|
+
children: React.ReactNode
|
|
8
|
+
}>) {
|
|
9
|
+
const authSession = await getAuthSession()
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
if (!session?.user) return notFound()
|
|
16
|
-
|
|
17
|
-
const isRoot = session.user.type === 'Root'
|
|
18
|
-
const [isTask] = await Promise.all([
|
|
19
|
-
checkForRolePermissionUseCase(
|
|
20
|
-
session.user.type,
|
|
21
|
-
session.user.roleId,
|
|
22
|
-
'TaskList'
|
|
23
|
-
)
|
|
24
|
-
])
|
|
11
|
+
if (!authSession) {
|
|
12
|
+
redirect('/auth')
|
|
13
|
+
}
|
|
25
14
|
|
|
26
15
|
return (
|
|
27
|
-
<div className="flex min-h-screen flex-col space-y-
|
|
28
|
-
<
|
|
29
|
-
<div className="container flex h-16 items-center justify-between py-4">
|
|
30
|
-
<MainNav
|
|
31
|
-
logoLink="/dashboard"
|
|
32
|
-
items={[
|
|
33
|
-
{
|
|
34
|
-
title: 'Dashboard',
|
|
35
|
-
href: '/dashboard'
|
|
36
|
-
},
|
|
37
|
-
...(isRoot
|
|
38
|
-
? [
|
|
39
|
-
{
|
|
40
|
-
title: 'Users',
|
|
41
|
-
href: '/users'
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
title: 'Roles',
|
|
45
|
-
href: '/roles'
|
|
46
|
-
}
|
|
47
|
-
]
|
|
48
|
-
: []),
|
|
49
|
-
...(isTask
|
|
50
|
-
? [
|
|
51
|
-
{
|
|
52
|
-
title: 'Tasks',
|
|
53
|
-
href: '/tasks'
|
|
54
|
-
}
|
|
55
|
-
]
|
|
56
|
-
: [])
|
|
57
|
-
]}
|
|
58
|
-
/>
|
|
59
|
-
<div className="flex items-center justify-center space-x-4">
|
|
60
|
-
<AppNavCommand
|
|
61
|
-
modules={{
|
|
62
|
-
task: true,
|
|
63
|
-
root: session.user.type === 'Root'
|
|
64
|
-
}}
|
|
65
|
-
/>
|
|
66
|
-
<UserAccountNav
|
|
67
|
-
user={{
|
|
68
|
-
name: session.user.name,
|
|
69
|
-
image: session.user.image,
|
|
70
|
-
email: session.user.email
|
|
71
|
-
}}
|
|
72
|
-
/>
|
|
73
|
-
</div>
|
|
74
|
-
</div>
|
|
75
|
-
</header>
|
|
76
|
-
<div className="container grid flex-1 gap-12 md:grid-cols-[200px_1fr]">
|
|
77
|
-
<aside className="hidden w-[200px] flex-col md:flex">
|
|
78
|
-
<SideNav
|
|
79
|
-
items={[
|
|
80
|
-
{
|
|
81
|
-
title: 'Dashboard',
|
|
82
|
-
href: '/dashboard',
|
|
83
|
-
icon: 'dashboard'
|
|
84
|
-
},
|
|
85
|
-
...(isRoot
|
|
86
|
-
? [
|
|
87
|
-
{
|
|
88
|
-
title: 'Users',
|
|
89
|
-
href: '/users',
|
|
90
|
-
icon: 'user' as const
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
title: 'Roles',
|
|
94
|
-
href: '/roles',
|
|
95
|
-
icon: 'mixer' as const
|
|
96
|
-
}
|
|
97
|
-
]
|
|
98
|
-
: []),
|
|
99
|
-
...(isTask
|
|
100
|
-
? [
|
|
101
|
-
{
|
|
102
|
-
title: 'Tasks',
|
|
103
|
-
href: '/tasks',
|
|
104
|
-
icon: 'task' as const
|
|
105
|
-
}
|
|
106
|
-
]
|
|
107
|
-
: []),
|
|
108
|
-
{
|
|
109
|
-
title: 'Settings',
|
|
110
|
-
href: '/settings',
|
|
111
|
-
icon: 'settings'
|
|
112
|
-
}
|
|
113
|
-
]}
|
|
114
|
-
/>
|
|
115
|
-
</aside>
|
|
116
|
-
<main className="flex w-full flex-1 flex-col overflow-hidden">
|
|
117
|
-
{children}
|
|
118
|
-
</main>
|
|
119
|
-
</div>
|
|
120
|
-
<SiteFooter className="border-t" />
|
|
16
|
+
<div className="flex min-h-screen flex-col space-y-4">
|
|
17
|
+
<main className="flex-1">{children}</main>
|
|
121
18
|
</div>
|
|
122
19
|
)
|
|
123
20
|
}
|
|
124
|
-
|
|
125
|
-
export default Layout
|
|
@@ -1,49 +1,72 @@
|
|
|
1
|
+
import { ShoppingBag } from 'lucide-react'
|
|
1
2
|
import Link from 'next/link'
|
|
3
|
+
import { redirect } from 'next/navigation'
|
|
4
|
+
import {
|
|
5
|
+
Card,
|
|
6
|
+
CardContent,
|
|
7
|
+
CardDescription,
|
|
8
|
+
CardFooter,
|
|
9
|
+
CardHeader,
|
|
10
|
+
CardTitle
|
|
11
|
+
} from '~/components/ui/card'
|
|
12
|
+
import { Separator } from '~/components/ui/separator'
|
|
13
|
+
import { getAuthSession } from '~/lib/auth'
|
|
14
|
+
import { EmailLoginForm } from './email-login-form'
|
|
15
|
+
import { SocialLoginButtons } from './social-login-buttons'
|
|
2
16
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
17
|
+
export default async function LoginPage() {
|
|
18
|
+
const authSession = await getAuthSession()
|
|
19
|
+
|
|
20
|
+
if (authSession) redirect('/')
|
|
6
21
|
|
|
7
|
-
const LoginPage = () => {
|
|
8
22
|
return (
|
|
9
|
-
<div className="
|
|
10
|
-
<
|
|
11
|
-
<
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
|
|
23
|
+
<div className="flex min-h-screen items-center justify-center px-4 py-12 sm:px-6 lg:px-8">
|
|
24
|
+
<Card className="w-full max-w-md">
|
|
25
|
+
<CardHeader className="space-y-1 text-center">
|
|
26
|
+
<div className="bg-primary/10 mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full">
|
|
27
|
+
<ShoppingBag className="text-primary size-6" />
|
|
28
|
+
</div>
|
|
29
|
+
<CardTitle className="text-2xl font-bold">Welcome back</CardTitle>
|
|
30
|
+
<CardDescription className="text-muted-foreground text-sm">
|
|
31
|
+
Sign in to your account to continue
|
|
32
|
+
</CardDescription>
|
|
33
|
+
</CardHeader>
|
|
34
|
+
<CardContent className="space-y-4">
|
|
35
|
+
<div className="border-muted-foreground/50 bg-muted/50 rounded-lg border border-dashed p-4">
|
|
36
|
+
<p className="text-muted-foreground text-sm">
|
|
37
|
+
<strong>New to our site?</strong> No need to create a separate
|
|
38
|
+
account. Simply use one of the options below to both sign up and
|
|
39
|
+
log in.
|
|
40
|
+
</p>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<EmailLoginForm />
|
|
44
|
+
|
|
45
|
+
<div className="relative">
|
|
46
|
+
<div className="absolute inset-0 flex items-center">
|
|
47
|
+
<span className="w-full border-t" />
|
|
48
|
+
</div>
|
|
49
|
+
<div className="relative flex justify-center text-xs uppercase">
|
|
50
|
+
<span className="bg-background text-muted-foreground px-2">
|
|
51
|
+
Or continue with
|
|
52
|
+
</span>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<SocialLoginButtons />
|
|
57
|
+
</CardContent>
|
|
58
|
+
<CardFooter className="flex flex-col space-y-4">
|
|
59
|
+
<Separator className="my-2" />
|
|
60
|
+
<div className="text-muted-foreground text-center text-sm">
|
|
61
|
+
<Link
|
|
62
|
+
href="/"
|
|
63
|
+
className="text-primary underline-offset-4 hover:underline"
|
|
64
|
+
>
|
|
65
|
+
Return to home page
|
|
66
|
+
</Link>
|
|
67
|
+
</div>
|
|
68
|
+
</CardFooter>
|
|
69
|
+
</Card>
|
|
45
70
|
</div>
|
|
46
71
|
)
|
|
47
72
|
}
|
|
48
|
-
|
|
49
|
-
export default LoginPage
|
|
@@ -1,42 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ReactNode } from 'react'
|
|
3
|
-
|
|
4
|
-
import { Icons } from '@/components/icons'
|
|
5
|
-
import { MainNav } from '@/components/main-nav'
|
|
6
|
-
import { SiteFooter } from '@/components/site-footer'
|
|
7
|
-
import { Button } from '@/components/ui/button'
|
|
8
|
-
import { getAuthSession } from '@/lib/auth'
|
|
9
|
-
|
|
10
|
-
const Layout = async ({ children }: { children: ReactNode }) => {
|
|
11
|
-
const session = await getAuthSession()
|
|
1
|
+
import { SiteFooter } from '~/components/site-footer'
|
|
12
2
|
|
|
3
|
+
export default async function Layout({
|
|
4
|
+
children
|
|
5
|
+
}: Readonly<{
|
|
6
|
+
children: React.ReactNode
|
|
7
|
+
}>) {
|
|
13
8
|
return (
|
|
14
9
|
<div className="flex min-h-screen flex-col space-y-4">
|
|
15
|
-
<header className="sticky top-0 z-40 border-b bg-background">
|
|
16
|
-
<div className="container flex h-16 items-center justify-between py-4">
|
|
17
|
-
<MainNav />
|
|
18
|
-
<div className="flex items-center justify-center space-x-4">
|
|
19
|
-
{session?.user ? (
|
|
20
|
-
<Link href="/dashboard">
|
|
21
|
-
<Button size="sm" variant="secondary">
|
|
22
|
-
Dashboard
|
|
23
|
-
</Button>
|
|
24
|
-
</Link>
|
|
25
|
-
) : (
|
|
26
|
-
<Link href="/login">
|
|
27
|
-
<Button size="sm" variant="secondary">
|
|
28
|
-
<Icons.login className="mr-2 h-4 w-4" />
|
|
29
|
-
Sign In
|
|
30
|
-
</Button>
|
|
31
|
-
</Link>
|
|
32
|
-
)}
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
</header>
|
|
36
10
|
<main className="flex-1">{children}</main>
|
|
37
|
-
<SiteFooter
|
|
11
|
+
<SiteFooter />
|
|
38
12
|
</div>
|
|
39
13
|
)
|
|
40
14
|
}
|
|
41
|
-
|
|
42
|
-
export default Layout
|
|
@@ -1,97 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const links = [
|
|
4
|
-
{
|
|
5
|
-
href: 'https://nextjs.org',
|
|
6
|
-
title: 'Next.js',
|
|
7
|
-
description: 'Find in-depth information about Next.js features and API.'
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
href: 'https://typescriptlang.org',
|
|
11
|
-
title: 'TypeScript',
|
|
12
|
-
description:
|
|
13
|
-
'Learn about TypeScript and how it helps you write better JavaScript.'
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
href: 'https://orm.drizzle.team',
|
|
17
|
-
title: 'Drizzle',
|
|
18
|
-
description:
|
|
19
|
-
'Lightweight and performant TypeScript ORM with developer experience in mind.'
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
href: 'https://next-auth.js.org',
|
|
23
|
-
title: 'NextAuth.js',
|
|
24
|
-
description:
|
|
25
|
-
'Authentication for Next.js featuring sign in with GitHub and more.'
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
href: 'https://tailwindcss.com',
|
|
29
|
-
title: 'Tailwind CSS',
|
|
30
|
-
description:
|
|
31
|
-
'A utility-first CSS framework for rapidly building custom designs.'
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
href: 'https://shadcn.com',
|
|
35
|
-
title: 'Shadcn UI',
|
|
36
|
-
description: 'An awesome ui component library with tailwindcss.'
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
href: 'https://nextjs.org/docs/app/api-reference/functions/server-actions',
|
|
40
|
-
title: 'Server Actions',
|
|
41
|
-
description: 'Learn about Server Actions and how to use them.'
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
href: 'https://vercel.com/new',
|
|
45
|
-
title: 'Vercel',
|
|
46
|
-
description:
|
|
47
|
-
'Instantly deploy your Next.js site to a shareable URL with Vercel.'
|
|
48
|
-
}
|
|
49
|
-
]
|
|
50
|
-
|
|
51
|
-
const Home = () => {
|
|
52
|
-
return (
|
|
53
|
-
<div className="flex min-h-[80vh] flex-col items-center justify-between">
|
|
54
|
-
<div className="w-full max-w-5xl items-center justify-between font-mono text-sm lg:flex">
|
|
55
|
-
<p className="flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30">
|
|
56
|
-
Get started by editing
|
|
57
|
-
<code className="font-mono font-bold">src/app/page.tsx</code>
|
|
58
|
-
</p>
|
|
59
|
-
</div>
|
|
60
|
-
|
|
61
|
-
<div className="before:bg-gradient-radial after:bg-gradient-conic z-[-1] mt-12 flex place-items-center before:absolute before:h-[300px] before:w-[240px] before:-translate-x-1/2 before:rounded-full before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:h-[180px] after:w-[120px] after:translate-x-1/3 after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700 before:dark:opacity-10 after:dark:from-sky-900 after:dark:via-[#0141ff] after:dark:opacity-40 before:lg:h-[360px]">
|
|
62
|
-
<Image
|
|
63
|
-
className="dark:drop-shadow-[0_0_0.3rem_#ffffff70] dark:invert"
|
|
64
|
-
src="/next.svg"
|
|
65
|
-
alt="Next.js Logo"
|
|
66
|
-
width={180}
|
|
67
|
-
height={37}
|
|
68
|
-
priority
|
|
69
|
-
/>
|
|
70
|
-
</div>
|
|
71
|
-
|
|
72
|
-
<div className="my-8 grid gap-2 text-center lg:w-full lg:max-w-5xl lg:grid-cols-4 lg:text-left">
|
|
73
|
-
{links.map((l, i) => (
|
|
74
|
-
<a
|
|
75
|
-
key={i}
|
|
76
|
-
href={l.href}
|
|
77
|
-
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
|
|
78
|
-
target="_blank"
|
|
79
|
-
rel="noopener noreferrer"
|
|
80
|
-
>
|
|
81
|
-
<h2 className="mb-3 text-2xl font-semibold">
|
|
82
|
-
{l.title + ' '}
|
|
83
|
-
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
|
|
84
|
-
->
|
|
85
|
-
</span>
|
|
86
|
-
</h2>
|
|
87
|
-
<p className="m-0 max-w-[30ch] text-sm opacity-50">
|
|
88
|
-
{l.description}
|
|
89
|
-
</p>
|
|
90
|
-
</a>
|
|
91
|
-
))}
|
|
92
|
-
</div>
|
|
93
|
-
</div>
|
|
94
|
-
)
|
|
1
|
+
export default async function HomePage() {
|
|
2
|
+
return <div>Hello, World!</div>
|
|
95
3
|
}
|
|
96
|
-
|
|
97
|
-
export default Home
|
|
@@ -1,76 +1,128 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
--card-foreground: 0 0% 98%;
|
|
44
|
-
|
|
45
|
-
--popover: 0 0% 3.9%;
|
|
46
|
-
--popover-foreground: 0 0% 98%;
|
|
47
|
-
|
|
48
|
-
--primary: 0 0% 98%;
|
|
49
|
-
--primary-foreground: 0 0% 9%;
|
|
50
|
-
|
|
51
|
-
--secondary: 0 0% 14.9%;
|
|
52
|
-
--secondary-foreground: 0 0% 98%;
|
|
53
|
-
|
|
54
|
-
--muted: 0 0% 14.9%;
|
|
55
|
-
--muted-foreground: 0 0% 63.9%;
|
|
56
|
-
|
|
57
|
-
--accent: 0 0% 14.9%;
|
|
58
|
-
--accent-foreground: 0 0% 98%;
|
|
1
|
+
@import 'tailwindcss';
|
|
2
|
+
@import 'tw-animate-css';
|
|
3
|
+
|
|
4
|
+
@custom-variant dark (&:is(.dark *));
|
|
5
|
+
|
|
6
|
+
@theme inline {
|
|
7
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
8
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
9
|
+
--radius-lg: var(--radius);
|
|
10
|
+
--radius-xl: calc(var(--radius) + 4px);
|
|
11
|
+
--color-background: var(--background);
|
|
12
|
+
--color-foreground: var(--foreground);
|
|
13
|
+
--color-card: var(--card);
|
|
14
|
+
--color-card-foreground: var(--card-foreground);
|
|
15
|
+
--color-popover: var(--popover);
|
|
16
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
17
|
+
--color-primary: var(--primary);
|
|
18
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
19
|
+
--color-secondary: var(--secondary);
|
|
20
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
21
|
+
--color-muted: var(--muted);
|
|
22
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
23
|
+
--color-accent: var(--accent);
|
|
24
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
25
|
+
--color-destructive: var(--destructive);
|
|
26
|
+
--color-border: var(--border);
|
|
27
|
+
--color-input: var(--input);
|
|
28
|
+
--color-ring: var(--ring);
|
|
29
|
+
--color-chart-1: var(--chart-1);
|
|
30
|
+
--color-chart-2: var(--chart-2);
|
|
31
|
+
--color-chart-3: var(--chart-3);
|
|
32
|
+
--color-chart-4: var(--chart-4);
|
|
33
|
+
--color-chart-5: var(--chart-5);
|
|
34
|
+
--color-sidebar: var(--sidebar);
|
|
35
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
36
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
37
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
38
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
39
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
40
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
41
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
42
|
+
}
|
|
59
43
|
|
|
60
|
-
|
|
61
|
-
|
|
44
|
+
:root {
|
|
45
|
+
--radius: 0.625rem;
|
|
46
|
+
--background: oklch(1 0 0);
|
|
47
|
+
--foreground: oklch(0.145 0 0);
|
|
48
|
+
--card: oklch(1 0 0);
|
|
49
|
+
--card-foreground: oklch(0.145 0 0);
|
|
50
|
+
--popover: oklch(1 0 0);
|
|
51
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
52
|
+
--primary: oklch(0.205 0 0);
|
|
53
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
54
|
+
--secondary: oklch(0.97 0 0);
|
|
55
|
+
--secondary-foreground: oklch(0.205 0 0);
|
|
56
|
+
--muted: oklch(0.97 0 0);
|
|
57
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
58
|
+
--accent: oklch(0.97 0 0);
|
|
59
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
60
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
61
|
+
--border: oklch(0.922 0 0);
|
|
62
|
+
--input: oklch(0.922 0 0);
|
|
63
|
+
--ring: oklch(0.708 0 0);
|
|
64
|
+
--chart-1: oklch(0.646 0.222 41.116);
|
|
65
|
+
--chart-2: oklch(0.6 0.118 184.704);
|
|
66
|
+
--chart-3: oklch(0.398 0.07 227.392);
|
|
67
|
+
--chart-4: oklch(0.828 0.189 84.429);
|
|
68
|
+
--chart-5: oklch(0.769 0.188 70.08);
|
|
69
|
+
--sidebar: oklch(0.985 0 0);
|
|
70
|
+
--sidebar-foreground: oklch(0.145 0 0);
|
|
71
|
+
--sidebar-primary: oklch(0.205 0 0);
|
|
72
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
73
|
+
--sidebar-accent: oklch(0.97 0 0);
|
|
74
|
+
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
75
|
+
--sidebar-border: oklch(0.922 0 0);
|
|
76
|
+
--sidebar-ring: oklch(0.708 0 0);
|
|
77
|
+
}
|
|
62
78
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
79
|
+
.dark {
|
|
80
|
+
--background: oklch(0.145 0 0);
|
|
81
|
+
--foreground: oklch(0.985 0 0);
|
|
82
|
+
--card: oklch(0.205 0 0);
|
|
83
|
+
--card-foreground: oklch(0.985 0 0);
|
|
84
|
+
--popover: oklch(0.205 0 0);
|
|
85
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
86
|
+
--primary: oklch(0.922 0 0);
|
|
87
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
88
|
+
--secondary: oklch(0.269 0 0);
|
|
89
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
90
|
+
--muted: oklch(0.269 0 0);
|
|
91
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
92
|
+
--accent: oklch(0.269 0 0);
|
|
93
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
94
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
95
|
+
--border: oklch(1 0 0 / 10%);
|
|
96
|
+
--input: oklch(1 0 0 / 15%);
|
|
97
|
+
--ring: oklch(0.556 0 0);
|
|
98
|
+
--chart-1: oklch(0.488 0.243 264.376);
|
|
99
|
+
--chart-2: oklch(0.696 0.17 162.48);
|
|
100
|
+
--chart-3: oklch(0.769 0.188 70.08);
|
|
101
|
+
--chart-4: oklch(0.627 0.265 303.9);
|
|
102
|
+
--chart-5: oklch(0.645 0.246 16.439);
|
|
103
|
+
--sidebar: oklch(0.205 0 0);
|
|
104
|
+
--sidebar-foreground: oklch(0.985 0 0);
|
|
105
|
+
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
106
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
107
|
+
--sidebar-accent: oklch(0.269 0 0);
|
|
108
|
+
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
109
|
+
--sidebar-border: oklch(1 0 0 / 10%);
|
|
110
|
+
--sidebar-ring: oklch(0.556 0 0);
|
|
67
111
|
}
|
|
68
112
|
|
|
69
113
|
@layer base {
|
|
70
114
|
* {
|
|
71
|
-
@apply border-border;
|
|
115
|
+
@apply border-border outline-ring/50;
|
|
72
116
|
}
|
|
73
117
|
body {
|
|
74
|
-
@apply bg-background
|
|
118
|
+
@apply text-foreground bg-background min-h-screen font-sans antialiased;
|
|
75
119
|
}
|
|
120
|
+
button:not([disabled]),
|
|
121
|
+
[role='button']:not([disabled]) {
|
|
122
|
+
cursor: pointer;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@utility container {
|
|
127
|
+
@apply mx-auto p-4;
|
|
76
128
|
}
|
|
@@ -1,12 +1,24 @@
|
|
|
1
|
-
import { GeistSans } from 'geist/font/sans'
|
|
2
1
|
import type { Metadata } from 'next'
|
|
3
2
|
import { ThemeProvider } from 'next-themes'
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { Geist, Geist_Mono } from 'next/font/google'
|
|
4
|
+
import { Loader } from '~/components/loader'
|
|
5
|
+
import { ReactQueryProvider } from '~/components/react-query-provider'
|
|
6
|
+
import { ScreenSize } from '~/components/screen-size'
|
|
7
|
+
import { Toaster } from '~/components/ui/sonner'
|
|
8
|
+
import { env } from '~/env'
|
|
9
|
+
import { siteConfig } from '~/lib/siteConfig'
|
|
8
10
|
import './globals.css'
|
|
9
11
|
|
|
12
|
+
const geistSans = Geist({
|
|
13
|
+
variable: '--font-geist-sans',
|
|
14
|
+
subsets: ['latin']
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
const geistMono = Geist_Mono({
|
|
18
|
+
variable: '--font-geist-mono',
|
|
19
|
+
subsets: ['latin']
|
|
20
|
+
})
|
|
21
|
+
|
|
10
22
|
export const metadata: Metadata = {
|
|
11
23
|
title: siteConfig.name,
|
|
12
24
|
description: siteConfig.description
|
|
@@ -18,13 +30,16 @@ export default function RootLayout({
|
|
|
18
30
|
children: React.ReactNode
|
|
19
31
|
}>) {
|
|
20
32
|
return (
|
|
21
|
-
<html lang="en"
|
|
22
|
-
<body className=
|
|
23
|
-
<
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
33
|
+
<html lang="en" suppressHydrationWarning>
|
|
34
|
+
<body className={`${geistSans.variable} ${geistMono.variable}`}>
|
|
35
|
+
<ReactQueryProvider>
|
|
36
|
+
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
|
|
37
|
+
<Loader />
|
|
38
|
+
{children}
|
|
39
|
+
{env.APP_ENV === 'development' ? <ScreenSize /> : null}
|
|
40
|
+
<Toaster />
|
|
41
|
+
</ThemeProvider>
|
|
42
|
+
</ReactQueryProvider>
|
|
28
43
|
</body>
|
|
29
44
|
</html>
|
|
30
45
|
)
|