stackkit 0.2.9 → 0.3.1

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 (35) hide show
  1. package/bin/stackkit.js +8 -5
  2. package/dist/cli/add.js +4 -9
  3. package/dist/cli/create.js +4 -9
  4. package/dist/cli/doctor.js +11 -32
  5. package/dist/lib/constants.js +3 -4
  6. package/dist/lib/conversion/js-conversion.js +20 -16
  7. package/dist/lib/discovery/installed-detection.js +28 -38
  8. package/dist/lib/discovery/module-discovery.d.ts +0 -15
  9. package/dist/lib/discovery/module-discovery.js +15 -50
  10. package/dist/lib/framework/framework-utils.d.ts +4 -5
  11. package/dist/lib/framework/framework-utils.js +38 -49
  12. package/dist/lib/generation/code-generator.d.ts +11 -12
  13. package/dist/lib/generation/code-generator.js +54 -134
  14. package/dist/lib/generation/generator-utils.js +3 -15
  15. package/dist/lib/project/detect.js +11 -19
  16. package/modules/auth/better-auth/files/express/middlewares/authorize.ts +66 -8
  17. package/modules/auth/better-auth/files/express/modules/auth/auth.controller.ts +7 -0
  18. package/modules/auth/better-auth/files/express/modules/auth/auth.route.ts +5 -0
  19. package/modules/auth/better-auth/files/express/modules/auth/auth.service.ts +145 -11
  20. package/modules/auth/better-auth/files/express/modules/auth/{auth.interface.ts → auth.type.ts} +16 -6
  21. package/modules/auth/better-auth/files/shared/config/env.ts +8 -4
  22. package/modules/auth/better-auth/files/shared/lib/auth.ts +24 -25
  23. package/modules/auth/better-auth/files/shared/mongoose/auth/constants.ts +11 -0
  24. package/modules/auth/better-auth/files/shared/mongoose/auth/helper.ts +51 -0
  25. package/modules/auth/better-auth/files/shared/utils/email.ts +0 -1
  26. package/modules/auth/better-auth/generator.json +24 -20
  27. package/modules/database/mongoose/files/lib/mongoose.ts +28 -3
  28. package/modules/database/mongoose/generator.json +1 -1
  29. package/package.json +1 -1
  30. package/templates/express/README.md +81 -0
  31. package/templates/express/env.example +1 -0
  32. package/templates/express/src/config/env.ts +4 -2
  33. package/templates/express/src/server.ts +50 -1
  34. package/templates/nextjs/README.md +96 -0
  35. package/templates/react/README.md +56 -0
@@ -61,6 +61,62 @@ src/
61
61
  └── utils/ # Helper functions
62
62
  ```
63
63
 
64
+ ## Recommended Folder & File Structure
65
+
66
+ ```text
67
+ react-vite-app/
68
+ ├── src/
69
+ │ ├── app/
70
+ │ │ ├── router.tsx
71
+ │ │ ├── providers.tsx
72
+ │ │ └── layouts/
73
+ │ │ ├── PublicLayout.tsx
74
+ │ │ └── DashboardLayout.tsx
75
+
76
+ │ ├── features/
77
+ │ │ ├── auth/
78
+ │ │ │ ├── pages/
79
+ │ │ │ │ ├── LoginPage.tsx
80
+ │ │ │ │ └── SignupPage.tsx
81
+ │ │ │ ├── components/
82
+ │ │ │ ├── api/
83
+ │ │ │ │ └── auth.api.ts
84
+ │ │ │ ├── hooks/
85
+ │ │ │ │ └── useAuth.ts
86
+ │ │ │ ├── schemas/
87
+ │ │ │ ├── types/
88
+ │ │ │ └── index.ts
89
+ │ │ ├── products/
90
+ │ │ └── orders/
91
+
92
+ │ ├── shared/
93
+ │ │ ├── ui/
94
+ │ │ ├── components/
95
+ │ │ │ ├── Header.tsx
96
+ │ │ │ └── Sidebar.tsx
97
+ │ │ ├── api/
98
+ │ │ │ ├── http.ts # axios/fetch client
99
+ │ │ │ └── endpoints.ts
100
+ │ │ └── lib/
101
+ │ │ ├── env.ts
102
+ │ │ ├── utils.ts
103
+ │ │ └── auth-client.ts # Auth client helper
104
+
105
+ │ ├── assets/
106
+ │ ├── main.tsx
107
+ │ └── index.css
108
+
109
+ ├── public/
110
+ ├── tests/
111
+ │ ├── unit/
112
+ │ └── e2e/
113
+ ├── vite.config.ts
114
+ ├── tsconfig.json
115
+ ├── package.json
116
+ ├── .env.example
117
+ └── README.md
118
+ ```
119
+
64
120
  ## Deployment
65
121
 
66
122
  Build for production and serve or deploy the static output: