stackkit 0.3.5 → 0.3.6

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 (192) hide show
  1. package/README.md +50 -42
  2. package/dist/cli/add.js +122 -56
  3. package/dist/cli/create.d.ts +2 -0
  4. package/dist/cli/create.js +271 -95
  5. package/dist/cli/doctor.js +1 -0
  6. package/dist/cli/list.d.ts +1 -1
  7. package/dist/cli/list.js +6 -4
  8. package/dist/index.js +234 -191
  9. package/dist/lib/constants.d.ts +4 -0
  10. package/dist/lib/constants.js +4 -0
  11. package/dist/lib/discovery/module-discovery.d.ts +4 -0
  12. package/dist/lib/discovery/module-discovery.js +56 -0
  13. package/dist/lib/generation/code-generator.d.ts +11 -2
  14. package/dist/lib/generation/code-generator.js +42 -3
  15. package/dist/lib/generation/generator-utils.js +3 -1
  16. package/dist/lib/pm/package-manager.js +16 -13
  17. package/dist/lib/ui/logger.js +3 -2
  18. package/dist/lib/utils/path-resolver.d.ts +2 -0
  19. package/dist/lib/utils/path-resolver.js +8 -0
  20. package/dist/meta.json +8312 -0
  21. package/modules/auth/better-auth/files/{shared → express}/config/env.ts +48 -50
  22. package/modules/auth/better-auth/files/express/middlewares/authorize.ts +20 -1
  23. package/modules/auth/better-auth/files/express/modules/auth.controller.ts +349 -0
  24. package/modules/auth/better-auth/files/express/modules/{auth/auth.route.ts → auth.route.ts} +9 -4
  25. package/modules/auth/better-auth/files/express/modules/auth.service.ts +664 -0
  26. package/modules/auth/better-auth/files/express/modules/{auth/auth.type.ts → auth.type.ts} +22 -9
  27. package/modules/auth/better-auth/files/{shared/mongoose/auth/helper.ts → express/mongo-modules/auth.helper.ts} +11 -1
  28. package/modules/auth/better-auth/files/express/types/express.d.ts +11 -0
  29. package/modules/auth/better-auth/files/nextjs/api-route.ts +74 -0
  30. package/modules/auth/better-auth/files/nextjs/dashboard/pages/(user)/page.tsx +6 -0
  31. package/modules/auth/better-auth/files/nextjs/dashboard/pages/admin/page.tsx +6 -0
  32. package/modules/auth/better-auth/files/nextjs/dashboard/pages/layout.tsx +48 -0
  33. package/modules/auth/better-auth/files/nextjs/dashboard/pages/my-profile/page.tsx +5 -0
  34. package/modules/auth/better-auth/files/nextjs/features/services/auth.service.ts +102 -0
  35. package/modules/auth/better-auth/files/nextjs/layout/layout.tsx +13 -0
  36. package/modules/auth/better-auth/files/nextjs/lib/axios/http.ts +158 -0
  37. package/modules/auth/better-auth/files/nextjs/lib/env.ts +35 -0
  38. package/modules/auth/better-auth/files/nextjs/lib/utils/auth.ts +75 -0
  39. package/modules/auth/better-auth/files/nextjs/lib/utils/cookie.ts +29 -0
  40. package/modules/auth/better-auth/files/nextjs/lib/utils/jwt.ts +28 -0
  41. package/modules/auth/better-auth/files/nextjs/lib/utils/token.ts +49 -0
  42. package/modules/auth/better-auth/files/nextjs/pages/forgot-password/page.tsx +5 -0
  43. package/modules/auth/better-auth/files/nextjs/pages/layout.tsx +11 -0
  44. package/modules/auth/better-auth/files/nextjs/pages/login/page.tsx +9 -0
  45. package/modules/auth/better-auth/files/nextjs/pages/register/page.tsx +5 -0
  46. package/modules/auth/better-auth/files/nextjs/pages/reset-password/page.tsx +10 -0
  47. package/modules/auth/better-auth/files/nextjs/pages/verify-email/page.tsx +10 -0
  48. package/modules/auth/better-auth/files/nextjs/proxy.ts +154 -42
  49. package/modules/auth/better-auth/files/nextjs/theme/providers/theme-provider.tsx +11 -0
  50. package/modules/auth/better-auth/files/nextjs/types/api.types.ts +18 -0
  51. package/modules/auth/better-auth/files/react/components/protected-route.tsx +39 -0
  52. package/modules/auth/better-auth/files/react/components/route-guards.tsx +13 -0
  53. package/modules/auth/better-auth/files/react/dashboard/admin/pages/overview.tsx +3 -0
  54. package/modules/auth/better-auth/files/react/dashboard/pages/overview.tsx +3 -0
  55. package/modules/auth/better-auth/files/react/features/pages/forgot-password.tsx +5 -0
  56. package/modules/auth/better-auth/files/react/features/pages/login.tsx +5 -0
  57. package/modules/auth/better-auth/files/react/features/pages/my-profile.tsx +5 -0
  58. package/modules/auth/better-auth/files/react/features/pages/oauth-callback.tsx +59 -0
  59. package/modules/auth/better-auth/files/react/features/pages/register.tsx +5 -0
  60. package/modules/auth/better-auth/files/react/features/pages/reset-password.tsx +10 -0
  61. package/modules/auth/better-auth/files/react/features/pages/verify-email.tsx +10 -0
  62. package/modules/auth/better-auth/files/react/layout/dashboard-layout.tsx +54 -0
  63. package/modules/auth/better-auth/files/react/lib/axios/http.ts +68 -0
  64. package/modules/auth/better-auth/files/react/lib/env.ts +25 -0
  65. package/modules/auth/better-auth/files/react/router.tsx +73 -0
  66. package/modules/auth/better-auth/files/react/theme/components/providers/theme-provider-context.ts +13 -0
  67. package/modules/auth/better-auth/files/react/theme/components/providers/theme-provider.tsx +51 -0
  68. package/modules/auth/better-auth/files/react/theme/hooks/use-theme.ts +8 -0
  69. package/modules/auth/better-auth/files/shared/features/components/change-password-dialog.tsx +113 -0
  70. package/modules/auth/better-auth/files/shared/features/components/forgot-password-form.tsx +84 -0
  71. package/modules/auth/better-auth/files/shared/features/components/login-form.tsx +134 -0
  72. package/modules/auth/better-auth/files/shared/features/components/my-profile.tsx +147 -0
  73. package/modules/auth/better-auth/files/shared/features/components/profile-form.tsx +205 -0
  74. package/modules/auth/better-auth/files/shared/features/components/register-form.tsx +100 -0
  75. package/modules/auth/better-auth/files/shared/features/components/reset-password-form.tsx +111 -0
  76. package/modules/auth/better-auth/files/shared/features/components/social-login-buttons.tsx +47 -0
  77. package/modules/auth/better-auth/files/shared/features/components/user-profile-menu.tsx +106 -0
  78. package/modules/auth/better-auth/files/shared/features/components/verify-email-form.tsx +110 -0
  79. package/modules/auth/better-auth/files/shared/features/queries/auth.mutations.tsx +312 -0
  80. package/modules/auth/better-auth/files/shared/features/queries/auth.querie.ts +19 -0
  81. package/modules/auth/better-auth/files/shared/features/services/auth.api.ts +81 -0
  82. package/modules/auth/better-auth/files/shared/features/types/auth.type.ts +47 -0
  83. package/modules/auth/better-auth/files/shared/features/validators/change-password.validator.ts +18 -0
  84. package/modules/auth/better-auth/files/shared/features/validators/forgot.validator.ts +7 -0
  85. package/modules/auth/better-auth/files/shared/features/validators/login.validator.ts +14 -0
  86. package/modules/auth/better-auth/files/shared/features/validators/profile.validator.ts +8 -0
  87. package/modules/auth/better-auth/files/shared/features/validators/register.validator.ts +9 -0
  88. package/modules/auth/better-auth/files/shared/features/validators/reset.validator.ts +9 -0
  89. package/modules/auth/better-auth/files/shared/features/validators/verify.validator.ts +8 -0
  90. package/modules/auth/better-auth/files/shared/lib/auth-client.ts +2 -1
  91. package/modules/auth/better-auth/files/shared/lib/auth.ts +5 -19
  92. package/modules/auth/better-auth/files/shared/lib/constant/dashboard.ts +90 -0
  93. package/modules/auth/better-auth/files/shared/theme/mode-toggle.tsx +30 -0
  94. package/modules/auth/better-auth/files/shared/ui/shadcn/components/dashboard/dashboard-header.tsx +94 -0
  95. package/modules/auth/better-auth/files/shared/ui/shadcn/components/dashboard/dashboard-sidebar.tsx +255 -0
  96. package/modules/auth/better-auth/files/shared/ui/shadcn/components/footer.tsx +35 -0
  97. package/modules/auth/better-auth/files/shared/ui/shadcn/components/navbar.tsx +145 -0
  98. package/modules/auth/better-auth/files/shared/ui/shadcn/form-field/input-field.tsx +440 -0
  99. package/modules/auth/better-auth/files/shared/utils/email.ts +2 -17
  100. package/modules/auth/better-auth/generator.json +172 -51
  101. package/modules/auth/better-auth/module.json +2 -2
  102. package/modules/components/files/shared/hooks/use-file-upload.ts +412 -0
  103. package/modules/components/files/shared/lib/utils/url-helpers.ts +110 -0
  104. package/modules/components/files/shared/shadcn/dashboard/data-table-column-selector.tsx +52 -0
  105. package/modules/components/files/shared/shadcn/dashboard/data-table-footer.tsx +156 -0
  106. package/modules/components/files/shared/shadcn/dashboard/data-table.tsx +405 -0
  107. package/modules/components/files/shared/shadcn/global/form-field/input-field.tsx +440 -0
  108. package/modules/components/files/shared/shadcn/global/form-field/media-uploader-field.tsx +745 -0
  109. package/modules/components/files/shared/shadcn/global/form-field/multi-select-field.tsx +207 -0
  110. package/modules/components/files/shared/shadcn/global/form-field/select-field.tsx +247 -0
  111. package/modules/components/files/shared/shadcn/global/form-field/textarea-field.tsx +277 -0
  112. package/modules/components/files/shared/shadcn/global/form-field/tiptap-editor-field.tsx +35 -0
  113. package/modules/components/files/shared/shadcn/global/no-results.tsx +41 -0
  114. package/modules/components/files/shared/shadcn/tiptap-editor/editor-menu-bar.tsx +217 -0
  115. package/modules/components/files/shared/shadcn/tiptap-editor/tiptap-editor.tsx +104 -0
  116. package/modules/components/files/shared/url/load-more.tsx +93 -0
  117. package/modules/components/files/shared/url/search-bar.tsx +131 -0
  118. package/modules/components/files/shared/url/sort-select.tsx +118 -0
  119. package/modules/components/files/shared/url/url-tabs.tsx +77 -0
  120. package/modules/components/generator.json +109 -0
  121. package/modules/components/module.json +11 -0
  122. package/modules/database/mongoose/generator.json +3 -14
  123. package/modules/database/mongoose/module.json +2 -2
  124. package/modules/database/prisma/generator.json +6 -12
  125. package/modules/database/prisma/module.json +2 -2
  126. package/modules/storage/cloudinary/files/express/config/env.ts +65 -0
  127. package/modules/storage/cloudinary/files/express/config/media.ts +103 -0
  128. package/modules/storage/cloudinary/files/express/modules/media/media.controller.ts +59 -0
  129. package/modules/storage/cloudinary/files/express/modules/media/media.route.ts +29 -0
  130. package/modules/storage/cloudinary/files/express/modules/media/media.service.ts +113 -0
  131. package/modules/storage/cloudinary/files/express/modules/media/media.type.ts +32 -0
  132. package/modules/storage/cloudinary/generator.json +34 -0
  133. package/modules/storage/cloudinary/module.json +11 -0
  134. package/modules/ui/shadcn/generator.json +21 -0
  135. package/modules/ui/shadcn/module.json +11 -0
  136. package/package.json +24 -26
  137. package/templates/express/README.md +11 -16
  138. package/templates/express/src/config/env.ts +7 -5
  139. package/templates/nextjs/README.md +13 -18
  140. package/templates/nextjs/app/favicon.ico +0 -0
  141. package/templates/nextjs/app/layout.tsx +6 -4
  142. package/templates/nextjs/components/providers/query-provider.tsx +3 -0
  143. package/templates/nextjs/env.example +3 -1
  144. package/templates/nextjs/lib/axios/http.ts +23 -0
  145. package/templates/nextjs/lib/env.ts +7 -5
  146. package/templates/nextjs/package.json +2 -1
  147. package/templates/nextjs/template.json +1 -2
  148. package/templates/react/README.md +9 -14
  149. package/templates/react/index.html +1 -1
  150. package/templates/react/package.json +1 -1
  151. package/templates/react/src/assets/favicon.ico +0 -0
  152. package/templates/react/src/components/providers/query-provider.tsx +38 -0
  153. package/templates/react/src/{shared/components → components}/seo.tsx +4 -8
  154. package/templates/react/src/lib/axios/http.ts +24 -0
  155. package/templates/react/src/main.tsx +8 -11
  156. package/templates/react/src/{features/about/pages → pages}/about.tsx +1 -1
  157. package/templates/react/src/{features/home/pages → pages}/home.tsx +1 -1
  158. package/templates/react/src/router.tsx +6 -6
  159. package/templates/react/src/vite-env.d.ts +2 -1
  160. package/templates/react/template.json +0 -1
  161. package/templates/react/tsconfig.app.json +6 -0
  162. package/templates/react/tsconfig.json +7 -1
  163. package/templates/react/vite.config.ts +12 -0
  164. package/modules/auth/authjs/files/nextjs/api/auth/[...nextauth]/route.ts +0 -3
  165. package/modules/auth/authjs/files/nextjs/proxy.ts +0 -1
  166. package/modules/auth/authjs/files/shared/lib/auth.ts +0 -119
  167. package/modules/auth/authjs/files/shared/prisma/schema.prisma +0 -61
  168. package/modules/auth/authjs/generator.json +0 -64
  169. package/modules/auth/authjs/module.json +0 -13
  170. package/modules/auth/better-auth/files/express/modules/auth/auth.controller.ts +0 -264
  171. package/modules/auth/better-auth/files/express/modules/auth/auth.service.ts +0 -549
  172. package/modules/auth/better-auth/files/express/templates/google-redirect.ejs +0 -24
  173. package/modules/auth/better-auth/files/nextjs/api/auth/[...all]/route.ts +0 -4
  174. package/modules/auth/better-auth/files/nextjs/lib/auth/auth-guards.ts +0 -31
  175. package/modules/auth/better-auth/files/nextjs/templates/email-otp.tsx +0 -74
  176. package/templates/nextjs/lib/api/http.ts +0 -40
  177. package/templates/react/public/vite.svg +0 -1
  178. package/templates/react/src/app/layouts/dashboard-layout.tsx +0 -8
  179. package/templates/react/src/app/layouts/public-layout.tsx +0 -5
  180. package/templates/react/src/app/providers.tsx +0 -20
  181. package/templates/react/src/app/router.tsx +0 -21
  182. package/templates/react/src/assets/react.svg +0 -1
  183. package/templates/react/src/shared/api/http.ts +0 -39
  184. package/templates/react/src/shared/components/loading.tsx +0 -8
  185. package/templates/react/src/shared/lib/query-client.ts +0 -12
  186. package/templates/react/src/utils/storage.ts +0 -35
  187. package/templates/react/src/utils/utils.ts +0 -3
  188. /package/modules/auth/better-auth/files/{shared/mongoose/auth/constants.ts → express/mongo-modules/auth.constants.ts} +0 -0
  189. /package/templates/nextjs/app/{page.tsx → (public)/(root)/page.tsx} +0 -0
  190. /package/templates/react/src/{shared/components → components}/error-boundary.tsx +0 -0
  191. /package/templates/react/src/{shared/components → components}/layout.tsx +0 -0
  192. /package/templates/react/src/{shared/pages → pages}/not-found.tsx +0 -0
