express-file-cluster 0.7.1 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. package/README.md +3 -1
  2. package/dist/auth/index.d.cts +1 -1
  3. package/dist/auth/index.d.ts +1 -1
  4. package/dist/chunk-75O3WQKR.cjs +1386 -0
  5. package/dist/chunk-75O3WQKR.cjs.map +1 -0
  6. package/dist/{chunk-6OGOVV57.js → chunk-B2I7SYQ3.js} +100 -1261
  7. package/dist/chunk-B2I7SYQ3.js.map +1 -0
  8. package/dist/chunk-BBSZLGZW.js +113 -0
  9. package/dist/chunk-BBSZLGZW.js.map +1 -0
  10. package/dist/{chunk-AZYXQU3Z.cjs → chunk-FQFKHPLR.cjs} +217 -1378
  11. package/dist/chunk-FQFKHPLR.cjs.map +1 -0
  12. package/dist/chunk-OSES7ZQ5.js +1386 -0
  13. package/dist/chunk-OSES7ZQ5.js.map +1 -0
  14. package/dist/chunk-QL6EWT4B.cjs +113 -0
  15. package/dist/chunk-QL6EWT4B.cjs.map +1 -0
  16. package/dist/cli/db-runner.cjs +611 -26
  17. package/dist/cli/db-runner.cjs.map +1 -1
  18. package/dist/cli/db-runner.js +610 -25
  19. package/dist/cli/db-runner.js.map +1 -1
  20. package/dist/cli/index.cjs +1210 -12
  21. package/dist/cli/index.cjs.map +1 -1
  22. package/dist/cli/index.js +1221 -23
  23. package/dist/cli/index.js.map +1 -1
  24. package/dist/docs/api-reference/db.md +1 -0
  25. package/dist/docs/cli/add.md +136 -0
  26. package/dist/docs/cli/db.md +25 -2
  27. package/dist/docs/cli/index.md +10 -1
  28. package/dist/docs/core-concepts/middleware.md +1 -1
  29. package/dist/docs/getting-started/index.md +25 -18
  30. package/dist/docs/getting-started/project-structure.md +6 -7
  31. package/dist/docs/guides/authentication.md +3 -1
  32. package/dist/docs/guides/coming-from-prisma.md +75 -0
  33. package/dist/docs/guides/database.md +3 -2
  34. package/dist/docs/guides/generated-portals.md +36 -19
  35. package/dist/docs/guides/mailer.md +7 -10
  36. package/dist/docs/guides/migrations.md +114 -3
  37. package/dist/docs/guides/oauth.md +94 -0
  38. package/dist/docs/guides/rbac.md +5 -40
  39. package/dist/docs/index.md +5 -3
  40. package/dist/docs/skills/SKILL.md +3 -3
  41. package/dist/docs/skills/what-not-to-invent.md +22 -6
  42. package/dist/index.cjs +10 -8
  43. package/dist/index.cjs.map +1 -1
  44. package/dist/index.d.cts +2 -2
  45. package/dist/index.d.ts +2 -2
  46. package/dist/index.js +8 -6
  47. package/dist/index.js.map +1 -1
  48. package/dist/registry/index.json +506 -0
  49. package/dist/registry/js-mongo/_base.json +1 -0
  50. package/dist/registry/js-mongo/account-security.json +1 -0
  51. package/dist/registry/js-mongo/account-settings.json +1 -0
  52. package/dist/registry/js-mongo/admin-admins.json +1 -0
  53. package/dist/registry/js-mongo/admin-analytics.json +1 -0
  54. package/dist/registry/js-mongo/admin-billing.json +1 -0
  55. package/dist/registry/js-mongo/admin-content.json +1 -0
  56. package/dist/registry/js-mongo/admin-logs.json +1 -0
  57. package/dist/registry/js-mongo/admin-support.json +1 -0
  58. package/dist/registry/js-mongo/admin-system.json +1 -0
  59. package/dist/registry/js-mongo/admin-users.json +1 -0
  60. package/dist/registry/js-mongo/admin.json +1 -0
  61. package/dist/registry/js-mongo/auth.json +1 -0
  62. package/dist/registry/js-mongo/auth@apple.json +1 -0
  63. package/dist/registry/js-mongo/auth@google.json +1 -0
  64. package/dist/registry/js-mongo/billing.json +1 -0
  65. package/dist/registry/js-mongo/email-client.json +1 -0
  66. package/dist/registry/js-mongo/email-verification.json +1 -0
  67. package/dist/registry/js-mongo/files.json +1 -0
  68. package/dist/registry/js-mongo/forgot-password.json +1 -0
  69. package/dist/registry/js-mongo/notifications.json +1 -0
  70. package/dist/registry/js-mongo/support.json +1 -0
  71. package/dist/registry/js-mongo/user-profile.json +1 -0
  72. package/dist/registry/js-pg-model/_base.json +1 -0
  73. package/dist/registry/js-pg-model/account-security.json +1 -0
  74. package/dist/registry/js-pg-model/account-settings.json +1 -0
  75. package/dist/registry/js-pg-model/admin-admins.json +1 -0
  76. package/dist/registry/js-pg-model/admin-analytics.json +1 -0
  77. package/dist/registry/js-pg-model/admin-billing.json +1 -0
  78. package/dist/registry/js-pg-model/admin-content.json +1 -0
  79. package/dist/registry/js-pg-model/admin-logs.json +1 -0
  80. package/dist/registry/js-pg-model/admin-support.json +1 -0
  81. package/dist/registry/js-pg-model/admin-system.json +1 -0
  82. package/dist/registry/js-pg-model/admin-users.json +1 -0
  83. package/dist/registry/js-pg-model/admin.json +1 -0
  84. package/dist/registry/js-pg-model/auth.json +1 -0
  85. package/dist/registry/js-pg-model/auth@apple.json +1 -0
  86. package/dist/registry/js-pg-model/auth@google.json +1 -0
  87. package/dist/registry/js-pg-model/billing.json +1 -0
  88. package/dist/registry/js-pg-model/email-client.json +1 -0
  89. package/dist/registry/js-pg-model/email-verification.json +1 -0
  90. package/dist/registry/js-pg-model/files.json +1 -0
  91. package/dist/registry/js-pg-model/forgot-password.json +1 -0
  92. package/dist/registry/js-pg-model/notifications.json +1 -0
  93. package/dist/registry/js-pg-model/support.json +1 -0
  94. package/dist/registry/js-pg-model/user-profile.json +1 -0
  95. package/dist/registry/js-pg-table/_base.json +1 -0
  96. package/dist/registry/js-pg-table/account-security.json +1 -0
  97. package/dist/registry/js-pg-table/account-settings.json +1 -0
  98. package/dist/registry/js-pg-table/admin-admins.json +1 -0
  99. package/dist/registry/js-pg-table/admin-analytics.json +1 -0
  100. package/dist/registry/js-pg-table/admin-billing.json +1 -0
  101. package/dist/registry/js-pg-table/admin-content.json +1 -0
  102. package/dist/registry/js-pg-table/admin-logs.json +1 -0
  103. package/dist/registry/js-pg-table/admin-support.json +1 -0
  104. package/dist/registry/js-pg-table/admin-system.json +1 -0
  105. package/dist/registry/js-pg-table/admin-users.json +1 -0
  106. package/dist/registry/js-pg-table/admin.json +1 -0
  107. package/dist/registry/js-pg-table/auth.json +1 -0
  108. package/dist/registry/js-pg-table/auth@apple.json +1 -0
  109. package/dist/registry/js-pg-table/auth@google.json +1 -0
  110. package/dist/registry/js-pg-table/billing.json +1 -0
  111. package/dist/registry/js-pg-table/email-client.json +1 -0
  112. package/dist/registry/js-pg-table/email-verification.json +1 -0
  113. package/dist/registry/js-pg-table/files.json +1 -0
  114. package/dist/registry/js-pg-table/forgot-password.json +1 -0
  115. package/dist/registry/js-pg-table/notifications.json +1 -0
  116. package/dist/registry/js-pg-table/support.json +1 -0
  117. package/dist/registry/js-pg-table/user-profile.json +1 -0
  118. package/dist/registry/ts-mongo/_base.json +1 -0
  119. package/dist/registry/ts-mongo/account-security.json +1 -0
  120. package/dist/registry/ts-mongo/account-settings.json +1 -0
  121. package/dist/registry/ts-mongo/admin-admins.json +1 -0
  122. package/dist/registry/ts-mongo/admin-analytics.json +1 -0
  123. package/dist/registry/ts-mongo/admin-billing.json +1 -0
  124. package/dist/registry/ts-mongo/admin-content.json +1 -0
  125. package/dist/registry/ts-mongo/admin-logs.json +1 -0
  126. package/dist/registry/ts-mongo/admin-support.json +1 -0
  127. package/dist/registry/ts-mongo/admin-system.json +1 -0
  128. package/dist/registry/ts-mongo/admin-users.json +1 -0
  129. package/dist/registry/ts-mongo/admin.json +1 -0
  130. package/dist/registry/ts-mongo/auth.json +1 -0
  131. package/dist/registry/ts-mongo/auth@apple.json +1 -0
  132. package/dist/registry/ts-mongo/auth@google.json +1 -0
  133. package/dist/registry/ts-mongo/billing.json +1 -0
  134. package/dist/registry/ts-mongo/email-client.json +1 -0
  135. package/dist/registry/ts-mongo/email-verification.json +1 -0
  136. package/dist/registry/ts-mongo/files.json +1 -0
  137. package/dist/registry/ts-mongo/forgot-password.json +1 -0
  138. package/dist/registry/ts-mongo/notifications.json +1 -0
  139. package/dist/registry/ts-mongo/support.json +1 -0
  140. package/dist/registry/ts-mongo/user-profile.json +1 -0
  141. package/dist/registry/ts-pg-model/_base.json +1 -0
  142. package/dist/registry/ts-pg-model/account-security.json +1 -0
  143. package/dist/registry/ts-pg-model/account-settings.json +1 -0
  144. package/dist/registry/ts-pg-model/admin-admins.json +1 -0
  145. package/dist/registry/ts-pg-model/admin-analytics.json +1 -0
  146. package/dist/registry/ts-pg-model/admin-billing.json +1 -0
  147. package/dist/registry/ts-pg-model/admin-content.json +1 -0
  148. package/dist/registry/ts-pg-model/admin-logs.json +1 -0
  149. package/dist/registry/ts-pg-model/admin-support.json +1 -0
  150. package/dist/registry/ts-pg-model/admin-system.json +1 -0
  151. package/dist/registry/ts-pg-model/admin-users.json +1 -0
  152. package/dist/registry/ts-pg-model/admin.json +1 -0
  153. package/dist/registry/ts-pg-model/auth.json +1 -0
  154. package/dist/registry/ts-pg-model/auth@apple.json +1 -0
  155. package/dist/registry/ts-pg-model/auth@google.json +1 -0
  156. package/dist/registry/ts-pg-model/billing.json +1 -0
  157. package/dist/registry/ts-pg-model/email-client.json +1 -0
  158. package/dist/registry/ts-pg-model/email-verification.json +1 -0
  159. package/dist/registry/ts-pg-model/files.json +1 -0
  160. package/dist/registry/ts-pg-model/forgot-password.json +1 -0
  161. package/dist/registry/ts-pg-model/notifications.json +1 -0
  162. package/dist/registry/ts-pg-model/support.json +1 -0
  163. package/dist/registry/ts-pg-model/user-profile.json +1 -0
  164. package/dist/registry/ts-pg-table/_base.json +1 -0
  165. package/dist/registry/ts-pg-table/account-security.json +1 -0
  166. package/dist/registry/ts-pg-table/account-settings.json +1 -0
  167. package/dist/registry/ts-pg-table/admin-admins.json +1 -0
  168. package/dist/registry/ts-pg-table/admin-analytics.json +1 -0
  169. package/dist/registry/ts-pg-table/admin-billing.json +1 -0
  170. package/dist/registry/ts-pg-table/admin-content.json +1 -0
  171. package/dist/registry/ts-pg-table/admin-logs.json +1 -0
  172. package/dist/registry/ts-pg-table/admin-support.json +1 -0
  173. package/dist/registry/ts-pg-table/admin-system.json +1 -0
  174. package/dist/registry/ts-pg-table/admin-users.json +1 -0
  175. package/dist/registry/ts-pg-table/admin.json +1 -0
  176. package/dist/registry/ts-pg-table/auth.json +1 -0
  177. package/dist/registry/ts-pg-table/auth@apple.json +1 -0
  178. package/dist/registry/ts-pg-table/auth@google.json +1 -0
  179. package/dist/registry/ts-pg-table/billing.json +1 -0
  180. package/dist/registry/ts-pg-table/email-client.json +1 -0
  181. package/dist/registry/ts-pg-table/email-verification.json +1 -0
  182. package/dist/registry/ts-pg-table/files.json +1 -0
  183. package/dist/registry/ts-pg-table/forgot-password.json +1 -0
  184. package/dist/registry/ts-pg-table/notifications.json +1 -0
  185. package/dist/registry/ts-pg-table/support.json +1 -0
  186. package/dist/registry/ts-pg-table/user-profile.json +1 -0
  187. package/dist/tasks/index.d.cts +1 -1
  188. package/dist/tasks/index.d.ts +1 -1
  189. package/dist/{types-B6lVw4bj.d.cts → types-B1tJoI4g.d.cts} +6 -0
  190. package/dist/{types-B6lVw4bj.d.ts → types-B1tJoI4g.d.ts} +6 -0
  191. package/package.json +11 -2
  192. package/dist/chunk-6OGOVV57.js.map +0 -1
  193. package/dist/chunk-AZYXQU3Z.cjs.map +0 -1
