create-einja-app 0.2.15 → 0.2.18

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 (272) hide show
  1. package/package.json +2 -2
  2. package/templates/default/.claude/hooks/einja/biome-format.sh +2 -2
  3. package/templates/default/.claude/hooks/einja/playwright-resize.sh +12 -2
  4. package/templates/default/.claude/settings.json +15 -0
  5. package/templates/default/.cursor/commands/task-vibe-kanban-loop.md +107 -42
  6. package/templates/default/.env.develop +0 -4
  7. package/templates/default/.env.example +1 -0
  8. package/templates/default/.env.preview +0 -4
  9. package/templates/default/.env.staging +19 -0
  10. package/templates/default/.github/actions/ci/action.yml +39 -0
  11. package/templates/default/.github/actions/migrate/action.yml +39 -0
  12. package/templates/default/.github/actions/neon-export-env/action.yml +28 -0
  13. package/templates/default/.github/actions/setup/action.yml +20 -0
  14. package/templates/default/.github/workflows/claude.yml +1 -0
  15. package/templates/default/.github/workflows/{cleanup-neon-branches.yml → cleanup-pr-preview-db.yml} +28 -24
  16. package/templates/default/.github/workflows/cleanup-pr-preview-on-close.yml +50 -0
  17. package/templates/default/.github/workflows/deploy-pr-preview.yml +398 -0
  18. package/templates/default/.github/workflows/deploy-stable-branches.yml +259 -0
  19. package/templates/default/.github/workflows/release-create-einja-app.yml +95 -0
  20. package/templates/default/.mcp.json +6 -9
  21. package/templates/default/.serena/project.yml +22 -1
  22. package/templates/default/CLAUDE.md +52 -10
  23. package/templates/default/README.md +5 -14
  24. package/templates/default/apps/admin/next.config.ts +11 -0
  25. package/templates/default/apps/admin/package.json +55 -0
  26. package/templates/default/apps/admin/postcss.config.cjs +5 -0
  27. package/templates/default/apps/admin/src/app/(auth)/forgot-password/page.tsx +97 -0
  28. package/templates/default/apps/admin/src/app/(auth)/layout.tsx +18 -0
  29. package/templates/default/apps/admin/src/app/(auth)/otp/page.tsx +121 -0
  30. package/templates/default/apps/admin/src/app/(auth)/sign-in/page.tsx +145 -0
  31. package/templates/default/apps/admin/src/app/(auth)/sign-up/page.tsx +199 -0
  32. package/templates/default/apps/admin/src/app/(errors)/401/page.tsx +27 -0
  33. package/templates/default/apps/admin/src/app/(errors)/403/page.tsx +28 -0
  34. package/templates/default/apps/admin/src/app/(errors)/500/page.tsx +29 -0
  35. package/templates/default/apps/admin/src/app/(errors)/layout.tsx +7 -0
  36. package/templates/default/apps/admin/src/app/(errors)/maintenance/page.tsx +25 -0
  37. package/templates/default/apps/admin/src/app/dashboard/_components/analytics-chart.tsx +68 -0
  38. package/templates/default/apps/admin/src/app/dashboard/_components/analytics.tsx +182 -0
  39. package/templates/default/apps/admin/src/app/dashboard/_components/dashboard-page.tsx +74 -0
  40. package/templates/default/apps/admin/src/app/dashboard/_components/metric-cards.tsx +49 -0
  41. package/templates/default/apps/admin/src/app/dashboard/_components/overview-chart.tsx +73 -0
  42. package/templates/default/apps/admin/src/app/dashboard/_components/recent-sales.tsx +75 -0
  43. package/templates/default/apps/admin/src/app/dashboard/apps/_components/apps-page.tsx +135 -0
  44. package/templates/default/apps/admin/src/app/dashboard/apps/page.tsx +10 -0
  45. package/templates/default/apps/admin/src/app/dashboard/chats/_components/chat-list.tsx +82 -0
  46. package/templates/default/apps/admin/src/app/dashboard/chats/_components/chat-messages.tsx +194 -0
  47. package/templates/default/apps/admin/src/app/dashboard/chats/_components/chats-page.tsx +99 -0
  48. package/templates/default/apps/admin/src/app/dashboard/chats/_components/new-chat.tsx +118 -0
  49. package/templates/default/apps/admin/src/app/dashboard/chats/page.tsx +10 -0
  50. package/templates/default/apps/admin/src/app/dashboard/layout.tsx +9 -0
  51. package/templates/default/apps/admin/src/app/dashboard/not-found.tsx +14 -0
  52. package/templates/default/apps/admin/src/app/dashboard/page.tsx +10 -0
  53. package/templates/default/apps/admin/src/app/dashboard/settings/_components/content-section.tsx +20 -0
  54. package/templates/default/apps/admin/src/app/dashboard/settings/_components/sidebar-nav.tsx +66 -0
  55. package/templates/default/apps/admin/src/app/dashboard/settings/account/page.tsx +173 -0
  56. package/templates/default/apps/admin/src/app/dashboard/settings/appearance/page.tsx +156 -0
  57. package/templates/default/apps/admin/src/app/dashboard/settings/display/page.tsx +125 -0
  58. package/templates/default/apps/admin/src/app/dashboard/settings/layout.tsx +30 -0
  59. package/templates/default/apps/admin/src/app/dashboard/settings/notifications/page.tsx +196 -0
  60. package/templates/default/apps/admin/src/app/dashboard/settings/page.tsx +5 -0
  61. package/templates/default/apps/admin/src/app/dashboard/settings/profile/page.tsx +176 -0
  62. package/templates/default/apps/admin/src/app/dashboard/tasks/_components/data-table-bulk-actions.tsx +183 -0
  63. package/templates/default/apps/admin/src/app/dashboard/tasks/_components/data-table-row-actions.tsx +79 -0
  64. package/templates/default/apps/admin/src/app/dashboard/tasks/_components/tasks-columns.tsx +107 -0
  65. package/templates/default/apps/admin/src/app/dashboard/tasks/_components/tasks-dialogs.tsx +71 -0
  66. package/templates/default/apps/admin/src/app/dashboard/tasks/_components/tasks-import-dialog.tsx +106 -0
  67. package/templates/default/apps/admin/src/app/dashboard/tasks/_components/tasks-multi-delete-dialog.tsx +90 -0
  68. package/templates/default/apps/admin/src/app/dashboard/tasks/_components/tasks-mutate-drawer.tsx +207 -0
  69. package/templates/default/apps/admin/src/app/dashboard/tasks/_components/tasks-page.tsx +31 -0
  70. package/templates/default/apps/admin/src/app/dashboard/tasks/_components/tasks-primary-buttons.tsx +19 -0
  71. package/templates/default/apps/admin/src/app/dashboard/tasks/_components/tasks-provider.tsx +37 -0
  72. package/templates/default/apps/admin/src/app/dashboard/tasks/_components/tasks-table.tsx +155 -0
  73. package/templates/default/apps/admin/src/app/dashboard/tasks/page.tsx +14 -0
  74. package/templates/default/apps/admin/src/app/dashboard/users/_components/data-table-bulk-actions.tsx +136 -0
  75. package/templates/default/apps/admin/src/app/dashboard/users/_components/data-table-row-actions.tsx +62 -0
  76. package/templates/default/apps/admin/src/app/dashboard/users/_components/users-action-dialog.tsx +297 -0
  77. package/templates/default/apps/admin/src/app/dashboard/users/_components/users-columns.tsx +121 -0
  78. package/templates/default/apps/admin/src/app/dashboard/users/_components/users-delete-dialog.tsx +72 -0
  79. package/templates/default/apps/admin/src/app/dashboard/users/_components/users-dialogs.tsx +49 -0
  80. package/templates/default/apps/admin/src/app/dashboard/users/_components/users-invite-dialog.tsx +139 -0
  81. package/templates/default/apps/admin/src/app/dashboard/users/_components/users-multi-delete-dialog.tsx +89 -0
  82. package/templates/default/apps/admin/src/app/dashboard/users/_components/users-page.tsx +30 -0
  83. package/templates/default/apps/admin/src/app/dashboard/users/_components/users-primary-buttons.tsx +19 -0
  84. package/templates/default/apps/admin/src/app/dashboard/users/_components/users-provider.tsx +35 -0
  85. package/templates/default/apps/admin/src/app/dashboard/users/_components/users-table.tsx +157 -0
  86. package/templates/default/apps/admin/src/app/dashboard/users/page.tsx +10 -0
  87. package/templates/default/apps/admin/src/app/globals.css +109 -0
  88. package/templates/default/apps/admin/src/app/layout.tsx +32 -0
  89. package/templates/default/apps/admin/src/app/not-found.tsx +14 -0
  90. package/templates/default/apps/admin/src/app/page.tsx +5 -0
  91. package/templates/default/apps/admin/src/components/layout/admin-layout.tsx +16 -0
  92. package/templates/default/apps/admin/src/components/layout/app-sidebar.tsx +52 -0
  93. package/templates/default/apps/admin/src/components/layout/nav-config.ts +131 -0
  94. package/templates/default/apps/admin/src/components/providers/theme-provider.tsx +10 -0
  95. package/templates/default/apps/admin/src/components/shared/long-text.tsx +78 -0
  96. package/templates/default/apps/admin/src/components/shared/search-input.tsx +16 -0
  97. package/templates/default/apps/admin/src/components/shared/select-dropdown.tsx +64 -0
  98. package/templates/default/apps/admin/src/data/apps.tsx +116 -0
  99. package/templates/default/apps/admin/src/data/chats.ts +114 -0
  100. package/templates/default/apps/admin/src/data/tasks.ts +114 -0
  101. package/templates/default/apps/admin/src/data/users.ts +90 -0
  102. package/templates/default/apps/admin/src/hooks/use-dialog-state.ts +17 -0
  103. package/templates/default/apps/admin/src/hooks/use-table-url-state.ts +243 -0
  104. package/templates/default/apps/admin/src/lib/show-submitted-data.tsx +12 -0
  105. package/templates/default/apps/admin/src/types/table.d.ts +9 -0
  106. package/templates/default/apps/admin/tsconfig.json +32 -0
  107. package/templates/default/apps/web/next.config.ts +1 -0
  108. package/templates/default/apps/web/package.json +1 -22
  109. package/templates/default/apps/web/postcss.config.cjs +0 -1
  110. package/templates/default/apps/web/src/app/(authenticated)/dashboard/page.tsx +4 -20
  111. package/templates/default/apps/web/src/app/(authenticated)/data/_components/UserTable.tsx +4 -4
  112. package/templates/default/apps/web/src/app/(authenticated)/data/page.tsx +1 -1
  113. package/templates/default/apps/web/src/app/(authenticated)/profile/page.tsx +1 -1
  114. package/templates/default/apps/web/src/app/error.tsx +8 -70
  115. package/templates/default/apps/web/src/app/global-error.tsx +8 -70
  116. package/templates/default/apps/web/src/app/globals.css +20 -0
  117. package/templates/default/apps/web/src/app/not-found.tsx +5 -39
  118. package/templates/default/apps/web/src/app/page.tsx +27 -203
  119. package/templates/default/apps/web/src/app/signin/page.tsx +27 -191
  120. package/templates/default/apps/web/src/app/signup/page.tsx +33 -240
  121. package/templates/default/apps/web/src/components/dashboard/dashboard-stats.tsx +11 -75
  122. package/templates/default/apps/web/src/components/shared/Sidebar.tsx +3 -3
  123. package/templates/default/apps/web/src/components/shared/header.tsx +17 -112
  124. package/templates/default/apps/web/tsconfig.json +0 -6
  125. package/templates/default/biome.json +30 -2
  126. package/templates/default/components.json +2 -2
  127. package/templates/default/docker-compose.yml +1 -1
  128. package/templates/default/gitignore +4 -0
  129. package/templates/default/package.json +2 -0
  130. package/templates/default/packages/admin-ui/catalog/catalog.css +54 -0
  131. package/templates/default/packages/admin-ui/catalog/catalog.tsx +401 -0
  132. package/templates/default/packages/admin-ui/catalog/index.html +12 -0
  133. package/templates/default/packages/admin-ui/catalog/main.tsx +9 -0
  134. package/templates/default/packages/admin-ui/components.json +21 -0
  135. package/templates/default/packages/admin-ui/package.json +105 -0
  136. package/templates/default/packages/admin-ui/src/command-menu/index.tsx +174 -0
  137. package/templates/default/packages/admin-ui/src/data-table/bulk-actions.tsx +215 -0
  138. package/templates/default/packages/admin-ui/src/data-table/column-header.tsx +73 -0
  139. package/templates/default/packages/admin-ui/src/data-table/data-table.tsx +127 -0
  140. package/templates/default/packages/admin-ui/src/data-table/faceted-filter.tsx +148 -0
  141. package/templates/default/packages/admin-ui/src/data-table/index.tsx +9 -0
  142. package/templates/default/packages/admin-ui/src/data-table/pagination.tsx +101 -0
  143. package/templates/default/packages/admin-ui/src/data-table/toolbar.tsx +87 -0
  144. package/templates/default/packages/admin-ui/src/data-table/view-options.tsx +57 -0
  145. package/templates/default/packages/admin-ui/src/hooks/use-mobile.tsx +23 -0
  146. package/templates/default/packages/admin-ui/src/layout/header.tsx +55 -0
  147. package/templates/default/packages/admin-ui/src/layout/index.ts +10 -0
  148. package/templates/default/packages/admin-ui/src/layout/main.tsx +23 -0
  149. package/templates/default/packages/admin-ui/src/layout/nav-group.tsx +111 -0
  150. package/templates/default/packages/admin-ui/src/layout/nav-user.tsx +114 -0
  151. package/templates/default/packages/admin-ui/src/layout/theme-switch.tsx +40 -0
  152. package/templates/default/packages/admin-ui/src/layout/types.ts +21 -0
  153. package/templates/default/packages/admin-ui/src/lib/utils.ts +6 -0
  154. package/templates/default/packages/admin-ui/src/styles/base.css +65 -0
  155. package/templates/default/packages/admin-ui/src/styles/tokens.css +91 -0
  156. package/templates/default/packages/admin-ui/src/tanstack-table.d.ts +10 -0
  157. package/templates/default/packages/admin-ui/src/ui/alert-dialog.tsx +157 -0
  158. package/templates/default/packages/admin-ui/src/ui/alert.tsx +66 -0
  159. package/templates/default/packages/admin-ui/src/ui/avatar.tsx +53 -0
  160. package/templates/default/packages/admin-ui/src/ui/badge.tsx +46 -0
  161. package/templates/default/packages/admin-ui/src/ui/breadcrumb.tsx +108 -0
  162. package/templates/default/packages/admin-ui/src/ui/button.tsx +59 -0
  163. package/templates/default/packages/admin-ui/src/ui/calendar.tsx +69 -0
  164. package/templates/default/packages/admin-ui/src/ui/card.tsx +92 -0
  165. package/templates/default/packages/admin-ui/src/ui/chart.tsx +345 -0
  166. package/templates/default/packages/admin-ui/src/ui/checkbox.tsx +32 -0
  167. package/templates/default/packages/admin-ui/src/ui/collapsible.tsx +27 -0
  168. package/templates/default/packages/admin-ui/src/ui/command.tsx +161 -0
  169. package/templates/default/packages/admin-ui/src/ui/confirm-dialog.tsx +72 -0
  170. package/templates/default/packages/admin-ui/src/ui/date-picker.tsx +53 -0
  171. package/templates/default/packages/admin-ui/src/ui/dialog.tsx +143 -0
  172. package/templates/default/packages/admin-ui/src/ui/dropdown-menu.tsx +257 -0
  173. package/templates/default/packages/admin-ui/src/ui/form.tsx +168 -0
  174. package/templates/default/packages/admin-ui/src/ui/input-otp.tsx +84 -0
  175. package/templates/default/packages/admin-ui/src/ui/input.tsx +21 -0
  176. package/templates/default/packages/admin-ui/src/ui/label.tsx +24 -0
  177. package/templates/default/packages/admin-ui/src/ui/pagination.tsx +126 -0
  178. package/templates/default/packages/admin-ui/src/ui/password-input.tsx +46 -0
  179. package/templates/default/packages/admin-ui/src/ui/popover.tsx +48 -0
  180. package/templates/default/packages/admin-ui/src/ui/progress.tsx +31 -0
  181. package/templates/default/packages/admin-ui/src/ui/radio-group.tsx +45 -0
  182. package/templates/default/packages/admin-ui/src/ui/scroll-area.tsx +52 -0
  183. package/templates/default/packages/admin-ui/src/ui/select.tsx +185 -0
  184. package/templates/default/packages/admin-ui/src/ui/separator.tsx +28 -0
  185. package/templates/default/packages/admin-ui/src/ui/sheet.tsx +149 -0
  186. package/templates/default/packages/admin-ui/src/ui/sidebar.tsx +728 -0
  187. package/templates/default/packages/admin-ui/src/ui/skeleton.tsx +13 -0
  188. package/templates/default/packages/admin-ui/src/ui/sonner.tsx +25 -0
  189. package/templates/default/packages/admin-ui/src/ui/switch.tsx +31 -0
  190. package/templates/default/packages/admin-ui/src/ui/table.tsx +116 -0
  191. package/templates/default/packages/admin-ui/src/ui/tabs.tsx +66 -0
  192. package/templates/default/packages/admin-ui/src/ui/textarea.tsx +18 -0
  193. package/templates/default/packages/admin-ui/src/ui/toggle-group.tsx +60 -0
  194. package/templates/default/packages/admin-ui/src/ui/toggle.tsx +44 -0
  195. package/templates/default/packages/admin-ui/src/ui/tooltip.tsx +61 -0
  196. package/templates/default/packages/admin-ui/tsconfig.json +8 -0
  197. package/templates/default/packages/admin-ui/vite.config.ts +11 -0
  198. package/templates/default/packages/config/package.json +0 -2
  199. package/templates/default/packages/server-core/package.json +2 -0
  200. package/templates/default/packages/ui/components.json +21 -0
  201. package/templates/default/packages/ui/package.json +42 -5
  202. package/templates/default/packages/ui/src/accordion.tsx +1 -1
  203. package/templates/default/packages/ui/src/alert-dialog.tsx +4 -4
  204. package/templates/default/packages/ui/src/alert.tsx +1 -1
  205. package/templates/default/packages/ui/src/avatar.tsx +1 -1
  206. package/templates/default/packages/ui/src/badge.tsx +1 -1
  207. package/templates/default/packages/ui/src/breadcrumb.tsx +1 -1
  208. package/templates/default/packages/ui/src/button.tsx +1 -1
  209. package/templates/default/packages/ui/src/card.tsx +1 -1
  210. package/templates/default/packages/ui/src/checkbox.tsx +1 -1
  211. package/templates/default/packages/ui/src/dialog.tsx +3 -3
  212. package/templates/default/packages/ui/src/drawer.tsx +3 -3
  213. package/templates/default/packages/ui/src/dropdown-menu.tsx +3 -3
  214. package/templates/default/packages/ui/src/form.tsx +2 -2
  215. package/templates/default/packages/ui/src/hover-card.tsx +2 -2
  216. package/templates/default/packages/ui/src/input.tsx +1 -1
  217. package/templates/default/packages/ui/src/label.tsx +1 -1
  218. package/templates/default/packages/ui/src/pagination.tsx +2 -2
  219. package/templates/default/packages/ui/src/popover.tsx +2 -2
  220. package/templates/default/packages/ui/src/progress.tsx +1 -1
  221. package/templates/default/packages/ui/src/select.tsx +2 -2
  222. package/templates/default/packages/ui/src/separator.tsx +1 -1
  223. package/templates/default/packages/ui/src/skeleton.tsx +1 -1
  224. package/templates/default/packages/ui/src/table.tsx +1 -1
  225. package/templates/default/packages/ui/src/tabs.tsx +1 -1
  226. package/templates/default/packages/ui/src/textarea.tsx +1 -1
  227. package/templates/default/packages/ui/src/tooltip.tsx +3 -3
  228. package/templates/default/packages/ui/src/typography.tsx +1 -1
  229. package/templates/default/packages/ui/tsconfig.json +1 -6
  230. package/templates/default/pnpm-lock.yaml +1319 -936
  231. package/templates/default/postcss.config.cjs +0 -1
  232. package/templates/default/turbo.json +17 -8
  233. package/templates/default/worktree.config.json +5 -0
  234. package/templates/default/.env.ci +0 -32
  235. package/templates/default/.github/workflows/ci.yml +0 -99
  236. package/templates/default/.github/workflows/preview-db.yml +0 -134
  237. package/templates/default/.playwright-mcp/dashboard.png +0 -0
  238. package/templates/default/.playwright-mcp/web-home.png +0 -0
  239. package/templates/default/apps/web/panda.config.ts +0 -114
  240. package/templates/default/apps/web/src/components/ui/accordion.tsx +0 -64
  241. package/templates/default/apps/web/src/components/ui/alert-dialog.tsx +0 -135
  242. package/templates/default/apps/web/src/components/ui/alert.tsx +0 -60
  243. package/templates/default/apps/web/src/components/ui/aspect-ratio.tsx +0 -9
  244. package/templates/default/apps/web/src/components/ui/avatar.tsx +0 -41
  245. package/templates/default/apps/web/src/components/ui/badge.tsx +0 -39
  246. package/templates/default/apps/web/src/components/ui/breadcrumb.tsx +0 -101
  247. package/templates/default/apps/web/src/components/ui/button.tsx +0 -56
  248. package/templates/default/apps/web/src/components/ui/card.tsx +0 -75
  249. package/templates/default/apps/web/src/components/ui/checkbox.tsx +0 -29
  250. package/templates/default/apps/web/src/components/ui/data-table.tsx +0 -189
  251. package/templates/default/apps/web/src/components/ui/dialog-hook.tsx +0 -210
  252. package/templates/default/apps/web/src/components/ui/dialog.tsx +0 -129
  253. package/templates/default/apps/web/src/components/ui/drawer.tsx +0 -124
  254. package/templates/default/apps/web/src/components/ui/dropdown-menu.tsx +0 -228
  255. package/templates/default/apps/web/src/components/ui/form.tsx +0 -152
  256. package/templates/default/apps/web/src/components/ui/hover-card.tsx +0 -38
  257. package/templates/default/apps/web/src/components/ui/input.tsx +0 -21
  258. package/templates/default/apps/web/src/components/ui/label.tsx +0 -21
  259. package/templates/default/apps/web/src/components/ui/pagination.tsx +0 -105
  260. package/templates/default/apps/web/src/components/ui/popover.tsx +0 -42
  261. package/templates/default/apps/web/src/components/ui/progress.tsx +0 -28
  262. package/templates/default/apps/web/src/components/ui/select.tsx +0 -170
  263. package/templates/default/apps/web/src/components/ui/separator.tsx +0 -28
  264. package/templates/default/apps/web/src/components/ui/skeleton.tsx +0 -13
  265. package/templates/default/apps/web/src/components/ui/sonner.tsx +0 -25
  266. package/templates/default/apps/web/src/components/ui/table.tsx +0 -92
  267. package/templates/default/apps/web/src/components/ui/tabs.tsx +0 -54
  268. package/templates/default/apps/web/src/components/ui/textarea.tsx +0 -18
  269. package/templates/default/apps/web/src/components/ui/tooltip.tsx +0 -57
  270. package/templates/default/apps/web/src/components/ui/typography.tsx +0 -158
  271. package/templates/default/packages/config/panda.config.ts +0 -114
  272. package/templates/default/panda.config.ts +0 -114