@@ -7,7 +7,7 @@
7
7
  "type": "create-file",
8
8
  "source": "shared/lib/auth.ts",
9
9
  "destination": "src/lib/auth.ts",
10
- "condition": { "framework": ["express"] }
10
+ "condition": { "framework": "express" }
11
11
  },
12
12
  {
13
13
  "type": "create-file",
@@ -17,26 +17,20 @@
17
17
  },
18
18
  {
19
19
  "type": "create-file",
20
- "source": "shared/config/env.ts",
20
+ "source": "express/config/env.ts",
21
21
  "destination": "src/config/env.ts",
22
22
  "condition": { "framework": "express" }
23
23
  },
24
24
  {
25
25
  "type": "create-file",
26
- "source": "express/modules/auth/*",
26
+ "source": "express/modules/*",
27
27
  "destination": "src/modules/auth/*",
28
28
  "condition": { "framework": "express" }
29
29
  },
30
30
  {
31
31
  "type": "create-file",
32
- "source": "shared/mongoose/auth/helper.ts",
33
- "destination": "src/modules/auth/auth.helper.ts",
34
- "condition": { "framework": "express", "database": "mongoose" }
35
- },
36
- {
37
- "type": "create-file",
38
- "source": "shared/mongoose/auth/constants.ts",
39
- "destination": "src/modules/auth/auth.constants.ts",
32
+ "source": "express/mongo-modules/*",
33
+ "destination": "src/modules/auth/*",
40
34
  "condition": { "framework": "express", "database": "mongoose" }
41
35
  },
