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.
- package/README.md +50 -42
- package/dist/cli/add.js +122 -56
- package/dist/cli/create.d.ts +2 -0
- package/dist/cli/create.js +271 -95
- package/dist/cli/doctor.js +1 -0
- package/dist/cli/list.d.ts +1 -1
- package/dist/cli/list.js +6 -4
- package/dist/index.js +234 -191
- package/dist/lib/constants.d.ts +4 -0
- package/dist/lib/constants.js +4 -0
- package/dist/lib/discovery/module-discovery.d.ts +4 -0
- package/dist/lib/discovery/module-discovery.js +56 -0
- package/dist/lib/generation/code-generator.d.ts +11 -2
- package/dist/lib/generation/code-generator.js +42 -3
- package/dist/lib/generation/generator-utils.js +3 -1
- package/dist/lib/pm/package-manager.js +16 -13
- package/dist/lib/ui/logger.js +3 -2
- package/dist/lib/utils/path-resolver.d.ts +2 -0
- package/dist/lib/utils/path-resolver.js +8 -0
- package/dist/meta.json +8312 -0
- package/modules/auth/better-auth/files/{shared → express}/config/env.ts +48 -50
- package/modules/auth/better-auth/files/express/middlewares/authorize.ts +20 -1
- package/modules/auth/better-auth/files/express/modules/auth.controller.ts +349 -0
- package/modules/auth/better-auth/files/express/modules/{auth/auth.route.ts → auth.route.ts} +9 -4
- package/modules/auth/better-auth/files/express/modules/auth.service.ts +664 -0
- package/modules/auth/better-auth/files/express/modules/{auth/auth.type.ts → auth.type.ts} +22 -9
- package/modules/auth/better-auth/files/{shared/mongoose/auth/helper.ts → express/mongo-modules/auth.helper.ts} +11 -1
- package/modules/auth/better-auth/files/express/types/express.d.ts +11 -0
- package/modules/auth/better-auth/files/nextjs/api-route.ts +74 -0
- package/modules/auth/better-auth/files/nextjs/dashboard/pages/(user)/page.tsx +6 -0
- package/modules/auth/better-auth/files/nextjs/dashboard/pages/admin/page.tsx +6 -0
- package/modules/auth/better-auth/files/nextjs/dashboard/pages/layout.tsx +48 -0
- package/modules/auth/better-auth/files/nextjs/dashboard/pages/my-profile/page.tsx +5 -0
- package/modules/auth/better-auth/files/nextjs/features/services/auth.service.ts +102 -0
- package/modules/auth/better-auth/files/nextjs/layout/layout.tsx +13 -0
- package/modules/auth/better-auth/files/nextjs/lib/axios/http.ts +158 -0
- package/modules/auth/better-auth/files/nextjs/lib/env.ts +35 -0
- package/modules/auth/better-auth/files/nextjs/lib/utils/auth.ts +75 -0
- package/modules/auth/better-auth/files/nextjs/lib/utils/cookie.ts +29 -0
- package/modules/auth/better-auth/files/nextjs/lib/utils/jwt.ts +28 -0
- package/modules/auth/better-auth/files/nextjs/lib/utils/token.ts +49 -0
- package/modules/auth/better-auth/files/nextjs/pages/forgot-password/page.tsx +5 -0
- package/modules/auth/better-auth/files/nextjs/pages/layout.tsx +11 -0
- package/modules/auth/better-auth/files/nextjs/pages/login/page.tsx +9 -0
- package/modules/auth/better-auth/files/nextjs/pages/register/page.tsx +5 -0
- package/modules/auth/better-auth/files/nextjs/pages/reset-password/page.tsx +10 -0
- package/modules/auth/better-auth/files/nextjs/pages/verify-email/page.tsx +10 -0
- package/modules/auth/better-auth/files/nextjs/proxy.ts +154 -42
- package/modules/auth/better-auth/files/nextjs/theme/providers/theme-provider.tsx +11 -0
- package/modules/auth/better-auth/files/nextjs/types/api.types.ts +18 -0
- package/modules/auth/better-auth/files/react/components/protected-route.tsx +39 -0
- package/modules/auth/better-auth/files/react/components/route-guards.tsx +13 -0
- package/modules/auth/better-auth/files/react/dashboard/admin/pages/overview.tsx +3 -0
- package/modules/auth/better-auth/files/react/dashboard/pages/overview.tsx +3 -0
- package/modules/auth/better-auth/files/react/features/pages/forgot-password.tsx +5 -0
- package/modules/auth/better-auth/files/react/features/pages/login.tsx +5 -0
- package/modules/auth/better-auth/files/react/features/pages/my-profile.tsx +5 -0
- package/modules/auth/better-auth/files/react/features/pages/oauth-callback.tsx +59 -0
- package/modules/auth/better-auth/files/react/features/pages/register.tsx +5 -0
- package/modules/auth/better-auth/files/react/features/pages/reset-password.tsx +10 -0
- package/modules/auth/better-auth/files/react/features/pages/verify-email.tsx +10 -0
- package/modules/auth/better-auth/files/react/layout/dashboard-layout.tsx +54 -0
- package/modules/auth/better-auth/files/react/lib/axios/http.ts +68 -0
- package/modules/auth/better-auth/files/react/lib/env.ts +25 -0
- package/modules/auth/better-auth/files/react/router.tsx +73 -0
- package/modules/auth/better-auth/files/react/theme/components/providers/theme-provider-context.ts +13 -0
- package/modules/auth/better-auth/files/react/theme/components/providers/theme-provider.tsx +51 -0
- package/modules/auth/better-auth/files/react/theme/hooks/use-theme.ts +8 -0
- package/modules/auth/better-auth/files/shared/features/components/change-password-dialog.tsx +113 -0
- package/modules/auth/better-auth/files/shared/features/components/forgot-password-form.tsx +84 -0
- package/modules/auth/better-auth/files/shared/features/components/login-form.tsx +134 -0
- package/modules/auth/better-auth/files/shared/features/components/my-profile.tsx +147 -0
- package/modules/auth/better-auth/files/shared/features/components/profile-form.tsx +205 -0
- package/modules/auth/better-auth/files/shared/features/components/register-form.tsx +100 -0
- package/modules/auth/better-auth/files/shared/features/components/reset-password-form.tsx +111 -0
- package/modules/auth/better-auth/files/shared/features/components/social-login-buttons.tsx +47 -0
- package/modules/auth/better-auth/files/shared/features/components/user-profile-menu.tsx +106 -0
- package/modules/auth/better-auth/files/shared/features/components/verify-email-form.tsx +110 -0
- package/modules/auth/better-auth/files/shared/features/queries/auth.mutations.tsx +312 -0
- package/modules/auth/better-auth/files/shared/features/queries/auth.querie.ts +19 -0
- package/modules/auth/better-auth/files/shared/features/services/auth.api.ts +81 -0
- package/modules/auth/better-auth/files/shared/features/types/auth.type.ts +47 -0
- package/modules/auth/better-auth/files/shared/features/validators/change-password.validator.ts +18 -0
- package/modules/auth/better-auth/files/shared/features/validators/forgot.validator.ts +7 -0
- package/modules/auth/better-auth/files/shared/features/validators/login.validator.ts +14 -0
- package/modules/auth/better-auth/files/shared/features/validators/profile.validator.ts +8 -0
- package/modules/auth/better-auth/files/shared/features/validators/register.validator.ts +9 -0
- package/modules/auth/better-auth/files/shared/features/validators/reset.validator.ts +9 -0
- package/modules/auth/better-auth/files/shared/features/validators/verify.validator.ts +8 -0
- package/modules/auth/better-auth/files/shared/lib/auth-client.ts +2 -1
- package/modules/auth/better-auth/files/shared/lib/auth.ts +5 -19
- package/modules/auth/better-auth/files/shared/lib/constant/dashboard.ts +90 -0
- package/modules/auth/better-auth/files/shared/theme/mode-toggle.tsx +30 -0
- package/modules/auth/better-auth/files/shared/ui/shadcn/components/dashboard/dashboard-header.tsx +94 -0
- package/modules/auth/better-auth/files/shared/ui/shadcn/components/dashboard/dashboard-sidebar.tsx +255 -0
- package/modules/auth/better-auth/files/shared/ui/shadcn/components/footer.tsx +35 -0
- package/modules/auth/better-auth/files/shared/ui/shadcn/components/navbar.tsx +145 -0
- package/modules/auth/better-auth/files/shared/ui/shadcn/form-field/input-field.tsx +440 -0
- package/modules/auth/better-auth/files/shared/utils/email.ts +2 -17
- package/modules/auth/better-auth/generator.json +172 -51
- package/modules/auth/better-auth/module.json +2 -2
- package/modules/components/files/shared/hooks/use-file-upload.ts +412 -0
- package/modules/components/files/shared/lib/utils/url-helpers.ts +110 -0
- package/modules/components/files/shared/shadcn/dashboard/data-table-column-selector.tsx +52 -0
- package/modules/components/files/shared/shadcn/dashboard/data-table-footer.tsx +156 -0
- package/modules/components/files/shared/shadcn/dashboard/data-table.tsx +405 -0
- package/modules/components/files/shared/shadcn/global/form-field/input-field.tsx +440 -0
- package/modules/components/files/shared/shadcn/global/form-field/media-uploader-field.tsx +745 -0
- package/modules/components/files/shared/shadcn/global/form-field/multi-select-field.tsx +207 -0
- package/modules/components/files/shared/shadcn/global/form-field/select-field.tsx +247 -0
- package/modules/components/files/shared/shadcn/global/form-field/textarea-field.tsx +277 -0
- package/modules/components/files/shared/shadcn/global/form-field/tiptap-editor-field.tsx +35 -0
- package/modules/components/files/shared/shadcn/global/no-results.tsx +41 -0
- package/modules/components/files/shared/shadcn/tiptap-editor/editor-menu-bar.tsx +217 -0
- package/modules/components/files/shared/shadcn/tiptap-editor/tiptap-editor.tsx +104 -0
- package/modules/components/files/shared/url/load-more.tsx +93 -0
- package/modules/components/files/shared/url/search-bar.tsx +131 -0
- package/modules/components/files/shared/url/sort-select.tsx +118 -0
- package/modules/components/files/shared/url/url-tabs.tsx +77 -0
- package/modules/components/generator.json +109 -0
- package/modules/components/module.json +11 -0
- package/modules/database/mongoose/generator.json +3 -14
- package/modules/database/mongoose/module.json +2 -2
- package/modules/database/prisma/generator.json +6 -12
- package/modules/database/prisma/module.json +2 -2
- package/modules/storage/cloudinary/files/express/config/env.ts +65 -0
- package/modules/storage/cloudinary/files/express/config/media.ts +103 -0
- package/modules/storage/cloudinary/files/express/modules/media/media.controller.ts +59 -0
- package/modules/storage/cloudinary/files/express/modules/media/media.route.ts +29 -0
- package/modules/storage/cloudinary/files/express/modules/media/media.service.ts +113 -0
- package/modules/storage/cloudinary/files/express/modules/media/media.type.ts +32 -0
- package/modules/storage/cloudinary/generator.json +34 -0
- package/modules/storage/cloudinary/module.json +11 -0
- package/modules/ui/shadcn/generator.json +21 -0
- package/modules/ui/shadcn/module.json +11 -0
- package/package.json +24 -26
- package/templates/express/README.md +11 -16
- package/templates/express/src/config/env.ts +7 -5
- package/templates/nextjs/README.md +13 -18
- package/templates/nextjs/app/favicon.ico +0 -0
- package/templates/nextjs/app/layout.tsx +6 -4
- package/templates/nextjs/components/providers/query-provider.tsx +3 -0
- package/templates/nextjs/env.example +3 -1
- package/templates/nextjs/lib/axios/http.ts +23 -0
- package/templates/nextjs/lib/env.ts +7 -5
- package/templates/nextjs/package.json +2 -1
- package/templates/nextjs/template.json +1 -2
- package/templates/react/README.md +9 -14
- package/templates/react/index.html +1 -1
- package/templates/react/package.json +1 -1
- package/templates/react/src/assets/favicon.ico +0 -0
- package/templates/react/src/components/providers/query-provider.tsx +38 -0
- package/templates/react/src/{shared/components → components}/seo.tsx +4 -8
- package/templates/react/src/lib/axios/http.ts +24 -0
- package/templates/react/src/main.tsx +8 -11
- package/templates/react/src/{features/about/pages → pages}/about.tsx +1 -1
- package/templates/react/src/{features/home/pages → pages}/home.tsx +1 -1
- package/templates/react/src/router.tsx +6 -6
- package/templates/react/src/vite-env.d.ts +2 -1
- package/templates/react/template.json +0 -1
- package/templates/react/tsconfig.app.json +6 -0
- package/templates/react/tsconfig.json +7 -1
- package/templates/react/vite.config.ts +12 -0
- package/modules/auth/authjs/files/nextjs/api/auth/[...nextauth]/route.ts +0 -3
- package/modules/auth/authjs/files/nextjs/proxy.ts +0 -1
- package/modules/auth/authjs/files/shared/lib/auth.ts +0 -119
- package/modules/auth/authjs/files/shared/prisma/schema.prisma +0 -61
- package/modules/auth/authjs/generator.json +0 -64
- package/modules/auth/authjs/module.json +0 -13
- package/modules/auth/better-auth/files/express/modules/auth/auth.controller.ts +0 -264
- package/modules/auth/better-auth/files/express/modules/auth/auth.service.ts +0 -549
- package/modules/auth/better-auth/files/express/templates/google-redirect.ejs +0 -24
- package/modules/auth/better-auth/files/nextjs/api/auth/[...all]/route.ts +0 -4
- package/modules/auth/better-auth/files/nextjs/lib/auth/auth-guards.ts +0 -31
- package/modules/auth/better-auth/files/nextjs/templates/email-otp.tsx +0 -74
- package/templates/nextjs/lib/api/http.ts +0 -40
- package/templates/react/public/vite.svg +0 -1
- package/templates/react/src/app/layouts/dashboard-layout.tsx +0 -8
- package/templates/react/src/app/layouts/public-layout.tsx +0 -5
- package/templates/react/src/app/providers.tsx +0 -20
- package/templates/react/src/app/router.tsx +0 -21
- package/templates/react/src/assets/react.svg +0 -1
- package/templates/react/src/shared/api/http.ts +0 -39
- package/templates/react/src/shared/components/loading.tsx +0 -8
- package/templates/react/src/shared/lib/query-client.ts +0 -12
- package/templates/react/src/utils/storage.ts +0 -35
- package/templates/react/src/utils/utils.ts +0 -3
- /package/modules/auth/better-auth/files/{shared/mongoose/auth/constants.ts → express/mongo-modules/auth.constants.ts} +0 -0
- /package/templates/nextjs/app/{page.tsx → (public)/(root)/page.tsx} +0 -0
- /package/templates/react/src/{shared/components → components}/error-boundary.tsx +0 -0
- /package/templates/react/src/{shared/components → components}/layout.tsx +0 -0
- /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":
|
|
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": "
|
|
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
|
|
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": "
|
|
33
|
-
"destination": "src/modules/auth
|
|
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:
|
|
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": "
|
|
148
|
-
"destination": "
|
|
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/
|
|
154
|
-
"destination": "app/
|
|
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/
|
|
160
|
-
"destination": "
|
|
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/
|
|
166
|
-
"destination": "
|
|
162
|
+
"source": "nextjs/lib/**",
|
|
163
|
+
"destination": "lib/**",
|
|
167
164
|
"condition": { "framework": "nextjs" }
|
|
168
165
|
},
|
|
169
166
|
{
|
|
170
167
|
"type": "create-file",
|
|
171
|
-
"source": "
|
|
172
|
-
"destination": "
|
|
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": "
|
|
178
|
-
"destination": "
|
|
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": "
|
|
184
|
-
"destination": "
|
|
180
|
+
"source": "nextjs/types/**",
|
|
181
|
+
"destination": "types/**",
|
|
185
182
|
"condition": { "framework": "nextjs" }
|
|
186
183
|
},
|
|
187
184
|
{
|
|
188
185
|
"type": "create-file",
|
|
189
|
-
"source": "nextjs/
|
|
190
|
-
"destination": "
|
|
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": "
|
|
196
|
-
"destination": "
|
|
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
|
-
"
|
|
204
|
-
"
|
|
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/
|
|
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
|
-
"
|
|
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/
|
|
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": ["
|
|
6
|
+
"supportedFrameworks": ["express", "react", "nextjs"],
|
|
7
7
|
"compatibility": {
|
|
8
|
-
"frameworks": ["
|
|
8
|
+
"frameworks": ["express", "react", "nextjs"],
|
|
9
9
|
"databases": ["prisma", "mongoose"],
|
|
10
10
|
"languages": ["typescript", "javascript"],
|
|
11
11
|
"packageManagers": ["npm", "yarn", "pnpm", "bun"]
|