@@ -0,0 +1,95 @@
1
+ name: Release create-einja-app
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'create-einja-app-v*'
7
+ workflow_dispatch:
8
+ inputs:
9
+ dry_run:
10
+ description: 'Dry run (skip actual publish)'
11
+ required: false
12
+ default: 'false'
13
+ type: boolean
14
+
15
+ jobs:
16
+ release:
17
+ runs-on: ubuntu-latest
18
+ permissions:
19
+ contents: read
20
+ id-token: write # npm provenance用
21
+ steps:
22
+ # actions/checkout@v4.2.2
23
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
24
+
25
+ # pnpm/action-setup@v4.1.0
26
+ - uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda
27
+ with:
28
+ version: 10.14.0
29
+
30
+ # actions/setup-node@v4.4.0
31
+ - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
32
+ with:
33
+ node-version: '22.16.0'
34
+ cache: 'pnpm'
35
+ registry-url: 'https://registry.npmjs.org'
36
+
37
+ - name: Install dependencies
38
+ run: pnpm install --frozen-lockfile
39
+
40
+ - name: Build package
41
+ run: pnpm -F create-einja-app build
42
+
43
+ - name: Run tests
44
+ run: pnpm -F create-einja-app test
45
+
46
+ - name: Type check
47
+ run: pnpm -F create-einja-app typecheck
48
+
49
+ - name: Lint
50
+ run: pnpm -F create-einja-app lint
51
+
52
+ - name: Get version info
53
+ id: version
54
+ run: |
55
+ PKG_VERSION=$(node -p "require('./packages/create-einja-app/package.json').version")
56
+ echo "pkg_version=$PKG_VERSION" >> $GITHUB_OUTPUT
57
+ if [[ "${{ github.ref_type }}" == "tag" ]]; then
58
+ TAG_VERSION="${{ github.ref_name }}"
59
+ TAG_VERSION="${TAG_VERSION#create-einja-app-v}"
60
+ echo "tag_version=$TAG_VERSION" >> $GITHUB_OUTPUT
61
+ echo "source=tag" >> $GITHUB_OUTPUT
62
+ else
63
+ echo "source=manual" >> $GITHUB_OUTPUT
64
+ fi
65
+
66
+ - name: Verify version (tag trigger)
67
+ if: ${{ steps.version.outputs.source == 'tag' }}
68
+ run: |
69
+ if [[ "${{ steps.version.outputs.pkg_version }}" != "${{ steps.version.outputs.tag_version }}" ]]; then
70
+ echo "::error::Version mismatch: package.json=${{ steps.version.outputs.pkg_version }}, tag=${{ steps.version.outputs.tag_version }}"
71
+ exit 1
72
+ fi
73
+ echo "✅ Version verified: ${{ steps.version.outputs.pkg_version }}"
74
+
75
+ - name: Show release info
76
+ run: |
77
+ echo "📦 Package: create-einja-app"
78
+ echo "📌 Version: ${{ steps.version.outputs.pkg_version }}"
79
+ echo "🎯 Trigger: ${{ steps.version.outputs.source }}"
80
+ echo "🧪 Dry run: ${{ github.event.inputs.dry_run || 'false' }}"
81
+
82
+ - name: Verify package contents
83
+ run: |
84
+ cd packages/create-einja-app
85
+ npm pack --dry-run
86
+
87
+ - name: Publish to npm (dry-run)
88
+ if: ${{ github.event.inputs.dry_run == 'true' }}
89
+ run: pnpm -F create-einja-app publish --no-git-checks --access public --provenance --dry-run
90
+
91
+ - name: Publish to npm
92
+ if: ${{ github.event.inputs.dry_run != 'true' }}
93
+ run: pnpm -F create-einja-app publish --no-git-checks --access public --provenance
94
+ env:
95
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -19,16 +19,17 @@
19
19
  "args": ["-y", "@playwright/mcp", "--isolated"]