42
36
  {
@@ -112,11 +106,14 @@
112
106
  "condition": { "framework": "express" },
113
107
  "dependencies": {
114
108
  "ejs": "^4.0.1",
115
- "jsonwebtoken": "^9.0.3"
109
+ "jsonwebtoken": "^9.0.3",
110
+ "better-auth": "^1.4.12",
111
+ "nodemailer": "^7.0.12"
116
112
  },
117
113
  "devDependencies": {
118
114
  "@types/ejs": "^3.1.5",
119
- "@types/jsonwebtoken": "^9.0.10"
115
+ "@types/jsonwebtoken": "^9.0.10",
116
+ "@types/nodemailer": "^7.0.5"
120
117
  }
121
118
  },
122
119
  {
@@ -124,7 +121,7 @@
124
121
  "condition": { "framework": "express" },
125
122
  "envVars": {
126
123
  "APP_NAME": "Your App",
127
- "BETTER_AUTH_URL": "http://localhost:3000",
124
+ "BETTER_AUTH_URL": "http://localhost:5000",
128
125
  "BETTER_AUTH_SECRET": "your_better_auth_secret",
129
126
  "BETTER_AUTH_SESSION_TOKEN_EXPIRES_IN": "1d",
130
127
  "BETTER_AUTH_SESSION_TOKEN_UPDATE_AGE": "1d",
@@ -144,81 +141,189 @@
144
141
  },
145
142
  {
146
143
  "type": "create-file",
147
- "source": "shared/lib/auth.ts",
148
- "destination": "server/auth/auth.ts",
144
+ "source": "nextjs/pages/**",
145
+ "destination": "app/(public)/(auth)/**",
149
146
  "condition": { "framework": "nextjs" }
150
147
  },
151
148
  {
152
149
  "type": "create-file",
153
- "source": "nextjs/api/auth/[...all]/route.ts",
154
- "destination": "app/api/auth/[...all]/route.ts",
150
+ "source": "nextjs/layout/layout.tsx",
151
+ "destination": "app/(public)/(root)/layout.tsx",
155
152
  "condition": { "framework": "nextjs" }
156
153
  },
157
154
  {
158
155
  "type": "create-file",
159
- "source": "nextjs/lib/auth/auth-guards.ts",
160
- "destination": "server/auth/guards.ts",
156
+ "source": "nextjs/features/**",
157
+ "destination": "features/auth/**",
161
158
  "condition": { "framework": "nextjs" }
162
159
  },
163
160
  {
164
161
  "type": "create-file",
165
- "source": "nextjs/proxy.ts",
166
- "destination": "proxy.ts",
162
+ "source": "nextjs/lib/**",
163
+ "destination": "lib/**",
167
164
  "condition": { "framework": "nextjs" }
168
165
  },
169
166
  {
170
167
  "type": "create-file",
171
- "source": "shared/lib/auth-client.ts",
172
- "destination": "lib/auth/auth-client.ts",
168
+ "source": "nextjs/proxy.ts",
169
+ "destination": "proxy.ts",
173
170
  "condition": { "framework": "nextjs" }
174
171
  },
175
172
  {
176
173
  "type": "create-file",
177
- "source": "shared/mongoose/auth/constants.ts",
178
- "destination": "lib/auth/auth-constants.ts",
174
+ "source": "nextjs/api-route.ts",
175
+ "destination": "app/api/auth/callback/[provider]/route.ts",
179
176
  "condition": { "framework": "nextjs" }
180
177
  },
181
178
  {
182
179
  "type": "create-file",
183
- "source": "shared/utils/email.ts",
184
- "destination": "lib/utils/email.ts",
180
+ "source": "nextjs/types/**",
181
+ "destination": "types/**",
185
182
  "condition": { "framework": "nextjs" }
186
183
  },
187
184
  {
188
185
  "type": "create-file",
189
- "source": "nextjs/templates/email-otp.tsx",
190
- "destination": "lib/email/otp-template.tsx",
191
- "condition": { "framework": "nextjs" }
186
+ "source": "nextjs/theme/**",
187
+ "destination": "components/**",
188
+ "condition": { "framework": "nextjs", "ui": "shadcn" }
192
189
  },
193
190
  {
194
191
  "type": "create-file",
195
- "source": "shared/config/env.ts",
196
- "destination": "lib/env.ts",
197
- "condition": { "framework": "nextjs" }
192
+ "source": "nextjs/dashboard/pages/**",
193
+ "destination": "app/dashboard/**",
194
+ "condition": { "framework": "nextjs", "ui": "shadcn" }
195
+ },
196
+ {
197
+ "type": "patch-file",
198
+ "destination": "app/layout.tsx",
199
+ "condition": { "framework": "nextjs" },
200
+ "operations": [
201
+ {
202
+ "type": "add-import",
203
+ "imports": ["import { ThemeProvider } from \"@/components/providers/theme-provider\";"]
204
+ },
205
+ {
206
+ "type": "add-code",
207
+ "after": "<body className=\"font-sans antialiased\" suppressHydrationWarning>",
208
+ "code": ["<ThemeProvider",
209
+ " attribute=\"class\"",
210
+ " defaultTheme=\"system\"",
211
+ " enableSystem",
212
+ " disableTransitionOnChange",
213
+ ">"]
214
+ },
215
+ {
216
+ "type": "add-code",
217
+ "before": "</body>",
218
+ "code": ["</ThemeProvider>"]
219
+ }
220
+ ]
198
221
  },
199
222
  {
200
223
  "type": "add-env",
201
224
  "condition": { "framework": "nextjs" },
202
225
  "envVars": {
203
- "NEXT_PUBLIC_APP_NAME": "Your App",
204
- "NEXT_PUBLIC_APP_URL": "http://localhost:3000",
205
- "NEXT_PUBLIC_FRONTEND_URL": "http://localhost:3000",
206
- "NEXT_PUBLIC_BETTER_AUTH_URL": "http://localhost:3000",
207
- "BETTER_AUTH_SECRET": "your_better_auth_secret",
208
- "GOOGLE_CLIENT_ID": "your_google_client_id",
209
- "GOOGLE_CLIENT_SECRET": "your_google_client_secret",
210
- "NEXT_PUBLIC_GOOGLE_CALLBACK_URL": "http://localhost:3000/api/auth/callback/google",
211
- "EMAIL_SENDER_SMTP_USER": "your_email@gmail.com",
212
- "EMAIL_SENDER_SMTP_PASS": "your_email_password",
213
- "EMAIL_SENDER_SMTP_HOST": "smtp.gmail.com",
214
- "EMAIL_SENDER_SMTP_PORT": "465",
215
- "EMAIL_SENDER_SMTP_FROM": "your_email@gmail.com"
226
+ "NEXT_PUBLIC_BETTER_AUTH_URL": "http://localhost:5000",
227
+ "JWT_ACCESS_SECRET": "your_jwt_access_secret"
216
228
  }
217
229
  },
230
+ {
231
+ "type": "create-file",
232
+ "source": "shared/ui/shadcn/components/**",
233
+ "destination": "{{framework=='nextjs' ? 'components/**' : 'src/components/**'}}",
234
+ "condition": { "framework": ["nextjs", "react"] }
235
+ },
218
236
  {
219
237
  "type": "create-file",
220
238
  "source": "shared/lib/auth-client.ts",
221
- "destination": "src/shared/lib/auth-client.ts",
239
+ "destination": "{{framework=='nextjs' ? 'lib/auth/auth-client.ts' : 'src/lib/auth/auth-client.ts'}}",
240
+ "condition": { "framework": ["nextjs", "react"] }
241
+ },
242
+ {
243
+ "type": "create-file",
244
+ "source": "shared/theme/mode-toggle.tsx",
245
+ "destination": "{{framework=='nextjs' ? 'components/mode-toggle.tsx' : 'src/components/mode-toggle.tsx'}}",
246
+ "condition": { "framework": ["nextjs", "react"], "ui": "shadcn" }
247
+ },
248
+ {
249
+ "type": "create-file",
250
+ "source": "shared/ui/shadcn/form-field/*",
251
+ "destination": "{{framework=='nextjs' ? 'components/global/form-field/*' : 'src/components/global/form-field/*'}}",
252
+ "condition": { "framework": ["react", "nextjs"], "ui": "shadcn" }
253
+ },
254
+ {
255
+ "type": "create-file",
256
+ "source": "shared/lib/constant/**",
257
+ "destination": "{{framework=='nextjs' ? 'lib/constant/**' : 'src/lib/constant/**'}}",
258
+ "condition": { "framework": ["react", "nextjs"]}
259
+ },
260
+ {
261
+ "type": "create-file",
262
+ "source": "shared/features/**",
263
+ "destination": "{{framework=='nextjs' ? 'features/auth/**' : 'src/features/auth/**'}}",
264
+ "condition": { "framework": ["react", "nextjs"]}
265
+ },
266
+ {
267
+ "type": "create-file",
268
+ "source": "react/theme/**",
269
+ "destination": "src/**",
270
+ "condition": { "framework": "react", "ui": "shadcn" }
271
+ },
272
+ {
273
+ "type": "create-file",
274
+ "source": "react/components/**",
275
+ "destination": "src/components/**",
276
+ "condition": { "framework": "react" }
277
+ },
278
+ {
279
+ "type": "create-file",
280
+ "source": "react/layout/**",
281
+ "destination": "src/layout/**",
282
+ "condition": { "framework": "react" }
283
+ },
284
+ {
285
+ "type": "create-file",
286
+ "source": "react/lib/**",
287
+ "destination": "src/lib/**",
288
+ "condition": { "framework": "react" }
289
+ },
290
+ {
291
+ "type": "patch-file",
292
+ "destination": "src/main.tsx",
293
+ "condition": { "framework": "react" },
294
+ "operations": [
295
+ {
296
+ "type": "add-import",
297
+ "imports": ["import { ThemeProvider } from \"./components/providers/theme-provider\";"]
298
+ },
299
+ {
300
+ "type": "add-code",
301
+ "after": "<StrictMode>",
302
+ "code": ["<ThemeProvider defaultTheme=\"dark\" storageKey=\"vite-ui-theme\">"]
303
+ },
304
+ {
305
+ "type": "add-code",
306
+ "before": "</StrictMode>,",
307
+ "code": ["</ThemeProvider>"]
308
+ }
309
+ ]
310
+ },
311
+ {
312
+ "type": "create-file",
313
+ "source": "react/router.tsx",
314
+ "destination": "src/router.tsx",
315
+ "condition": { "framework": "react" }
316
+ },
317
+ {
318
+ "type": "create-file",
319
+ "source": "react/dashboard/**",
320
+ "destination": "src/features/dashboard/**",
321
+ "condition": { "framework": "react" }
322
+ },
323
+ {
324
+ "type": "create-file",
325
+ "source": "react/features/**",
326
+ "destination": "src/features/auth/**",
222
327
  "condition": { "framework": "react" }
223
328
  },
224
329
  {
@@ -229,13 +334,29 @@
229
334
  },
230
335
  {
231
336
  "type": "add-dependency",
337
+ "condition": { "framework": ["react", "nextjs"] },
232
338
  "dependencies": {
233
339
  "better-auth": "^1.4.12",
234
- "nodemailer": "^7.0.12"
340
+ "zod": "^4.3.6",
341
+ "@hookform/resolvers": "^3.0.0",
342
+ "react-hook-form": "^7.71.2"
343
+ }
344
+ },
345
+ {
346
+ "type": "add-dependency",
347
+ "dependencies": {
348
+ "jsonwebtoken": "^9.0.3",
349
+ "next-themes": "^0.4.6"
235
350
  },
236
351
  "devDependencies": {
237
- "@types/nodemailer": "^7.0.5"
238
- }
352
+ "@types/jsonwebtoken": "^9.0.10"
353
+ },
354
+ "condition": { "framework": "nextjs" }
355
+ },
356
+ {
357
+ "type": "run-command",
358
+ "command": "{{packageManager=='pnpm' ? 'pnpm dlx shadcn@latest add button card checkbox field input input-group avatar separator sheet textarea label dropdown-menu sidebar skeleton -y' : packageManager=='yarn' ? 'yarn dlx shadcn@latest add button card checkbox field input input-group avatar separator sheet textarea label dropdown-menu sidebar skeleton -y' : packageManager=='bun' ? 'bun dlx shadcn@latest add button card checkbox field input input-group avatar separator sheet textarea label dropdown-menu sidebar skeleton -y' : 'npx shadcn@latest add button card checkbox field input input-group avatar separator sheet textarea label dropdown-menu sidebar skeleton -y'}}",
359
+ "condition": { "framework": ["react", "nextjs"], "ui": "shadcn" }
239
360
  }
240
361
  ]
241
362
  }
@@ -3,9 +3,9 @@
3
3
  "displayName": "Better Auth",
4
4
  "category": "auth",
5
5
  "provider": "better-auth",
6
- "supportedFrameworks": ["nextjs", "express", "react"],
6
+ "supportedFrameworks": ["express", "react", "nextjs"],
7
7
  "compatibility": {
8
- "frameworks": ["nextjs", "express", "react"],
8
+ "frameworks": ["express", "react", "nextjs"],
9
9
  "databases": ["prisma", "mongoose"],
10
10
  "languages": ["typescript", "javascript"],
11
11
  "packageManagers": ["npm", "yarn", "pnpm", "bun"]