@fernir2/saas-kit-cli 0.1.40 → 0.1.41-1096

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 (286) hide show
  1. package/base-repo/app-constants/alias-symbols.js +2 -2
  2. package/base-repo/app-constants/aliases.js +3 -1
  3. package/base-repo/app-constants/app-packages-names.js +4 -0
  4. package/base-repo/app-constants/command-names.js +4 -0
  5. package/base-repo/app-constants/internal-system-constants.js +8 -0
  6. package/base-repo/app-constants/project-paths.js +6 -3
  7. package/base-repo/constants/basic-types.js +4 -0
  8. package/base-repo/constants/ci-constants.js +7 -0
  9. package/base-repo/constants/http-constants.js +4 -0
  10. package/base-repo/constants/http-methods.js +6 -0
  11. package/base-repo/constants/internal-cli-constants.js +6 -0
  12. package/base-repo/constants/internal-common-strings.js +4 -0
  13. package/base-repo/constants/internal-extensions.js +6 -0
  14. package/base-repo/constants/packages.js +1 -1
  15. package/base-repo/constants/push-statuses.js +4 -0
  16. package/base-repo/constants/strings-constants.js +4 -0
  17. package/base-repo/constants/type-string-values.js +4 -0
  18. package/base-repo/process.js +4 -0
  19. package/cli/.env.example +8 -61
  20. package/cli/.prettierignore +15 -0
  21. package/cli/.prettierrc.json +8 -0
  22. package/cli/README.md +3 -3
  23. package/cli/bin/create.ts +635 -453
  24. package/cli/configs/drizzle-cli-config.ts +16 -15
  25. package/cli/configs/next-cli-config.ts +44 -78
  26. package/cli/configs/playwright-cli-config.ts +45 -35
  27. package/cli/configs/tsconfig.cli.json +35 -35
  28. package/cli/configs/tsconfig.server.json +13 -13
  29. package/cli/drizzle.config.ts +6 -6
  30. package/cli/next.config.js +5 -3
  31. package/cli/npm-commands/gen-meta.ts +9 -3
  32. package/cli/npm-commands/gen-schema.ts +3 -3
  33. package/cli/npm-commands/migrate-db.ts +17 -15
  34. package/cli/npm-commands/seed-db.ts +17 -15
  35. package/cli/package-template.json +54 -57
  36. package/cli/playwright.config.ts +6 -6
  37. package/cli/postcss.config.mjs +7 -7
  38. package/cli/public/handle.svg +23 -0
  39. package/cli/public/images/login-image-dark.webp +0 -0
  40. package/cli/public/images/login-image.webp +0 -0
  41. package/cli/public/images/logo.webp +0 -0
  42. package/cli/public/images/no-image.webp +0 -0
  43. package/cli/public/images/profile.webp +0 -0
  44. package/cli/public/images/search-not-found-result.webp +0 -0
  45. package/cli/public/logo.svg +1 -0
  46. package/cli/server.ts +48 -40
  47. package/cli/src/app/api/v1/(f)/[resourceName]/[id]/route.ts +18 -11
  48. package/cli/src/app/api/v1/(f)/[resourceName]/route.ts +23 -14
  49. package/cli/src/app/api/v1/(f)/[resourceName]/upsert/route.ts +6 -3
  50. package/cli/src/app/api/v1/(f)/blob/route.ts +14 -7
  51. package/cli/src/app/api/v1/(f)/log/route.ts +14 -7
  52. package/cli/src/app/api/v1/(f)/markdown/route.ts +6 -0
  53. package/cli/src/app/api/v1/(f)/other-user/[id]/route.ts +23 -14
  54. package/cli/src/app/api/v1/(f)/other-user/route.ts +14 -7
  55. package/cli/src/app/api/v1/(f)/password/forgot-password/route.ts +6 -3
  56. package/cli/src/app/api/v1/(f)/password/reset-password/route.ts +6 -3
  57. package/cli/src/app/api/v1/(f)/payment/method/route.ts +9 -4
  58. package/cli/src/app/api/v1/(f)/payment/route.ts +6 -3
  59. package/cli/src/app/api/v1/(f)/payment/verify-fail/route.ts +6 -3
  60. package/cli/src/app/api/v1/(f)/payment/verify-success/route.ts +6 -3
  61. package/cli/src/app/api/v1/(f)/search-result/route.ts +6 -3
  62. package/cli/src/app/api/v1/(f)/searchable-resources/route.ts +6 -3
  63. package/cli/src/app/api/v1/(f)/sign-in/route.ts +6 -3
  64. package/cli/src/app/api/v1/(f)/sign-out/route.ts +6 -3
  65. package/cli/src/app/api/v1/(f)/sign-up/route.ts +6 -3
  66. package/cli/src/app/api/v1/(f)/subscription/cancel/route.ts +6 -3
  67. package/cli/src/app/api/v1/(f)/subscription/create/route.ts +6 -3
  68. package/cli/src/app/api/v1/(f)/subscription/update/route.ts +6 -3
  69. package/cli/src/app/api/v1/(f)/uimeta/route.ts +6 -3
  70. package/cli/src/app/api/v1/(f)/uimetas/route.ts +6 -3
  71. package/cli/src/app/api/v1/(f)/user-feature/isenabled/route.ts +6 -3
  72. package/cli/src/app/api/v1/(f)/user-permission/route.ts +6 -3
  73. package/cli/src/app/api/v1/(f)/visible-workspace/route.ts +10 -5
  74. package/cli/src/app/api/v1/(f)/workspace/change/route.ts +10 -5
  75. package/cli/src/app/f/(not-signed-in)/edit-password/page.tsx +8 -8
  76. package/cli/src/app/f/(not-signed-in)/forgot-password/page.tsx +13 -13
  77. package/cli/src/app/f/(not-signed-in)/reset-password/page.tsx +11 -11
  78. package/cli/src/app/f/(not-signed-in)/sign-in/microsoft/page.tsx +8 -8
  79. package/cli/src/app/f/(not-signed-in)/sign-in/page.tsx +13 -13
  80. package/cli/src/app/f/(not-signed-in)/sign-up/page.tsx +13 -13
  81. package/cli/src/app/f/(signed-in)/dashboard/page.tsx +8 -8
  82. package/cli/src/app/f/(signed-in)/dynamiclayout/page.tsx +8 -8
  83. package/cli/src/app/f/(signed-in)/edituser/[id]/page.tsx +8 -8
  84. package/cli/src/app/f/(signed-in)/edituser/page.tsx +8 -8
  85. package/cli/src/app/f/(signed-in)/layout.tsx +5 -5
  86. package/cli/src/app/f/(signed-in)/payment-plans/page.tsx +8 -8
  87. package/cli/src/app/f/(signed-in)/statusboard/page.tsx +8 -8
  88. package/cli/src/app/f/(signed-in)/userlist/page.tsx +8 -8
  89. package/cli/src/app/f/(signed-in)/view/page.tsx +23 -9
  90. package/cli/src/app/f/api-docs/page.tsx +15 -15
  91. package/cli/src/app/globals.css +1 -1
  92. package/cli/src/app/http-wrappers.ts +23 -0
  93. package/cli/src/app/init-saas-kit.ts +12 -0
  94. package/cli/src/app/layout.tsx +43 -35
  95. package/cli/src/app/page.tsx +9 -9
  96. package/cli/src/app/styles/common.css +75 -71
  97. package/cli/src/app/styles/rich-text-editor.css +130 -130
  98. package/cli/templates/.env-template +8 -12
  99. package/cli/templates/gitignore-template +54 -0
  100. package/cli/test/custom-test.ts +20 -0
  101. package/cli/test/global-setup.ts +7 -3
  102. package/cli/test/global-teardown.ts +7 -0
  103. package/cli/tsconfig.json +15 -15
  104. package/cli/tsconfig.lint.json +5 -0
  105. package/cli/tsconfig.server.json +4 -14
  106. package/fd-toolbox/api/api-client.js +3 -3
  107. package/fd-toolbox/api/api-path-names.js +4 -1
  108. package/fd-toolbox/api/api-paths.js +2 -1
  109. package/fd-toolbox/api/base-api.js +5 -4
  110. package/fd-toolbox/auth/{login-states.js → internal-login-states.js} +3 -3
  111. package/fd-toolbox/auth/session-storage.js +1 -1
  112. package/fd-toolbox/auth/tokens.js +1 -1
  113. package/fd-toolbox/constants/common-user-fields.js +7 -0
  114. package/fd-toolbox/constants/constants.js +2 -2
  115. package/fd-toolbox/constants/environment-constants.js +4 -1
  116. package/fd-toolbox/constants/header-names.js +1 -1
  117. package/fd-toolbox/constants/meta-query-params.js +4 -1
  118. package/fd-toolbox/constants/odata-query-params.js +7 -0
  119. package/fd-toolbox/constants/public-files.js +5 -3
  120. package/fd-toolbox/constants/resource-folders.js +4 -0
  121. package/fd-toolbox/constants/toolbox-error-messages-constants.js +4 -0
  122. package/fd-toolbox/enums/enums.js +5 -2
  123. package/fd-toolbox/errors/error-handler.js +2 -2
  124. package/fd-toolbox/errors/error-statuses.js +4 -1
  125. package/fd-toolbox/errors/errors.js +1 -1
  126. package/fd-toolbox/errors/problem-details.js +4 -2
  127. package/fd-toolbox/functions/value-checking-functions.js +5 -3
  128. package/fd-toolbox/http/url/urls.js +4 -3
  129. package/fd-toolbox/infra/env-config.js +2 -2
  130. package/fd-toolbox/infra/env-functions.js +6 -4
  131. package/fd-toolbox/infra/env-schema.js +2 -4
  132. package/fd-toolbox/infra/toolbox-env-setting-keys.js +1 -1
  133. package/fd-toolbox/lib/environments.js +4 -3
  134. package/fd-toolbox/lib/utils.js +5 -2
  135. package/fd-toolbox/local-storage/local-storage.js +1 -1
  136. package/fd-toolbox/logging/loggers.js +2 -2
  137. package/fd-toolbox/notifications.js +2 -2
  138. package/fd-toolbox/odata/odata-filter-constants.js +4 -0
  139. package/fd-toolbox/odata/odata-formatting/odata-filters.js +9 -0
  140. package/fd-toolbox/odata/odata.js +12 -0
  141. package/fd-toolbox/paths/paths-names.js +1 -1
  142. package/fd-toolbox/redirect/redirect-functions.js +8 -0
  143. package/fd-toolbox/resources/resource-names.js +1 -1
  144. package/fd-toolbox/routing/login-routers.js +2 -1
  145. package/fd-toolbox/routing/paths.js +1 -1
  146. package/fd-toolbox/routing/routers.js +9 -0
  147. package/fd-toolbox/routing/routes.js +3 -2
  148. package/fd-toolbox/server/collections/single-funcs.js +8 -0
  149. package/fd-toolbox/server/constants/api-routes-constants.js +4 -0
  150. package/fd-toolbox/server/errors/error-dtos.js +4 -0
  151. package/fd-toolbox/server/framework/index.js +8 -0
  152. package/fd-toolbox/server/logging/latest-logs-store.js +6 -0
  153. package/fd-toolbox/server/logging/log-dtos.js +6 -0
  154. package/fd-toolbox/server/logging/logger.js +9 -0
  155. package/fd-toolbox/server/web/response-messages.js +4 -0
  156. package/fd-toolbox/strings/strings.js +2 -3
  157. package/fd-toolbox/types/ensure-type.js +6 -2
  158. package/fd-toolbox/url/urls.js +4 -0
  159. package/fd-toolbox-core/constants/meta-constants.js +4 -2
  160. package/fd-toolbox-core/core/name-of.js +1 -1
  161. package/fd-toolbox-core/types/resource-with-id.js +3 -1
  162. package/git/constants/git-constants.js +6 -0
  163. package/level2/cli/bin/index.js +2 -1
  164. package/level2/cli/create/bin/create.js +19 -10
  165. package/level2/npm-commands/build-npm/cli-contents.js +1 -1
  166. package/level2/npm-commands/build-npm/paths.js +6 -0
  167. package/package.json +49 -55
  168. package/base-repo/app-constants/alias-symbols.cjs.js +0 -6
  169. package/base-repo/app-constants/aliases.cjs.js +0 -8
  170. package/base-repo/app-constants/project-paths.cjs.js +0 -17
  171. package/base-repo/constants/create-app-constants.cjs.js +0 -9
  172. package/base-repo/constants/packages.cjs.js +0 -6
  173. package/base-repo/constants/packages.cjs2.js +0 -6
  174. package/base-repo/constants/packages2.js +0 -4
  175. package/cli/public/images/00000000-0000-0000-0000-000000000000.webp +0 -0
  176. package/cli/public/images/login-image-dark.jpg +0 -0
  177. package/cli/public/images/login-image.jpg +0 -0
  178. package/cli/public/images/no-image.png +0 -0
  179. package/cli/public/images/profile.png +0 -0
  180. package/cli/public/images/search-not-found-result.png +0 -0
  181. package/cli/public/images/toolbar-logo.png +0 -0
  182. package/cli/public/images/users/00000000-0000-0000-0000-000000000000.webp +0 -0
  183. package/cli/src/app/api/v1/(f)/preload/route.ts +0 -3
  184. package/cli/src/app/f/(signed-in)/lm/page.tsx +0 -8
  185. package/cli/src/app/f/(signed-in)/preload/page.tsx +0 -8
  186. package/cli/src/app/f/test/feed/page.tsx +0 -8
  187. package/cli/src/app/f/test/file-upload/page.tsx +0 -8
  188. package/cli/src/app/f/test/layout.tsx +0 -5
  189. package/cli/src/app/f/test/page.tsx +0 -8
  190. package/fd-toolbox/api/api-client.cjs.js +0 -19
  191. package/fd-toolbox/api/api-path-names.cjs.js +0 -9
  192. package/fd-toolbox/api/api-paths.cjs.js +0 -9
  193. package/fd-toolbox/api/base-api.cjs.js +0 -22
  194. package/fd-toolbox/auth/login-states.cjs.js +0 -18
  195. package/fd-toolbox/auth/session-storage.cjs.js +0 -12
  196. package/fd-toolbox/auth/tokens.cjs.js +0 -11
  197. package/fd-toolbox/constants/api-constants.cjs.js +0 -26
  198. package/fd-toolbox/constants/api-constants.js +0 -4
  199. package/fd-toolbox/constants/constants.cjs.js +0 -13
  200. package/fd-toolbox/constants/environment-constants.cjs.js +0 -7
  201. package/fd-toolbox/constants/extensions.cjs.js +0 -6
  202. package/fd-toolbox/constants/extensions.js +0 -4
  203. package/fd-toolbox/constants/header-names.cjs.js +0 -7
  204. package/fd-toolbox/constants/http-status-codes.cjs.js +0 -6
  205. package/fd-toolbox/constants/meta-query-params.cjs.js +0 -6
  206. package/fd-toolbox/constants/public-files.cjs.js +0 -14
  207. package/fd-toolbox/constants/representations.cjs.js +0 -6
  208. package/fd-toolbox/constants/representations.js +0 -4
  209. package/fd-toolbox/enums/enums.cjs.js +0 -26
  210. package/fd-toolbox/errors/error-handler.cjs.js +0 -10
  211. package/fd-toolbox/errors/error-statuses.cjs.js +0 -6
  212. package/fd-toolbox/errors/errors.cjs.js +0 -6
  213. package/fd-toolbox/errors/problem-details.cjs.js +0 -8
  214. package/fd-toolbox/functions/value-checking-functions.cjs.js +0 -10
  215. package/fd-toolbox/http/http-constants.cjs.js +0 -7
  216. package/fd-toolbox/http/http-constants.js +0 -4
  217. package/fd-toolbox/http/url/urls.cjs.js +0 -9
  218. package/fd-toolbox/infra/env-config.cjs.js +0 -8
  219. package/fd-toolbox/infra/env-functions.cjs.js +0 -16
  220. package/fd-toolbox/infra/env-schema.cjs.js +0 -12
  221. package/fd-toolbox/infra/env-setting-types.cjs.js +0 -6
  222. package/fd-toolbox/infra/env-setting-types.js +0 -4
  223. package/fd-toolbox/infra/env-store.cjs.js +0 -9
  224. package/fd-toolbox/infra/env-store.js +0 -7
  225. package/fd-toolbox/infra/toolbox-env-setting-keys.cjs.js +0 -6
  226. package/fd-toolbox/lib/environments.cjs.js +0 -25
  227. package/fd-toolbox/lib/utils.cjs.js +0 -29
  228. package/fd-toolbox/local-storage/local-storage.cjs.js +0 -12
  229. package/fd-toolbox/logging/loggers.cjs.js +0 -16
  230. package/fd-toolbox/logging/logging-constants.cjs.js +0 -6
  231. package/fd-toolbox/logging/logging-constants.js +0 -4
  232. package/fd-toolbox/notifications.cjs.js +0 -14
  233. package/fd-toolbox/odata/odata-constants.cjs.js +0 -11
  234. package/fd-toolbox/odata/odata-constants.js +0 -4
  235. package/fd-toolbox/odata/odata-enums.cjs.js +0 -8
  236. package/fd-toolbox/odata/odatas.cjs.js +0 -11
  237. package/fd-toolbox/odata/odatas.js +0 -9
  238. package/fd-toolbox/odata/services/odata-filters.cjs.js +0 -11
  239. package/fd-toolbox/odata/services/odata-filters.js +0 -9
  240. package/fd-toolbox/paths/paths-names.cjs.js +0 -9
  241. package/fd-toolbox/resources/resource-names.cjs.js +0 -6
  242. package/fd-toolbox/routing/login-routers.cjs.js +0 -10
  243. package/fd-toolbox/routing/paths.cjs.js +0 -6
  244. package/fd-toolbox/routing/routes.cjs.js +0 -14
  245. package/fd-toolbox/strings/strings-constants.cjs.js +0 -7
  246. package/fd-toolbox/strings/strings-constants.js +0 -4
  247. package/fd-toolbox/strings/strings.cjs.js +0 -10
  248. package/fd-toolbox/types/ensure-type.cjs.js +0 -23
  249. package/fd-toolbox-core/constants/meta-constants.cjs.js +0 -7
  250. package/fd-toolbox-core/constants/promises.cjs.js +0 -6
  251. package/fd-toolbox-core/core/name-of.cjs.js +0 -8
  252. package/fd-toolbox-core/enums/log-severities.cjs.js +0 -6
  253. package/fd-toolbox-core/types/resource-with-id.cjs.js +0 -9
  254. package/level2/cli/bin/index.cjs.js +0 -8
  255. package/level2/cli/create/bin/create.cjs.js +0 -42
  256. package/level2/npm-commands/build-npm/cli-contents.cjs.js +0 -9
  257. package/level2/npm-commands/build-npm/path.cjs.js +0 -13
  258. package/level2/npm-commands/build-npm/path.js +0 -6
  259. /package/cli/public/images/{companies → demo/companies}/00000000-0000-0000-0000-000000000000.webp +0 -0
  260. /package/cli/public/images/{companies → demo/companies}/004a196f-f9a7-49fc-9e05-606fffd0613c.webp +0 -0
  261. /package/cli/public/images/{companies → demo/companies}/497b26a6-3e91-4b27-8c24-f3b145fc6c7f.webp +0 -0
  262. /package/cli/public/images/{companies → demo/companies}/6cead29b-2572-4283-add6-f407b39d7135.webp +0 -0
  263. /package/cli/public/images/{companies → demo/companies}/71efdb77-4ecb-45e6-bc83-0fdff835c2e7.webp +0 -0
  264. /package/cli/public/images/{companies → demo/companies}/773602c8-a417-4afc-adb0-bb6856ac2970.webp +0 -0
  265. /package/cli/public/images/{companies → demo/companies}/9d09881a-cf60-438d-9edf-10f5864d4468.webp +0 -0
  266. /package/cli/public/images/{companies → demo/companies}/a1b2c3d4-e5f6-7890-1234-56789abcdef0.webp +0 -0
  267. /package/cli/public/images/{companies → demo/companies}/b04d7c5e-18de-4f44-b923-5bfb28bb33bb.webp +0 -0
  268. /package/cli/public/images/{companies → demo/companies}/c75c22fc-d295-472e-bdae-dbb8eb09cf18.webp +0 -0
  269. /package/cli/public/images/{companies → demo/companies}/cdf3efb4-33a2-485e-8d95-e0ab5a4cb6a5.webp +0 -0
  270. /package/cli/public/images/{companies → demo/companies}/d6fe4c6a-ecdb-40fc-a8e6-2044ef2b82d4.webp +0 -0
  271. /package/cli/public/images/{contacts → demo/contacts}/159e4c7a-ff5f-4162-8237-acec3ca8a759.webp +0 -0
  272. /package/cli/public/images/{contacts → demo/contacts}/65e07208-6b1f-4a59-b5e3-2f80f5741b18.webp +0 -0
  273. /package/cli/public/images/{contacts → demo/contacts}/6d1c5410-ef5b-4d37-8b8d-4ab8cfc87785.webp +0 -0
  274. /package/cli/public/images/{contacts → demo/contacts}/754c77d8-eefb-4a90-b07b-ed00980c88b4.webp +0 -0
  275. /package/cli/public/images/{contacts → demo/contacts}/9fd23cd9-9b94-4bb8-bb73-d315b93b8a5c.webp +0 -0
  276. /package/cli/public/images/{contacts → demo/contacts}/b2f746d1-6b3c-4c47-8e07-f73927c167cb.webp +0 -0
  277. /package/cli/public/images/{contacts → demo/contacts}/b515cb46-eab4-4862-9e8e-c2f5f217ae79.webp +0 -0
  278. /package/cli/public/images/{contacts → demo/contacts}/cf2eae72-e5ab-4d95-8f08-b6571b44f8eb.webp +0 -0
  279. /package/cli/public/images/{contacts → demo/contacts}/ec0e0285-22d9-48d4-b4b3-96388c37c807.webp +0 -0
  280. /package/cli/public/images/{contacts → demo/contacts}/ecb1a0f4-d244-4136-badf-c2bc72e3b678.webp +0 -0
  281. /package/cli/public/images/{users → demo/users}/02d1230f-5bfe-46b4-8ce1-d10f4aa918a7.webp +0 -0
  282. /package/cli/public/images/{users → demo/users}/166c5e4a-696f-4bf5-ab48-dbbb5e90d526.webp +0 -0
  283. /package/cli/public/images/{users → demo/users}/175a3f0c-692c-4503-87eb-ff95d6535e16.webp +0 -0
  284. /package/cli/public/images/{users → demo/users}/8398ee85-7546-4710-b628-44c98e4ba03a.webp +0 -0
  285. /package/cli/public/images/{users → demo/users}/979f8933-71b1-4df8-b691-566a901d3c76.webp +0 -0
  286. /package/cli/public/images/{users → demo/users}/fbe37132-31bc-4fc9-9bfb-aac7a1b61a7f.webp +0 -0