20
20
  },
21
21
  "serena": {
22
+ "type": "stdio",
22
23
  "command": "uvx",
23
24
  "args": [
24
25
  "--from",
25
26
  "git+https://github.com/oraios/serena",
26
- "serena-mcp-server",
27
+ "serena",
28
+ "start-mcp-server",
27
29
  "--context",
28
- "ide-assistant",
29
- ".",
30
- "--enable-web-dashboard=false"
31
- ]
30
+ "claude-code",
31
+ "--open-web-dashboard",
32
+ "false"]
32
33
  },
33
34
  "github": {
34
35
  "type": "http",
@@ -36,10 +37,6 @@
36
37
  "headers": {
37
38
  "Authorization": "Bearer ${GITHUB_TOKEN}"
38
39
  }
39
- },
40
- "asana": {
41
- "command": "npx",
42
- "args": ["mcp-remote", "https://mcp.asana.com/sse"]
43
40
  }
44
41
  }
45
42
  }
@@ -79,6 +79,27 @@ excluded_tools: []
79
79
  # initial prompt for the project. It will always be given to the LLM upon activating the project
80
80
  # (contrary to the memories, which are loaded on demand).
81
81
  initial_prompt: ""
82
-
82
+ # the name by which the project can be referenced within Serena
83
83
  project_name: "einja-management-template"
