create-ej-app 6.0.0 → 7.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.
Files changed (364) hide show
  1. package/cli.js +88 -14
  2. package/cli.ts +100 -17
  3. package/package.json +2 -2
  4. package/template/base/.env.example +11 -15
  5. package/template/base/Dockerfile +15 -0
  6. package/template/base/components.json +10 -5
  7. package/template/base/drizzle.config.ts +4 -5
  8. package/template/{new → base}/eslint.config.mjs +6 -1
  9. package/template/base/package.json +58 -75
  10. package/template/base/postcss.config.mjs +1 -4
  11. package/template/base/src/app/(admin)/layout.tsx +20 -0
  12. package/template/base/src/app/(app)/layout.tsx +13 -118
  13. package/template/base/src/app/(auth)/login/page.tsx +65 -42
  14. package/template/base/src/app/(marketing)/layout.tsx +7 -35
  15. package/template/base/src/app/(marketing)/page.tsx +2 -96
  16. package/template/base/src/app/(marketing)/privacy/page.tsx +3 -0
  17. package/template/base/src/app/(marketing)/terms/page.tsx +3 -0
  18. package/template/base/src/app/globals.css +118 -66
  19. package/template/base/src/app/layout.tsx +27 -12
  20. package/template/base/src/app/not-found.tsx +27 -0
  21. package/template/base/src/components/site-footer.tsx +16 -24
  22. package/template/base/src/components/ui/button.tsx +31 -27
  23. package/template/base/src/components/ui/card.tsx +83 -70
  24. package/template/base/src/components/ui/form.tsx +38 -47
  25. package/template/base/src/components/ui/input.tsx +16 -20
  26. package/template/base/src/components/ui/label.tsx +16 -18
  27. package/template/base/src/components/ui/separator.tsx +11 -14
  28. package/template/base/src/components/ui/sonner.tsx +22 -13
  29. package/template/base/src/db/index.ts +4 -11
  30. package/template/base/src/db/schema.ts +60 -268
  31. package/template/{new → base}/src/env.ts +2 -2
  32. package/template/{new → base}/src/lib/auth-client.ts +2 -0
  33. package/template/base/src/lib/auth.ts +64 -80
  34. package/template/base/src/lib/safe-action.ts +30 -6
  35. package/template/base/tsconfig.json +9 -7
  36. package/template/{prisma-advanced → old}/.env.example +10 -9
  37. package/template/{prisma → old}/components.json +1 -1
  38. package/template/old/drizzle.config.ts +11 -0
  39. package/template/old/package.json +87 -0
  40. package/template/old/postcss.config.mjs +8 -0
  41. package/template/{prisma-advanced → old}/src/app/(app)/layout.tsx +11 -3
  42. package/template/{prisma-advanced → old}/src/app/(auth)/login/page.tsx +2 -2
  43. package/template/{prisma → old}/src/app/(marketing)/page.tsx +8 -7
  44. package/template/old/src/app/layout.tsx +31 -0
  45. package/template/old/src/components/ui/sonner.tsx +31 -0
  46. package/template/old/src/db/index.ts +14 -0
  47. package/template/old/src/db/schema.ts +287 -0
  48. package/template/old/src/lib/auth.ts +89 -0
  49. package/template/old/src/lib/safe-action.ts +19 -0
  50. package/template/{prisma-advanced → old}/tsconfig.json +3 -2
  51. package/template/new/.env.example +0 -13
  52. package/template/new/components.json +0 -22
  53. package/template/new/drizzle.config.ts +0 -10
  54. package/template/new/package.json +0 -81
  55. package/template/new/postcss.config.mjs +0 -5
  56. package/template/new/src/app/(auth)/login/page.tsx +0 -72
  57. package/template/new/src/app/globals.css +0 -128
  58. package/template/new/src/app/layout.tsx +0 -50
  59. package/template/new/src/app/page.tsx +0 -3
  60. package/template/new/src/components/ui/button.tsx +0 -60
  61. package/template/new/src/components/ui/card.tsx +0 -92
  62. package/template/new/src/components/ui/form.tsx +0 -167
  63. package/template/new/src/components/ui/input.tsx +0 -21
  64. package/template/new/src/components/ui/label.tsx +0 -24
  65. package/template/new/src/components/ui/separator.tsx +0 -28
  66. package/template/new/src/components/ui/sonner.tsx +0 -40
  67. package/template/new/src/db/index.ts +0 -7
  68. package/template/new/src/db/schema.ts +0 -74
  69. package/template/new/src/lib/auth.ts +0 -67
  70. package/template/new/src/lib/safe-action.ts +0 -15
  71. package/template/new/tsconfig.json +0 -49
  72. package/template/prisma/.env.example +0 -16
  73. package/template/prisma/.eslintrc.cjs +0 -24
  74. package/template/prisma/next.config.mjs +0 -15
  75. package/template/prisma/package.json +0 -80
  76. package/template/prisma/postcss.config.cjs +0 -6
  77. package/template/prisma/prettier.config.ts +0 -11
  78. package/template/prisma/prisma/schema.prisma +0 -115
  79. package/template/prisma/public/next.svg +0 -1
  80. package/template/prisma/src/app/(app)/dashboard/page.tsx +0 -19
  81. package/template/prisma/src/app/(app)/layout.tsx +0 -90
  82. package/template/prisma/src/app/(app)/settings/actions.ts +0 -18
  83. package/template/prisma/src/app/(app)/settings/loading.tsx +0 -28
  84. package/template/prisma/src/app/(app)/settings/page.tsx +0 -28
  85. package/template/prisma/src/app/(app)/settings/render.tsx +0 -113
  86. package/template/prisma/src/app/(app)/tasks/[id]/actions.ts +0 -147
  87. package/template/prisma/src/app/(app)/tasks/[id]/page.tsx +0 -25
  88. package/template/prisma/src/app/(app)/tasks/[id]/render.tsx +0 -413
  89. package/template/prisma/src/app/(app)/tasks/actions.ts +0 -69
  90. package/template/prisma/src/app/(app)/tasks/page.tsx +0 -53
  91. package/template/prisma/src/app/(app)/tasks/render.tsx +0 -107
  92. package/template/prisma/src/app/(app)/users/[id]/actions.ts +0 -83
  93. package/template/prisma/src/app/(app)/users/[id]/page.tsx +0 -32
  94. package/template/prisma/src/app/(app)/users/[id]/render.tsx +0 -240
  95. package/template/prisma/src/app/(app)/users/actions.ts +0 -55
  96. package/template/prisma/src/app/(app)/users/page.tsx +0 -49
  97. package/template/prisma/src/app/(app)/users/render.tsx +0 -80
  98. package/template/prisma/src/app/(auth)/layout.tsx +0 -20
  99. package/template/prisma/src/app/(auth)/login/page.tsx +0 -49
  100. package/template/prisma/src/app/(auth)/login/user-auth-form.tsx +0 -152
  101. package/template/prisma/src/app/api/auth/[...nextauth]/route.ts +0 -7
  102. package/template/prisma/src/app/api/upload/route.ts +0 -36
  103. package/template/prisma/src/app/favicon.ico +0 -0
  104. package/template/prisma/src/app/layout.tsx +0 -34
  105. package/template/prisma/src/components/app-nav-command.tsx +0 -160
  106. package/template/prisma/src/components/dark-mode-toggle.tsx +0 -43
  107. package/template/prisma/src/components/data-table/data-table-column-header.tsx +0 -91
  108. package/template/prisma/src/components/data-table/data-table-faceted-filter.tsx +0 -149
  109. package/template/prisma/src/components/data-table/data-table-loading.tsx +0 -77
  110. package/template/prisma/src/components/data-table/data-table-pagination.tsx +0 -94
  111. package/template/prisma/src/components/data-table/data-table-toolbar.tsx +0 -78
  112. package/template/prisma/src/components/data-table/data-table-types.ts +0 -17
  113. package/template/prisma/src/components/data-table/data-table-view-options.tsx +0 -59
  114. package/template/prisma/src/components/data-table/data-table.tsx +0 -301
  115. package/template/prisma/src/components/data-table/simple-data-table.tsx +0 -109
  116. package/template/prisma/src/components/empty-placeholder.tsx +0 -78
  117. package/template/prisma/src/components/heading.tsx +0 -17
  118. package/template/prisma/src/components/icons.tsx +0 -85
  119. package/template/prisma/src/components/main-nav.tsx +0 -64
  120. package/template/prisma/src/components/mobile-nav.tsx +0 -50
  121. package/template/prisma/src/components/shell.tsx +0 -13
  122. package/template/prisma/src/components/side-nav.tsx +0 -51
  123. package/template/prisma/src/components/site-footer.tsx +0 -31
  124. package/template/prisma/src/components/system-info.tsx +0 -36
  125. package/template/prisma/src/components/theme-provider.tsx +0 -13
  126. package/template/prisma/src/components/ui/alert-dialog.tsx +0 -141
  127. package/template/prisma/src/components/ui/avatar.tsx +0 -50
  128. package/template/prisma/src/components/ui/badge.tsx +0 -36
  129. package/template/prisma/src/components/ui/button.tsx +0 -56
  130. package/template/prisma/src/components/ui/card.tsx +0 -79
  131. package/template/prisma/src/components/ui/checkbox.tsx +0 -30
  132. package/template/prisma/src/components/ui/command.tsx +0 -155
  133. package/template/prisma/src/components/ui/dialog.tsx +0 -122
  134. package/template/prisma/src/components/ui/dropdown-menu.tsx +0 -200
  135. package/template/prisma/src/components/ui/form.tsx +0 -176
  136. package/template/prisma/src/components/ui/input.tsx +0 -25
  137. package/template/prisma/src/components/ui/label.tsx +0 -26
  138. package/template/prisma/src/components/ui/popover.tsx +0 -31
  139. package/template/prisma/src/components/ui/select.tsx +0 -160
  140. package/template/prisma/src/components/ui/separator.tsx +0 -31
  141. package/template/prisma/src/components/ui/skeleton.tsx +0 -15
  142. package/template/prisma/src/components/ui/table.tsx +0 -117
  143. package/template/prisma/src/components/ui/textarea.tsx +0 -24
  144. package/template/prisma/src/components/ui/toast.tsx +0 -127
  145. package/template/prisma/src/components/ui/toaster.tsx +0 -35
  146. package/template/prisma/src/components/ui/use-toast.ts +0 -189
  147. package/template/prisma/src/components/user-account-nav.tsx +0 -60
  148. package/template/prisma/src/components/user-avatar.tsx +0 -25
  149. package/template/prisma/src/env.mjs +0 -78
  150. package/template/prisma/src/hooks/use-debounce.ts +0 -17
  151. package/template/prisma/src/hooks/use-lock-body.tsx +0 -12
  152. package/template/prisma/src/lib/auth.ts +0 -80
  153. package/template/prisma/src/lib/cn.ts +0 -4
  154. package/template/prisma/src/lib/db.ts +0 -20
  155. package/template/prisma/src/lib/delay.ts +0 -2
  156. package/template/prisma/src/lib/formatDate.ts +0 -11
  157. package/template/prisma/src/lib/generateLabel.ts +0 -5
  158. package/template/prisma/src/lib/siteConfig.ts +0 -4
  159. package/template/prisma/src/lib/storageClient.ts +0 -11
  160. package/template/prisma/src/styles/editor.css +0 -61
  161. package/template/prisma/src/styles/globals.css +0 -76
  162. package/template/prisma/src/types/UnwrapPromise.ts +0 -1
  163. package/template/prisma/tailwind.config.ts +0 -80
  164. package/template/prisma/tsconfig.json +0 -46
  165. package/template/prisma-advanced/.eslintrc.cjs +0 -24
  166. package/template/prisma-advanced/components.json +0 -17
  167. package/template/prisma-advanced/next.config.mjs +0 -15
  168. package/template/prisma-advanced/package.json +0 -80
  169. package/template/prisma-advanced/postcss.config.cjs +0 -6
  170. package/template/prisma-advanced/prettier.config.ts +0 -11
  171. package/template/prisma-advanced/prisma/schema.prisma +0 -154
  172. package/template/prisma-advanced/public/next.svg +0 -1
  173. package/template/prisma-advanced/src/app/(app)/dashboard/page.tsx +0 -19
  174. package/template/prisma-advanced/src/app/(app)/roles/[id]/actions.ts +0 -100
  175. package/template/prisma-advanced/src/app/(app)/roles/[id]/page.tsx +0 -36
  176. package/template/prisma-advanced/src/app/(app)/roles/[id]/render.tsx +0 -266
  177. package/template/prisma-advanced/src/app/(app)/roles/actions.ts +0 -67
  178. package/template/prisma-advanced/src/app/(app)/roles/page.tsx +0 -51
  179. package/template/prisma-advanced/src/app/(app)/roles/render.tsx +0 -70
  180. package/template/prisma-advanced/src/app/(app)/settings/actions.ts +0 -18
  181. package/template/prisma-advanced/src/app/(app)/settings/loading.tsx +0 -28
  182. package/template/prisma-advanced/src/app/(app)/settings/page.tsx +0 -28
  183. package/template/prisma-advanced/src/app/(app)/settings/render.tsx +0 -113
  184. package/template/prisma-advanced/src/app/(app)/tasks/[id]/actions.ts +0 -147
  185. package/template/prisma-advanced/src/app/(app)/tasks/[id]/page.tsx +0 -55
  186. package/template/prisma-advanced/src/app/(app)/tasks/[id]/render.tsx +0 -418
  187. package/template/prisma-advanced/src/app/(app)/tasks/actions.ts +0 -69
  188. package/template/prisma-advanced/src/app/(app)/tasks/page.tsx +0 -63
  189. package/template/prisma-advanced/src/app/(app)/tasks/render.tsx +0 -114
  190. package/template/prisma-advanced/src/app/(app)/users/[id]/actions.ts +0 -104
  191. package/template/prisma-advanced/src/app/(app)/users/[id]/page.tsx +0 -39
  192. package/template/prisma-advanced/src/app/(app)/users/[id]/render.tsx +0 -320
  193. package/template/prisma-advanced/src/app/(app)/users/actions.ts +0 -67
  194. package/template/prisma-advanced/src/app/(app)/users/page.tsx +0 -61
  195. package/template/prisma-advanced/src/app/(app)/users/render.tsx +0 -108
  196. package/template/prisma-advanced/src/app/(auth)/layout.tsx +0 -20
  197. package/template/prisma-advanced/src/app/(auth)/login/user-auth-form.tsx +0 -152
  198. package/template/prisma-advanced/src/app/(marketing)/layout.tsx +0 -42
  199. package/template/prisma-advanced/src/app/(marketing)/page.tsx +0 -96
  200. package/template/prisma-advanced/src/app/api/auth/[...nextauth]/route.ts +0 -7
  201. package/template/prisma-advanced/src/app/api/upload/route.ts +0 -36
  202. package/template/prisma-advanced/src/app/favicon.ico +0 -0
  203. package/template/prisma-advanced/src/app/layout.tsx +0 -34
  204. package/template/prisma-advanced/src/components/app-nav-command.tsx +0 -160
  205. package/template/prisma-advanced/src/components/dark-mode-toggle.tsx +0 -43
  206. package/template/prisma-advanced/src/components/data-table/data-table-column-header.tsx +0 -91
  207. package/template/prisma-advanced/src/components/data-table/data-table-faceted-filter.tsx +0 -149
  208. package/template/prisma-advanced/src/components/data-table/data-table-loading.tsx +0 -77
  209. package/template/prisma-advanced/src/components/data-table/data-table-pagination.tsx +0 -94
  210. package/template/prisma-advanced/src/components/data-table/data-table-toolbar.tsx +0 -78
  211. package/template/prisma-advanced/src/components/data-table/data-table-types.ts +0 -17
  212. package/template/prisma-advanced/src/components/data-table/data-table-view-options.tsx +0 -59
  213. package/template/prisma-advanced/src/components/data-table/data-table.tsx +0 -301
  214. package/template/prisma-advanced/src/components/data-table/simple-data-table.tsx +0 -109
  215. package/template/prisma-advanced/src/components/empty-placeholder.tsx +0 -78
  216. package/template/prisma-advanced/src/components/heading.tsx +0 -17
  217. package/template/prisma-advanced/src/components/icons.tsx +0 -85
  218. package/template/prisma-advanced/src/components/main-nav.tsx +0 -64
  219. package/template/prisma-advanced/src/components/shell.tsx +0 -13
  220. package/template/prisma-advanced/src/components/side-nav.tsx +0 -51
  221. package/template/prisma-advanced/src/components/system-info.tsx +0 -36
  222. package/template/prisma-advanced/src/components/theme-provider.tsx +0 -13
  223. package/template/prisma-advanced/src/components/ui/alert-dialog.tsx +0 -141
  224. package/template/prisma-advanced/src/components/ui/avatar.tsx +0 -50
  225. package/template/prisma-advanced/src/components/ui/badge.tsx +0 -36
  226. package/template/prisma-advanced/src/components/ui/checkbox.tsx +0 -30
  227. package/template/prisma-advanced/src/components/ui/command.tsx +0 -155
  228. package/template/prisma-advanced/src/components/ui/dialog.tsx +0 -122
  229. package/template/prisma-advanced/src/components/ui/dropdown-menu.tsx +0 -200
  230. package/template/prisma-advanced/src/components/ui/popover.tsx +0 -31
  231. package/template/prisma-advanced/src/components/ui/select.tsx +0 -160
  232. package/template/prisma-advanced/src/components/ui/skeleton.tsx +0 -15
  233. package/template/prisma-advanced/src/components/ui/table.tsx +0 -117
  234. package/template/prisma-advanced/src/components/ui/textarea.tsx +0 -24
  235. package/template/prisma-advanced/src/components/ui/toast.tsx +0 -127
  236. package/template/prisma-advanced/src/components/ui/toaster.tsx +0 -35
  237. package/template/prisma-advanced/src/components/ui/use-toast.ts +0 -189
  238. package/template/prisma-advanced/src/components/user-account-nav.tsx +0 -60
  239. package/template/prisma-advanced/src/components/user-avatar.tsx +0 -25
  240. package/template/prisma-advanced/src/env.mjs +0 -78
  241. package/template/prisma-advanced/src/hooks/use-debounce.ts +0 -17
  242. package/template/prisma-advanced/src/hooks/use-lock-body.tsx +0 -12
  243. package/template/prisma-advanced/src/lib/auth.ts +0 -180
  244. package/template/prisma-advanced/src/lib/cn.ts +0 -4
  245. package/template/prisma-advanced/src/lib/db.ts +0 -20
  246. package/template/prisma-advanced/src/lib/delay.ts +0 -2
  247. package/template/prisma-advanced/src/lib/formatDate.ts +0 -11
  248. package/template/prisma-advanced/src/lib/generateLabel.ts +0 -5
  249. package/template/prisma-advanced/src/lib/siteConfig.ts +0 -4
  250. package/template/prisma-advanced/src/lib/storageClient.ts +0 -11
  251. package/template/prisma-advanced/src/styles/editor.css +0 -61
  252. package/template/prisma-advanced/src/types/UnwrapPromise.ts +0 -1
  253. package/template/prisma-advanced/tailwind.config.ts +0 -80
  254. package/template/{new → base}/next.config.ts +0 -0
  255. package/template/{new → base}/public/placeholder.svg +0 -0
  256. package/template/{new → base}/src/app/(auth)/login/email-login-form.tsx +0 -0
  257. package/template/{new → base}/src/app/(auth)/login/social-login-buttons.tsx +0 -0
  258. package/template/{new → base}/src/app/api/auth/[...all]/route.ts +0 -0
  259. package/template/{new → base}/src/components/loader.tsx +0 -0
  260. package/template/{new → base}/src/components/react-query-provider.tsx +0 -0
  261. package/template/{new → base}/src/components/screen-size.tsx +0 -0
  262. package/template/{new → base}/src/components/theme-toggle.tsx +0 -0
  263. package/template/{new → base}/src/lib/toast-message.ts +0 -0
  264. package/template/{base → old}/.eslintrc.cjs +0 -0
  265. package/template/{base → old}/next.config.mjs +0 -0
  266. package/template/{new → old}/prettier.config.mjs +0 -0
  267. package/template/{base → old}/public/next.svg +0 -0
  268. package/template/{base → old}/public/vercel.svg +0 -0
  269. package/template/{base → old}/src/app/(app)/dashboard/layout.tsx +0 -0
  270. package/template/{base → old}/src/app/(app)/dashboard/page.tsx +0 -0
  271. package/template/{base → old}/src/app/(app)/roles/[id]/actions.ts +0 -0
  272. package/template/{base → old}/src/app/(app)/roles/[id]/page.tsx +0 -0
  273. package/template/{base → old}/src/app/(app)/roles/[id]/render.tsx +0 -0
  274. package/template/{base → old}/src/app/(app)/roles/[id]/validation.ts +0 -0
  275. package/template/{base → old}/src/app/(app)/roles/actions.ts +0 -0
  276. package/template/{base → old}/src/app/(app)/roles/page.tsx +0 -0
  277. package/template/{base → old}/src/app/(app)/roles/render.tsx +0 -0
  278. package/template/{base → old}/src/app/(app)/settings/actions.ts +0 -0
  279. package/template/{base → old}/src/app/(app)/settings/layout.tsx +0 -0
  280. package/template/{base → old}/src/app/(app)/settings/loading.tsx +0 -0
  281. package/template/{base → old}/src/app/(app)/settings/page.tsx +0 -0
  282. package/template/{base → old}/src/app/(app)/settings/render.tsx +0 -0
  283. package/template/{base → old}/src/app/(app)/settings/validation.ts +0 -0
  284. package/template/{base → old}/src/app/(app)/tasks/[id]/actions.ts +0 -0
  285. package/template/{base → old}/src/app/(app)/tasks/[id]/page.tsx +0 -0
  286. package/template/{base → old}/src/app/(app)/tasks/[id]/render.tsx +0 -0
  287. package/template/{base → old}/src/app/(app)/tasks/[id]/validation.ts +0 -0
  288. package/template/{base → old}/src/app/(app)/tasks/actions.ts +0 -0
  289. package/template/{base → old}/src/app/(app)/tasks/page.tsx +0 -0
  290. package/template/{base → old}/src/app/(app)/tasks/render.tsx +0 -0
  291. package/template/{base → old}/src/app/(app)/tasks/statusEnum.ts +0 -0
  292. package/template/{base → old}/src/app/(app)/users/[id]/actions.ts +0 -0
  293. package/template/{base → old}/src/app/(app)/users/[id]/page.tsx +0 -0
  294. package/template/{base → old}/src/app/(app)/users/[id]/render.tsx +0 -0
  295. package/template/{base → old}/src/app/(app)/users/[id]/validation.ts +0 -0
  296. package/template/{base → old}/src/app/(app)/users/actions.ts +0 -0
  297. package/template/{base → old}/src/app/(app)/users/page.tsx +0 -0
  298. package/template/{base → old}/src/app/(app)/users/render.tsx +0 -0
  299. package/template/{base → old}/src/app/(auth)/layout.tsx +0 -0
  300. package/template/{base → old}/src/app/(auth)/login/render.tsx +0 -0
  301. package/template/{prisma → old}/src/app/(marketing)/layout.tsx +1 -1
  302. /package/template/{base → old}/src/app/api/auth/[...nextauth]/route.ts +0 -0
  303. /package/template/{new → old}/src/app/favicon.ico +0 -0
  304. /package/template/{prisma-advanced/src/styles → old/src/app}/globals.css +0 -0
  305. /package/template/{base → old}/src/components/app-nav-command.tsx +0 -0
  306. /package/template/{base → old}/src/components/dark-mode-toggle.tsx +0 -0
  307. /package/template/{base → old}/src/components/data-table/data-table-column-header.tsx +0 -0
  308. /package/template/{base → old}/src/components/data-table/data-table-faceted-filter.tsx +0 -0
  309. /package/template/{base → old}/src/components/data-table/data-table-loading.tsx +0 -0
  310. /package/template/{base → old}/src/components/data-table/data-table-pagination.tsx +0 -0
  311. /package/template/{base → old}/src/components/data-table/data-table-toolbar.tsx +0 -0
  312. /package/template/{base → old}/src/components/data-table/data-table-types.ts +0 -0
  313. /package/template/{base → old}/src/components/data-table/data-table-view-options.tsx +0 -0
  314. /package/template/{base → old}/src/components/data-table/data-table.tsx +0 -0
  315. /package/template/{base → old}/src/components/data-table/simple-data-table.tsx +0 -0
  316. /package/template/{base → old}/src/components/empty-placeholder.tsx +0 -0
  317. /package/template/{base → old}/src/components/heading.tsx +0 -0
  318. /package/template/{base → old}/src/components/icons.tsx +0 -0
  319. /package/template/{base → old}/src/components/main-nav.tsx +0 -0
  320. /package/template/{base → old}/src/components/mobile-nav.tsx +0 -0
  321. /package/template/{base → old}/src/components/shell.tsx +0 -0
  322. /package/template/{base → old}/src/components/side-nav.tsx +0 -0
  323. /package/template/{prisma-advanced → old}/src/components/site-footer.tsx +0 -0
  324. /package/template/{base → old}/src/components/system-info.tsx +0 -0
  325. /package/template/{base → old}/src/components/ui/alert-dialog.tsx +0 -0
  326. /package/template/{base → old}/src/components/ui/avatar.tsx +0 -0
  327. /package/template/{base → old}/src/components/ui/badge.tsx +0 -0
  328. /package/template/{prisma-advanced → old}/src/components/ui/button.tsx +0 -0
  329. /package/template/{prisma-advanced → old}/src/components/ui/card.tsx +0 -0
  330. /package/template/{base → old}/src/components/ui/checkbox.tsx +0 -0
  331. /package/template/{base → old}/src/components/ui/command.tsx +0 -0
  332. /package/template/{base → old}/src/components/ui/dialog.tsx +0 -0
  333. /package/template/{base → old}/src/components/ui/dropdown-menu.tsx +0 -0
  334. /package/template/{prisma-advanced → old}/src/components/ui/form.tsx +0 -0
  335. /package/template/{prisma-advanced → old}/src/components/ui/input.tsx +0 -0
  336. /package/template/{prisma-advanced → old}/src/components/ui/label.tsx +0 -0
  337. /package/template/{base → old}/src/components/ui/popover.tsx +0 -0
  338. /package/template/{base → old}/src/components/ui/select.tsx +0 -0
  339. /package/template/{prisma-advanced → old}/src/components/ui/separator.tsx +0 -0
  340. /package/template/{base → old}/src/components/ui/skeleton.tsx +0 -0
  341. /package/template/{base → old}/src/components/ui/table.tsx +0 -0
  342. /package/template/{base → old}/src/components/user-account-nav.tsx +0 -0
  343. /package/template/{base → old}/src/components/user-avatar.tsx +0 -0
  344. /package/template/{base → old}/src/data-access/resource.ts +0 -0
  345. /package/template/{base → old}/src/data-access/role-permission.ts +0 -0
  346. /package/template/{base → old}/src/data-access/role.ts +0 -0
  347. /package/template/{base → old}/src/data-access/task.ts +0 -0
  348. /package/template/{base → old}/src/data-access/user.ts +0 -0
  349. /package/template/{base → old}/src/env.mjs +0 -0
  350. /package/template/{base → old}/src/hooks/use-debounce.tsx +0 -0
  351. /package/template/{base → old}/src/hooks/use-lock-body.tsx +0 -0
  352. /package/template/{new → old}/src/lib/cn.ts +0 -0
  353. /package/template/{base → old}/src/lib/currentUser.ts +0 -0
  354. /package/template/{new → old}/src/lib/delay.ts +0 -0
  355. /package/template/{base → old}/src/lib/formatDate.ts +0 -0
  356. /package/template/{base → old}/src/lib/generateLabel.ts +0 -0
  357. /package/template/{base → old}/src/lib/s3Client.ts +0 -0
  358. /package/template/{new → old}/src/lib/siteConfig.ts +0 -0
  359. /package/template/{base → old}/src/lib/sortOrderEnum.ts +0 -0
  360. /package/template/{base → old}/src/use-case/role-permission.ts +0 -0
  361. /package/template/{base → old}/src/use-case/role.ts +0 -0
  362. /package/template/{base → old}/src/use-case/task.ts +0 -0
  363. /package/template/{base → old}/src/use-case/user.ts +0 -0
  364. /package/template/{base → old}/tailwind.config.ts +0 -0
