create-nexwire 4.3.0 → 4.4.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 (326) hide show
  1. package/README.md +10 -5
  2. package/express/src/framework/facade.ts +1 -0
  3. package/express/src/framework/http/logger.ts +13 -4
  4. package/express/src/framework/maker-cli/runtime/core.mjs +1 -2
  5. package/express/src/framework/notification/channels/mail.ts +8 -6
  6. package/express/src/middlewares/auth-middleware.ts +1 -2
  7. package/express/src/middlewares/role-middleware.ts +3 -13
  8. package/express/src/modules/auth/routes/index.ts +1 -2
  9. package/express/src/providers/notification.ts +2 -2
  10. package/express/src/resources/src/components/Switch.vue +60 -65
  11. package/express/src/resources/src/pages/auth/forgetPassword.vue +23 -30
  12. package/express/src/resources/src/pages/auth/login.vue +25 -28
  13. package/express/src/resources/src/pages/auth/register.vue +35 -39
  14. package/express/src/resources/src/pages/auth/resetPassword.vue +29 -37
  15. package/express/src/resources/src/pages/auth/verifyEmail.vue +15 -19
  16. package/express/src/resources/src/plugins/gum.ts +519 -203
  17. package/express/src/resources/src/stores/auth.ts +9 -6
  18. package/express/src/storage/database/nexwire.sqlite +0 -0
  19. package/fastify/.dockerignore +14 -0
  20. package/fastify/.env +44 -0
  21. package/fastify/.env.example +42 -0
  22. package/fastify/.vscode/extensions.json +6 -0
  23. package/fastify/.vscode/settings.json +37 -0
  24. package/fastify/LICENSE +21 -0
  25. package/fastify/README.md +232 -0
  26. package/fastify/biome.json +99 -0
  27. package/fastify/drizzle.config.ts +25 -0
  28. package/fastify/gitignore-stub +31 -0
  29. package/fastify/package.json +130 -0
  30. package/fastify/public/.gitkeep +0 -0
  31. package/fastify/src/config/app.ts +41 -0
  32. package/fastify/src/config/auth.ts +12 -0
  33. package/fastify/src/config/cache.ts +16 -0
  34. package/fastify/src/config/cookie.ts +15 -0
  35. package/fastify/src/config/cors.ts +12 -0
  36. package/fastify/src/config/database.ts +48 -0
  37. package/fastify/src/config/index.ts +83 -0
  38. package/fastify/src/config/jwt.ts +19 -0
  39. package/fastify/src/config/logging.ts +13 -0
  40. package/fastify/src/config/mail.ts +24 -0
  41. package/fastify/src/config/openapi.ts +36 -0
  42. package/fastify/src/config/queue.ts +30 -0
  43. package/fastify/src/config/rateLimit.ts +17 -0
  44. package/fastify/src/config/realtime.ts +15 -0
  45. package/fastify/src/config/redis.ts +18 -0
  46. package/fastify/src/config/security.ts +44 -0
  47. package/fastify/src/config/session.ts +17 -0
  48. package/fastify/src/config/storage.ts +22 -0
  49. package/fastify/src/config/validate.ts +50 -0
  50. package/fastify/src/database/migrations/sqlite/0000_init.sql +48 -0
  51. package/fastify/src/database/migrations/sqlite/meta/0000_snapshot.json +324 -0
  52. package/fastify/src/database/migrations/sqlite/meta/_journal.json +13 -0
  53. package/fastify/src/database/schema.ts +2 -0
  54. package/fastify/src/env.ts +76 -0
  55. package/fastify/src/framework/cache/cache.ts +114 -0
  56. package/fastify/src/framework/circuit-breaker/cb.ts +88 -0
  57. package/fastify/src/framework/database/app-schema.ts +37 -0
  58. package/fastify/src/framework/database/connection.ts +223 -0
  59. package/fastify/src/framework/database/migrate-hooks.ts +87 -0
  60. package/fastify/src/framework/database/paginate.ts +226 -0
  61. package/fastify/src/framework/database/schema.ts +20 -0
  62. package/fastify/src/framework/database/seed.ts +152 -0
  63. package/fastify/src/framework/events/dispatcher.ts +61 -0
  64. package/fastify/src/framework/facade.ts +96 -0
  65. package/fastify/src/framework/http/app.ts +176 -0
  66. package/fastify/src/framework/http/cors.ts +13 -0
  67. package/fastify/src/framework/http/fastify.d.ts +13 -0
  68. package/fastify/src/framework/http/logger.ts +110 -0
  69. package/fastify/src/framework/http/metrics.ts +22 -0
  70. package/fastify/src/framework/http/openapi.ts +48 -0
  71. package/fastify/src/framework/http/ratelimiter.ts +47 -0
  72. package/fastify/src/framework/http/security.ts +25 -0
  73. package/fastify/src/framework/http/static.ts +83 -0
  74. package/fastify/src/framework/http/validation.ts +49 -0
  75. package/fastify/src/framework/kernel.ts +43 -0
  76. package/fastify/src/framework/maker-cli/db/core.mjs +291 -0
  77. package/fastify/src/framework/maker-cli/db/index.mjs +204 -0
  78. package/fastify/src/framework/maker-cli/deploy/core.mjs +1046 -0
  79. package/fastify/src/framework/maker-cli/deploy/index.mjs +91 -0
  80. package/fastify/src/framework/maker-cli/index.mjs +65 -0
  81. package/fastify/src/framework/maker-cli/middleware/core.mjs +41 -0
  82. package/fastify/src/framework/maker-cli/middleware/index.mjs +17 -0
  83. package/fastify/src/framework/maker-cli/module/core.mjs +1066 -0
  84. package/fastify/src/framework/maker-cli/module/index.mjs +211 -0
  85. package/fastify/src/framework/maker-cli/provider/core.mjs +49 -0
  86. package/fastify/src/framework/maker-cli/provider/index.mjs +12 -0
  87. package/fastify/src/framework/maker-cli/runtime/build-ui.mjs +16 -0
  88. package/fastify/src/framework/maker-cli/runtime/core.mjs +560 -0
  89. package/fastify/src/framework/maker-cli/runtime/index.mjs +120 -0
  90. package/fastify/src/framework/maker-cli/runtime/redis-commander-patch.cjs +20 -0
  91. package/fastify/src/framework/maker-cli/stubs/controller/openapi.ts.stub +74 -0
  92. package/fastify/src/framework/maker-cli/stubs/controller/plain.ts.stub +77 -0
  93. package/fastify/src/framework/maker-cli/stubs/controller/standalone.ts.stub +51 -0
  94. package/fastify/src/framework/maker-cli/stubs/deploy/Dockerfile.bun.stub +52 -0
  95. package/fastify/src/framework/maker-cli/stubs/deploy/Dockerfile.pnpm.stub +55 -0
  96. package/fastify/src/framework/maker-cli/stubs/deploy/Dockerfile.stub +51 -0
  97. package/fastify/src/framework/maker-cli/stubs/deploy/Dockerfile.yarn.stub +55 -0
  98. package/fastify/src/framework/maker-cli/stubs/deploy/README.stub +59 -0
  99. package/fastify/src/framework/maker-cli/stubs/deploy/compose/mysql.server.stub +45 -0
  100. package/fastify/src/framework/maker-cli/stubs/deploy/compose/postgres.server.stub +45 -0
  101. package/fastify/src/framework/maker-cli/stubs/deploy/compose/sqlite.stub +45 -0
  102. package/fastify/src/framework/maker-cli/stubs/deploy/env/mysql.server.stub +68 -0
  103. package/fastify/src/framework/maker-cli/stubs/deploy/env/postgres.server.stub +68 -0
  104. package/fastify/src/framework/maker-cli/stubs/deploy/env/sqlite.stub +67 -0
  105. package/fastify/src/framework/maker-cli/stubs/deploy/scripts/auto-migrate.sh.stub +41 -0
  106. package/fastify/src/framework/maker-cli/stubs/deploy/server/README.stub +78 -0
  107. package/fastify/src/framework/maker-cli/stubs/deploy/server/compose/noredis.stub +120 -0
  108. package/fastify/src/framework/maker-cli/stubs/deploy/server/compose/redis.dev.stub +133 -0
  109. package/fastify/src/framework/maker-cli/stubs/deploy/server/compose/redis.stub +131 -0
  110. package/fastify/src/framework/maker-cli/stubs/deploy/server/env/local.example.stub +11 -0
  111. package/fastify/src/framework/maker-cli/stubs/deploy/server/env/noredis.stub +25 -0
  112. package/fastify/src/framework/maker-cli/stubs/deploy/server/env/redis.stub +25 -0
  113. package/fastify/src/framework/maker-cli/stubs/deploy/server/nginx-vhost/README.stub +16 -0
  114. package/fastify/src/framework/maker-cli/stubs/deploy/server/nginx-vhost/app.example.com.stub +13 -0
  115. package/fastify/src/framework/maker-cli/stubs/deploy/server/pgadmin/servers.stub +14 -0
  116. package/fastify/src/framework/maker-cli/stubs/deploy/server/redis/redis.conf.stub +7 -0
  117. package/fastify/src/framework/maker-cli/stubs/deploy/supervisor/noredis.stub +54 -0
  118. package/fastify/src/framework/maker-cli/stubs/deploy/supervisor/redis.stub +70 -0
  119. package/fastify/src/framework/maker-cli/stubs/deploy/workflow/local.json.stub +25 -0
  120. package/fastify/src/framework/maker-cli/stubs/deploy/workflow/remote.json.stub +24 -0
  121. package/fastify/src/framework/maker-cli/stubs/facade/name.ts.stub +12 -0
  122. package/fastify/src/framework/maker-cli/stubs/helper/name.ts.stub +14 -0
  123. package/fastify/src/framework/maker-cli/stubs/job/name.ts.stub +25 -0
  124. package/fastify/src/framework/maker-cli/stubs/middleware/name.local.ts.stub +15 -0
  125. package/fastify/src/framework/maker-cli/stubs/middleware/name.ts.stub +15 -0
  126. package/fastify/src/framework/maker-cli/stubs/model/name.mysql.ts.stub +10 -0
  127. package/fastify/src/framework/maker-cli/stubs/model/name.postgresql.ts.stub +10 -0
  128. package/fastify/src/framework/maker-cli/stubs/model/name.sqlite.ts.stub +10 -0
  129. package/fastify/src/framework/maker-cli/stubs/notification/controller.ts.stub +79 -0
  130. package/fastify/src/framework/maker-cli/stubs/notification/job.ts.stub +11 -0
  131. package/fastify/src/framework/maker-cli/stubs/notification/model.ts.stub +29 -0
  132. package/fastify/src/framework/maker-cli/stubs/notification/provider.ts.stub +174 -0
  133. package/fastify/src/framework/maker-cli/stubs/notification/route.api.ts.stub +71 -0
  134. package/fastify/src/framework/maker-cli/stubs/notification/route.plain.ts.stub +15 -0
  135. package/fastify/src/framework/maker-cli/stubs/notification/schema.plain.ts.stub +26 -0
  136. package/fastify/src/framework/maker-cli/stubs/notification/schema.ts.stub +26 -0
  137. package/fastify/src/framework/maker-cli/stubs/provider/module-barrel.ts.stub +19 -0
  138. package/fastify/src/framework/maker-cli/stubs/provider/module.ts.stub +21 -0
  139. package/fastify/src/framework/maker-cli/stubs/provider/name.ts.stub +21 -0
  140. package/fastify/src/framework/maker-cli/stubs/route/api.ts.stub +101 -0
  141. package/fastify/src/framework/maker-cli/stubs/route/plain.ts.stub +23 -0
  142. package/fastify/src/framework/maker-cli/stubs/route/standalone.api.ts.stub +120 -0
  143. package/fastify/src/framework/maker-cli/stubs/route/standalone.plain.ts.stub +50 -0
  144. package/fastify/src/framework/maker-cli/stubs/schedule/name.ts.stub +36 -0
  145. package/fastify/src/framework/maker-cli/stubs/schema/name.plain.ts.stub +14 -0
  146. package/fastify/src/framework/maker-cli/stubs/schema/name.ts.stub +33 -0
  147. package/fastify/src/framework/maker-cli/stubs/seeder/name.ts.stub +18 -0
  148. package/fastify/src/framework/maker-cli/stubs/seeder/standalone.ts.stub +22 -0
  149. package/fastify/src/framework/maker-cli/stubs/service/name.plain.ts.stub +67 -0
  150. package/fastify/src/framework/maker-cli/stubs/service/name.ts.stub +65 -0
  151. package/fastify/src/framework/maker-cli/stubs/test/unit.ts.stub +22 -0
  152. package/fastify/src/framework/maker-cli/stubs/type/name.ts.stub +22 -0
  153. package/fastify/src/framework/maker-cli/utils/env-config.mjs +44 -0
  154. package/fastify/src/framework/maker-cli/utils/env-db.mjs +61 -0
  155. package/fastify/src/framework/maker-cli/utils/file-ops.mjs +30 -0
  156. package/fastify/src/framework/maker-cli/utils/flags.mjs +14 -0
  157. package/fastify/src/framework/maker-cli/utils/help.mjs +379 -0
  158. package/fastify/src/framework/maker-cli/utils/naming.mjs +119 -0
  159. package/fastify/src/framework/maker-cli/utils/process.mjs +52 -0
  160. package/fastify/src/framework/maker-cli/utils/project-commands.mjs +201 -0
  161. package/fastify/src/framework/modules/discover.ts +57 -0
  162. package/fastify/src/framework/modules/routes.ts +31 -0
  163. package/fastify/src/framework/notification/channels/broadcast.ts +15 -0
  164. package/fastify/src/framework/notification/channels/mail.ts +42 -0
  165. package/fastify/src/framework/notification/contracts.ts +29 -0
  166. package/fastify/src/framework/notification/index.ts +59 -0
  167. package/fastify/src/framework/notification/registry.ts +15 -0
  168. package/fastify/src/framework/providers/adapter.ts +149 -0
  169. package/fastify/src/framework/providers/contracts.ts +126 -0
  170. package/fastify/src/framework/providers/loader.ts +105 -0
  171. package/fastify/src/framework/providers/registry.ts +88 -0
  172. package/fastify/src/framework/queue/clear.ts +22 -0
  173. package/fastify/src/framework/queue/queue.ts +401 -0
  174. package/fastify/src/framework/queue/ui.ts +194 -0
  175. package/fastify/src/framework/queue/worker.ts +61 -0
  176. package/fastify/src/framework/realtime/broadcast.ts +70 -0
  177. package/fastify/src/framework/realtime/index.ts +2 -0
  178. package/fastify/src/framework/realtime/socket-cookie.ts +72 -0
  179. package/fastify/src/framework/realtime/socket.ts +149 -0
  180. package/fastify/src/framework/realtime/types.ts +6 -0
  181. package/fastify/src/framework/realtime/ui.ts +16 -0
  182. package/fastify/src/framework/redis/client.ts +148 -0
  183. package/fastify/src/framework/runtime/runtime.ts +23 -0
  184. package/fastify/src/framework/runtime/server-adapter.ts +33 -0
  185. package/fastify/src/framework/scheduler/lock.ts +128 -0
  186. package/fastify/src/framework/scheduler/run.ts +48 -0
  187. package/fastify/src/framework/scheduler/scheduler.ts +155 -0
  188. package/fastify/src/framework/server.ts +162 -0
  189. package/fastify/src/framework/session/session.ts +160 -0
  190. package/fastify/src/framework/storage/storage.ts +744 -0
  191. package/fastify/src/framework/support/cookie.ts +71 -0
  192. package/fastify/src/framework/support/jwt.ts +33 -0
  193. package/fastify/src/framework/support/lifecycle.ts +35 -0
  194. package/fastify/src/framework/support/logger.ts +148 -0
  195. package/fastify/src/framework/support/mail.ts +56 -0
  196. package/fastify/src/framework/support/password.ts +23 -0
  197. package/fastify/src/framework/support/status-codes.ts +75 -0
  198. package/fastify/src/framework/support/upload.ts +181 -0
  199. package/fastify/src/framework/support/url.ts +41 -0
  200. package/fastify/src/middlewares/auth-middleware.ts +134 -0
  201. package/fastify/src/middlewares/role-middleware.ts +19 -0
  202. package/fastify/src/modules/auth/__tests__/forgetpass.test.ts +200 -0
  203. package/fastify/src/modules/auth/__tests__/login.test.ts +171 -0
  204. package/fastify/src/modules/auth/__tests__/logout.test.ts +60 -0
  205. package/fastify/src/modules/auth/__tests__/logoutalldevices.test.ts +49 -0
  206. package/fastify/src/modules/auth/__tests__/me.test.ts +91 -0
  207. package/fastify/src/modules/auth/__tests__/refreshtoken.test.ts +305 -0
  208. package/fastify/src/modules/auth/__tests__/register.test.ts +291 -0
  209. package/fastify/src/modules/auth/__tests__/resetpass.test.ts +206 -0
  210. package/fastify/src/modules/auth/__tests__/verifyemail.test.ts +183 -0
  211. package/fastify/src/modules/auth/controllers/auth.ts +252 -0
  212. package/fastify/src/modules/auth/controllers/role.ts +35 -0
  213. package/fastify/src/modules/auth/database/models/role.ts +14 -0
  214. package/fastify/src/modules/auth/database/models/user.ts +46 -0
  215. package/fastify/src/modules/auth/database/seeders/role.ts +18 -0
  216. package/fastify/src/modules/auth/database/seeders/user.ts +35 -0
  217. package/fastify/src/modules/auth/facade.ts +12 -0
  218. package/fastify/src/modules/auth/helpers/auth.ts +115 -0
  219. package/fastify/src/modules/auth/jobs/forgetpass.ts +20 -0
  220. package/fastify/src/modules/auth/jobs/registeruser.ts +23 -0
  221. package/fastify/src/modules/auth/jobs/verifyemail.ts +18 -0
  222. package/fastify/src/modules/auth/routes/index.ts +185 -0
  223. package/fastify/src/modules/auth/routes/role.ts +56 -0
  224. package/fastify/src/modules/auth/schemas/auth.ts +116 -0
  225. package/fastify/src/modules/auth/services/forgetpassword.ts +66 -0
  226. package/fastify/src/modules/auth/services/login.ts +63 -0
  227. package/fastify/src/modules/auth/services/logout.ts +25 -0
  228. package/fastify/src/modules/auth/services/logoutalldevices.ts +19 -0
  229. package/fastify/src/modules/auth/services/me.ts +31 -0
  230. package/fastify/src/modules/auth/services/refreshtoken.ts +110 -0
  231. package/fastify/src/modules/auth/services/register.ts +141 -0
  232. package/fastify/src/modules/auth/services/resetpassword.ts +69 -0
  233. package/fastify/src/modules/auth/services/verifyemail.ts +77 -0
  234. package/fastify/src/modules/auth/types/auth.ts +31 -0
  235. package/fastify/src/providers/README.md +107 -0
  236. package/fastify/src/providers/notification.ts +4 -0
  237. package/fastify/src/resources/index.html +17 -0
  238. package/fastify/src/resources/src/App.vue +5 -0
  239. package/fastify/src/resources/src/assets/css/styles.css +14761 -0
  240. package/fastify/src/resources/src/assets/css/styles.css.map +1 -0
  241. package/fastify/src/resources/src/assets/fonts/public-sans/public-sans-latin-ext.woff2 +0 -0
  242. package/fastify/src/resources/src/assets/fonts/public-sans/public-sans-latin.woff2 +0 -0
  243. package/fastify/src/resources/src/assets/images/favicon/favicon.ico +0 -0
  244. package/fastify/src/resources/src/assets/images/logo.png +0 -0
  245. package/fastify/src/resources/src/assets/scss/custom.css +217 -0
  246. package/fastify/src/resources/src/assets/scss/custom.css.map +1 -0
  247. package/fastify/src/resources/src/assets/scss/custom.scss +1346 -0
  248. package/fastify/src/resources/src/components/Button.vue +32 -0
  249. package/fastify/src/resources/src/components/Checkbox.vue +32 -0
  250. package/fastify/src/resources/src/components/Datepicker.vue +106 -0
  251. package/fastify/src/resources/src/components/FeatureButton.vue +53 -0
  252. package/fastify/src/resources/src/components/FloatButton.vue +33 -0
  253. package/fastify/src/resources/src/components/Href.vue +32 -0
  254. package/fastify/src/resources/src/components/Input.vue +243 -0
  255. package/fastify/src/resources/src/components/InputGroup.vue +147 -0
  256. package/fastify/src/resources/src/components/InputPasswordToggle.vue +229 -0
  257. package/fastify/src/resources/src/components/Modal.vue +71 -0
  258. package/fastify/src/resources/src/components/Pagebar.vue +26 -0
  259. package/fastify/src/resources/src/components/Refresh.vue +19 -0
  260. package/fastify/src/resources/src/components/Select.vue +384 -0
  261. package/fastify/src/resources/src/components/Spinner.vue +42 -0
  262. package/fastify/src/resources/src/components/Switch.vue +60 -0
  263. package/fastify/src/resources/src/components/TextArea.vue +117 -0
  264. package/fastify/src/resources/src/components/Toast.vue +56 -0
  265. package/fastify/src/resources/src/components/datatable/DataTableSkeleton.vue +98 -0
  266. package/fastify/src/resources/src/components/datatable/Pagination.vue +147 -0
  267. package/fastify/src/resources/src/components/datatable/SelectOpption.vue +64 -0
  268. package/fastify/src/resources/src/components/datatable/index.vue +199 -0
  269. package/fastify/src/resources/src/composables/useAuth.ts +52 -0
  270. package/fastify/src/resources/src/helpers/assets.ts +51 -0
  271. package/fastify/src/resources/src/helpers/nformatter.ts +10 -0
  272. package/fastify/src/resources/src/helpers/utils.ts +75 -0
  273. package/fastify/src/resources/src/layouts/AuthLayout.vue +20 -0
  274. package/fastify/src/resources/src/layouts/Layout/Footer.vue +23 -0
  275. package/fastify/src/resources/src/layouts/Layout/Header.vue +124 -0
  276. package/fastify/src/resources/src/layouts/Layout/Sidebar.vue +137 -0
  277. package/fastify/src/resources/src/layouts/Layout/index.vue +87 -0
  278. package/fastify/src/resources/src/main.ts +28 -0
  279. package/fastify/src/resources/src/pages/auth/forgetPassword.vue +76 -0
  280. package/fastify/src/resources/src/pages/auth/login.vue +96 -0
  281. package/fastify/src/resources/src/pages/auth/register.vue +129 -0
  282. package/fastify/src/resources/src/pages/auth/resetPassword.vue +110 -0
  283. package/fastify/src/resources/src/pages/auth/verifyEmail.vue +64 -0
  284. package/fastify/src/resources/src/pages/dashboard/index.vue +66 -0
  285. package/fastify/src/resources/src/plugins/axios.ts +31 -0
  286. package/fastify/src/resources/src/plugins/browserDetect.ts +55 -0
  287. package/fastify/src/resources/src/plugins/dialog.ts +216 -0
  288. package/fastify/src/resources/src/plugins/gum.ts +683 -0
  289. package/fastify/src/resources/src/plugins/pulse.ts +157 -0
  290. package/fastify/src/resources/src/plugins/routeProgress.ts +87 -0
  291. package/fastify/src/resources/src/router/index.ts +85 -0
  292. package/fastify/src/resources/src/stores/admin-ui.ts +148 -0
  293. package/fastify/src/resources/src/stores/auth.ts +187 -0
  294. package/fastify/src/resources/tsconfig.json +19 -0
  295. package/fastify/src/resources/vite.config.ts +64 -0
  296. package/fastify/src/storage/app/private/.gitkeep +0 -0
  297. package/fastify/src/storage/app/public/.gitkeep +0 -0
  298. package/fastify/src/storage/app/tmp/generated/.gitkeep +0 -0
  299. package/fastify/src/storage/database/nexwire.sqlite +0 -0
  300. package/fastify/src/storage/logs/.gitkeep +0 -0
  301. package/fastify/src/storage/logs/app.log +0 -0
  302. package/fastify/src/storage/logs/fatal.log +0 -0
  303. package/fastify/src/storage/tmp/.gitkeep +0 -0
  304. package/fastify/src/storage/trash/modules/.gitkeep +0 -0
  305. package/fastify/src/types/global.d.ts +32 -0
  306. package/fastify/tsconfig.json +19 -0
  307. package/fastify/vitest.config.ts +38 -0
  308. package/hono/src/framework/facade.ts +1 -0
  309. package/hono/src/framework/http/logger.ts +86 -81
  310. package/hono/src/framework/maker-cli/runtime/core.mjs +1 -2
  311. package/hono/src/framework/notification/channels/mail.ts +8 -6
  312. package/hono/src/middlewares/auth-middleware.ts +1 -2
  313. package/hono/src/middlewares/role-middleware.ts +3 -13
  314. package/hono/src/modules/auth/routes/index.ts +1 -2
  315. package/hono/src/providers/notification.ts +2 -2
  316. package/hono/src/resources/src/components/Switch.vue +60 -65
  317. package/hono/src/resources/src/pages/auth/forgetPassword.vue +23 -29
  318. package/hono/src/resources/src/pages/auth/login.vue +26 -29
  319. package/hono/src/resources/src/pages/auth/register.vue +36 -40
  320. package/hono/src/resources/src/pages/auth/resetPassword.vue +29 -37
  321. package/hono/src/resources/src/pages/auth/verifyEmail.vue +15 -19
  322. package/hono/src/resources/src/plugins/gum.ts +519 -203
  323. package/hono/src/resources/src/stores/auth.ts +9 -6
  324. package/hono/src/storage/database/nexwire.sqlite +0 -0
  325. package/package.json +3 -2
  326. package/src/index.js +11 -8