84
+
85
+ # list of tools to include that would otherwise be disabled (particularly optional tools that are disabled by default)
84
86
  included_optional_tools: []
87
+
88
+ # list of mode names to that are always to be included in the set of active modes
89
+ # The full set of modes to be activated is base_modes + default_modes.
90
+ # If the setting is undefined, the base_modes from the global configuration (serena_config.yml) apply.
91
+ # Otherwise, this setting overrides the global configuration.
92
+ # Set this to [] to disable base modes for this project.
93
+ # Set this to a list of mode names to always include the respective modes for this project.
94
+ base_modes:
95
+
96
+ # list of mode names that are to be activated by default.
97
+ # The full set of modes to be activated is base_modes + default_modes.
98
+ # If the setting is undefined, the default_modes from the global configuration (serena_config.yml) apply.
99
+ # Otherwise, this overrides the setting from the global configuration (serena_config.yml).
100
+ # This setting can, in turn, be overridden by CLI parameters (--mode).
101
+ default_modes:
102
+
103
+ # fixed set of tools to use as the base tool set (if non-empty), replacing Serena's default set of tools.
104
+ # This cannot be combined with non-empty excluded_tools or included_optional_tools.
105
+ fixed_tools: []
@@ -18,11 +18,17 @@
18
18
 