@@ -1,80 +0,0 @@
1
- import { PrismaAdapter } from '@next-auth/prisma-adapter'
2
- import { User as PrismaUser } from '@prisma/client'
3
- import {
4
- getServerSession,
5
- type DefaultSession,
6
- type NextAuthOptions
7
- } from 'next-auth'
8
- import EmailProvider from 'next-auth/providers/email'
9
- import GitHubProvider from 'next-auth/providers/github'
10
- import GoogleProvider from 'next-auth/providers/google'
11
-
12
- import { env } from '@/env.mjs'
13
- import { prisma } from '@/lib/db'
14
-
15
- /**
16
- * Module augmentation for `next-auth` types. Allows us to add custom properties to the `session`
17
- * object and keep type safety.
18
- *
19
- * @see https://next-auth.js.org/getting-started/typescript#module-augmentation
20
- */
21
- declare module 'next-auth' {
22
- interface Session extends DefaultSession {
23
- user: {
24
- id: string
25
- } & DefaultSession['user']
26
- }
27
-
28
- interface User extends PrismaUser {}
29
- }
30
-
31
- /**
32
- * Options for NextAuth.js used to configure adapters, providers, callbacks, etc.
33
- *
34
- * @see https://next-auth.js.org/configuration/options
35
- */
36
- export const authOptions: NextAuthOptions = {
37
- pages: {
38
- signIn: '/login'
39
- },
40
- callbacks: {
41
- session({ session, user }) {
42
- return {
43
- ...session,
44
- user: {
45
- ...session.user,
46
- id: user.id
47
- }
48
- }
49
- }
50
- },
51
- adapter: PrismaAdapter(prisma),
52
- providers: [
53
- EmailProvider({
54
- server: {
55
- host: env.EMAIL_SERVER_HOST,
56
- port: env.EMAIL_SERVER_PORT,
57
- auth: {
58
- user: env.EMAIL_SERVER_USER,
59
- pass: env.EMAIL_SERVER_PASSWORD
60
- }
61
- },
62
- from: env.EMAIL_FROM
63
- }),
64
- GoogleProvider({
65
- clientId: env.GOOGLE_ID,
66
- clientSecret: env.GOOGLE_SECRET
67
- }),
68
- GitHubProvider({
69
- clientId: env.GITHUB_ID,
70
- clientSecret: env.GITHUB_SECRET
71
- })
72
- ]
73
- }
74
-
75
- /**
76
- * Wrapper for `getServerSession` so that you don't need to import the `authOptions` in every file.
77
- *
78
- * @see https://next-auth.js.org/configuration/nextjs
79
- */
80
- export const getAuthSession = () => getServerSession(authOptions)
@@ -1,4 +0,0 @@
1
- import { clsx, type ClassValue } from 'clsx'
2
- import { twMerge } from 'tailwind-merge'
3
-
4
- export const cn = (...inputs: ClassValue[]) => twMerge(clsx(inputs))
@@ -1,20 +0,0 @@
1
- import { PrismaClient } from '@prisma/client'
2
-
3
- import { env } from '@/env.mjs'
4
-
5
- const globalForPrisma = globalThis as unknown as {
6
- prisma: PrismaClient | undefined
7
- }
8
-
9
- export const prisma =
10
- globalForPrisma.prisma ||
11
- new PrismaClient({
12
- log:
13
- env.NODE_ENV === 'development'
14
- ? [
15
- // 'info', 'query', 'error', 'warn'
16
- ]
17
- : ['error']
18
- })
19
-
20
- if (env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma
@@ -1,2 +0,0 @@
1
- export const delay = (ms: number) =>
2
- new Promise(resolve => setTimeout(resolve, ms))
@@ -1,11 +0,0 @@
1
- import dayjs from 'dayjs'
2
- import relativeTime from 'dayjs/plugin/relativeTime'
3
-
4
- dayjs.extend(relativeTime)
5
-
6
- export const formatDate = (date: Date) => dayjs(date).format('DD/MM/YYYY')
7
-
8
- export const formatDateTime = (date: Date) =>
9
- dayjs(date).format('DD/MM/YYYY hh:mm:ss A')
10
-
11
- export const timesAgo = (date: Date) => dayjs(date).fromNow()
@@ -1,5 +0,0 @@
1
- export const generateLabel = (str: string) =>
2
- str
3
- .replaceAll('_', ' ')
4
- .replaceAll(/([A-Z])/g, ' $1')
5
- .trim()
@@ -1,4 +0,0 @@
1
- export const siteConfig = {
2
- name: 'Project Name',
3
- description: 'Project Description'
4
- }
@@ -1,11 +0,0 @@
1
- import { GCPStorageClient } from '@ejekanshjain/cloud-storage'
2
-
3
- import { env } from '@/env.mjs'
4
-
5
- export const storageClient = GCPStorageClient({
6
- projectId: env.FIREBASE_PROJECT_ID!,
7
- privateKey: env.FIREBASE_PRIVATE_KEY!,
8
- clientEmail: env.FIREBASE_CLIENT_EMAIL!,
9
- bucket: env.FIREBASE_STORAGE_BUCKET!,
10
- defaultMediaPublic: true
11
- })
@@ -1,61 +0,0 @@
1
- .dark .ce-block--selected .ce-block__content,
2
- .dark .ce-inline-toolbar,
3
- .dark .codex-editor--narrow .ce-toolbox,
4
- .dark .ce-conversion-toolbar,
5
- .dark .ce-settings,
6
- .dark .ce-settings__button,
7
- .dark .ce-toolbar__settings-btn,
8
- .dark .cdx-button,
9
- .dark .ce-popover,
10
- .dark .ce-toolbar__plus:hover {
11
- background: theme('colors.popover.DEFAULT');
12
- color: inherit;
13
- border-color: theme('colors.border');
14
- }
15
-
16
- .dark .ce-inline-tool,
17
- .dark .ce-conversion-toolbar__label,
18
- .dark .ce-toolbox__button,
19
- .dark .cdx-settings-button,
20
- .dark .ce-toolbar__plus {
21
- color: inherit;
22
- }
23
-
24
- .dark .ce-popover__item-icon,
25
- .dark .ce-conversion-tool__icon {
26
- background-color: theme('colors.muted.DEFAULT');
27
- box-shadow: none;
28
- }
29
-
30
- .dark .cdx-search-field {
31
- border-color: theme('colors.border');
32
- background: theme('colors.input');
33
- color: inherit;
34
- }
35
-
36
- .dark ::selection {
37
- background: theme('colors.accent.DEFAULT');
38
- }
39
-
40
- .dark .cdx-settings-button:hover,
41
- .dark .ce-settings__button:hover,
42
- .dark .ce-toolbox__button--active,
43
- .dark .ce-toolbox__button:hover,
44
- .dark .cdx-button:hover,
45
- .dark .ce-inline-toolbar__dropdown:hover,
46
- .dark .ce-inline-tool:hover,
47
- .dark .ce-popover__item:hover,
48
- .dark .ce-conversion-tool:hover,
49
- .dark .ce-toolbar__settings-btn:hover {
50
- background-color: theme('colors.accent.DEFAULT');
51
- color: theme('colors.accent.foreground');
52
- }
53
-
54
- .dark .cdx-notify--error {
55
- background: theme('colors.destructive.DEFAULT') !important;
56
- }
57
-
58
- .dark .cdx-notify__cross::after,
59
- .dark .cdx-notify__cross::before {
60
- background: white;
61
- }
@@ -1,76 +0,0 @@
1
- @tailwind base;
2
- @tailwind components;
3
- @tailwind utilities;
4
-
5
- @layer base {
6
- :root {
7
- --background: 0 0% 100%;
8
- --foreground: 0 0% 3.9%;
9
-
10
- --card: 0 0% 100%;
11
- --card-foreground: 0 0% 3.9%;
12
-
13
- --popover: 0 0% 100%;
14
- --popover-foreground: 0 0% 3.9%;
15
-
16
- --primary: 0 0% 9%;
17
- --primary-foreground: 0 0% 98%;
18
-
19
- --secondary: 0 0% 96.1%;
20
- --secondary-foreground: 0 0% 9%;
21
-
22
- --muted: 0 0% 96.1%;
23
- --muted-foreground: 0 0% 45.1%;
24
-
25
- --accent: 0 0% 96.1%;
26
- --accent-foreground: 0 0% 9%;
27
-
28
- --destructive: 0 84.2% 60.2%;
29
- --destructive-foreground: 0 0% 98%;
30
-
31
- --border: 0 0% 89.8%;
32
- --input: 0 0% 89.8%;
33
- --ring: 0 0% 3.9%;
34
-
35
- --radius: 0.5rem;
36
- }
37
-
38
- .dark {
39
- --background: 0 0% 3.9%;
40
- --foreground: 0 0% 98%;
41
-
42
- --card: 0 0% 3.9%;
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%;
59
-
60
- --destructive: 0 62.8% 30.6%;
61
- --destructive-foreground: 0 0% 98%;
62
-
63
- --border: 0 0% 14.9%;
64
- --input: 0 0% 14.9%;
65
- --ring: 0 0% 83.1%;
66
- }
67
- }
68
-
69
- @layer base {
70
- * {
71
- @apply border-border;
72
- }
73
- body {
74
- @apply bg-background text-foreground;
75
- }
76
- }
@@ -1 +0,0 @@
1
- export type UnwrapPromise<T> = T extends Promise<infer U> ? U : T
@@ -1,80 +0,0 @@
1
- import type { Config } from 'tailwindcss'
2
-
3
- const config = {
4
- darkMode: ['class'],
5
- content: ['./src/**/*.{js,ts,jsx,tsx,mdx}'],
6
- prefix: '',
7
- theme: {
8
- container: {
9
- center: true,
10
- padding: '2rem',
11
- screens: {
12
- '2xl': '1400px'
13
- }
14
- },
15
- extend: {
16
- backgroundImage: {
17
- 'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))',
18
- 'gradient-conic':
19
- 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))'
20
- },
21
- colors: {
22
- border: 'hsl(var(--border))',
23
- input: 'hsl(var(--input))',
24
- ring: 'hsl(var(--ring))',
25
- background: 'hsl(var(--background))',
26
- foreground: 'hsl(var(--foreground))',
27
- primary: {
28
- DEFAULT: 'hsl(var(--primary))',
29
- foreground: 'hsl(var(--primary-foreground))'
30
- },
31
- secondary: {
32
- DEFAULT: 'hsl(var(--secondary))',
33
- foreground: 'hsl(var(--secondary-foreground))'
34
- },
35
- destructive: {
36
- DEFAULT: 'hsl(var(--destructive))',
37
- foreground: 'hsl(var(--destructive-foreground))'
38
- },
39
- muted: {
40
- DEFAULT: 'hsl(var(--muted))',
41
- foreground: 'hsl(var(--muted-foreground))'
42
- },
43
- accent: {
44
- DEFAULT: 'hsl(var(--accent))',
45
- foreground: 'hsl(var(--accent-foreground))'
46
- },
47
- popover: {
48
- DEFAULT: 'hsl(var(--popover))',
49
- foreground: 'hsl(var(--popover-foreground))'
50
- },
51
- card: {
52
- DEFAULT: 'hsl(var(--card))',
53
- foreground: 'hsl(var(--card-foreground))'
54
- }
55
- },
56
- borderRadius: {
57
- lg: 'var(--radius)',
58
- md: 'calc(var(--radius) - 2px)',
59
- sm: 'calc(var(--radius) - 4px)'
60
- },
61
- keyframes: {
62
- 'accordion-down': {
63
- from: { height: '0' },
64
- to: { height: 'var(--radix-accordion-content-height)' }
65
- },
66
- 'accordion-up': {
67
- from: { height: 'var(--radix-accordion-content-height)' },
68
- to: { height: '0' }
69
- }
70
- },
71
- animation: {
72
- 'accordion-down': 'accordion-down 0.2s ease-out',
73
- 'accordion-up': 'accordion-up 0.2s ease-out'
74
- }
75
- }
76
- },
77
- plugins: [require('tailwindcss-animate'), require('@tailwindcss/typography')]
78
- } satisfies Config
79
-
80
- export default config
@@ -1,46 +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": "preserve",
26
- "incremental": true,
27
- "plugins": [
28
- {
29
- "name": "next"
30
- }
31
- ],
32
- "paths": {
33
- "@/*": ["./src/*"]
34
- }
35
- },
36
- "include": [
37
- ".eslintrc.cjs",
38
- "next-env.d.ts",
39
- "**/*.ts",
40
- "**/*.tsx",
41
- "**/*.cjs",
42
- "**/*.mjs",
43
- ".next/types/**/*.ts"
44
- ],
45
- "exclude": ["node_modules"]
46
- }
@@ -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,17 +0,0 @@
1
- {
2
- "$schema": "https://ui.shadcn.com/schema.json",
3
- "style": "default",
4
- "rsc": true,
5
- "tsx": true,
6
- "tailwind": {
7
- "config": "tailwind.config.ts",
8
- "css": "src/styles/globals.css",
9
- "baseColor": "neutral",
10
- "cssVariables": true,
11
- "prefix": ""
12
- },
13
- "aliases": {
14
- "components": "@/components",
15
- "utils": "@/lib/cn"
16
- }
17
- }
@@ -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,6 +0,0 @@
1
- module.exports = {
2
- plugins: {
3
- tailwindcss: {},
4
- autoprefixer: {}
5
- }
6
- }
@@ -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