@@ -3,11 +3,11 @@ import { defineStore } from "pinia";
3
3
  import { ref } from "vue";
4
4
  import { type AuthUser, clearUser, setUser } from "@/composables/useAuth";
5
5
 
6
- type LoginPayload = { email?: string; phone?: string; password: string; remember?: boolean };
7
- type VerifyEmailPayload = { email: string; token: string };
8
- type ForgotPayload = { email: string };
6
+ export type LoginPayload = { email?: string; phone?: string; password: string; remember?: boolean };
7
+ export type VerifyEmailPayload = { email: string; token: string };
8
+ export type ForgotPayload = { email: string };
9
9
 
10
- type RegisterPayload = {
10
+ export type RegisterPayload = {
11
11
  name: string;
12
12
  email?: string;
13
13
  phone?: string;
@@ -15,7 +15,7 @@ type RegisterPayload = {
15
15
  password_confirmation: string;
16
16
  };
17
17
 
18
- type ResetPayload = {
18
+ export type ResetPayload = {
19
19
  email: string;
20
20
  token: string;
21
21
  password: string;
@@ -36,7 +36,10 @@ async function request<T>(method: "GET" | "POST", path: string, payload?: unknow
36
36
  return response.data;
37
37
  } catch (error: unknown) {
38
38
  if (axios.isAxiosError(error)) {
39
- throw new Error(String(error.response?.data?.message || error.message || "Request failed"));
39
+ // Keep the AxiosError so Gum can read `response.data` and populate
40
+ // form.errors, but show the API's message instead of axios's generic one.
41
+ error.message = String(error.response?.data?.message || error.message || "Request failed");
42
+ throw error;
40
43
  }
41
44
  throw new Error("Request failed");
42
45
  }
@@ -0,0 +1,14 @@
1
+ node_modules
2
+ dist
3
+ .git
4
+ .gitignore
5
+
6
+ npm-debug.log*
7
+ yarn-debug.log*
8
+ yarn-error.log*
9
+ pnpm-debug.log*
10
+
11
+ coverage
12
+ *.log
13
+ tmp
14
+ temp
package/fastify/.env ADDED
@@ -0,0 +1,44 @@
1
+ # ── App ────────────────────────────────────────────
2
+ APP_NAME=nexwire
3
+ APP_ENV=development
4
+ APP_PORT=3000
5
+ APP_URL=http://localhost:3000
6
+
7
+ # Frontend origin when UI is on a different domain than the API.
8
+ # Leave empty if UI is served from the same APP_URL.
9
+ FRONTEND_URL=
10
+
11
+ # ── Database ───────────────────────────────────────
12
+ # Supported: sqlite:, mysql://, postgres://
13
+ # Default is SQLite so a fresh clone runs with zero setup (no server to install).
14
+ # The dev stack migrates + seeds automatically on first run.
15
+ # Switch later, e.g. mysql://root:@localhost:3306/nexwire
16
+ DATABASE_URL=sqlite:./src/storage/database/nexwire.sqlite
17
+
18
+ # ── Secrets ────────────────────────────────────────
19
+ JWT_ACCESS_SECRET=change-me-access
20
+ JWT_REFRESH_SECRET=change-me-refresh
21
+ COOKIE_SECRET=change-me-cookie
22
+ STORAGE_ACCESS_KEY_ID=
23
+ STORAGE_SECRET_ACCESS_KEY=
24
+ MAIL_USERNAME=
25
+ MAIL_PASSWORD=
26
+
27
+ # ── Redis ──────────────────────────────────────────
28
+ # Set true to enable cache, session, queue, events, and Queue Dashboard
29
+ REDIS=false
30
+ # Shared key prefix for cache, session, queue, events, and dashboards
31
+ REDIS_URL=redis://127.0.0.1:6379
32
+ REDIS_PREFIX=nexwire
33
+
34
+ # ── Feature Toggle ─────────────────────────────────
35
+ # Set false for API-only mode (no UI build/serve)
36
+ UI=true
37
+ # Set true to enable OpenAPI / Scalar docs at /api-docs
38
+ OPEN_API=true
39
+ # Set false to disable Socket.IO realtime server
40
+ SOCKET=false
41
+ # Set false to disable browser security headers (CSP, HSTS, X-Frame)
42
+ SECURITY_HEADERS=true
43
+
44
+
@@ -0,0 +1,42 @@
1
+ # ── App ────────────────────────────────────────────
2
+ APP_ENV=development
3
+ APP_NAME=nexwire
4
+ APP_PORT=3000
5
+ APP_URL=http://localhost:3000
6
+
7
+ # Frontend origin when UI is on a different domain than the API.
8
+ # Leave empty if UI is served from the same APP_URL.
9
+ FRONTEND_URL=
10
+
11
+ # ── Database ───────────────────────────────────────
12
+ # Supported: sqlite:, mysql://, postgres://
13
+ # Default is SQLite so a fresh clone runs with zero setup (no server to install).
14
+ # The dev stack migrates + seeds automatically on first run.
15
+ # Switch later, e.g. mysql://root:@localhost:3306/nexwire
16
+ DATABASE_URL=sqlite:./src/storage/database/nexwire.sqlite
17
+
18
+ # ── Secrets ────────────────────────────────────────
19
+ JWT_ACCESS_SECRET=change-me-access
20
+ JWT_REFRESH_SECRET=change-me-refresh
21
+ COOKIE_SECRET=change-me-cookie
22
+ STORAGE_ACCESS_KEY_ID=
23
+ STORAGE_SECRET_ACCESS_KEY=
24
+ MAIL_USERNAME=
25
+ MAIL_PASSWORD=
26
+
27
+ # ── Redis ──────────────────────────────────────────
28
+ # Set true to enable cache, session, queue, events, and Queue Dashboard
29
+ REDIS=false
30
+ # Shared key prefix for cache, session, queue, events, and dashboards
31
+ REDIS_URL=redis://127.0.0.1:6379
32
+ REDIS_PREFIX=nexwire
33
+
34
+ # ── Feature Toggle ─────────────────────────────────
35
+ # Set false for API-only mode (no UI build/serve)
36
+ UI=true
37
+ # Set true to enable OpenAPI / Scalar docs at /api-docs
38
+ OPEN_API=true
39
+ # Set false to disable Socket.IO realtime server
40
+ SOCKET=false
41
+ # Set false to disable browser security headers (CSP, HSTS, X-Frame)
42
+ SECURITY_HEADERS=true
@@ -0,0 +1,6 @@
1
+ {
2
+ "recommendations": [
3
+ "biomejs.biome",
4
+ "editorconfig.editorconfig"
5
+ ]
6
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "editor.defaultFormatter": "biomejs.biome",
3
+ "[typescript]": {
4
+ "editor.defaultFormatter": "biomejs.biome"
5
+ },
6
+ "[typescriptreact]": {
7
+ "editor.defaultFormatter": "biomejs.biome"
8
+ },
9
+ "[javascript]": {
10
+ "editor.defaultFormatter": "biomejs.biome"
11
+ },
12
+ "[javascriptreact]": {
13
+ "editor.defaultFormatter": "biomejs.biome"
14
+ },
15
+ "[json]": {
16
+ "editor.defaultFormatter": "biomejs.biome"
17
+ },
18
+ "[jsonc]": {
19
+ "editor.defaultFormatter": "biomejs.biome"
20
+ },
21
+ "[vue]": {
22
+ "editor.defaultFormatter": "biomejs.biome"
23
+ },
24
+ "[css]": {
25
+ "editor.defaultFormatter": "biomejs.biome"
26
+ },
27
+ "[scss]": {
28
+ "editor.defaultFormatter": "biomejs.biome"
29
+ },
30
+ "editor.codeActionsOnSave": {
31
+ "source.organizeImports.biome": "explicit",
32
+ "source.fixAll.biome": "explicit"
33
+ },
34
+ "files.eol": "\n",
35
+ "files.trimTrailingWhitespace": true,
36
+ "files.insertFinalNewline": true
37
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 - present, niYam
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,232 @@
1
+ <p align="center">
2
+ <a href="https://github.com/niyamulahsan/nexwire">
3
+ <img alt="nexwire" src="https://raw.githubusercontent.com/niyamulahsan/nexwire/main/logo-favicon/nexwire.png" width="300">
4
+ </a>
5
+ </p>
6
+
7
+ <h3 align="center">Full-stack TypeScript framework for modern web applications</h3>
8
+
9
+ <p align="center">
10
+ <a href="https://niyamulahsan.github.io/nexwire"><img src="https://img.shields.io/badge/docs%20%7C%20nexwire-3b8eed" alt="Documentation"></a>
11
+ <a href="https://www.npmjs.com/package/create-nexwire"><img src="https://img.shields.io/npm/v/create-nexwire" alt="npm version"></a>
12
+ <a href="https://www.npmjs.com/package/create-nexwire"><img src="https://img.shields.io/npm/dt/create-nexwire" alt="npm downloads"></a>
13
+ <a href="https://github.com/niyamulahsan/nexwire/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="MIT License"></a>
14
+ <a href="https://github.com/niyamulahsan/nexwire"><img src="https://img.shields.io/github/stars/niyamulahsan/nexwire?style=social" alt="GitHub Stars"></a>
15
+ </p>
16
+
17
+ ---
18
+
19
+ nexwire is a batteries-included TypeScript framework that combines modular backends (Hono, Express, Fastify) with Drizzle ORM, BullMQ, Socket.IO, Redis, and a Vue 3 SPA frontend — all scaffolded with a single command and deployed with Docker Compose.
20
+
21
+ ## Quick Start
22
+
23
+ ### Hono (default)
24
+
25
+ ```bash
26
+ npm create nexwire@latest my-app
27
+ cd my-app
28
+ npm install
29
+ npm run maker db:migrate --seed
30
+ npm run maker dev
31
+ ```
32
+
33
+ ### Express
34
+
35
+ ```bash
36
+ npm create nexwire@latest my-app -- --engine=express
37
+ cd my-app
38
+ npm install
39
+ npm run maker db:migrate --seed
40
+ npm run maker dev
41
+ ```
42
+
43
+ ### Fastify
44
+
45
+ ```bash
46
+ npm create nexwire@latest my-app -- --engine=fastify
47
+ cd my-app
48
+ npm install
49
+ npm run maker db:migrate --seed
50
+ npm run maker dev
51
+ ```
52
+
53
+ Your API is live at `http://localhost:3000`, Scalar docs at `/api-docs`, and the Vue frontend at `http://localhost:5173`.
54
+
55
+ Requires **Node.js >= 22.12**. Hono and Express also support **Bun >= 1.3**; Fastify is Node-only.
56
+
57
+ ### Current directory
58
+
59
+ Scaffold directly into the current directory:
60
+
61
+ ```bash
62
+ npm create nexwire@latest .
63
+ npm create nexwire@latest . -- --engine=express
64
+ npm create nexwire@latest . -- --engine=fastify
65
+ ```
66
+
67
+ Works with any package manager: `pnpm`, `yarn`, or `bun`.
68
+
69
+ ### Package Manager
70
+
71
+ All examples use `npm` as the default. nexwire works with any major package manager:
72
+
73
+ | Manager | Create project | Run commands |
74
+ | -------- | ----------------------------------- | --------------------- |
75
+ | **npm** | `npm create nexwire@latest my-app` | `npm run maker <cmd>` |
76
+ | **pnpm** | `pnpm create nexwire@latest my-app` | `pnpm maker <cmd>` |
77
+ | **yarn** | `yarn create nexwire@latest my-app` | `yarn maker <cmd>` |
78
+ | **bun** | `bun create nexwire@latest my-app` | `bun maker <cmd>` |
79
+ | **all** | `npm create nexwire@latest .` | current directory |
80
+
81
+ ### Runtime
82
+
83
+ nexwire runs on **Node.js** or **Bun** — pick whichever fits your deployment:
84
+
85
+ | Runtime | Minimum version | Notes |
86
+ | ----------- | --------------- | --------------------------------------------------------------------- |
87
+ | **Node.js** | `>= 22.12` | Default. Uses `node` in Dockerfile. Required by Fastify. |
88
+ | **Bun** | `>= 1.3` | Hono and Express only. Pass `--runtime=bun` to deploy:init. |
89
+
90
+ ::: tip
91
+ The Fastify template is **Node-only** and does not include Bun support.
92
+ :::
93
+
94
+ ## Features
95
+
96
+ | Category | What you get |
97
+ | ------------------- | -------------------------------------------------------------------------------------- |
98
+ | **API** | Hono/Express/Fastify HTTP server with Zod validation, OpenAPI/Scalar docs, CORS, rate limiting |
99
+ | **Database** | Drizzle ORM — SQLite, MySQL, or PostgreSQL. Auto-detected from `DATABASE_URL`. |
100
+ | **Auth** | JWT access + refresh token rotation, signed httpOnly cookies, role middleware |
101
+ | **Queue** | BullMQ background jobs with `shouldQueue` decorator and Bull Board dashboard |
102
+ | **Realtime** | Socket.IO with auto room joining (user, role, auth) and broadcast events |
103
+ | **Cache & Session** | Redis-backed with graceful fallback when Redis is disabled |
104
+ | **Scheduler** | Cron-based task scheduling with distributed Redis lock |
105
+ | **Storage** | Local disk or S3-compatible (AWS S3, R2, MinIO, DigitalOcean Spaces) |
106
+ | **Notifications** | Database-persisted notifications with broadcast + mail delivery |
107
+ | **Frontend** | Vue 3 SPA — Vite, Pinia, Vue Router, Bootstrap 5, real-time Pulse plugin |
108
+ | **Security** | CSP, HSTS, X-Frame headers — configured in one place, toggled per environment |
109
+ | **Reliability** | Circuit breakers for Redis, mail, and S3 with auto-fallback; startup config validation |
110
+ | **CLI** | `maker` command for code generation, migrations, runtime, and deploy |
111
+ | **Deploy** | Two-layer Docker Compose — nginx-proxy, auto SSL, supervisor |
112
+
113
+ ## Architecture
114
+
115
+ ```
116
+ src/
117
+ ├── env.ts # Zod-validated environment config
118
+ ├── database/ # Drizzle schema, migrations, seeders
119
+ ├── framework/ # Reusable engine (HTTP, auth, queue, cache, etc.)
120
+ ├── modules/ # Application modules (auto-discovered)
121
+ ├── middlewares/ # Auth & role guards
122
+ ├── resources/ # Vue 3 SPA frontend
123
+ └── storage/ # Uploaded files & logs
124
+ ```
125
+
126
+ ### Modules
127
+
128
+ Every feature is a self-contained module under `src/modules/<name>/`:
129
+
130
+ ```
131
+ src/modules/posts/
132
+ ├── __tests__/ # Unit tests
133
+ ├── console/ # CLI commands & scheduled tasks
134
+ ├── controllers/ # Request handlers
135
+ ├── database/
136
+ │ ├── models/ # Drizzle table definitions
137
+ │ └── seeders/ # Test data
138
+ ├── helpers/ # Pure functions — no I/O
139
+ ├── jobs/ # BullMQ queue handlers
140
+ ├── middlewares/ # Module-local middleware
141
+ ├── routes/ # HTTP route definitions (auto-discovered)
142
+ ├── schemas/ # Zod validation schemas
143
+ ├── services/ # Business logic — DB, files, network
144
+ ├── types/ # Shared TypeScript types
145
+ └── facade.ts # Public API for other modules
146
+ ```
147
+
148
+ Modules are **auto-discovered** — no manual registration. Create one with:
149
+
150
+ ```bash
151
+ npm run maker module:make blog
152
+ npm run maker module:make-controller blog post
153
+ npm run maker module:make-route blog post
154
+ npm run maker module:make-model blog post
155
+ ```
156
+
157
+ ### Framework Facade
158
+
159
+ Access all subsystems through a single import:
160
+
161
+ ```ts
162
+ import {
163
+ db,
164
+ cache,
165
+ session,
166
+ queue,
167
+ dispatchEvent,
168
+ notify,
169
+ storage,
170
+ jwt,
171
+ mail,
172
+ password,
173
+ urls,
174
+ logger,
175
+ } from "@/framework/facade.js";
176
+ ```
177
+
178
+ ## CLI Reference
179
+
180
+ | Command | Description |
181
+ | ------------------------------ | ---------------------------------------------- |
182
+ | `maker dev` | Start API server + frontend HMR + queue worker |
183
+ | `maker serve [--prod]` | API server (dev or production) |
184
+ | `maker queue:work` | BullMQ worker process |
185
+ | `maker schedule:work` | Cron scheduler |
186
+ | `maker db:migrate --seed` | Run migrations + seeders |
187
+ | `maker db:fresh` | Drop all tables, re-migrate, re-seed |
188
+ | `maker module:make <name>` | Scaffold a new module |
189
+ | `maker deploy:init` | Generate Docker deploy scaffolding |
190
+ | `maker deploy:workflow` | Local deploy (Docker Desktop) |
191
+ | `maker deploy:workflow:remote` | Remote deploy via SSH + rsync |
192
+
193
+ ## Deployment
194
+
195
+ nexwire includes a complete Docker deployment system out of the box.
196
+
197
+ ### Local (Docker Desktop)
198
+
199
+ ```bash
200
+ npm run maker deploy:init # Generate deploy files (one-time)
201
+ npm run maker deploy:workflow # Build and start everything
202
+ ```
203
+
204
+ ### Remote (VPS / Cloud)
205
+
206
+ ```bash
207
+ npm run maker deploy:init # Generate files
208
+ # Edit deploy/workflow.remote.json with your SSH details
209
+ npm run maker deploy:workflow:remote # Deploy to server
210
+ ```
211
+
212
+ The deploy system provisions:
213
+
214
+ - **Multi-stage Dockerfile** — builder (install + build) → runner (minimal production image)
215
+ - **Shared infrastructure** — nginx-proxy, MySQL/PostgreSQL, Redis, phpMyAdmin, pgAdmin
216
+ - **Auto SSL** — Let's Encrypt via nginx-proxy companion
217
+ - **Process supervisor** — API server, queue worker, cron scheduler, auto-migration
218
+ - **Two-layer architecture** — server infra runs once per host, app stack rebuilds per deploy
219
+
220
+ See the [deploy documentation](https://niyamulahsan.github.io/nexwire/deploy/overview) for full details.
221
+
222
+ ## Documentation
223
+
224
+ Complete documentation is available at **[Documentation](https://niyamulahsan.github.io/nexwire)**
225
+
226
+ ## Contributing
227
+
228
+ Contributions are welcome. Open an issue or pull request on [GitHub](https://github.com/niyamulahsan/nexwire).
229
+
230
+ ## License
231
+
232
+ nexwire is open-sourced software licensed under the [MIT license](LICENSE).
@@ -0,0 +1,99 @@
1
+ {
2
+ "$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
3
+ "vcs": {
4
+ "enabled": true,
5
+ "clientKind": "git",
6
+ "useIgnoreFile": true
7
+ },
8
+ "html": {
9
+ "experimentalFullSupportEnabled": true,
10
+ "formatter": {
11
+ "enabled": true
12
+ }
13
+ },
14
+ "formatter": {
15
+ "indentStyle": "space",
16
+ "indentWidth": 2,
17
+ "lineWidth": 140,
18
+ "bracketSameLine": false
19
+ },
20
+ "files": {
21
+ "includes": [
22
+ "**",
23
+ "!**/node_modules"
24
+ ]
25
+ },
26
+ "linter": {
27
+ "rules": {
28
+ "preset": "recommended",
29
+ "a11y": {
30
+ "noLabelWithoutControl": "off",
31
+ "useButtonType": "off",
32
+ "useSemanticElements": "off",
33
+ "noStaticElementInteractions": "off",
34
+ "useKeyWithClickEvents": "off",
35
+ "useValidAnchor": "off",
36
+ "useAnchorContent": "off",
37
+ "noDistractingElements": "off"
38
+ },
39
+ "correctness": {
40
+ "noUnusedVariables": "off",
41
+ "useVueValidTemplateRoot": "off",
42
+ "noUnusedImports": "off"
43
+ },
44
+ "complexity": {
45
+ "noUselessEscapeInRegex": "off",
46
+ "noImportantStyles": "off"
47
+ },
48
+ "style": {
49
+ "noNonNullAssertion": "off",
50
+ "useVueMultiWordComponentNames": "off",
51
+ "useImportType": "off"
52
+ },
53
+ "suspicious": {
54
+ "noEmptyBlockStatements": "off",
55
+ "noExplicitAny": "off",
56
+ "noRedeclare": "off",
57
+ "noAssignInExpressions": "off",
58
+ "useIterableCallbackReturn": "off"
59
+ }
60
+ }
61
+ },
62
+ "javascript": {
63
+ "formatter": {
64
+ "quoteStyle": "double",
65
+ "semicolons": "always",
66
+ "trailingCommas": "none"
67
+ }
68
+ },
69
+ "overrides": [
70
+ {
71
+ "includes": [
72
+ "**/*.{js,mjs,cjs,ts,tsx,vue}"
73
+ ],
74
+ "javascript": {
75
+ "globals": [
76
+ "exports",
77
+ "location"
78
+ ]
79
+ }
80
+ }
81
+ ],
82
+ "assist": {
83
+ "actions": {
84
+ "source": {
85
+ "organizeImports": {
86
+ "level": "on",
87
+ "options": {
88
+ "groups": [
89
+ ":NODE:",
90
+ ":PACKAGE:",
91
+ ":ALIAS:",
92
+ ":PATH:"
93
+ ]
94
+ }
95
+ }
96
+ }
97
+ }
98
+ }
99
+ }
@@ -0,0 +1,25 @@
1
+ import { config } from "dotenv";
2
+ import { defineConfig } from "drizzle-kit";
3
+
4
+ config({ path: ".env" });
5
+
6
+ function sqlitePathFromUrl(url: string) {
7
+ if (url.startsWith("sqlite:///")) return url.replace("sqlite:///", "");
8
+ if (url.startsWith("sqlite://")) return url.replace("sqlite://", "");
9
+ if (url.startsWith("sqlite:")) return url.replace("sqlite:", "");
10
+ return url;
11
+ }
12
+
13
+ const databaseUrl = process.env.DATABASE_URL || "sqlite:./src/storage/database/nexwire.sqlite";
14
+ const dialect = databaseUrl.startsWith("mysql") ? "mysql" : databaseUrl.startsWith("postgres") ? "postgresql" : "sqlite";
15
+
16
+ export default defineConfig({
17
+ schema: process.env.DRIZZLE_SCHEMA || "./src/database/schema.ts",
18
+ out: `./src/database/migrations/${dialect}`,
19
+ dialect,
20
+ dbCredentials: databaseUrl.startsWith("mysql")
21
+ ? { url: databaseUrl }
22
+ : databaseUrl.startsWith("postgres")
23
+ ? { url: databaseUrl }
24
+ : { url: `file:${sqlitePathFromUrl(databaseUrl)}` }
25
+ });
@@ -0,0 +1,31 @@
1
+ .env
2
+ node_modules/
3
+ dist/
4
+
5
+ # Coverage reports - regenerated by `npm run test:coverage`, ~130 HTML files
6
+ coverage/
7
+
8
+ public/*
9
+ !public/.gitkeep
10
+
11
+ deploy/.env
12
+ deploy/server/.env
13
+
14
+ *.log
15
+ npm-debug.log*
16
+ yarn-debug.log*
17
+ yarn-error.log*
18
+ pnpm-debug.log*
19
+
20
+ .DS_Store
21
+ Thumbs.db
22
+
23
+ # Lock files — regenerated per developer's package manager
24
+ # bun.lockb is the binary format used by bun before 1.2; bun.lock is the
25
+ # current text format. Both are ignored, so upgrading bun cannot turn a
26
+ # developer's local install into an untracked file.
27
+ bun.lock
28
+ bun.lockb
29
+ package-lock.json
30
+ pnpm-lock.yaml
31
+ yarn.lock