19
19
  | 作業 | 委託先 |
20
20
  |------|--------|
21
- | コミット・プッシュ | `task-committer` |
22
21
  | コンフリクト解消 | `conflict-resolver` |
23
22
  | コード実装 | `task-executer` |
24
23
  | 品質検証(QA) | `task-qa` |
25
24
  | 実装レビュー | `task-reviewer` |
25
+ | Codex作業(レビュー・実装支援等) | `codex-agent` |
26
+
27
+ #### Skill(直接呼び出し)
28
+
29
+ | 作業 | 使用するSkill |
30
+ |------|--------------|
31
+ | コミット・プッシュ | `einja-task-commit` Skill |
26
32
 
27
33
  #### ビルトインサブエージェント(探索・計画用)
28
34
 
@@ -51,7 +57,7 @@
51
57
 
52
58
  ## コード変更時の動作方針
53
59
 
54
- **【厳守事項】コード変更の指示があった場合、絶対に即座に実装を開始してはならない。**
60
+ **【厳守事項】コード変更の指示があった場合、絶対に即座に実装を開始してはならない。(サブエージェントとしての動作時は除く)**
55
61
 
56
62
  ### 必須フロー
57
63
  1. 問題・要件を調査・分析する
@@ -88,7 +94,7 @@ einja-management-template/
88
94
  │ ├── package.json
89
95
  │ └── tsconfig.json
90
96
  ├── packages/
91
- │ ├── config/ # 共通設定(Biome, TypeScript, Panda CSS
97
+ │ ├── config/ # 共通設定(Biome, TypeScript)
92
98
  │ ├── front-core/ # フロントエンド共通層
93
99
  │ │ └── src/
94
100
  │ │ ├── auth/ # NextAuth共通設定・型定義
@@ -206,16 +212,16 @@ pnpm env:prepare
206
212
  - ワークスペース間の依存関係管理
207
213
 
208
214
  ### パッケージ構成:
209
- - `@repo/config` - 共通設定(Biome, TypeScript, Panda CSS
215
+ - `@repo/config` - 共通設定(Biome, TypeScript)
210
216
  - `@repo/front-core` - フロントエンド共通層(認証共通設定、hooks、utils、context)
211
217
  - `@repo/server-core` - バックエンド共通層(Prismaクライアント・スキーマ、ドメインロジック)
212
218
  - `@repo/ui` - 共通UIコンポーネント(shadcn/ui)
213
219
  - `@repo/web` - メイン管理画面アプリケーション
214
220
 
215
221
  ### スタイリングシステム:
216
- - **Panda CSS** でデザイントークンとレシピを使用したスタイリング
217
- - タイプセーフなスタイル生成によるCSS-in-JS
218
- - スタイルコンポーネントは `apps/web/src/styled-system/` ディレクトリに出力
222
+ - **Tailwind CSS v4** + shadcn/ui によるユーティリティファーストのスタイリング
223
+ - `globals.css` でCSS変数によるデザイントークンを定義
224
+ - shadcn/ui `cva` によるコンポーネントバリアント管理
219
225
  - カスタムブレークポイント: sm(640px), md(768px), lg(1024px), xl(1280px), 2xl(1440px)
220
226
 
221
227
  ### コード品質:
@@ -231,7 +237,6 @@ pnpm env:prepare
231
237
  - Voltaまたはfnmを使用したNode.jsバージョン管理 (v22.16.0)
232
238
 
233
239
  ### 特記事項:
234
- - プロダクションビルド前に必ず`panda codegen`を実行
235
240
  - Biomeはスペース2つインデントとダブルクォートを使用
236
241
  - ビルド時はESLintを無効化(代わりにBiomeを使用)
237
242
  - Turborepoのキャッシュ機能で高速ビルド
@@ -286,10 +291,17 @@ export const { handlers, signIn, signOut, auth } = NextAuth(authOptions);
286
291
 
287
292
  ## AskUserQuestion ツールの使用
288
293
 
289
- 選択肢を提示してユーザーに質問する場合は、**必ず AskUserQuestion ツール**を使用してください。
294
+ **不明点や曖昧な点がある場合は、推測で進めずに必ず AskUserQuestion ツールで確認してください。**
295
+
296
+ ### 基本姿勢
297
+ - 要件が不明確な場合は**積極的に質問する**
298
+ - 推測や仮定で実装を進めない
299
+ - 確認することで手戻りを防ぐ
290
300
 
291
301
  ### 使用必須シーン
292
- - 複数の実装方法・設計アプローチがある場合
302
+ - **要件・仕様が不明確な場合**
303
+ - **複数の実装方法・設計アプローチがある場合**
304
+ - **技術的な判断が必要な場合**(ライブラリ選定、アーキテクチャ決定など)
293
305
  - 重要な判断(コミット分割、リファクタリング方針など)
294
306
  - 破壊的な操作の前
295
307
 
@@ -298,6 +310,9 @@ export const { handlers, signIn, signOut, auth } = NextAuth(authOptions);
298
310
  - 番号付きリスト: 詳細説明が必要な場合
299
311
  - 推奨オプションには `(推奨)` と理由を付記
300
312
 
313
+ ### サブエージェントでの使用
314
+ サブエージェント(task-executer等)も同様に、不明点がある場合は AskUserQuestion を使用して確認すること。
315
+
301
316
  ## サブエージェント結果報告のルール
302
317
 
303
318
  サブエージェントの出力形式は **@.claude/skills/einja-output-format/SKILL.md** に定義されています。
@@ -398,6 +413,32 @@ export const { handlers, signIn, signOut, auth } = NextAuth(authOptions);
398
413
  [後続処理の説明]
399
414
  ```
400
415
 
416
+ #### codex-agent 呼び出し時
417
+
418
+ プロンプト末尾に以下を追加:
419
+
420
+ ```
421
+ ---
422
+ **【必須】以下の形式で報告してください。この形式以外は不可:**
423
+
424
+ ## 🤖 Codex作業完了
425
+
426
+ ### タスク: [作業内容]
427
+
428
+ ### 作業結果: [✅ SUCCESS / ⚠️ PARTIAL / ❌ FAILURE]
429
+
430
+ ### 作業モード: [レビュー / 実装 / バグ修正 / リファクタリング / 調査]
431
+
432
+ ### サマリー
433
+ [主要な結果・数値]
434
+
435
+ ### 詳細
436
+ [Codexからの出力・分析結果]
437
+
438
+ ### 次のステップ
439
+ [後続処理の説明]
440
+ ```
441
+
401
442
  ## 追加指示
402
443
 
403
444
  以下のドキュメントも参照して作業を進めてください:
@@ -409,6 +450,7 @@ export const { handlers, signIn, signOut, auth } = NextAuth(authOptions);
409
450
  - @docs/einja/steering/development/review-guidelines.md - コードレビューのガイドライン
410
451
  - @docs/einja/memory/decisions.md - 過去の意思決定記録(セッション跨ぎで継承)
411
452
  - @docs/einja/memory/patterns.md - 再利用可能なパターン(セッション跨ぎで継承)
453
+ - @.claude/skills/einja-playwright-mcp/SKILL.md - Playwright MCP動作確認ガイドライン
412
454
 
413
455
  <!-- @einja:excluded:start -->
414
456
  ## このリポジトリ限定の設定
@@ -26,7 +26,7 @@ einja-management-template/
26
26
  ├── packages/
27
27
  │ ├── cli/ # @einja/dev-cli
28
28
  │ ├── create-einja-app/ # create-einja-app
29
- │ ├── config/ # 共通設定(Biome, TypeScript, Panda CSS
29
+ │ ├── config/ # 共通設定(Biome, TypeScript)
30
30
  │ ├── front-core/ # フロントエンド共通層
31
31
  │ │ └── src/
32
32
  │ │ ├── auth/ # NextAuth共通設定・型定義
@@ -50,7 +50,7 @@ einja-management-template/
50
50
  - **モノレポ**: Turborepo + pnpm workspaces
51
51
  - **フレームワーク**: Next.js 15 (App Router)
52
52
  - **言語**: TypeScript (strict mode)
53
- - **スタイリング**: Panda CSS
53
+ - **スタイリング**: Tailwind CSS v4
54
54
  - **UI**: shadcn/ui + Radix UI
55
55
  - **データベース**: PostgreSQL + Prisma
56
56
  - **認証**: NextAuth.js v5
@@ -171,7 +171,6 @@ pnpm db:studio # Prisma Studio起動
171
171
  # 特定のワークスペースでコマンド実行
172
172
  pnpm --filter @repo/web dev
173
173
  pnpm --filter @repo/web build
174
- pnpm --filter @repo/web panda codegen
175
174
  ```
176
175
 
177
176
  ### データベース設定
@@ -218,7 +217,7 @@ pnpm db:studio
218
217
 
219
218
  - **@einja/dev-cli**: Claude Code設定配布CLI([詳細](./packages/cli/README.md))
220
219
  - **create-einja-app**: プロジェクト作成CLI([詳細](./packages/create-einja-app/README.md))
221
- - **@repo/config**: Biome, TypeScript, Panda CSSの共通設定
220
+ - **@repo/config**: Biome, TypeScriptの共通設定
222
221
  - **@repo/front-core**: フロントエンド共通層(認証共通設定、hooks、utils、context)
223
222
  - **@repo/server-core**: バックエンド共通層(Prismaクライアント・スキーマ、ドメインロジック)
224
223
  - **@repo/ui**: 共通UIコンポーネント(shadcn/ui)
@@ -229,9 +228,8 @@ pnpm db:studio
229
228
  2. コードを変更
230
229
  3. ホットリロードで即座に反映
231
230
  4. データベーススキーマを変更した場合は `pnpm db:push`
232
- 5. Panda CSSのスタイル変更時は自動生成される
233
- 6. コミット前に自動的にlint-stagedが実行される
234
- 7. プルリクエストを作成
231
+ 5. コミット前に自動的にlint-stagedが実行される
232
+ 6. プルリクエストを作成
235
233
 
236
234
  ### トラブルシューティング
237
235
 
@@ -258,13 +256,6 @@ pnpmがインストールされていません:
258
256
  volta install pnpm@10.14.0
259
257
  ```
260
258
 
261
- #### Panda CSS関連エラー
262
-
263
- ```bash
264
- # styled-systemを再生成
265
- pnpm --filter @repo/web panda codegen
266
- ```
267
-
268
259
  #### Prisma関連エラー
269
260
 
270
261
  ```bash
@@ -0,0 +1,11 @@
1
+ import type { NextConfig } from "next";
2
+
3
+ const nextConfig: NextConfig = {
4
+ eslint: {
5
+ ignoreDuringBuilds: true,
6
+ },
7
+ output: "standalone",
8
+ transpilePackages: ["@repo/admin-ui"],
9
+ };
10
+
11
+ export default nextConfig;
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "@repo/admin",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "scripts": {
6
+ "dev": "rm -rf .next && next dev --turbopack --port ${PORT_ADMIN:-4000}",
7
+ "build": "next build",
8
+ "start": "next start",
9
+ "lint": "biome check .",
10
+ "lint:fix": "biome check --write",
11
+ "format": "biome format .",
12
+ "format:fix": "biome format --write .",
13
+ "typecheck": "tsc --noEmit",
14
+ "test": "vitest run --passWithNoTests",
15
+ "test:watch": "vitest",
16
+ "test:ui": "vitest --ui",
17
+ "test:coverage": "vitest run --coverage"
18
+ },
19
+ "dependencies": {
20
+ "@hookform/resolvers": "^5.1.1",
21
+ "@radix-ui/react-icons": "^1.3.2",
22
+ "@repo/admin-ui": "workspace:*",
23
+ "@repo/front-core": "workspace:*",
24
+ "@repo/server-core": "workspace:*",
25
+ "@tailwindcss/postcss": "^4.1.10",
26
+ "@tanstack/react-query": "^5.81.5",
27
+ "@tanstack/react-table": "^8.21.3",
28
+ "clsx": "^2.1.1",
29
+ "date-fns": "^4.1.0",
30
+ "lucide-react": "^0.523.0",
31
+ "next": "15.3.3",
32
+ "next-auth": "^5.0.0-beta.28",
33
+ "next-themes": "^0.4.6",
34
+ "postcss": "^8.5.6",
35
+ "react": "^19.0.0",
36
+ "react-dom": "^19.0.0",
37
+ "react-hook-form": "^7.59.0",
38
+ "recharts": "^2.15.4",
39
+ "sonner": "^2.0.7",
40
+ "tailwind-merge": "^3.3.1",
41
+ "tailwindcss": "^4.1.10",
42
+ "zod": "^3.25.67"
43
+ },
44
+ "devDependencies": {
45
+ "@biomejs/biome": "1.9.4",
46
+ "@faker-js/faker": "^9.0.0",
47
+ "@repo/config": "workspace:*",
48
+ "@types/node": "^22",
49
+ "@types/react": "^19",
50
+ "@types/react-dom": "^19",
51
+ "tw-animate-css": "^1.3.4",
52
+ "typescript": "^5",
53
+ "vitest": "^3.2.2"
54
+ }
55
+ }
@@ -0,0 +1,5 @@
1
+ module.exports = {
2
+ plugins: {
3
+ "@tailwindcss/postcss": {},
4
+ },
5
+ };
@@ -0,0 +1,97 @@
1
+ "use client";
2
+
3
+ import { zodResolver } from "@hookform/resolvers/zod";
4
+ import { cn } from "{{packageName}}/admin-ui/lib/utils";
5
+ import { Button } from "{{packageName}}/admin-ui/ui/button";
6
+ import {
7
+ Card,
8
+ CardContent,
9
+ CardDescription,
10
+ CardFooter,
11
+ CardHeader,
12
+ CardTitle,
13
+ } from "{{packageName}}/admin-ui/ui/card";
14
+ import {
15
+ Form,
16
+ FormControl,
17
+ FormField,
18
+ FormItem,
19
+ FormLabel,
20
+ FormMessage,
21
+ } from "{{packageName}}/admin-ui/ui/form";
22
+ import { Input } from "{{packageName}}/admin-ui/ui/input";
23
+ import { ArrowRight, Loader2 } from "lucide-react";
24
+ import Link from "next/link";
25
+ import { useRouter } from "next/navigation";
26
+ import { useState } from "react";
27
+ import { useForm } from "react-hook-form";
28
+ import { z } from "zod";
29
+
30
+ const formSchema = z.object({
31
+ email: z.string().email("Invalid email address").min(1, "Please enter your email"),
32
+ });
33
+
34
+ export default function ForgotPasswordPage() {
35
+ const router = useRouter();
36
+ const [isLoading, setIsLoading] = useState(false);
37
+
38
+ const form = useForm<z.infer<typeof formSchema>>({
39
+ resolver: zodResolver(formSchema),
40
+ defaultValues: { email: "" },
41
+ });
42
+
43
+ function onSubmit(data: z.infer<typeof formSchema>) {
44
+ setIsLoading(true);
45
+ console.log("Forgot Password Data:", data);
46
+
47
+ setTimeout(() => {
48
+ setIsLoading(false);
49
+ form.reset();
50
+ alert(`Email sent to ${data.email}`);
51
+ router.push("/otp");
52
+ }, 2000);
53
+ }
54
+
55
+ return (
56
+ <Card className="gap-4">
57
+ <CardHeader>
58
+ <CardTitle className="text-lg tracking-tight">Forgot Password</CardTitle>
59
+ <CardDescription>
60
+ Enter your registered email and <br /> we will send you a link to reset your password.
61
+ </CardDescription>
62
+ </CardHeader>
63
+ <CardContent>
64
+ <Form {...form}>
65
+ <form onSubmit={form.handleSubmit(onSubmit)} className={cn("grid gap-2")}>
66
+ <FormField
67
+ control={form.control}
68
+ name="email"
69
+ render={({ field }) => (
70
+ <FormItem>
71
+ <FormLabel>Email</FormLabel>
72
+ <FormControl>
73
+ <Input placeholder="name@example.com" {...field} />
74
+ </FormControl>
75
+ <FormMessage />
76
+ </FormItem>
77
+ )}
78
+ />
79
+ <Button className="mt-2" disabled={isLoading}>
80
+ Continue
81
+ {isLoading ? <Loader2 className="animate-spin" /> : <ArrowRight />}
82
+ </Button>
83
+ </form>
84
+ </Form>
85
+ </CardContent>
86
+ <CardFooter>
87
+ <p className="mx-auto px-8 text-center text-sm text-balance text-muted-foreground">
88
+ Don&apos;t have an account?{" "}
89
+ <Link href="/sign-up" className="underline underline-offset-4 hover:text-primary">
90
+ Sign up
91
+ </Link>
92
+ .
93
+ </p>
94
+ </CardFooter>
95
+ </Card>
96
+ );
97
+ }
@@ -0,0 +1,18 @@
1
+ import type { ReactNode } from "react";
2
+
3
+ interface AuthLayoutProps {
4
+ children: ReactNode;
5
+ }
6
+
7
+ export default function AuthLayout({ children }: AuthLayoutProps) {
8
+ return (
9
+ <div className="container grid h-svh max-w-none items-center justify-center">
10
+ <div className="mx-auto flex w-full flex-col justify-center space-y-2 py-8 sm:w-[480px] sm:p-8">
11
+ <div className="mb-4 flex items-center justify-center">
12
+ <h1 className="text-xl font-medium">Admin Portal</h1>
13
+ </div>
14
+ {children}
15
+ </div>
16
+ </div>
17
+ );
18
+ }
@@ -0,0 +1,121 @@
1
+ "use client";
2
+
3
+ import { zodResolver } from "@hookform/resolvers/zod";
4
+ import { cn } from "{{packageName}}/admin-ui/lib/utils";
5
+ import { Button } from "{{packageName}}/admin-ui/ui/button";
6
+ import {
7
+ Card,
8
+ CardContent,
9
+ CardDescription,
10
+ CardFooter,
11
+ CardHeader,
12
+ CardTitle,
13
+ } from "{{packageName}}/admin-ui/ui/card";
14
+ import {
15
+ Form,
16
+ FormControl,
17
+ FormField,
18
+ FormItem,
19
+ FormLabel,
20
+ FormMessage,
21
+ } from "{{packageName}}/admin-ui/ui/form";
22
+ import {
23
+ InputOTP,
24
+ InputOTPGroup,
25
+ InputOTPSeparator,
26
+ InputOTPSlot,
27
+ } from "{{packageName}}/admin-ui/ui/input-otp";
28
+ import Link from "next/link";
29
+ import { useRouter } from "next/navigation";
30
+ import { useState } from "react";
31
+ import { useForm } from "react-hook-form";
32
+ import { z } from "zod";
33
+
34
+ const formSchema = z.object({
35
+ otp: z.string().min(6, "Please enter the 6-digit code").max(6, "Please enter the 6-digit code"),
36
+ });
37
+
38
+ export default function OtpPage() {
39
+ const router = useRouter();
40
+ const [isLoading, setIsLoading] = useState(false);
41
+
42
+ const form = useForm<z.infer<typeof formSchema>>({
43
+ resolver: zodResolver(formSchema),
44
+ defaultValues: { otp: "" },
45
+ });
46
+
47
+ const otp = form.watch("otp");
48
+
49
+ function onSubmit(data: z.infer<typeof formSchema>) {
50
+ setIsLoading(true);
51
+ console.log("OTP Data:", data);
52
+
53
+ setTimeout(() => {
54
+ setIsLoading(false);
55
+ alert(`OTP verified: ${data.otp}`);
56
+ router.push("/");
57
+ }, 1000);
58
+ }
59
+
60
+ return (
61
+ <Card className="gap-4">
62
+ <CardHeader>
63
+ <CardTitle className="text-base tracking-tight">Two-factor Authentication</CardTitle>
64
+ <CardDescription>
65
+ Please enter the authentication code. <br /> We have sent the authentication code to your
66
+ email.
67
+ </CardDescription>
68
+ </CardHeader>
69
+ <CardContent>
70
+ <Form {...form}>
71
+ <form onSubmit={form.handleSubmit(onSubmit)} className={cn("grid gap-2")}>
72
+ <FormField
73
+ control={form.control}
74
+ name="otp"
75
+ render={({ field }) => (
76
+ <FormItem>
77
+ <FormLabel className="sr-only">One-Time Password</FormLabel>
78
+ <FormControl>
79
+ <InputOTP
80
+ maxLength={6}
81
+ {...field}
82
+ containerClassName="justify-between sm:[&>[data-slot='input-otp-group']>div]:w-12"
83
+ >
84
+ <InputOTPGroup>
85
+ <InputOTPSlot index={0} />
86
+ <InputOTPSlot index={1} />
87
+ </InputOTPGroup>
88
+ <InputOTPSeparator />
89
+ <InputOTPGroup>
90
+ <InputOTPSlot index={2} />
91
+ <InputOTPSlot index={3} />
92
+ </InputOTPGroup>
93
+ <InputOTPSeparator />
94
+ <InputOTPGroup>
95
+ <InputOTPSlot index={4} />
96
+ <InputOTPSlot index={5} />
97
+ </InputOTPGroup>
98
+ </InputOTP>
99
+ </FormControl>
100
+ <FormMessage />
101
+ </FormItem>
102
+ )}
103
+ />
104
+ <Button className="mt-2" disabled={otp.length < 6 || isLoading}>
105
+ Verify
106
+ </Button>
107
+ </form>
108
+ </Form>
109
+ </CardContent>
110
+ <CardFooter>
111
+ <p className="px-8 text-center text-sm text-muted-foreground">
112
+ Haven&apos;t received it?{" "}
113
+ <Link href="/sign-in" className="underline underline-offset-4 hover:text-primary">
114
+ Resend a new code
115
+ </Link>
116
+ .
117
+ </p>
118
+ </CardFooter>
119
+ </Card>
120
+ );
121
+ }