@@ -0,0 +1,506 @@
1
+ {
2
+ "version": "0.8.0",
3
+ "variants": [
4
+ {
5
+ "key": "ts-mongo",
6
+ "language": "typescript",
7
+ "database": "mongodb",
8
+ "modelApi": "defineModel"
9
+ },
10
+ {
11
+ "key": "ts-pg-model",
12
+ "language": "typescript",
13
+ "database": "postgresql",
14
+ "modelApi": "defineModel"
15
+ },
16
+ {
17
+ "key": "ts-pg-table",
18
+ "language": "typescript",
19
+ "database": "postgresql",
20
+ "modelApi": "defineTable"
21
+ },
22
+ {
23
+ "key": "js-mongo",
24
+ "language": "javascript",
25
+ "database": "mongodb",
26
+ "modelApi": "defineModel"
27
+ },
28
+ {
29
+ "key": "js-pg-model",
30
+ "language": "javascript",
31
+ "database": "postgresql",
32
+ "modelApi": "defineModel"
33
+ },
34
+ {
35
+ "key": "js-pg-table",
36
+ "language": "javascript",
37
+ "database": "postgresql",
38
+ "modelApi": "defineTable"
39
+ }
40
+ ],
41
+ "items": [
42
+ {
43
+ "name": "auth",
44
+ "title": "Authentication",
45
+ "description": "User & Admin models; register, login, logout and me routes",
46
+ "group": "auth",
47
+ "registryDependencies": [],
48
+ "replaces": [],
49
+ "aliases": [],
50
+ "prompts": [],
51
+ "docs": "Tokens are issued per `authStrategy` in efc.config — 'http-only' (cookie) or 'localStorage' (Bearer). Verification emails go through the SendEmail task; `efc add email-client` makes it send real mail.",
52
+ "requiresTasks": true
53
+ },
54
+ {
55
+ "name": "user-profile",
56
+ "title": "Profile",
57
+ "description": "GET/PUT /user/profile",
58
+ "group": "user",
59
+ "registryDependencies": [
60
+ "auth"
61
+ ],
62
+ "replaces": [],
63
+ "aliases": [],
64
+ "prompts": [],
65
+ "requiresTasks": false
66
+ },
67
+ {
68
+ "name": "forgot-password",
69
+ "title": "Forgot / reset password",
70
+ "description": "forgot-password and reset-password routes",
71
+ "group": "user",
72
+ "registryDependencies": [
73
+ "auth"
74
+ ],
75
+ "replaces": [],
76
+ "aliases": [],
77
+ "prompts": [],
78
+ "requiresTasks": true
79
+ },
80
+ {
81
+ "name": "account-security",
82
+ "title": "Account security",
83
+ "description": "change password, 2FA, sessions, token refresh",
84
+ "group": "user",
85
+ "registryDependencies": [
86
+ "auth"
87
+ ],
88
+ "replaces": [],
89
+ "aliases": [],
90
+ "prompts": [],
91
+ "requiresTasks": false
92
+ },
93
+ {
94
+ "name": "email-verification",
95
+ "title": "Email verification",
96
+ "description": "verify-email and resend-verification routes",
97
+ "group": "user",
98
+ "registryDependencies": [
99
+ "auth"
100
+ ],
101
+ "replaces": [],
102
+ "aliases": [],
103
+ "prompts": [],
104
+ "requiresTasks": true
105
+ },
106
+ {
107
+ "name": "account-settings",
108
+ "title": "Account settings",
109
+ "description": "avatar, settings, account, dashboard, activity",
110
+ "group": "user",
111
+ "registryDependencies": [
112
+ "auth"
113
+ ],
114
+ "replaces": [],
115
+ "aliases": [],
116
+ "prompts": [],
117
+ "requiresTasks": false
118
+ },
119
+ {
120
+ "name": "notifications",
121
+ "title": "Notifications",
122
+ "description": "Notification model + /user/notifications",
123
+ "group": "user",
124
+ "registryDependencies": [
125
+ "auth"
126
+ ],
127
+ "replaces": [],
128
+ "aliases": [],
129
+ "prompts": [],
130
+ "requiresTasks": false
131
+ },
132
+ {
133
+ "name": "files",
134
+ "title": "Files, favorites & bookmarks",
135
+ "description": "File model + files, favorites, bookmarks, search",
136
+ "group": "user",
137
+ "registryDependencies": [
138
+ "auth"
139
+ ],
140
+ "replaces": [],
141
+ "aliases": [],
142
+ "prompts": [],
143
+ "requiresTasks": false
144
+ },
145
+ {
146
+ "name": "billing",
147
+ "title": "API keys & billing",
148
+ "description": "Plan, Subscription, Invoice, ApiKey models + user billing routes",
149
+ "group": "user",
150
+ "registryDependencies": [
151
+ "auth"
152
+ ],
153
+ "replaces": [],
154
+ "aliases": [],
155
+ "prompts": [],
156
+ "requiresTasks": false
157
+ },
158
+ {
159
+ "name": "support",
160
+ "title": "Support tickets",
161
+ "description": "SupportTicket model + create & view own tickets",
162
+ "group": "user",
163
+ "registryDependencies": [
164
+ "auth"
165
+ ],
166
+ "replaces": [],
167
+ "aliases": [],
168
+ "prompts": [],
169
+ "requiresTasks": false
170
+ },
171
+ {
172
+ "name": "admin",
173
+ "title": "Admin portal",
174
+ "description": "admin dashboard stats, behind requireAuth('admin')",
175
+ "group": "admin",
176
+ "registryDependencies": [
177
+ "auth"
178
+ ],
179
+ "replaces": [],
180
+ "aliases": [],
181
+ "prompts": [],
182
+ "requiresTasks": false
183
+ },
184
+ {
185
+ "name": "admin-users",
186
+ "title": "User management",
187
+ "description": "list/create/suspend/verify/export users + stats",
188
+ "group": "admin",
189
+ "registryDependencies": [
190
+ "admin"
191
+ ],
192
+ "replaces": [],
193
+ "aliases": [],
194
+ "prompts": [],
195
+ "requiresTasks": false
196
+ },
197
+ {
198
+ "name": "admin-admins",
199
+ "title": "Admin & role management",
200
+ "description": "manage other admins + Role model",
201
+ "group": "admin",
202
+ "registryDependencies": [
203
+ "admin"
204
+ ],
205
+ "replaces": [],
206
+ "aliases": [],
207
+ "prompts": [],
208
+ "requiresTasks": false
209
+ },
210
+ {
211
+ "name": "admin-analytics",
212
+ "title": "Analytics",
213
+ "description": "users, revenue, traffic dashboards",
214
+ "group": "admin",
215
+ "registryDependencies": [
216
+ "admin"
217
+ ],
218
+ "replaces": [],
219
+ "aliases": [],
220
+ "prompts": [],
221
+ "requiresTasks": false
222
+ },
223
+ {
224
+ "name": "admin-content",
225
+ "title": "Content management",
226
+ "description": "FAQ, Blog, Category models + admin routes",
227
+ "group": "admin",
228
+ "registryDependencies": [
229
+ "admin"
230
+ ],
231
+ "replaces": [],
232
+ "aliases": [],
233
+ "prompts": [],
234
+ "requiresTasks": false
235
+ },
236
+ {
237
+ "name": "admin-billing",
238
+ "title": "Billing management",
239
+ "description": "Plan, Coupon models + plans, coupons, subscriptions",
240
+ "group": "admin",
241
+ "registryDependencies": [
242
+ "admin"
243
+ ],
244
+ "replaces": [],
245
+ "aliases": [],
246
+ "prompts": [],
247
+ "requiresTasks": false
248
+ },
249
+ {
250
+ "name": "admin-support",
251
+ "title": "Support desk",
252
+ "description": "view & respond to support tickets",
253
+ "group": "admin",
254
+ "registryDependencies": [
255
+ "admin"
256
+ ],
257
+ "replaces": [],
258
+ "aliases": [],
259
+ "prompts": [],
260
+ "requiresTasks": false
261
+ },
262
+ {
263
+ "name": "admin-logs",
264
+ "title": "Notifications & audit logs",
265
+ "description": "broadcast + audit/activity/security logs",
266
+ "group": "admin",
267
+ "registryDependencies": [
268
+ "admin"
269
+ ],
270
+ "replaces": [],
271
+ "aliases": [],
272
+ "prompts": [],
273
+ "requiresTasks": false
274
+ },
275
+ {
276
+ "name": "admin-system",
277
+ "title": "System settings & health",
278
+ "description": "app settings, health check, cache",
279
+ "group": "admin",
280
+ "registryDependencies": [
281
+ "admin"
282
+ ],
283
+ "replaces": [],
284
+ "aliases": [],
285
+ "prompts": [],
286
+ "requiresTasks": false
287
+ },
288
+ {
289
+ "name": "auth@google",
290
+ "title": "Sign in with Google",
291
+ "description": "GET /auth/google → Google → /auth/google/callback (OpenID Connect + PKCE)",
292
+ "group": "auth",
293
+ "registryDependencies": [
294
+ "auth"
295
+ ],
296
+ "replaces": [],
297
+ "aliases": [],
298
+ "prompts": [
299
+ {
300
+ "name": "GOOGLE_CLIENT_ID",
301
+ "type": "text",
302
+ "message": "Google OAuth client ID:",
303
+ "placeholder": "1234-abc.apps.googleusercontent.com",
304
+ "required": true,
305
+ "pattern": "\\.apps\\.googleusercontent\\.com$",
306
+ "patternMessage": "Google client IDs end in .apps.googleusercontent.com",
307
+ "note": "console.cloud.google.com → APIs & Services → Credentials → Create credentials → OAuth client ID (Web application)."
308
+ },
309
+ {
310
+ "name": "GOOGLE_CLIENT_SECRET",
311
+ "type": "password",
312
+ "message": "Google OAuth client secret:",
313
+ "required": true
314
+ },
315
+ {
316
+ "name": "GOOGLE_REDIRECT_URI",
317
+ "type": "text",
318
+ "message": "Redirect URI (register it on the client):",
319
+ "default": "http://localhost:3000/v1/api/auth/google/callback"
320
+ },
321
+ {
322
+ "name": "OAUTH_SUCCESS_REDIRECT",
323
+ "type": "text",
324
+ "message": "Where to send the browser after sign-in:",
325
+ "default": "http://localhost:3000/"
326
+ }
327
+ ],
328
+ "docs": "Create an OAuth client (type \"Web application\") at console.cloud.google.com → APIs & Services → Credentials, and add GOOGLE_REDIRECT_URI as an authorised redirect URI. Send users to GET /v1/api/auth/google to sign in.",
329
+ "requiresTasks": false
330
+ },
331
+ {
332
+ "name": "auth@apple",
333
+ "title": "Sign in with Apple",
334
+ "description": "GET /auth/apple → Apple → POST /auth/apple/callback (form_post)",
335
+ "group": "auth",
336
+ "registryDependencies": [
337
+ "auth"
338
+ ],
339
+ "replaces": [],
340
+ "aliases": [],
341
+ "prompts": [
342
+ {
343
+ "name": "APPLE_CLIENT_ID",
344
+ "type": "text",
345
+ "message": "Services ID (client ID):",
346
+ "placeholder": "com.yourapp.signin",
347
+ "required": true,
348
+ "note": "developer.apple.com → Certificates, IDs & Profiles: a Services ID with Sign in with Apple, and a key with Sign in with Apple (.p8)."
349
+ },
350
+ {
351
+ "name": "APPLE_TEAM_ID",
352
+ "type": "text",
353
+ "message": "Team ID:",
354
+ "required": true,
355
+ "pattern": "^[A-Z0-9]{10}$",
356
+ "patternMessage": "Team IDs are 10 characters (A-Z, 0-9)"
357
+ },
358
+ {
359
+ "name": "APPLE_KEY_ID",
360
+ "type": "text",
361
+ "message": "Key ID:",
362
+ "required": true,
363
+ "pattern": "^[A-Z0-9]{10}$",
364
+ "patternMessage": "Key IDs are 10 characters (A-Z, 0-9)"
365
+ },
366
+ {
367
+ "name": "APPLE_PRIVATE_KEY",
368
+ "type": "file",
369
+ "message": "Path to the .p8 key file:",
370
+ "placeholder": "./AuthKey_ABCDE12345.p8",
371
+ "required": true,
372
+ "pattern": "BEGIN PRIVATE KEY",
373
+ "patternMessage": "That file doesn't look like a .p8 private key"
374
+ },
375
+ {
376
+ "name": "APPLE_REDIRECT_URI",
377
+ "type": "text",
378
+ "message": "Return URL (https, registered on the Services ID):",
379
+ "default": "https://api.yourapp.com/v1/api/auth/apple/callback",
380
+ "pattern": "^https://",
381
+ "patternMessage": "Apple only accepts https return URLs"
382
+ },
383
+ {
384
+ "name": "OAUTH_SUCCESS_REDIRECT",
385
+ "type": "text",
386
+ "message": "Where to send the browser after sign-in:",
387
+ "default": "http://localhost:3000/"
388
+ }
389
+ ],
390
+ "docs": "Needs a Services ID with Sign in with Apple enabled, its return URL set to APPLE_REDIRECT_URI (https, on a verified domain — Apple rejects localhost), and a Sign in with Apple key (.p8). Send users to GET /v1/api/auth/apple to sign in.",
391
+ "requiresTasks": false
392
+ },
393
+ {
394
+ "name": "email-client",
395
+ "title": "Email client",
396
+ "description": "SendEmail task over SMTP (nodemailer) — Gmail or any SMTP server",
397
+ "group": "integrations",
398
+ "registryDependencies": [],
399
+ "replaces": [
400
+ "src/tasks/SendEmail.ts",
401
+ "src/tasks/SendEmail.js"
402
+ ],
403
+ "aliases": [
404
+ "mailer"
405
+ ],
406
+ "prompts": [
407
+ {
408
+ "name": "provider",
409
+ "type": "select",
410
+ "message": "Email provider:",
411
+ "options": [
412
+ {
413
+ "value": "gmail",
414
+ "label": "Gmail",
415
+ "hint": "smtp.gmail.com, preconfigured",
416
+ "env": {
417
+ "SMTP_HOST": "smtp.gmail.com",
418
+ "SMTP_PORT": "465"
419
+ }
420
+ },
421
+ {
422
+ "value": "custom",
423
+ "label": "Other (custom SMTP)",
424
+ "hint": "you'll provide host + port"
425
+ }
426
+ ]
427
+ },
428
+ {
429
+ "name": "SMTP_HOST",
430
+ "type": "text",
431
+ "message": "SMTP host:",
432
+ "placeholder": "smtp.mailtrap.io",
433
+ "required": true,
434
+ "when": {
435
+ "provider": "custom"
436
+ }
437
+ },
438
+ {
439
+ "name": "SMTP_PORT",
440
+ "type": "text",
441
+ "message": "SMTP port:",
442
+ "default": "587",
443
+ "when": {
444
+ "provider": "custom"
445
+ }
446
+ },
447
+ {
448
+ "name": "SMTP_USER",
449
+ "type": "text",
450
+ "message": "Gmail address:",
451
+ "placeholder": "you@gmail.com",
452
+ "required": true,
453
+ "when": {
454
+ "provider": "gmail"
455
+ }
456
+ },
457
+ {
458
+ "name": "SMTP_USER",
459
+ "type": "text",
460
+ "message": "SMTP username / email:",
461
+ "placeholder": "you@example.com",
462
+ "required": true,
463
+ "when": {
464
+ "provider": "custom"
465
+ }
466
+ },
467
+ {
468
+ "name": "SMTP_PASS",
469
+ "type": "password",
470
+ "message": "Gmail app password (16 characters):",
471
+ "required": true,
472
+ "stripSpaces": true,
473
+ "pattern": "^\\S{16}$",
474
+ "patternMessage": "Gmail app passwords are 16 characters — this looks like a regular password, not an app password",
475
+ "when": {
476
+ "provider": "gmail"
477
+ },
478
+ "note": "Google no longer accepts your regular password for SMTP. Generate a 16-character App Password: Google Account → Security → 2-Step Verification → App passwords."
479
+ },
480
+ {
481
+ "name": "SMTP_PASS",
482
+ "type": "password",
483
+ "message": "SMTP password:",
484
+ "required": true,
485
+ "when": {
486
+ "provider": "custom"
487
+ }
488
+ },
489
+ {
490
+ "name": "SMTP_FROM",
491
+ "type": "text",
492
+ "message": "From address:",
493
+ "default": "{{SMTP_USER}}"
494
+ },
495
+ {
496
+ "name": "APP_URL",
497
+ "type": "text",
498
+ "message": "App URL (used in email links):",
499
+ "default": "http://localhost:3000"
500
+ }
501
+ ],
502
+ "docs": "Every enqueue('SendEmail', { to, subject, body }) now sends real mail. Change SMTP settings in .env.",
503
+ "requiresTasks": false
504
+ }
505
+ ]
506
+ }
@@ -0,0 +1 @@
1
+ {"files":[{"path":"src/api/health.js","content":"export const meta = {\n GET: {\n description: 'Health check — returns server status and current timestamp.',\n response: { status: 200, body: { status: 'OK', timestamp: '2024-01-01T00:00:00.000Z' } },\n },\n};\n\nexport const GET = async (_req, res) => {\n res.json({ status: 'OK', timestamp: new Date().toISOString() });\n};\n"},{"path":"src/tasks/SendEmail.js","content":"import { defineTask } from 'express-file-cluster/tasks';\n\nexport default defineTask(async (payload) => {\n // TODO: wire up your mailer\n console.log('[SendEmail] Sending to', payload.to);\n});\n"}]}
@@ -0,0 +1 @@
1
+ {"name":"account-security","files":[{"path":"src/api/auth/2fa/disable.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n POST: {\n description: 'Disable 2FA for the authenticated user.',\n request: { body: { code: '123456' } },\n response: { status: 200, body: { message: '2FA disabled' } },\n },\n};\n\nexport const middlewares = [requireAuth('user', 'admin')];\n\nexport const POST = async (req, res) => {\n const { code } = req.body;\n if (!code) return res.status(400).json({ error: 'code is required' });\n // TODO: verify code and disable 2FA\n res.json({ message: '2FA disabled' });\n};\n"},{"path":"src/api/auth/2fa/setup.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'Generate a TOTP secret and QR code to set up 2FA.',\n response: { status: 200, body: { qrCode: 'otpauth://totp/...', secret: 'BASE32SECRET' } },\n },\n POST: {\n description: 'Confirm a TOTP code to enable 2FA for the authenticated user.',\n request: { body: { code: '123456' } },\n response: { status: 200, body: { message: '2FA enabled' } },\n },\n};\n\nexport const middlewares = [requireAuth('user', 'admin')];\n\nexport const GET = async (req, res) => {\n // TODO: generate TOTP secret and return QR code URL\n res.json({ qrCode: 'otpauth://totp/...', secret: 'BASE32SECRET' });\n};\n\nexport const POST = async (req, res) => {\n const { code } = req.body;\n if (!code) return res.status(400).json({ error: 'code is required' });\n // TODO: verify TOTP code and enable 2FA\n res.json({ message: '2FA enabled' });\n};\n"},{"path":"src/api/auth/2fa/verify.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n POST: {\n description: 'Verify a TOTP code during login.',\n request: { body: { code: '123456' } },\n response: { status: 200, body: { message: '2FA verified' } },\n },\n};\n\nexport const POST = async (req, res) => {\n const { code } = req.body;\n if (!code) return res.status(400).json({ error: 'code is required' });\n // TODO: verify TOTP code\n res.json({ message: '2FA verified' });\n};\n"},{"path":"src/api/auth/change-password.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n POST: {\n description: 'Change password for the authenticated user.',\n request: { body: { oldPassword: 'current', newPassword: 'newpassword' } },\n response: { status: 200, body: { message: 'Password changed successfully' } },\n },\n};\n\nexport const middlewares = [requireAuth('user', 'admin')];\n\nexport const POST = async (req, res) => {\n const { oldPassword, newPassword } = req.body;\n if (!oldPassword || !newPassword) return res.status(400).json({ error: 'oldPassword and newPassword are required' });\n // TODO: verify old password, hash and update new password, then sign out other devices:\n // await revokeAllSessions(req.user.id) (import from 'express-file-cluster/auth')\n res.json({ message: 'Password changed successfully' });\n};\n"},{"path":"src/api/auth/refresh.js","content":"import { issueToken } from 'express-file-cluster/auth';\nimport crypto from 'node:crypto';\nimport { User } from '../../model/User.js';\nimport { Admin } from '../../model/Admin.js';\nexport const meta = {\n POST: {\n description: 'Refresh the JWT using the refresh-token cookie and issue a new access token.',\n response: { status: 200, body: { message: 'Token refreshed' } },\n },\n};\n\nconst REFRESH_TOKEN_TTL_MS = 1000 * 60 * 60 * 24 * 30; // 30 days\n\nexport const POST = async (req, res) => {\n const token = req.cookies?.efc_refresh_token || req.body?.refreshToken;\n if (!token) return res.status(401).json({ error: 'Refresh token required' });\n\n const user = await User.findOne({ refreshToken: token });\n const admin = user ? null : await Admin.findOne({ refreshToken: token });\n const account = user || admin;\n\n if (!account || !account.refreshTokenExpiry || new Date(account.refreshTokenExpiry) < new Date()) {\n return res.status(401).json({ error: 'Invalid or expired refresh token' });\n }\n\n const newRefreshToken = crypto.randomBytes(40).toString('hex');\n const refreshTokenExpiry = new Date(Date.now() + REFRESH_TOKEN_TTL_MS);\n if (user) await User.update(user.id, { refreshToken: newRefreshToken, refreshTokenExpiry });\n else if (admin) await Admin.update(admin.id, { refreshToken: newRefreshToken, refreshTokenExpiry });\n\n res.cookie('efc_refresh_token', newRefreshToken, {\n httpOnly: true,\n secure: process.env.NODE_ENV === 'production',\n sameSite: 'strict',\n maxAge: REFRESH_TOKEN_TTL_MS,\n });\n\n await issueToken(res, { id: account.id, role: account.role, email: account.email });\n res.json({ message: 'Token refreshed' });\n};\n"},{"path":"src/api/auth/sessions/[id].js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n DELETE: {\n description: 'Revoke a single active session by ID.',\n request: { params: { id: 'sess_01HXZ' } },\n response: { status: 200, body: { message: 'Session sess_01HXZ revoked' } },\n },\n};\n\nexport const middlewares = [requireAuth('user', 'admin')];\n\nexport const DELETE = async (req, res) => {\n const { id } = req.params;\n // TODO: revoke session by id\n res.json({ message: `Session ${id} revoked` });\n};\n"},{"path":"src/api/auth/sessions/index.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'List all active sessions for the authenticated user.',\n response: { status: 200, body: { sessions: [] } },\n },\n};\n\nexport const middlewares = [requireAuth('user', 'admin')];\n\nexport const GET = async (req, res) => {\n // TODO: fetch sessions for req.user.id\n res.json({ sessions: [] });\n};\n"},{"path":"src/model/Session.js","content":"import { defineModel } from 'express-file-cluster';\n\nexport const Session = defineModel('Session', {\n userId: { type: 'string', required: true },\n token: { type: 'string', required: true, unique: true },\n ip: { type: 'string', required: true },\n userAgent: { type: 'string', required: true },\n expiresAt: { type: 'date', required: true },\n isActive: { type: 'boolean', default: true },\n});\n"}],"dependencies":{},"devDependencies":{},"env":[]}
@@ -0,0 +1 @@
1
+ {"name":"account-settings","files":[{"path":"src/api/user/account.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'Download a personal data export for the authenticated user.',\n response: { status: 200, body: { data: { user: { id: '1', role: 'user', email: 'user@example.com' }, exportedAt: '2026-01-01T00:00:00.000Z' } } },\n },\n DELETE: {\n description: 'Schedule the authenticated account for deletion (requires password confirmation).',\n request: { body: { password: 'current' } },\n response: { status: 200, body: { message: 'Account scheduled for deletion' } },\n },\n};\n\nexport const middlewares = [requireAuth('user', 'admin')];\n\nexport const GET = async (req, res) => {\n // TODO: compile and return personal data export\n res.json({ data: { user: req.user, exportedAt: new Date().toISOString() } });\n};\n\nexport const DELETE = async (req, res) => {\n const { password } = req.body;\n if (!password) return res.status(400).json({ error: 'password confirmation required' });\n // TODO: verify password, schedule account deletion\n res.json({ message: 'Account scheduled for deletion' });\n};\n"},{"path":"src/api/user/activity.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'Paginated activity history for the authenticated user.',\n request: { query: { page: '1', limit: '20' } },\n response: { status: 200, body: { activities: [], total: 0, page: 1, limit: 20 } },\n },\n};\n\nexport const middlewares = [requireAuth('user', 'admin')];\n\nexport const GET = async (req, res) => {\n const { page = 1, limit = 20 } = req.query;\n // TODO: fetch paginated activity log\n res.json({ activities: [], total: 0, page: Number(page), limit: Number(limit) });\n};\n"},{"path":"src/api/user/avatar.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n POST: {\n description: 'Upload a new avatar image for the authenticated user.',\n response: { status: 200, body: { message: 'Avatar updated', url: 'https://example.com/avatar.jpg' } },\n },\n DELETE: {\n description: 'Remove the authenticated user\\'s avatar.',\n response: { status: 200, body: { message: 'Avatar removed' } },\n },\n};\n\nexport const middlewares = [requireAuth('user', 'admin')];\n\nexport const POST = async (req, res) => {\n // TODO: handle multipart upload, store file, update user.avatar\n res.json({ message: 'Avatar updated', url: 'https://example.com/avatar.jpg' });\n};\n\nexport const DELETE = async (req, res) => {\n // TODO: remove avatar and clear user.avatar\n res.json({ message: 'Avatar removed' });\n};\n"},{"path":"src/api/user/dashboard.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'Personal dashboard: stats, recent activity, and quick actions.',\n response: { status: 200, body: { stats: {}, recentActivity: [], quickActions: [] } },\n },\n};\n\nexport const middlewares = [requireAuth('user', 'admin')];\n\nexport const GET = async (req, res) => {\n // TODO: aggregate personal stats and activity\n res.json({ stats: {}, recentActivity: [], quickActions: [] });\n};\n"},{"path":"src/api/user/settings.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'Get account settings (notifications, language, theme, privacy) for the authenticated user.',\n response: { status: 200, body: { settings: { notifications: true, language: 'en', theme: 'system', privacy: 'public' } } },\n },\n PUT: {\n description: 'Update account settings for the authenticated user.',\n request: { body: { notifications: true, language: 'en', theme: 'system', privacy: 'public' } },\n response: { status: 200, body: { message: 'Settings updated', settings: { notifications: true, language: 'en', theme: 'system', privacy: 'public' } } },\n },\n};\n\nexport const middlewares = [requireAuth('user', 'admin')];\n\nexport const GET = async (req, res) => {\n // TODO: fetch user settings from DB\n res.json({ settings: { notifications: true, language: 'en', theme: 'system', privacy: 'public' } });\n};\n\nexport const PUT = async (req, res) => {\n const { notifications, language, theme, privacy } = req.body;\n // TODO: update user settings in DB\n res.json({ message: 'Settings updated', settings: { notifications, language, theme, privacy } });\n};\n"}],"dependencies":{},"devDependencies":{},"env":[]}
@@ -0,0 +1 @@
1
+ {"name":"admin-admins","files":[{"path":"src/api/admin/admins/[id].js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'Fetch a single admin account by ID (admin only).',\n request: { params: { id: 'adm_01HXZ' } },\n response: { status: 200, body: { admin: { id: 'adm_01HXZ' } } },\n },\n PUT: {\n description: 'Update an admin account by ID (admin only).',\n request: { params: { id: 'adm_01HXZ' }, body: { name: 'Jane Doe', role: 'admin' } },\n response: { status: 200, body: { message: 'Admin updated', admin: { id: 'adm_01HXZ', name: 'Jane Doe', role: 'admin' } } },\n },\n DELETE: {\n description: 'Delete an admin account by ID (admin only).',\n request: { params: { id: 'adm_01HXZ' } },\n response: { status: 200, body: { message: 'Admin adm_01HXZ deleted' } },\n },\n};\n\nexport const middlewares = [requireAuth('admin')];\n\nexport const GET = async (req, res) => {\n const { id } = req.params;\n // TODO: fetch admin by id\n res.json({ admin: { id } });\n};\n\nexport const PUT = async (req, res) => {\n const { id } = req.params;\n // TODO: update admin record\n res.json({ message: 'Admin updated', admin: { id, ...req.body } });\n};\n\nexport const DELETE = async (req, res) => {\n const { id } = req.params;\n // TODO: delete admin\n res.json({ message: `Admin ${id} deleted` });\n};\n"},{"path":"src/api/admin/admins/index.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'List all admin accounts (admin only).',\n response: { status: 200, body: { admins: [], total: 0 } },\n },\n POST: {\n description: 'Create a new admin account (admin only).',\n request: { body: { name: 'Jane Doe', email: 'jane@example.com', role: 'admin' } },\n response: { status: 201, body: { message: 'Admin created', admin: { id: 'new-id', name: 'Jane Doe', email: 'jane@example.com', role: 'admin' } } },\n },\n};\n\nexport const middlewares = [requireAuth('admin')];\n\nexport const GET = async (_req, res) => {\n // TODO: fetch admins from DB\n res.json({ admins: [], total: 0 });\n};\n\nexport const POST = async (req, res) => {\n const { name, email, role } = req.body;\n if (!name || !email) return res.status(400).json({ error: 'name and email are required' });\n // TODO: create admin account\n res.status(201).json({ message: 'Admin created', admin: { id: 'new-id', name, email, role: role ?? 'admin' } });\n};\n"},{"path":"src/api/admin/roles/[id].js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'Fetch a single role by ID (admin only).',\n request: { params: { id: 'role_01HXZ' } },\n response: { status: 200, body: { role: { id: 'role_01HXZ', name: 'editor', permissions: ['content:write'] } } },\n },\n PUT: {\n description: 'Update a role by ID (admin only).',\n request: { params: { id: 'role_01HXZ' }, body: { name: 'editor', permissions: ['content:write'] } },\n response: { status: 200, body: { message: 'Role updated', role: { id: 'role_01HXZ', name: 'editor', permissions: ['content:write'] } } },\n },\n DELETE: {\n description: 'Delete a role by ID (admin only).',\n request: { params: { id: 'role_01HXZ' } },\n response: { status: 200, body: { message: 'Role role_01HXZ deleted' } },\n },\n};\n\nexport const middlewares = [requireAuth('admin')];\n\nexport const GET = async (req, res) => {\n const { id } = req.params;\n // TODO: fetch role by id\n res.json({ role: { id } });\n};\n\nexport const PUT = async (req, res) => {\n const { id } = req.params;\n // TODO: update role\n res.json({ message: 'Role updated', role: { id, ...req.body } });\n};\n\nexport const DELETE = async (req, res) => {\n const { id } = req.params;\n // TODO: delete role\n res.json({ message: `Role ${id} deleted` });\n};\n"},{"path":"src/api/admin/roles/index.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'List all roles (admin only).',\n response: { status: 200, body: { roles: [] } },\n },\n POST: {\n description: 'Create a new role (admin only).',\n request: { body: { name: 'editor', description: 'Can edit content', permissions: ['content:write'] } },\n response: { status: 201, body: { message: 'Role created', role: { id: 'new-id', name: 'editor', permissions: ['content:write'] } } },\n },\n};\n\nexport const middlewares = [requireAuth('admin')];\n\nexport const GET = async (_req, res) => {\n // TODO: fetch all roles\n res.json({ roles: [] });\n};\n\nexport const POST = async (req, res) => {\n const { name, description, permissions } = req.body;\n if (!name) return res.status(400).json({ error: 'name is required' });\n // TODO: create role\n res.status(201).json({ message: 'Role created', role: { id: 'new-id', name, permissions: permissions ?? [] } });\n};\n"},{"path":"src/model/Role.js","content":"import { defineModel } from 'express-file-cluster';\n\nexport const Role = defineModel('Role', {\n name: { type: 'string', required: true, unique: true },\n description: { type: 'string', required: true },\n permissions: { type: 'array', of: 'string', default: [] },\n});\n"}],"dependencies":{},"devDependencies":{},"env":[]}
@@ -0,0 +1 @@
1
+ {"name":"admin-analytics","files":[{"path":"src/api/admin/analytics/index.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'Analytics overview: users, revenue, traffic (admin only).',\n response: { status: 200, body: { users: {}, revenue: {}, traffic: {} } },\n },\n};\n\nexport const middlewares = [requireAuth('admin')];\n\nexport const GET = async (req, res) => {\n // TODO: aggregate analytics overview\n res.json({ users: {}, revenue: {}, traffic: {} });\n};\n"},{"path":"src/api/admin/analytics/revenue.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'Revenue analytics: MRR, ARR, payment history (admin only).',\n request: { query: { period: '30d' } },\n response: { status: 200, body: { mrr: 0, arr: 0, history: [], period: '30d' } },\n },\n};\n\nexport const middlewares = [requireAuth('admin')];\n\nexport const GET = async (req, res) => {\n const { period = '30d' } = req.query;\n // TODO: fetch revenue analytics for period\n res.json({ mrr: 0, arr: 0, history: [], period });\n};\n"},{"path":"src/api/admin/analytics/traffic.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'Traffic analytics: page views, devices, countries (admin only).',\n request: { query: { period: '30d' } },\n response: { status: 200, body: { pageViews: 0, devices: {}, countries: {}, period: '30d' } },\n },\n};\n\nexport const middlewares = [requireAuth('admin')];\n\nexport const GET = async (req, res) => {\n const { period = '30d' } = req.query;\n // TODO: fetch traffic analytics for period\n res.json({ pageViews: 0, devices: {}, countries: {}, period });\n};\n"},{"path":"src/api/admin/analytics/users.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'User analytics: registrations, active users, churn (admin only).',\n request: { query: { period: '30d' } },\n response: { status: 200, body: { registrations: [], activeUsers: 0, churn: 0, period: '30d' } },\n },\n};\n\nexport const middlewares = [requireAuth('admin')];\n\nexport const GET = async (req, res) => {\n const { period = '30d' } = req.query;\n // TODO: fetch user analytics for period\n res.json({ registrations: [], activeUsers: 0, churn: 0, period });\n};\n"}],"dependencies":{},"devDependencies":{},"env":[]}
@@ -0,0 +1 @@
1
+ {"name":"admin-billing","files":[{"path":"src/api/admin/billing/coupons/[id].js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'Fetch a single coupon by ID (admin only).',\n request: { params: { id: 'coupon_01HXZ' } },\n response: { status: 200, body: { coupon: { id: 'coupon_01HXZ', code: 'sample-code', type: 'sample-type', value: 'sample-value' } } },\n },\n PUT: {\n description: 'Update a coupon by ID (admin only).',\n request: { params: { id: 'coupon_01HXZ' }, body: { code: 'sample-code', type: 'sample-type', value: 'sample-value' } },\n response: { status: 200, body: { message: 'Coupon updated', coupon: { id: 'coupon_01HXZ', code: 'sample-code', type: 'sample-type', value: 'sample-value' } } },\n },\n DELETE: {\n description: 'Delete a coupon by ID (admin only).',\n request: { params: { id: 'coupon_01HXZ' } },\n response: { status: 200, body: { message: 'Coupon coupon_01HXZ deleted' } },\n },\n};\n\nexport const middlewares = [requireAuth('admin')];\n\nexport const GET = async (req, res) => {\n const { id } = req.params;\n // TODO: fetch Coupon by id\n res.json({ coupon: { id } });\n};\n\nexport const PUT = async (req, res) => {\n const { id } = req.params;\n // TODO: update Coupon\n res.json({ message: 'Coupon updated', coupon: { id, ...req.body } });\n};\n\nexport const DELETE = async (req, res) => {\n const { id } = req.params;\n // TODO: delete Coupon\n res.json({ message: `Coupon ${id} deleted` });\n};\n"},{"path":"src/api/admin/billing/coupons/index.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'List all coupons (admin only).',\n response: { status: 200, body: { coupons: [], total: 0 } },\n },\n POST: {\n description: 'Create a new coupon (admin only).',\n request: { body: { code: 'sample-code', type: 'sample-type', value: 'sample-value' } },\n response: { status: 201, body: { message: 'Coupon created', coupon: { id: 'new-id', code: 'sample-code' } } },\n },\n};\n\nexport const middlewares = [requireAuth('admin')];\n\nexport const GET = async (_req, res) => {\n // TODO: fetch coupons\n res.json({ coupons: [], total: 0 });\n};\n\nexport const POST = async (req, res) => {\n const { code, type, value } = req.body;\n // TODO: create Coupon\n res.status(201).json({ message: 'Coupon created', coupon: { id: 'new-id' } });\n};\n"},{"path":"src/api/admin/billing/plans/[id].js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'Fetch a single plan by ID (admin only).',\n request: { params: { id: 'plan_01HXZ' } },\n response: { status: 200, body: { plan: { id: 'plan_01HXZ', name: 'sample-name', price: 'sample-price', interval: 'sample-interval' } } },\n },\n PUT: {\n description: 'Update a plan by ID (admin only).',\n request: { params: { id: 'plan_01HXZ' }, body: { name: 'sample-name', price: 'sample-price', interval: 'sample-interval' } },\n response: { status: 200, body: { message: 'Plan updated', plan: { id: 'plan_01HXZ', name: 'sample-name', price: 'sample-price', interval: 'sample-interval' } } },\n },\n DELETE: {\n description: 'Delete a plan by ID (admin only).',\n request: { params: { id: 'plan_01HXZ' } },\n response: { status: 200, body: { message: 'Plan plan_01HXZ deleted' } },\n },\n};\n\nexport const middlewares = [requireAuth('admin')];\n\nexport const GET = async (req, res) => {\n const { id } = req.params;\n // TODO: fetch Plan by id\n res.json({ plan: { id } });\n};\n\nexport const PUT = async (req, res) => {\n const { id } = req.params;\n // TODO: update Plan\n res.json({ message: 'Plan updated', plan: { id, ...req.body } });\n};\n\nexport const DELETE = async (req, res) => {\n const { id } = req.params;\n // TODO: delete Plan\n res.json({ message: `Plan ${id} deleted` });\n};\n"},{"path":"src/api/admin/billing/plans/index.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'List all plans (admin only).',\n response: { status: 200, body: { plans: [], total: 0 } },\n },\n POST: {\n description: 'Create a new plan (admin only).',\n request: { body: { name: 'sample-name', price: 'sample-price', interval: 'sample-interval' } },\n response: { status: 201, body: { message: 'Plan created', plan: { id: 'new-id', name: 'sample-name' } } },\n },\n};\n\nexport const middlewares = [requireAuth('admin')];\n\nexport const GET = async (_req, res) => {\n // TODO: fetch plans\n res.json({ plans: [], total: 0 });\n};\n\nexport const POST = async (req, res) => {\n const { name, price, interval } = req.body;\n // TODO: create Plan\n res.status(201).json({ message: 'Plan created', plan: { id: 'new-id' } });\n};\n"},{"path":"src/api/admin/billing/subscriptions/index.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'List all subscriptions with filters (admin only).',\n request: { query: { status: 'active', page: '1', limit: '20' } },\n response: { status: 200, body: { subscriptions: [], total: 0, page: 1, limit: 20 } },\n },\n};\n\nexport const middlewares = [requireAuth('admin')];\n\nexport const GET = async (req, res) => {\n const { status, page = 1, limit = 20 } = req.query;\n // TODO: fetch all subscriptions with filters\n res.json({ subscriptions: [], total: 0, page: Number(page), limit: Number(limit) });\n};\n"},{"path":"src/model/Coupon.js","content":"import { defineModel } from 'express-file-cluster';\n\nexport const Coupon = defineModel('Coupon', {\n code: { type: 'string', required: true, unique: true },\n type: { type: 'string', required: true, default: 'percent' },\n value: { type: 'number', required: true },\n maxUses: { type: 'number', default: 0 },\n usedCount: { type: 'number', default: 0 },\n expiresAt: { type: 'date' },\n isActive: { type: 'boolean', default: true },\n});\n"},{"path":"src/model/Plan.js","content":"import { defineModel } from 'express-file-cluster';\n\nexport const Plan = defineModel('Plan', {\n name: { type: 'string', required: true },\n description: { type: 'string', required: true },\n price: { type: 'number', required: true },\n interval: { type: 'string', required: true, default: 'monthly' },\n features: { type: 'array', of: 'string', default: [] },\n isActive: { type: 'boolean', default: true },\n});\n"}],"dependencies":{},"devDependencies":{},"env":[]}
@@ -0,0 +1 @@
1
+ {"name":"admin-content","files":[{"path":"src/api/admin/content/blogs/[id].js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'Fetch a single blog by ID (admin only).',\n request: { params: { id: 'blog_01HXZ' } },\n response: { status: 200, body: { blog: { id: 'blog_01HXZ', title: 'sample-title', slug: 'sample-slug', content: 'sample-content' } } },\n },\n PUT: {\n description: 'Update a blog by ID (admin only).',\n request: { params: { id: 'blog_01HXZ' }, body: { title: 'sample-title', slug: 'sample-slug', content: 'sample-content' } },\n response: { status: 200, body: { message: 'Blog updated', blog: { id: 'blog_01HXZ', title: 'sample-title', slug: 'sample-slug', content: 'sample-content' } } },\n },\n DELETE: {\n description: 'Delete a blog by ID (admin only).',\n request: { params: { id: 'blog_01HXZ' } },\n response: { status: 200, body: { message: 'Blog blog_01HXZ deleted' } },\n },\n};\n\nexport const middlewares = [requireAuth('admin')];\n\nexport const GET = async (req, res) => {\n const { id } = req.params;\n // TODO: fetch Blog by id\n res.json({ blog: { id } });\n};\n\nexport const PUT = async (req, res) => {\n const { id } = req.params;\n // TODO: update Blog\n res.json({ message: 'Blog updated', blog: { id, ...req.body } });\n};\n\nexport const DELETE = async (req, res) => {\n const { id } = req.params;\n // TODO: delete Blog\n res.json({ message: `Blog ${id} deleted` });\n};\n"},{"path":"src/api/admin/content/blogs/index.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'List all blogs (admin only).',\n response: { status: 200, body: { blogs: [], total: 0 } },\n },\n POST: {\n description: 'Create a new blog (admin only).',\n request: { body: { title: 'sample-title', slug: 'sample-slug', content: 'sample-content' } },\n response: { status: 201, body: { message: 'Blog created', blog: { id: 'new-id', title: 'sample-title' } } },\n },\n};\n\nexport const middlewares = [requireAuth('admin')];\n\nexport const GET = async (_req, res) => {\n // TODO: fetch blogs\n res.json({ blogs: [], total: 0 });\n};\n\nexport const POST = async (req, res) => {\n const { title, slug, content } = req.body;\n // TODO: create Blog\n res.status(201).json({ message: 'Blog created', blog: { id: 'new-id' } });\n};\n"},{"path":"src/api/admin/content/categories/[id].js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'Fetch a single category by ID (admin only).',\n request: { params: { id: 'category_01HXZ' } },\n response: { status: 200, body: { category: { id: 'category_01HXZ', name: 'sample-name', slug: 'sample-slug' } } },\n },\n PUT: {\n description: 'Update a category by ID (admin only).',\n request: { params: { id: 'category_01HXZ' }, body: { name: 'sample-name', slug: 'sample-slug' } },\n response: { status: 200, body: { message: 'Category updated', category: { id: 'category_01HXZ', name: 'sample-name', slug: 'sample-slug' } } },\n },\n DELETE: {\n description: 'Delete a category by ID (admin only).',\n request: { params: { id: 'category_01HXZ' } },\n response: { status: 200, body: { message: 'Category category_01HXZ deleted' } },\n },\n};\n\nexport const middlewares = [requireAuth('admin')];\n\nexport const GET = async (req, res) => {\n const { id } = req.params;\n // TODO: fetch Category by id\n res.json({ category: { id } });\n};\n\nexport const PUT = async (req, res) => {\n const { id } = req.params;\n // TODO: update Category\n res.json({ message: 'Category updated', category: { id, ...req.body } });\n};\n\nexport const DELETE = async (req, res) => {\n const { id } = req.params;\n // TODO: delete Category\n res.json({ message: `Category ${id} deleted` });\n};\n"},{"path":"src/api/admin/content/categories/index.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'List all categories (admin only).',\n response: { status: 200, body: { categories: [], total: 0 } },\n },\n POST: {\n description: 'Create a new category (admin only).',\n request: { body: { name: 'sample-name', slug: 'sample-slug' } },\n response: { status: 201, body: { message: 'Category created', category: { id: 'new-id', name: 'sample-name' } } },\n },\n};\n\nexport const middlewares = [requireAuth('admin')];\n\nexport const GET = async (_req, res) => {\n // TODO: fetch categories\n res.json({ categories: [], total: 0 });\n};\n\nexport const POST = async (req, res) => {\n const { name, slug } = req.body;\n // TODO: create Category\n res.status(201).json({ message: 'Category created', category: { id: 'new-id' } });\n};\n"},{"path":"src/api/admin/content/faqs/[id].js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'Fetch a single faq by ID (admin only).',\n request: { params: { id: 'faq_01HXZ' } },\n response: { status: 200, body: { faq: { id: 'faq_01HXZ', question: 'sample-question', answer: 'sample-answer', category: 'sample-category' } } },\n },\n PUT: {\n description: 'Update a faq by ID (admin only).',\n request: { params: { id: 'faq_01HXZ' }, body: { question: 'sample-question', answer: 'sample-answer', category: 'sample-category' } },\n response: { status: 200, body: { message: 'FAQ updated', faq: { id: 'faq_01HXZ', question: 'sample-question', answer: 'sample-answer', category: 'sample-category' } } },\n },\n DELETE: {\n description: 'Delete a faq by ID (admin only).',\n request: { params: { id: 'faq_01HXZ' } },\n response: { status: 200, body: { message: 'FAQ faq_01HXZ deleted' } },\n },\n};\n\nexport const middlewares = [requireAuth('admin')];\n\nexport const GET = async (req, res) => {\n const { id } = req.params;\n // TODO: fetch FAQ by id\n res.json({ faq: { id } });\n};\n\nexport const PUT = async (req, res) => {\n const { id } = req.params;\n // TODO: update FAQ\n res.json({ message: 'FAQ updated', faq: { id, ...req.body } });\n};\n\nexport const DELETE = async (req, res) => {\n const { id } = req.params;\n // TODO: delete FAQ\n res.json({ message: `FAQ ${id} deleted` });\n};\n"},{"path":"src/api/admin/content/faqs/index.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'List all faqs (admin only).',\n response: { status: 200, body: { faqs: [], total: 0 } },\n },\n POST: {\n description: 'Create a new faq (admin only).',\n request: { body: { question: 'sample-question', answer: 'sample-answer', category: 'sample-category' } },\n response: { status: 201, body: { message: 'FAQ created', faq: { id: 'new-id', question: 'sample-question' } } },\n },\n};\n\nexport const middlewares = [requireAuth('admin')];\n\nexport const GET = async (_req, res) => {\n // TODO: fetch faqs\n res.json({ faqs: [], total: 0 });\n};\n\nexport const POST = async (req, res) => {\n const { question, answer, category } = req.body;\n // TODO: create FAQ\n res.status(201).json({ message: 'FAQ created', faq: { id: 'new-id' } });\n};\n"},{"path":"src/model/Blog.js","content":"import { defineModel } from 'express-file-cluster';\n\nexport const Blog = defineModel('Blog', {\n title: { type: 'string', required: true },\n slug: { type: 'string', required: true, unique: true },\n content: { type: 'string', required: true },\n authorId: { type: 'string', required: true },\n category: { type: 'string', required: true, default: 'general' },\n tags: { type: 'array', of: 'string', default: [] },\n status: { type: 'string', required: true, default: 'draft' },\n publishedAt: { type: 'date' },\n});\n"},{"path":"src/model/Category.js","content":"import { defineModel } from 'express-file-cluster';\n\nexport const Category = defineModel('Category', {\n name: { type: 'string', required: true },\n slug: { type: 'string', required: true, unique: true },\n description: { type: 'string' },\n parentId: { type: 'string' },\n});\n"},{"path":"src/model/FAQ.js","content":"import { defineModel } from 'express-file-cluster';\n\nexport const FAQ = defineModel('FAQ', {\n question: { type: 'string', required: true },\n answer: { type: 'string', required: true },\n category: { type: 'string', required: true, default: 'general' },\n order: { type: 'number', default: 0 },\n isPublished: { type: 'boolean', default: false },\n});\n"}],"dependencies":{},"devDependencies":{},"env":[]}
@@ -0,0 +1 @@
1
+ {"name":"admin-logs","files":[{"path":"src/api/admin/logs/activity.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'Paginated activity log entries (admin only).',\n request: { query: { page: '1', limit: '50' } },\n response: { status: 200, body: { logs: [], total: 0, page: 1, limit: 50 } },\n },\n};\n\nexport const middlewares = [requireAuth('admin')];\n\nexport const GET = async (req, res) => {\n const { page = 1, limit = 50 } = req.query;\n // TODO: fetch activity logs with pagination\n res.json({ logs: [], total: 0, page: Number(page), limit: Number(limit) });\n};\n"},{"path":"src/api/admin/logs/audit.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'Paginated audit log entries (admin only).',\n request: { query: { page: '1', limit: '50' } },\n response: { status: 200, body: { logs: [], total: 0, page: 1, limit: 50 } },\n },\n};\n\nexport const middlewares = [requireAuth('admin')];\n\nexport const GET = async (req, res) => {\n const { page = 1, limit = 50 } = req.query;\n // TODO: fetch audit logs with pagination\n res.json({ logs: [], total: 0, page: Number(page), limit: Number(limit) });\n};\n"},{"path":"src/api/admin/logs/security.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'Paginated security log entries (admin only).',\n request: { query: { page: '1', limit: '50' } },\n response: { status: 200, body: { logs: [], total: 0, page: 1, limit: 50 } },\n },\n};\n\nexport const middlewares = [requireAuth('admin')];\n\nexport const GET = async (req, res) => {\n const { page = 1, limit = 50 } = req.query;\n // TODO: fetch security logs with pagination\n res.json({ logs: [], total: 0, page: Number(page), limit: Number(limit) });\n};\n"},{"path":"src/api/admin/notifications/broadcast.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n POST: {\n description: 'Broadcast a notification to all users (admin only).',\n request: { body: { title: 'Announcement', message: 'Hello everyone!', type: 'info' } },\n response: { status: 200, body: { message: 'Broadcast sent', count: 0 } },\n },\n};\n\nexport const middlewares = [requireAuth('admin')];\n\nexport const POST = async (req, res) => {\n const { title, message, type } = req.body;\n if (!title || !message) return res.status(400).json({ error: 'title and message are required' });\n // TODO: send notification to all users\n res.json({ message: 'Broadcast sent', count: 0 });\n};\n"},{"path":"src/api/admin/notifications/index.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'List all sent notifications (admin only).',\n response: { status: 200, body: { notifications: [], total: 0 } },\n },\n POST: {\n description: 'Send a notification to a specific user (admin only).',\n request: { body: { userId: 'usr_01HXZ', title: 'Welcome', message: 'Thanks for joining!', type: 'info' } },\n response: { status: 201, body: { message: 'Notification sent' } },\n },\n};\n\nexport const middlewares = [requireAuth('admin')];\n\nexport const GET = async (_req, res) => {\n // TODO: fetch sent notifications\n res.json({ notifications: [], total: 0 });\n};\n\nexport const POST = async (req, res) => {\n const { userId, title, message, type } = req.body;\n if (!userId || !title || !message) return res.status(400).json({ error: 'userId, title and message are required' });\n // TODO: create and send notification to user\n res.status(201).json({ message: 'Notification sent' });\n};\n"},{"path":"src/model/AuditLog.js","content":"import { defineModel } from 'express-file-cluster';\n\nexport const AuditLog = defineModel('AuditLog', {\n adminId: { type: 'string', required: true },\n action: { type: 'string', required: true },\n entity: { type: 'string', required: true },\n entityId: { type: 'string', required: true },\n metadata: { type: 'object' },\n ip: { type: 'string', required: true },\n});\n"},{"path":"src/model/Notification.js","content":"import { defineModel } from 'express-file-cluster';\n\nexport const Notification = defineModel('Notification', {\n userId: { type: 'string', required: true },\n title: { type: 'string', required: true },\n message: { type: 'string', required: true },\n type: { type: 'string', required: true, default: 'info' },\n isRead: { type: 'boolean', default: false },\n link: { type: 'string' },\n});\n"}],"dependencies":{},"devDependencies":{},"env":[]}
@@ -0,0 +1 @@
1
+ {"name":"admin-support","files":[{"path":"src/api/admin/tickets/[id].js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'Fetch a single support ticket by ID (admin only).',\n request: { params: { id: 'tk_01HXZ' } },\n response: { status: 200, body: { ticket: { id: 'tk_01HXZ' } } },\n },\n PUT: {\n description: 'Assign, reply to, or change the status of a support ticket (admin only).',\n request: { params: { id: 'tk_01HXZ' }, body: { reply: 'Looking into it.', status: 'in_progress', assignedTo: 'adm_01HXZ' } },\n response: { status: 200, body: { message: 'Ticket updated', ticket: { id: 'tk_01HXZ', status: 'in_progress', assignedTo: 'adm_01HXZ' } } },\n },\n};\n\nexport const middlewares = [requireAuth('admin')];\n\nexport const GET = async (req, res) => {\n const { id } = req.params;\n // TODO: fetch ticket by id\n res.json({ ticket: { id } });\n};\n\nexport const PUT = async (req, res) => {\n const { id } = req.params;\n const { reply, status, assignedTo } = req.body;\n // TODO: update ticket (assign, change status, add reply)\n res.json({ message: 'Ticket updated', ticket: { id, status, assignedTo } });\n};\n"},{"path":"src/api/admin/tickets/index.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'List all support tickets with filters (admin only).',\n request: { query: { status: 'open', priority: 'normal', page: '1', limit: '20' } },\n response: { status: 200, body: { tickets: [], total: 0, page: 1, limit: 20 } },\n },\n};\n\nexport const middlewares = [requireAuth('admin')];\n\nexport const GET = async (req, res) => {\n const { status, priority, page = 1, limit = 20 } = req.query;\n // TODO: fetch all tickets with filters\n res.json({ tickets: [], total: 0, page: Number(page), limit: Number(limit) });\n};\n"},{"path":"src/model/SupportTicket.js","content":"import { defineModel } from 'express-file-cluster';\n\nexport const SupportTicket = defineModel('SupportTicket', {\n userId: { type: 'string', required: true },\n subject: { type: 'string', required: true },\n message: { type: 'string', required: true },\n status: { type: 'string', required: true, default: 'open' },\n priority: { type: 'string', required: true, default: 'normal' },\n assignedTo: { type: 'string' },\n});\n"}],"dependencies":{},"devDependencies":{},"env":[]}
@@ -0,0 +1 @@
1
+ {"name":"admin-system","files":[{"path":"src/api/admin/settings/index.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'Get system-wide settings (admin only).',\n response: { status: 200, body: { settings: {} } },\n },\n PUT: {\n description: 'Update system-wide settings (admin only).',\n request: { body: { maintenanceMode: false } },\n response: { status: 200, body: { message: 'Settings updated', settings: { maintenanceMode: false } } },\n },\n};\n\nexport const middlewares = [requireAuth('admin')];\n\nexport const GET = async (_req, res) => {\n // TODO: fetch system settings from DB\n res.json({ settings: {} });\n};\n\nexport const PUT = async (req, res) => {\n // TODO: update system settings\n res.json({ message: 'Settings updated', settings: req.body });\n};\n"},{"path":"src/api/admin/system/cache.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n DELETE: {\n description: 'Flush the application cache (admin only).',\n response: { status: 200, body: { message: 'Cache cleared' } },\n },\n};\n\nexport const middlewares = [requireAuth('admin')];\n\nexport const DELETE = async (_req, res) => {\n // TODO: flush Redis or in-memory cache\n res.json({ message: 'Cache cleared' });\n};\n"},{"path":"src/api/admin/system/health.js","content":"import { requireAuth } from 'express-file-cluster/auth';\nexport const meta = {\n GET: {\n description: 'System health check: DB, queue, cache status (admin only).',\n response: { status: 200, body: { status: 'ok', db: 'ok', queue: 'ok', uptime: 12345 } },\n },\n};\n\nexport const middlewares = [requireAuth('admin')];\n\nexport const GET = async (_req, res) => {\n // TODO: check DB connection, queue, cache health\n res.json({ status: 'ok', db: 'ok', queue: 'ok', uptime: process.uptime() });\n};\n"}],"dependencies":{},"devDependencies":{},"env":[]}