@@ -1,15 +1,16 @@
1
- import { defineConfig } from "drizzle-kit";
2
- import { getRequiredStringEnvSetting } from "@fd-toolbox/infra/env-functions";
3
- import { generatedPaths } from "@base-repo/app-constants/project-paths";
4
- import { toolboxEnvSettingKeys } from "@fd-toolbox/infra/toolbox-env-setting-keys";
5
-
6
- const connectionString = getRequiredStringEnvSetting(toolboxEnvSettingKeys.databaseConnectionString);
7
-
8
- /** To do: add docs */
9
- export const drizzleConfig = defineConfig({
10
- dialect: "postgresql",
11
- schema: generatedPaths.schema,
12
- dbCredentials: {
13
- url: connectionString,
14
- },
15
- });
1
+ import { defineConfig } from "drizzle-kit";
2
+ import { getRequiredStringEnvSetting } from "@fd-toolbox/infra/env-functions";
3
+ import { generatedPaths } from "@base-repo/app-constants/project-paths";
4
+ import { toolboxEnvSettingKeys } from "@fd-toolbox/infra/toolbox-env-setting-keys";
5
+ import { postgresql } from "@base-repo/app-constants/internal-system-constants";
6
+
7
+ const connectionString = getRequiredStringEnvSetting(toolboxEnvSettingKeys.databaseConnectionString);
8
+
9
+ /** To do: add docs */
10
+ export const drizzleConfig = defineConfig({
11
+ dialect: postgresql,
12
+ schema: generatedPaths.schema,
13
+ dbCredentials: {
14
+ url: connectionString,
15
+ },
16
+ });
@@ -1,78 +1,44 @@
1
- import { folders } from "@base-repo/app-constants/project-paths";
2
- import type { Configuration as WebpackConfig } from "webpack";
3
-
4
- const externalModules = {
5
- "@node-rs/argon2": "commonjs @node-rs/argon2",
6
- "cloudflare:sockets": "commonjs cloudflare:sockets",
7
- "node:crypto": "commonjs node:crypto",
8
- "node:fs": "commonjs node:fs",
9
- "node:path": "commonjs node:path",
10
- "node:stream": "commonjs node:stream",
11
- child_process: "commonjs2 child_process",
12
- };
13
-
14
- const serverRules = {
15
- test: /\.html$/,
16
- use: "raw-loader",
17
- };
18
-
19
- const mdRules = {
20
- test: /\.md$/,
21
- use: "ignore-loader",
22
- };
23
-
24
- /** To do: add docs */
25
- export const nextConfig = (overrides = {}) => {
26
- const baseConfig = {
27
- reactCompiler: true,
28
- images: {
29
- remotePatterns: [
30
- {
31
- protocol: "https",
32
- hostname: "pub-7a5f8c3ab46946ae96d8d2e497a36f7b.r2.dev",
33
- port: "",
34
- pathname: "/**",
35
- },
36
- ],
37
- },
38
- webpack: (
39
- config: WebpackConfig & {
40
- resolve: { alias: Record<string, false> };
41
- module: { rules: unknown[] };
42
- externals: unknown[];
43
- watchOptions?: { ignored: string[] };
44
- },
45
- { isServer }: { isServer: boolean },
46
- ) => {
47
- if (isServer) {
48
- config.watchOptions = {
49
- ignored: [
50
- `**/${folders.nodeModules}/**`,
51
- `**/${folders.next}/**`,
52
- `**/${folders.npmCommands}/**`,
53
- ],
54
- };
55
- config.externals.push(externalModules);
56
- config.module.rules.push(serverRules);
57
- }
58
-
59
- config.module.rules.push(mdRules);
60
-
61
- return config;
62
- },
63
- async rewrites() {
64
- return [
65
- {
66
- source: "/api/:path*",
67
- destination: "/api/v1/:path*",
68
- },
69
- {
70
- source: "/:path((?!api).*)",
71
- destination: "/f/:path*",
72
- },
73
- ];
74
- },
75
- serverExternalPackages: ["oslo", "pg"],
76
- };
77
- return { ...baseConfig, ...overrides };
78
- };
1
+ import { httpProtocols } from "@base-repo/constants/http-constants";
2
+ import { turbopackProperties } from "@cli/constants";
3
+
4
+ /** Default Next.js configuration for saas-kit projects. */
5
+ export function nextConfig(overrides = {}) {
6
+ const baseConfig = {
7
+ reactCompiler: true,
8
+ images: {
9
+ remotePatterns: [
10
+ {
11
+ protocol: httpProtocols.https,
12
+ hostname: "pub-7a5f8c3ab46946ae96d8d2e497a36f7b.r2.dev",
13
+ port: "",
14
+ pathname: "/**",
15
+ },
16
+ ],
17
+ },
18
+ turbopack: {
19
+ rules: {
20
+ "*.html": {
21
+ loaders: ["raw-loader"],
22
+ as: "*.js",
23
+ },
24
+ "*.md": {
25
+ type: turbopackProperties.raw,
26
+ },
27
+ },
28
+ },
29
+ async rewrites() {
30
+ return [
31
+ {
32
+ source: "/api/:path*",
33
+ destination: "/api/v1/:path*",
34
+ },
35
+ {
36
+ source: "/:path((?!api).*)",
37
+ destination: "/f/:path*",
38
+ },
39
+ ];
40
+ },
41
+ serverExternalPackages: ["oslo", "pg", "@node-rs/argon2", "cloudflare:sockets"],
42
+ } as const;
43
+ return { ...baseConfig, ...overrides };
44
+ }
@@ -1,35 +1,45 @@
1
- import { defineConfig, devices } from "playwright/test";
2
- import { getDotenvConfig } from "@fd-toolbox/infra/env-config";
3
-
4
- getDotenvConfig();
5
-
6
- const baseUrl = "http://localhost:8080/";
7
-
8
- /** To do: add docs */
9
- export const playwrightConfig = defineConfig({
10
- timeout: 120000,
11
- testDir: "test/",
12
- fullyParallel: true,
13
- globalSetup: "./test/global-setup.ts",
14
- workers: undefined,
15
- reporter: "html",
16
- use: {
17
- baseURL: baseUrl,
18
- trace: "on-first-retry",
19
- },
20
- projects: [
21
- {
22
- name: "chromium",
23
- use: { ...devices["Desktop Chrome"] },
24
- },
25
- ],
26
- webServer: {
27
- command: "npm run prod",
28
- url: baseUrl,
29
- reuseExistingServer: true,
30
- timeout: 120000,
31
- env: {
32
- NODE_ENV: "test",
33
- },
34
- },
35
- });
1
+ import { defineConfig, devices } from "playwright/test";
2
+ import { getDotenvConfig } from "@fd-toolbox/infra/env-config";
3
+ import { isCi } from "@fd-toolbox/lib/environments";
4
+ import { folders } from "@base-repo/app-constants/project-paths";
5
+ import { npmCommands } from "@infra/ci/constants/npm-commands";
6
+ import { playwright } from "@base-repo/constants/playwright";
7
+ import { ensurePathSeparatorAtTheEnd } from "@fd-toolbox/paths/ensure";
8
+
9
+ getDotenvConfig();
10
+
11
+ /**
12
+ * Playwright test configuration for local and CI environments.
13
+ */
14
+ export const playwrightConfig = defineConfig({
15
+ globalTimeout: 300000,
16
+ timeout: 60000,
17
+ testDir: ensurePathSeparatorAtTheEnd(folders.test),
18
+ fullyParallel: true,
19
+ snapshotDir: `${folders.test}/ui-tests/snapshots`,
20
+ forbidOnly: isCi(),
21
+ globalSetup: `${folders.test}/global-setup.ts`,
22
+ globalTeardown: `${folders.test}/global-teardown.ts`,
23
+ retries: isCi() ? 2 : 0,
24
+ workers: isCi() ? 20 : undefined,
25
+ reporter: playwright.reporter,
26
+ use: {
27
+ baseURL: playwright.baseUrl,
28
+ trace: playwright.trace,
29
+ },
30
+ projects: [
31
+ {
32
+ name: playwright.projectName,
33
+ use: { ...devices[playwright.projectDevice] },
34
+ },
35
+ ],
36
+ webServer: {
37
+ command: isCi() ? "next start" : npmCommands.start,
38
+ url: playwright.baseUrl,
39
+ reuseExistingServer: true,
40
+ timeout: 120000,
41
+ env: {
42
+ NODE_ENV: folders.test,
43
+ },
44
+ },
45
+ });
@@ -1,35 +1,35 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "experimentalDecorators": true,
5
- "emitDecoratorMetadata": true,
6
- "lib": ["dom", "dom.iterable", "esnext"],
7
- "allowJs": true,
8
- "skipLibCheck": true,
9
- "strict": true,
10
- "esModuleInterop": true,
11
- "module": "esnext",
12
- "moduleResolution": "bundler",
13
- "resolveJsonModule": true,
14
- "isolatedModules": true,
15
- "jsx": "preserve",
16
- "incremental": true,
17
- "plugins": [{ "name": "next" }],
18
- "preserveSymlinks": false,
19
- "forceConsistentCasingInFileNames": true,
20
- "noFallthroughCasesInSwitch": true,
21
- "sourceMap": true,
22
- "importHelpers": true,
23
- "noEmitHelpers": true,
24
- "downlevelIteration": true,
25
- "pretty": true,
26
- "noUnusedLocals": true,
27
- "noUnusedParameters": true,
28
- "noPropertyAccessFromIndexSignature": true,
29
- "noImplicitOverride": true,
30
- "useUnknownInCatchVariables": true,
31
- "noEmit": false,
32
- "outDir": "./build/package/types-output",
33
- "noEmitOnError": true
34
- }
35
- }
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "experimentalDecorators": true,
5
+ "emitDecoratorMetadata": true,
6
+ "lib": ["dom", "dom.iterable", "esnext"],
7
+ "allowJs": true,
8
+ "skipLibCheck": true,
9
+ "strict": true,
10
+ "esModuleInterop": true,
11
+ "module": "esnext",
12
+ "moduleResolution": "bundler",
13
+ "resolveJsonModule": true,
14
+ "isolatedModules": true,
15
+ "jsx": "preserve",
16
+ "incremental": true,
17
+ "plugins": [{ "name": "next" }],
18
+ "preserveSymlinks": false,
19
+ "forceConsistentCasingInFileNames": true,
20
+ "noFallthroughCasesInSwitch": true,
21
+ "sourceMap": true,
22
+ "importHelpers": true,
23
+ "noEmitHelpers": true,
24
+ "downlevelIteration": true,
25
+ "pretty": true,
26
+ "noUnusedLocals": true,
27
+ "noUnusedParameters": true,
28
+ "noPropertyAccessFromIndexSignature": true,
29
+ "noImplicitOverride": true,
30
+ "useUnknownInCatchVariables": true,
31
+ "noEmit": false,
32
+ "outDir": "./build/npm-package/types-output",
33
+ "noEmitOnError": true
34
+ }
35
+ }
@@ -1,13 +1,13 @@
1
- {
2
- "extends": "./tsconfig.cli.json",
3
- "compilerOptions": {
4
- "module": "es2022",
5
- "moduleResolution": "bundler",
6
- "outDir": "dist",
7
- "lib": ["ES2022", "dom"],
8
- "target": "ES2022",
9
- "isolatedModules": false,
10
- "noEmit": false,
11
- "strict": true
12
- }
13
- }
1
+ {
2
+ "extends": "./tsconfig.cli.json",
3
+ "compilerOptions": {
4
+ "module": "es2022",
5
+ "moduleResolution": "bundler",
6
+ "outDir": "dist",
7
+ "lib": ["ES2022", "dom"],
8
+ "target": "ES2022",
9
+ "isolatedModules": false,
10
+ "noEmit": false,
11
+ "strict": true
12
+ }
13
+ }
@@ -1,6 +1,6 @@
1
- import { drizzleConfig } from "@fernir2/saas-kit";
2
- import { defineConfig } from "drizzle-kit";
3
-
4
- export default defineConfig({
5
- ...drizzleConfig,
6
- });
1
+ import { drizzleConfig } from "@fernir2/saas-kit";
2
+ import { defineConfig } from "drizzle-kit";
3
+
4
+ export default defineConfig({
5
+ ...drizzleConfig,
6
+ });
@@ -1,3 +1,5 @@
1
- import { nextConfig } from "@fernir2/saas-kit";
2
-
3
- export default nextConfig();
1
+ // @ts-check
2
+
3
+ import { nextConfig } from "@fernir2/saas-kit";
4
+
5
+ export default nextConfig();
@@ -1,3 +1,9 @@
1
- import { generateCombinedMeta } from "@fernir2/saas-kit";
2
-
3
- generateCombinedMeta();
1
+ import { generateMeta, generateHandlerMap } from "@fernir2/saas-kit";
2
+
3
+ async function generateCombinedHandlerMapAndMeta() {
4
+ await generateHandlerMap({ isCombined: true });
5
+
6
+ await generateMeta({ isCombined: true });
7
+ }
8
+
9
+ generateCombinedHandlerMapAndMeta();
@@ -1,3 +1,3 @@
1
- import { generateSchema } from "@fernir2/saas-kit";
2
-
3
- generateSchema();
1
+ import { generateSchema } from "@fernir2/saas-kit";
2
+
3
+ generateSchema();
@@ -1,15 +1,17 @@
1
- import { migrateDatabase, logInfo, logError } from "@fernir2/saas-kit/server";
2
-
3
- async function migrate() {
4
- try {
5
- await migrateDatabase();
6
- logInfo("Database migrations executed successfully");
7
- process.exit(0);
8
- } catch (err) {
9
- logError("Error running migrations", err);
10
-
11
- process.exit(1);
12
- }
13
- }
14
-
15
- migrate();
1
+ import { migrateDatabase, logInfo, logError } from "@fernir2/saas-kit/server";
2
+ import { initSaasKit } from "@/app/init-saas-kit";
3
+
4
+ async function migrate() {
5
+ try {
6
+ initSaasKit();
7
+ await migrateDatabase();
8
+ logInfo("Database migrations executed successfully");
9
+ process.exit(0);
10
+ } catch (err) {
11
+ logError("Error running migrations", err);
12
+
13
+ process.exit(1);
14
+ }
15
+ }
16
+
17
+ migrate();
@@ -1,15 +1,17 @@
1
- import { seedDatabase, logInfo, logError } from "@fernir2/saas-kit/server";
2
-
3
- async function seed() {
4
- try {
5
- await seedDatabase();
6
- logInfo("Database seeded successfully");
7
- process.exit(0);
8
- } catch (err) {
9
- logError("Error seeding database", err);
10
-
11
- process.exit(1);
12
- }
13
- }
14
-
15
- seed();
1
+ import { seedDatabase, logInfo, logError } from "@fernir2/saas-kit/server";
2
+ import { initSaasKit } from "@/app/init-saas-kit";
3
+
4
+ async function seed() {
5
+ try {
6
+ initSaasKit();
7
+ await seedDatabase();
8
+ logInfo("Database seeded successfully");
9
+ process.exit(0);
10
+ } catch (err) {
11
+ logError("Error seeding database", err);
12
+
13
+ process.exit(1);
14
+ }
15
+ }
16
+
17
+ seed();
@@ -1,57 +1,54 @@
1
- {
2
- "version": "0.1.0",
3
- "private": true,
4
- "type": "module",
5
- "scripts": {
6
- "start": "npm run setup && npm run build && npx tsx server.ts",
7
- "dev": "next dev --turbo",
8
- "build": "next build --turbo",
9
- "lint": "eslint -c eslint.config.js",
10
- "setup": "npm run gen-meta && npm run gen-schema && npm run init-db",
11
- "init-db": "npm run migrate-db && npm run seed-db",
12
- "gen-schema": "npx tsx npm-commands/gen-schema.ts",
13
- "gen-meta": "npx tsx npm-commands/gen-meta.ts",
14
- "migrate-db": "npx tsx npm-commands/migrate-db.ts",
15
- "seed-db": "npx tsx npm-commands/seed-db.ts"
16
- },
17
- "dependencies": {
18
- "@fernir2/saas-kit": "0.0.174",
19
- "drizzle-orm": "0.36.4",
20
- "next": "16.1.1",
21
- "quill": "2.0.3",
22
- "react": "19.2.3",
23
- "react-dom": "19.2.3",
24
- "socket.io-client": "4.8.1",
25
- "tailwindcss-animate": "1.0.7"
26
- },
27
- "devDependencies": {
28
- "playwright": "1.52.0",
29
- "@eslint/eslintrc": "3.3.1",
30
- "@eslint/js": "9.35.0",
31
- "@types/node": "24.5.2",
32
- "@types/react": "19.2.7",
33
- "@types/react-dom": "19.2.3",
34
- "@typescript-eslint/eslint-plugin": "8.43.0",
35
- "@typescript-eslint/parser": "8.43.0",
36
- "drizzle-kit": "0.28.1",
37
- "eslint": "9.35.0",
38
- "eslint-config-next": "16.1.1",
39
- "eslint-config-prettier": "10.1.8",
40
- "eslint-plugin-react": "7.37.5",
41
- "eslint-plugin-react-compiler": "19.1.0-rc.2",
42
- "eslint-plugin-react-hooks": "5.2.0",
43
- "eslint-plugin-react-refresh": "0.4.20",
44
- "eslint-plugin-github": "6.0.0",
45
- "eslint-plugin-import": "2.32.0",
46
- "eslint-plugin-sonarjs": "3.0.5",
47
- "husky": "9.1.7",
48
- "postcss": "8.5.6",
49
- "prettier": "3.6.2",
50
- "prettier-plugin-tailwindcss": "0.7.1",
51
- "tailwindcss": "4.1.17",
52
- "@tailwindcss/postcss": "4.1.16",
53
- "tsx": "4.20.5",
54
- "typescript": "5.9.2",
55
- "babel-plugin-react-compiler": "1.0.0"
56
- }
57
- }
1
+ {
2
+ "version": "0.1.0",
3
+ "private": true,
4
+ "type": "module",
5
+ "scripts": {
6
+ "start": "npm run setup && npm run build && npx tsx server.ts",
7
+ "dev": "next dev",
8
+ "build": "next build",
9
+ "lint": "eslint -c eslint.config.js",
10
+ "setup": "npm run gen-meta && npm run gen-schema && npm run init-db",
11
+ "init-db": "npm run migrate-db && npm run seed-db",
12
+ "gen-schema": "npx tsx npm-commands/gen-schema.ts",
13
+ "gen-meta": "npx tsx npm-commands/gen-meta.ts",
14
+ "migrate-db": "npx tsx npm-commands/migrate-db.ts",
15
+ "seed-db": "npx tsx npm-commands/seed-db.ts",
16
+ "pretty": "prettier --write \"./**/*.{js,jsx,mjs,cjs,ts,tsx,json}\""
17
+ },
18
+ "dependencies": {
19
+ "@fernir2/saas-kit": "0.0.211",
20
+ "drizzle-orm": "0.45.2",
21
+ "next": "16.2.4",
22
+ "react": "19.2.4",
23
+ "react-dom": "19.2.4"
24
+ },
25
+ "devDependencies": {
26
+ "playwright": "1.59.1",
27
+ "@eslint/eslintrc": "3.3.1",
28
+ "@eslint/js": "9.35.0",
29
+ "@types/node": "24.12.2",
30
+ "@types/react": "19.2.14",
31
+ "@types/react-dom": "19.2.3",
32
+ "@typescript-eslint/eslint-plugin": "8.43.0",
33
+ "@typescript-eslint/parser": "8.43.0",
34
+ "drizzle-kit": "0.31.10",
35
+ "eslint": "9.35.0",
36
+ "eslint-config-prettier": "10.1.8",
37
+ "eslint-plugin-react": "7.37.5",
38
+ "eslint-plugin-react-compiler": "19.1.0-rc.2",
39
+ "eslint-plugin-react-hooks": "5.2.0",
40
+ "eslint-plugin-github": "6.0.0",
41
+ "eslint-plugin-import": "2.32.0",
42
+ "eslint-plugin-sonarjs": "3.0.5",
43
+ "@stylistic/eslint-plugin": "5.3.1",
44
+ "eslint-plugin-jsonc": "2.20.1",
45
+ "prettier": "3.6.2",
46
+ "prettier-plugin-tailwindcss": "0.7.1",
47
+ "tailwindcss": "4.1.17",
48
+ "@tailwindcss/postcss": "4.1.16",
49
+ "tsx": "4.20.5",
50
+ "typescript": "5.9.2",
51
+ "babel-plugin-react-compiler": "1.0.0",
52
+ "swagger-ui-react": "5.32.4"
53
+ }
54
+ }
@@ -1,6 +1,6 @@
1
- import { playwrightConfig } from "@fernir2/saas-kit";
2
- import { defineConfig } from "playwright/test";
3
-
4
- export default defineConfig({
5
- ...playwrightConfig,
6
- });
1
+ import { playwrightConfig } from "@fernir2/saas-kit";
2
+ import { defineConfig } from "playwright/test";
3
+
4
+ export default defineConfig({
5
+ ...playwrightConfig,
6
+ });
@@ -1,7 +1,7 @@
1
- const config = {
2
- plugins: {
3
- "@tailwindcss/postcss": {},
4
- },
5
- };
6
-
7
- export default config;
1
+ const config = {
2
+ plugins: {
3
+ "@tailwindcss/postcss": {},
4
+ },
5
+ };
6
+
7
+ export default config;
@@ -0,0 +1,23 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="13.2px" height="13.2px" viewBox="0 0 22 22" fill="#7fd1de">
2
+ <rect x="20" y="20" width="2" height="2"/>
3
+ <rect x="20" y="16" width="2" height="2"/>
4
+ <rect x="20" y="12" width="2" height="2"/>
5
+ <rect x="20" y="8" width="2" height="2"/>
6
+ <rect x="20" y="4" width="2" height="2"/>
7
+ <rect x="16" y="20" width="2" height="2"/>
8
+ <rect x="16" y="16" width="2" height="2"/>
9
+ <rect x="16" y="12" width="2" height="2"/>
10
+ <rect x="16" y="8" width="2" height="2"/>
11
+ <rect x="12" y="20" width="2" height="2"/>
12
+ <rect x="12" y="16" width="2" height="2"/>
13
+ <rect x="12" y="12" width="2" height="2"/>
14
+ <rect x="8" y="20" width="2" height="2"/>
15
+ <rect x="8" y="16" width="2" height="2"/>
16
+ <rect x="4" y="20" width="2" height="2"/>
17
+ <rect x="0" y="20" width="2" height="2"/>
18
+ <rect x="4" y="16" width="2" height="2"/>
19
+ <rect x="8" y="12" width="2" height="2"/>
20
+ <rect x="12" y="8" width="2" height="2"/>
21
+ <rect x="16" y="4" width="2" height="2"/>
22
+ <rect x="20" y="0" width="2" height="2"/>
23
+ </svg>
Binary file
Binary file
Binary file