@kabyeon/nexusjs 0.6.5

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 (669) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +860 -0
  3. package/dist/auth/auth.controller.d.ts +175 -0
  4. package/dist/auth/auth.controller.d.ts.map +1 -0
  5. package/dist/auth/auth.d.ts +47 -0
  6. package/dist/auth/auth.d.ts.map +1 -0
  7. package/dist/auth/auth.module.d.ts +34 -0
  8. package/dist/auth/auth.module.d.ts.map +1 -0
  9. package/dist/auth/auth.service.d.ts +192 -0
  10. package/dist/auth/auth.service.d.ts.map +1 -0
  11. package/dist/auth/decorators/current-user.d.ts +58 -0
  12. package/dist/auth/decorators/current-user.d.ts.map +1 -0
  13. package/dist/auth/index.d.ts +43 -0
  14. package/dist/auth/index.d.ts.map +1 -0
  15. package/dist/auth/index.js +730 -0
  16. package/dist/auth/index.js.map +25 -0
  17. package/dist/auth/middleware.d.ts +50 -0
  18. package/dist/auth/middleware.d.ts.map +1 -0
  19. package/dist/auth/types.d.ts +135 -0
  20. package/dist/auth/types.d.ts.map +1 -0
  21. package/dist/cache/cache.module.d.ts +22 -0
  22. package/dist/cache/cache.module.d.ts.map +1 -0
  23. package/dist/cache/cache.service.d.ts +37 -0
  24. package/dist/cache/cache.service.d.ts.map +1 -0
  25. package/dist/cache/index.d.ts +9 -0
  26. package/dist/cache/index.d.ts.map +1 -0
  27. package/dist/cache/index.js +814 -0
  28. package/dist/cache/index.js.map +25 -0
  29. package/dist/cache/stores/drizzle.d.ts +76 -0
  30. package/dist/cache/stores/drizzle.d.ts.map +1 -0
  31. package/dist/cache/stores/index.d.ts +10 -0
  32. package/dist/cache/stores/index.d.ts.map +1 -0
  33. package/dist/cache/stores/memory.d.ts +34 -0
  34. package/dist/cache/stores/memory.d.ts.map +1 -0
  35. package/dist/cache/stores/redis.d.ts +46 -0
  36. package/dist/cache/stores/redis.d.ts.map +1 -0
  37. package/dist/cache/types.d.ts +88 -0
  38. package/dist/cache/types.d.ts.map +1 -0
  39. package/dist/cli/commands/config.d.ts +44 -0
  40. package/dist/cli/commands/config.d.ts.map +1 -0
  41. package/dist/cli/commands/db-generate.d.ts +20 -0
  42. package/dist/cli/commands/db-generate.d.ts.map +1 -0
  43. package/dist/cli/commands/db-migrate.d.ts +33 -0
  44. package/dist/cli/commands/db-migrate.d.ts.map +1 -0
  45. package/dist/cli/commands/db-seed.d.ts +43 -0
  46. package/dist/cli/commands/db-seed.d.ts.map +1 -0
  47. package/dist/cli/commands/index.d.ts +11 -0
  48. package/dist/cli/commands/index.d.ts.map +1 -0
  49. package/dist/cli/commands/info.d.ts +11 -0
  50. package/dist/cli/commands/info.d.ts.map +1 -0
  51. package/dist/cli/commands/init.d.ts +38 -0
  52. package/dist/cli/commands/init.d.ts.map +1 -0
  53. package/dist/cli/commands/make-auth.d.ts +17 -0
  54. package/dist/cli/commands/make-auth.d.ts.map +1 -0
  55. package/dist/cli/commands/make-controller.d.ts +16 -0
  56. package/dist/cli/commands/make-controller.d.ts.map +1 -0
  57. package/dist/cli/commands/make-crud.d.ts +28 -0
  58. package/dist/cli/commands/make-crud.d.ts.map +1 -0
  59. package/dist/cli/commands/make-listener.d.ts +15 -0
  60. package/dist/cli/commands/make-listener.d.ts.map +1 -0
  61. package/dist/cli/commands/make-middleware.d.ts +7 -0
  62. package/dist/cli/commands/make-middleware.d.ts.map +1 -0
  63. package/dist/cli/commands/make-migration.d.ts +21 -0
  64. package/dist/cli/commands/make-migration.d.ts.map +1 -0
  65. package/dist/cli/commands/make-model.d.ts +22 -0
  66. package/dist/cli/commands/make-model.d.ts.map +1 -0
  67. package/dist/cli/commands/make-module.d.ts +11 -0
  68. package/dist/cli/commands/make-module.d.ts.map +1 -0
  69. package/dist/cli/commands/make-queue.d.ts +17 -0
  70. package/dist/cli/commands/make-queue.d.ts.map +1 -0
  71. package/dist/cli/commands/make-schedule.d.ts +17 -0
  72. package/dist/cli/commands/make-schedule.d.ts.map +1 -0
  73. package/dist/cli/commands/make-service.d.ts +7 -0
  74. package/dist/cli/commands/make-service.d.ts.map +1 -0
  75. package/dist/cli/commands/make-session.d.ts +15 -0
  76. package/dist/cli/commands/make-session.d.ts.map +1 -0
  77. package/dist/cli/commands/make-validator.d.ts +7 -0
  78. package/dist/cli/commands/make-validator.d.ts.map +1 -0
  79. package/dist/cli/commands/new.d.ts +14 -0
  80. package/dist/cli/commands/new.d.ts.map +1 -0
  81. package/dist/cli/commands/repl.d.ts +42 -0
  82. package/dist/cli/commands/repl.d.ts.map +1 -0
  83. package/dist/cli/commands/route-list.d.ts +12 -0
  84. package/dist/cli/commands/route-list.d.ts.map +1 -0
  85. package/dist/cli/core/args.d.ts +29 -0
  86. package/dist/cli/core/args.d.ts.map +1 -0
  87. package/dist/cli/core/config.d.ts +137 -0
  88. package/dist/cli/core/config.d.ts.map +1 -0
  89. package/dist/cli/core/fs.d.ts +38 -0
  90. package/dist/cli/core/fs.d.ts.map +1 -0
  91. package/dist/cli/core/index.d.ts +42 -0
  92. package/dist/cli/core/index.d.ts.map +1 -0
  93. package/dist/cli/core/logger.d.ts +46 -0
  94. package/dist/cli/core/logger.d.ts.map +1 -0
  95. package/dist/cli/core/loose-json.d.ts +26 -0
  96. package/dist/cli/core/loose-json.d.ts.map +1 -0
  97. package/dist/cli/core/prompts.d.ts +22 -0
  98. package/dist/cli/core/prompts.d.ts.map +1 -0
  99. package/dist/cli/core/template.d.ts +26 -0
  100. package/dist/cli/core/template.d.ts.map +1 -0
  101. package/dist/cli/index.d.ts +1 -0
  102. package/dist/cli/index.d.ts.map +1 -0
  103. package/dist/cli/index.js +6136 -0
  104. package/dist/cli/index.js.map +91 -0
  105. package/dist/cli/templates/controller/adonis.d.ts +10 -0
  106. package/dist/cli/templates/controller/adonis.d.ts.map +1 -0
  107. package/dist/cli/templates/controller/functional.d.ts +9 -0
  108. package/dist/cli/templates/controller/functional.d.ts.map +1 -0
  109. package/dist/cli/templates/controller/nest.d.ts +17 -0
  110. package/dist/cli/templates/controller/nest.d.ts.map +1 -0
  111. package/dist/cli/templates/crud/controller.d.ts +8 -0
  112. package/dist/cli/templates/crud/controller.d.ts.map +1 -0
  113. package/dist/cli/templates/crud/dto.d.ts +8 -0
  114. package/dist/cli/templates/crud/dto.d.ts.map +1 -0
  115. package/dist/cli/templates/crud/index.d.ts +33 -0
  116. package/dist/cli/templates/crud/index.d.ts.map +1 -0
  117. package/dist/cli/templates/crud/module.d.ts +6 -0
  118. package/dist/cli/templates/crud/module.d.ts.map +1 -0
  119. package/dist/cli/templates/crud/test.d.ts +10 -0
  120. package/dist/cli/templates/crud/test.d.ts.map +1 -0
  121. package/dist/cli/templates/index.d.ts +39 -0
  122. package/dist/cli/templates/index.d.ts.map +1 -0
  123. package/dist/cli/templates/middleware/middleware.d.ts +8 -0
  124. package/dist/cli/templates/middleware/middleware.d.ts.map +1 -0
  125. package/dist/cli/templates/migration/drizzle.d.ts +12 -0
  126. package/dist/cli/templates/migration/drizzle.d.ts.map +1 -0
  127. package/dist/cli/templates/migration/sql.d.ts +10 -0
  128. package/dist/cli/templates/migration/sql.d.ts.map +1 -0
  129. package/dist/cli/templates/model/drizzle-dialect.d.ts +29 -0
  130. package/dist/cli/templates/model/drizzle-dialect.d.ts.map +1 -0
  131. package/dist/cli/templates/model/drizzle.d.ts +14 -0
  132. package/dist/cli/templates/model/drizzle.d.ts.map +1 -0
  133. package/dist/cli/templates/model/kysely.d.ts +12 -0
  134. package/dist/cli/templates/model/kysely.d.ts.map +1 -0
  135. package/dist/cli/templates/model/prisma.d.ts +12 -0
  136. package/dist/cli/templates/model/prisma.d.ts.map +1 -0
  137. package/dist/cli/templates/module/module.d.ts +16 -0
  138. package/dist/cli/templates/module/module.d.ts.map +1 -0
  139. package/dist/cli/templates/project/drizzle.config.d.ts +12 -0
  140. package/dist/cli/templates/project/drizzle.config.d.ts.map +1 -0
  141. package/dist/cli/templates/project/nx.config.d.ts +7 -0
  142. package/dist/cli/templates/project/nx.config.d.ts.map +1 -0
  143. package/dist/cli/templates/repository/repository.d.ts +13 -0
  144. package/dist/cli/templates/repository/repository.d.ts.map +1 -0
  145. package/dist/cli/templates/service/service.d.ts +12 -0
  146. package/dist/cli/templates/service/service.d.ts.map +1 -0
  147. package/dist/cli/templates/validator/validator.d.ts +8 -0
  148. package/dist/cli/templates/validator/validator.d.ts.map +1 -0
  149. package/dist/config/config.module.d.ts +39 -0
  150. package/dist/config/config.module.d.ts.map +1 -0
  151. package/dist/config/config.service.d.ts +47 -0
  152. package/dist/config/config.service.d.ts.map +1 -0
  153. package/dist/config/index.d.ts +39 -0
  154. package/dist/config/index.d.ts.map +1 -0
  155. package/dist/config/index.js +436 -0
  156. package/dist/config/index.js.map +21 -0
  157. package/dist/config/types.d.ts +78 -0
  158. package/dist/config/types.d.ts.map +1 -0
  159. package/dist/core/application.d.ts +77 -0
  160. package/dist/core/application.d.ts.map +1 -0
  161. package/dist/core/constants.d.ts +48 -0
  162. package/dist/core/constants.d.ts.map +1 -0
  163. package/dist/core/decorators/controller.d.ts +21 -0
  164. package/dist/core/decorators/controller.d.ts.map +1 -0
  165. package/dist/core/decorators/http-methods.d.ts +33 -0
  166. package/dist/core/decorators/http-methods.d.ts.map +1 -0
  167. package/dist/core/decorators/index.d.ts +12 -0
  168. package/dist/core/decorators/index.d.ts.map +1 -0
  169. package/dist/core/decorators/injectable.d.ts +42 -0
  170. package/dist/core/decorators/injectable.d.ts.map +1 -0
  171. package/dist/core/decorators/metadata.d.ts +7 -0
  172. package/dist/core/decorators/metadata.d.ts.map +1 -0
  173. package/dist/core/decorators/module.d.ts +23 -0
  174. package/dist/core/decorators/module.d.ts.map +1 -0
  175. package/dist/core/decorators/params.d.ts +33 -0
  176. package/dist/core/decorators/params.d.ts.map +1 -0
  177. package/dist/core/decorators/repository.d.ts +24 -0
  178. package/dist/core/decorators/repository.d.ts.map +1 -0
  179. package/dist/core/decorators/validate.d.ts +21 -0
  180. package/dist/core/decorators/validate.d.ts.map +1 -0
  181. package/dist/core/di/container.d.ts +70 -0
  182. package/dist/core/di/container.d.ts.map +1 -0
  183. package/dist/core/di/index.d.ts +9 -0
  184. package/dist/core/di/index.d.ts.map +1 -0
  185. package/dist/core/di/request-middleware.d.ts +36 -0
  186. package/dist/core/di/request-middleware.d.ts.map +1 -0
  187. package/dist/core/di/request-scope.d.ts +45 -0
  188. package/dist/core/di/request-scope.d.ts.map +1 -0
  189. package/dist/core/di/scanner.d.ts +36 -0
  190. package/dist/core/di/scanner.d.ts.map +1 -0
  191. package/dist/core/di/tokens.d.ts +98 -0
  192. package/dist/core/di/tokens.d.ts.map +1 -0
  193. package/dist/core/http/context.d.ts +30 -0
  194. package/dist/core/http/context.d.ts.map +1 -0
  195. package/dist/core/http/index.d.ts +8 -0
  196. package/dist/core/http/index.d.ts.map +1 -0
  197. package/dist/core/http/middleware.d.ts +31 -0
  198. package/dist/core/http/middleware.d.ts.map +1 -0
  199. package/dist/core/http/router.d.ts +46 -0
  200. package/dist/core/http/router.d.ts.map +1 -0
  201. package/dist/core/http/server.d.ts +58 -0
  202. package/dist/core/http/server.d.ts.map +1 -0
  203. package/dist/core/index.d.ts +20 -0
  204. package/dist/core/index.d.ts.map +1 -0
  205. package/dist/core/orm/drizzle-adapter.d.ts +73 -0
  206. package/dist/core/orm/drizzle-adapter.d.ts.map +1 -0
  207. package/dist/core/orm/index.d.ts +5 -0
  208. package/dist/core/orm/index.d.ts.map +1 -0
  209. package/dist/core/runtime/bun.d.ts +13 -0
  210. package/dist/core/runtime/bun.d.ts.map +1 -0
  211. package/dist/core/runtime/cloudflare.d.ts +18 -0
  212. package/dist/core/runtime/cloudflare.d.ts.map +1 -0
  213. package/dist/core/runtime/index.d.ts +11 -0
  214. package/dist/core/runtime/index.d.ts.map +1 -0
  215. package/dist/core/runtime/node.d.ts +10 -0
  216. package/dist/core/runtime/node.d.ts.map +1 -0
  217. package/dist/core/validation/index.d.ts +5 -0
  218. package/dist/core/validation/index.d.ts.map +1 -0
  219. package/dist/core/validation/validator.d.ts +46 -0
  220. package/dist/core/validation/validator.d.ts.map +1 -0
  221. package/dist/crypto/encryption.d.ts +71 -0
  222. package/dist/crypto/encryption.d.ts.map +1 -0
  223. package/dist/crypto/hash.d.ts +52 -0
  224. package/dist/crypto/hash.d.ts.map +1 -0
  225. package/dist/crypto/index.d.ts +49 -0
  226. package/dist/crypto/index.d.ts.map +1 -0
  227. package/dist/crypto/index.js +533 -0
  228. package/dist/crypto/index.js.map +14 -0
  229. package/dist/crypto/module.d.ts +28 -0
  230. package/dist/crypto/module.d.ts.map +1 -0
  231. package/dist/crypto/types.d.ts +81 -0
  232. package/dist/crypto/types.d.ts.map +1 -0
  233. package/dist/drive/drive.module.d.ts +20 -0
  234. package/dist/drive/drive.module.d.ts.map +1 -0
  235. package/dist/drive/drive.service.d.ts +21 -0
  236. package/dist/drive/drive.service.d.ts.map +1 -0
  237. package/dist/drive/drivers/index.d.ts +9 -0
  238. package/dist/drive/drivers/index.d.ts.map +1 -0
  239. package/dist/drive/drivers/local.d.ts +24 -0
  240. package/dist/drive/drivers/local.d.ts.map +1 -0
  241. package/dist/drive/drivers/memory.d.ts +19 -0
  242. package/dist/drive/drivers/memory.d.ts.map +1 -0
  243. package/dist/drive/drivers/s3.d.ts +44 -0
  244. package/dist/drive/drivers/s3.d.ts.map +1 -0
  245. package/dist/drive/index.d.ts +9 -0
  246. package/dist/drive/index.d.ts.map +1 -0
  247. package/dist/drive/index.js +714 -0
  248. package/dist/drive/index.js.map +25 -0
  249. package/dist/drive/types.d.ts +97 -0
  250. package/dist/drive/types.d.ts.map +1 -0
  251. package/dist/drizzle/decorators/columns.d.ts +16 -0
  252. package/dist/drizzle/decorators/columns.d.ts.map +1 -0
  253. package/dist/drizzle/decorators/index.d.ts +6 -0
  254. package/dist/drizzle/decorators/index.d.ts.map +1 -0
  255. package/dist/drizzle/drivers/base.d.ts +32 -0
  256. package/dist/drizzle/drivers/base.d.ts.map +1 -0
  257. package/dist/drizzle/drivers/bun-sqlite.d.ts +6 -0
  258. package/dist/drizzle/drivers/bun-sqlite.d.ts.map +1 -0
  259. package/dist/drizzle/drivers/d1.d.ts +7 -0
  260. package/dist/drizzle/drivers/d1.d.ts.map +1 -0
  261. package/dist/drizzle/drivers/index.d.ts +14 -0
  262. package/dist/drizzle/drivers/index.d.ts.map +1 -0
  263. package/dist/drizzle/drivers/mysql.d.ts +6 -0
  264. package/dist/drizzle/drivers/mysql.d.ts.map +1 -0
  265. package/dist/drizzle/drivers/postgres.d.ts +12 -0
  266. package/dist/drizzle/drivers/postgres.d.ts.map +1 -0
  267. package/dist/drizzle/drivers/sqlite.d.ts +8 -0
  268. package/dist/drizzle/drivers/sqlite.d.ts.map +1 -0
  269. package/dist/drizzle/drizzle.module.d.ts +29 -0
  270. package/dist/drizzle/drizzle.module.d.ts.map +1 -0
  271. package/dist/drizzle/drizzle.service.d.ts +52 -0
  272. package/dist/drizzle/drizzle.service.d.ts.map +1 -0
  273. package/dist/drizzle/index.d.ts +13 -0
  274. package/dist/drizzle/index.d.ts.map +1 -0
  275. package/dist/drizzle/index.js +979 -0
  276. package/dist/drizzle/index.js.map +32 -0
  277. package/dist/drizzle/model.d.ts +26 -0
  278. package/dist/drizzle/model.d.ts.map +1 -0
  279. package/dist/drizzle/raw-query.d.ts +41 -0
  280. package/dist/drizzle/raw-query.d.ts.map +1 -0
  281. package/dist/drizzle/repository/index.d.ts +6 -0
  282. package/dist/drizzle/repository/index.d.ts.map +1 -0
  283. package/dist/drizzle/repository/repository.d.ts +60 -0
  284. package/dist/drizzle/repository/repository.d.ts.map +1 -0
  285. package/dist/drizzle/types.d.ts +160 -0
  286. package/dist/drizzle/types.d.ts.map +1 -0
  287. package/dist/events/decorators/on-event.d.ts +49 -0
  288. package/dist/events/decorators/on-event.d.ts.map +1 -0
  289. package/dist/events/emitter.d.ts +52 -0
  290. package/dist/events/emitter.d.ts.map +1 -0
  291. package/dist/events/event.service.d.ts +27 -0
  292. package/dist/events/event.service.d.ts.map +1 -0
  293. package/dist/events/events.module.d.ts +35 -0
  294. package/dist/events/events.module.d.ts.map +1 -0
  295. package/dist/events/index.d.ts +43 -0
  296. package/dist/events/index.d.ts.map +1 -0
  297. package/dist/events/index.js +646 -0
  298. package/dist/events/index.js.map +23 -0
  299. package/dist/events/types.d.ts +120 -0
  300. package/dist/events/types.d.ts.map +1 -0
  301. package/dist/grpc/decorators.d.ts +34 -0
  302. package/dist/grpc/decorators.d.ts.map +1 -0
  303. package/dist/grpc/index.d.ts +70 -0
  304. package/dist/grpc/index.d.ts.map +1 -0
  305. package/dist/grpc/index.js +528 -0
  306. package/dist/grpc/index.js.map +22 -0
  307. package/dist/grpc/module.d.ts +32 -0
  308. package/dist/grpc/module.d.ts.map +1 -0
  309. package/dist/grpc/service.d.ts +60 -0
  310. package/dist/grpc/service.d.ts.map +1 -0
  311. package/dist/grpc/types.d.ts +79 -0
  312. package/dist/grpc/types.d.ts.map +1 -0
  313. package/dist/health/health.controller.d.ts +61 -0
  314. package/dist/health/health.controller.d.ts.map +1 -0
  315. package/dist/health/health.module.d.ts +29 -0
  316. package/dist/health/health.module.d.ts.map +1 -0
  317. package/dist/health/health.service.d.ts +34 -0
  318. package/dist/health/health.service.d.ts.map +1 -0
  319. package/dist/health/index.d.ts +38 -0
  320. package/dist/health/index.d.ts.map +1 -0
  321. package/dist/health/index.js +599 -0
  322. package/dist/health/index.js.map +25 -0
  323. package/dist/health/indicators/drizzle.d.ts +18 -0
  324. package/dist/health/indicators/drizzle.d.ts.map +1 -0
  325. package/dist/health/indicators/index.d.ts +59 -0
  326. package/dist/health/indicators/index.d.ts.map +1 -0
  327. package/dist/health/types.d.ts +105 -0
  328. package/dist/health/types.d.ts.map +1 -0
  329. package/dist/i18n/decorators.d.ts +14 -0
  330. package/dist/i18n/decorators.d.ts.map +1 -0
  331. package/dist/i18n/index.d.ts +48 -0
  332. package/dist/i18n/index.d.ts.map +1 -0
  333. package/dist/i18n/index.js +589 -0
  334. package/dist/i18n/index.js.map +17 -0
  335. package/dist/i18n/middleware.d.ts +26 -0
  336. package/dist/i18n/middleware.d.ts.map +1 -0
  337. package/dist/i18n/module.d.ts +39 -0
  338. package/dist/i18n/module.d.ts.map +1 -0
  339. package/dist/i18n/service.d.ts +130 -0
  340. package/dist/i18n/service.d.ts.map +1 -0
  341. package/dist/i18n/types.d.ts +65 -0
  342. package/dist/i18n/types.d.ts.map +1 -0
  343. package/dist/index.d.ts +2 -0
  344. package/dist/index.js +2056 -0
  345. package/dist/index.js.map +53 -0
  346. package/dist/limiter/backends/drizzle.d.ts +40 -0
  347. package/dist/limiter/backends/drizzle.d.ts.map +1 -0
  348. package/dist/limiter/backends/index.d.ts +6 -0
  349. package/dist/limiter/backends/index.d.ts.map +1 -0
  350. package/dist/limiter/backends/memory.d.ts +28 -0
  351. package/dist/limiter/backends/memory.d.ts.map +1 -0
  352. package/dist/limiter/index.d.ts +9 -0
  353. package/dist/limiter/index.d.ts.map +1 -0
  354. package/dist/limiter/index.js +640 -0
  355. package/dist/limiter/index.js.map +25 -0
  356. package/dist/limiter/limiter.middleware.d.ts +11 -0
  357. package/dist/limiter/limiter.middleware.d.ts.map +1 -0
  358. package/dist/limiter/limiter.module.d.ts +23 -0
  359. package/dist/limiter/limiter.module.d.ts.map +1 -0
  360. package/dist/limiter/limiter.service.d.ts +18 -0
  361. package/dist/limiter/limiter.service.d.ts.map +1 -0
  362. package/dist/limiter/types.d.ts +99 -0
  363. package/dist/limiter/types.d.ts.map +1 -0
  364. package/dist/logger/index.d.ts +36 -0
  365. package/dist/logger/index.d.ts.map +1 -0
  366. package/dist/logger/index.js +538 -0
  367. package/dist/logger/index.js.map +22 -0
  368. package/dist/logger/logger.module.d.ts +35 -0
  369. package/dist/logger/logger.module.d.ts.map +1 -0
  370. package/dist/logger/logger.service.d.ts +55 -0
  371. package/dist/logger/logger.service.d.ts.map +1 -0
  372. package/dist/logger/transports/index.d.ts +35 -0
  373. package/dist/logger/transports/index.d.ts.map +1 -0
  374. package/dist/logger/types.d.ts +58 -0
  375. package/dist/logger/types.d.ts.map +1 -0
  376. package/dist/mail/index.d.ts +9 -0
  377. package/dist/mail/index.d.ts.map +1 -0
  378. package/dist/mail/index.js +479 -0
  379. package/dist/mail/index.js.map +25 -0
  380. package/dist/mail/mail.module.d.ts +21 -0
  381. package/dist/mail/mail.module.d.ts.map +1 -0
  382. package/dist/mail/mail.service.d.ts +18 -0
  383. package/dist/mail/mail.service.d.ts.map +1 -0
  384. package/dist/mail/transports/file.d.ts +19 -0
  385. package/dist/mail/transports/file.d.ts.map +1 -0
  386. package/dist/mail/transports/index.d.ts +9 -0
  387. package/dist/mail/transports/index.d.ts.map +1 -0
  388. package/dist/mail/transports/null.d.ts +11 -0
  389. package/dist/mail/transports/null.d.ts.map +1 -0
  390. package/dist/mail/transports/smtp.d.ts +40 -0
  391. package/dist/mail/transports/smtp.d.ts.map +1 -0
  392. package/dist/mail/types.d.ts +73 -0
  393. package/dist/mail/types.d.ts.map +1 -0
  394. package/dist/metrics/controller.d.ts +27 -0
  395. package/dist/metrics/controller.d.ts.map +1 -0
  396. package/dist/metrics/counter.d.ts +36 -0
  397. package/dist/metrics/counter.d.ts.map +1 -0
  398. package/dist/metrics/decorators/counted.d.ts +26 -0
  399. package/dist/metrics/decorators/counted.d.ts.map +1 -0
  400. package/dist/metrics/decorators/index.d.ts +3 -0
  401. package/dist/metrics/decorators/index.d.ts.map +1 -0
  402. package/dist/metrics/decorators/timed.d.ts +25 -0
  403. package/dist/metrics/decorators/timed.d.ts.map +1 -0
  404. package/dist/metrics/gauge.d.ts +38 -0
  405. package/dist/metrics/gauge.d.ts.map +1 -0
  406. package/dist/metrics/histogram.d.ts +52 -0
  407. package/dist/metrics/histogram.d.ts.map +1 -0
  408. package/dist/metrics/index.d.ts +35 -0
  409. package/dist/metrics/index.d.ts.map +1 -0
  410. package/dist/metrics/index.js +1033 -0
  411. package/dist/metrics/index.js.map +21 -0
  412. package/dist/metrics/module.d.ts +33 -0
  413. package/dist/metrics/module.d.ts.map +1 -0
  414. package/dist/metrics/registry.d.ts +52 -0
  415. package/dist/metrics/registry.d.ts.map +1 -0
  416. package/dist/metrics/service.d.ts +42 -0
  417. package/dist/metrics/service.d.ts.map +1 -0
  418. package/dist/metrics/summary.d.ts +50 -0
  419. package/dist/metrics/summary.d.ts.map +1 -0
  420. package/dist/metrics/types.d.ts +115 -0
  421. package/dist/metrics/types.d.ts.map +1 -0
  422. package/dist/openapi/decorators/body.d.ts +9 -0
  423. package/dist/openapi/decorators/body.d.ts.map +1 -0
  424. package/dist/openapi/decorators/index.d.ts +11 -0
  425. package/dist/openapi/decorators/index.d.ts.map +1 -0
  426. package/dist/openapi/decorators/operation.d.ts +9 -0
  427. package/dist/openapi/decorators/operation.d.ts.map +1 -0
  428. package/dist/openapi/decorators/param.d.ts +17 -0
  429. package/dist/openapi/decorators/param.d.ts.map +1 -0
  430. package/dist/openapi/decorators/property.d.ts +24 -0
  431. package/dist/openapi/decorators/property.d.ts.map +1 -0
  432. package/dist/openapi/decorators/response.d.ts +10 -0
  433. package/dist/openapi/decorators/response.d.ts.map +1 -0
  434. package/dist/openapi/decorators/security.d.ts +9 -0
  435. package/dist/openapi/decorators/security.d.ts.map +1 -0
  436. package/dist/openapi/decorators/tags.d.ts +2 -0
  437. package/dist/openapi/decorators/tags.d.ts.map +1 -0
  438. package/dist/openapi/index.d.ts +10 -0
  439. package/dist/openapi/index.d.ts.map +1 -0
  440. package/dist/openapi/index.js +974 -0
  441. package/dist/openapi/index.js.map +31 -0
  442. package/dist/openapi/openapi.module.d.ts +46 -0
  443. package/dist/openapi/openapi.module.d.ts.map +1 -0
  444. package/dist/openapi/openapi.service.d.ts +55 -0
  445. package/dist/openapi/openapi.service.d.ts.map +1 -0
  446. package/dist/openapi/scalar.d.ts +16 -0
  447. package/dist/openapi/scalar.d.ts.map +1 -0
  448. package/dist/openapi/types.d.ts +266 -0
  449. package/dist/openapi/types.d.ts.map +1 -0
  450. package/dist/openapi/zod-to-json-schema.d.ts +34 -0
  451. package/dist/openapi/zod-to-json-schema.d.ts.map +1 -0
  452. package/dist/package.json +59 -0
  453. package/dist/queue/backends/bullmq.d.ts +41 -0
  454. package/dist/queue/backends/bullmq.d.ts.map +1 -0
  455. package/dist/queue/backends/cloudflare.d.ts +84 -0
  456. package/dist/queue/backends/cloudflare.d.ts.map +1 -0
  457. package/dist/queue/backends/index.d.ts +7 -0
  458. package/dist/queue/backends/index.d.ts.map +1 -0
  459. package/dist/queue/backends/memory.d.ts +24 -0
  460. package/dist/queue/backends/memory.d.ts.map +1 -0
  461. package/dist/queue/decorators/on-queue-ready.d.ts +43 -0
  462. package/dist/queue/decorators/on-queue-ready.d.ts.map +1 -0
  463. package/dist/queue/index.d.ts +57 -0
  464. package/dist/queue/index.d.ts.map +1 -0
  465. package/dist/queue/index.js +961 -0
  466. package/dist/queue/index.js.map +25 -0
  467. package/dist/queue/queue.module.d.ts +46 -0
  468. package/dist/queue/queue.module.d.ts.map +1 -0
  469. package/dist/queue/queue.service.d.ts +61 -0
  470. package/dist/queue/queue.service.d.ts.map +1 -0
  471. package/dist/queue/types.d.ts +204 -0
  472. package/dist/queue/types.d.ts.map +1 -0
  473. package/dist/redis/adapters/bun.d.ts +27 -0
  474. package/dist/redis/adapters/bun.d.ts.map +1 -0
  475. package/dist/redis/adapters/cloudflare.d.ts +51 -0
  476. package/dist/redis/adapters/cloudflare.d.ts.map +1 -0
  477. package/dist/redis/adapters/index.d.ts +29 -0
  478. package/dist/redis/adapters/index.d.ts.map +1 -0
  479. package/dist/redis/adapters/memory.d.ts +28 -0
  480. package/dist/redis/adapters/memory.d.ts.map +1 -0
  481. package/dist/redis/adapters/node.d.ts +36 -0
  482. package/dist/redis/adapters/node.d.ts.map +1 -0
  483. package/dist/redis/index.d.ts +33 -0
  484. package/dist/redis/index.d.ts.map +1 -0
  485. package/dist/redis/index.js +667 -0
  486. package/dist/redis/index.js.map +25 -0
  487. package/dist/redis/module.d.ts +32 -0
  488. package/dist/redis/module.d.ts.map +1 -0
  489. package/dist/redis/types.d.ts +146 -0
  490. package/dist/redis/types.d.ts.map +1 -0
  491. package/dist/schedule/backends/cloudflare.d.ts +55 -0
  492. package/dist/schedule/backends/cloudflare.d.ts.map +1 -0
  493. package/dist/schedule/backends/index.d.ts +3 -0
  494. package/dist/schedule/backends/index.d.ts.map +1 -0
  495. package/dist/schedule/backends/memory.d.ts +39 -0
  496. package/dist/schedule/backends/memory.d.ts.map +1 -0
  497. package/dist/schedule/cron-parser.d.ts +48 -0
  498. package/dist/schedule/cron-parser.d.ts.map +1 -0
  499. package/dist/schedule/decorators/cron.d.ts +71 -0
  500. package/dist/schedule/decorators/cron.d.ts.map +1 -0
  501. package/dist/schedule/index.d.ts +51 -0
  502. package/dist/schedule/index.d.ts.map +1 -0
  503. package/dist/schedule/index.js +1108 -0
  504. package/dist/schedule/index.js.map +25 -0
  505. package/dist/schedule/schedule.module.d.ts +44 -0
  506. package/dist/schedule/schedule.module.d.ts.map +1 -0
  507. package/dist/schedule/schedule.service.d.ts +51 -0
  508. package/dist/schedule/schedule.service.d.ts.map +1 -0
  509. package/dist/schedule/types.d.ts +150 -0
  510. package/dist/schedule/types.d.ts.map +1 -0
  511. package/dist/session/backends/cookie.d.ts +56 -0
  512. package/dist/session/backends/cookie.d.ts.map +1 -0
  513. package/dist/session/backends/drizzle.d.ts +65 -0
  514. package/dist/session/backends/drizzle.d.ts.map +1 -0
  515. package/dist/session/backends/index.d.ts +6 -0
  516. package/dist/session/backends/index.d.ts.map +1 -0
  517. package/dist/session/backends/memory.d.ts +32 -0
  518. package/dist/session/backends/memory.d.ts.map +1 -0
  519. package/dist/session/backends/redis.d.ts +53 -0
  520. package/dist/session/backends/redis.d.ts.map +1 -0
  521. package/dist/session/decorators/current-session.d.ts +56 -0
  522. package/dist/session/decorators/current-session.d.ts.map +1 -0
  523. package/dist/session/index.d.ts +42 -0
  524. package/dist/session/index.d.ts.map +1 -0
  525. package/dist/session/index.js +1498 -0
  526. package/dist/session/index.js.map +28 -0
  527. package/dist/session/session-middleware.d.ts +29 -0
  528. package/dist/session/session-middleware.d.ts.map +1 -0
  529. package/dist/session/session.module.d.ts +35 -0
  530. package/dist/session/session.module.d.ts.map +1 -0
  531. package/dist/session/session.service.d.ts +49 -0
  532. package/dist/session/session.service.d.ts.map +1 -0
  533. package/dist/session/types.d.ts +201 -0
  534. package/dist/session/types.d.ts.map +1 -0
  535. package/dist/shield/guards/csrf.d.ts +33 -0
  536. package/dist/shield/guards/csrf.d.ts.map +1 -0
  537. package/dist/shield/guards/headers.d.ts +22 -0
  538. package/dist/shield/guards/headers.d.ts.map +1 -0
  539. package/dist/shield/guards/index.d.ts +6 -0
  540. package/dist/shield/guards/index.d.ts.map +1 -0
  541. package/dist/shield/index.d.ts +8 -0
  542. package/dist/shield/index.d.ts.map +1 -0
  543. package/dist/shield/index.js +728 -0
  544. package/dist/shield/index.js.map +25 -0
  545. package/dist/shield/shield.module.d.ts +25 -0
  546. package/dist/shield/shield.module.d.ts.map +1 -0
  547. package/dist/shield/shield.service.d.ts +21 -0
  548. package/dist/shield/shield.service.d.ts.map +1 -0
  549. package/dist/shield/types.d.ts +95 -0
  550. package/dist/shield/types.d.ts.map +1 -0
  551. package/dist/sse/index.d.ts +7 -0
  552. package/dist/sse/index.d.ts.map +1 -0
  553. package/dist/sse/index.js +214 -0
  554. package/dist/sse/index.js.map +13 -0
  555. package/dist/sse/sse-stream.d.ts +46 -0
  556. package/dist/sse/sse-stream.d.ts.map +1 -0
  557. package/dist/sse/sse.d.ts +24 -0
  558. package/dist/sse/sse.d.ts.map +1 -0
  559. package/dist/sse/types.d.ts +84 -0
  560. package/dist/sse/types.d.ts.map +1 -0
  561. package/dist/static/index.d.ts +41 -0
  562. package/dist/static/index.d.ts.map +1 -0
  563. package/dist/static/index.js +313 -0
  564. package/dist/static/index.js.map +13 -0
  565. package/dist/static/static.module.d.ts +41 -0
  566. package/dist/static/static.module.d.ts.map +1 -0
  567. package/dist/static/static.service.d.ts +38 -0
  568. package/dist/static/static.service.d.ts.map +1 -0
  569. package/dist/tracing/decorators/index.d.ts +2 -0
  570. package/dist/tracing/decorators/index.d.ts.map +1 -0
  571. package/dist/tracing/decorators/trace.d.ts +37 -0
  572. package/dist/tracing/decorators/trace.d.ts.map +1 -0
  573. package/dist/tracing/hono-instrumentation.d.ts +21 -0
  574. package/dist/tracing/hono-instrumentation.d.ts.map +1 -0
  575. package/dist/tracing/index.d.ts +29 -0
  576. package/dist/tracing/index.d.ts.map +1 -0
  577. package/dist/tracing/index.js +782 -0
  578. package/dist/tracing/index.js.map +24 -0
  579. package/dist/tracing/module.d.ts +45 -0
  580. package/dist/tracing/module.d.ts.map +1 -0
  581. package/dist/tracing/propagation.d.ts +53 -0
  582. package/dist/tracing/propagation.d.ts.map +1 -0
  583. package/dist/tracing/service.d.ts +95 -0
  584. package/dist/tracing/service.d.ts.map +1 -0
  585. package/dist/tracing/types.d.ts +90 -0
  586. package/dist/tracing/types.d.ts.map +1 -0
  587. package/dist/upload/decorators/index.d.ts +6 -0
  588. package/dist/upload/decorators/index.d.ts.map +1 -0
  589. package/dist/upload/decorators/upload.d.ts +16 -0
  590. package/dist/upload/decorators/upload.d.ts.map +1 -0
  591. package/dist/upload/decorators/uploaded-file.d.ts +10 -0
  592. package/dist/upload/decorators/uploaded-file.d.ts.map +1 -0
  593. package/dist/upload/index.d.ts +9 -0
  594. package/dist/upload/index.d.ts.map +1 -0
  595. package/dist/upload/index.js +553 -0
  596. package/dist/upload/index.js.map +25 -0
  597. package/dist/upload/types.d.ts +103 -0
  598. package/dist/upload/types.d.ts.map +1 -0
  599. package/dist/upload/upload.middleware.d.ts +15 -0
  600. package/dist/upload/upload.middleware.d.ts.map +1 -0
  601. package/dist/upload/upload.module.d.ts +33 -0
  602. package/dist/upload/upload.module.d.ts.map +1 -0
  603. package/dist/upload/upload.service.d.ts +29 -0
  604. package/dist/upload/upload.service.d.ts.map +1 -0
  605. package/dist/view/edge.d.ts +23 -0
  606. package/dist/view/edge.d.ts.map +1 -0
  607. package/dist/view/eta.d.ts +30 -0
  608. package/dist/view/eta.d.ts.map +1 -0
  609. package/dist/view/index.d.ts +34 -0
  610. package/dist/view/index.d.ts.map +1 -0
  611. package/dist/view/index.js +240 -0
  612. package/dist/view/index.js.map +14 -0
  613. package/dist/view/inertia/default-ssr.d.ts +15 -0
  614. package/dist/view/inertia/default-ssr.d.ts.map +1 -0
  615. package/dist/view/inertia/form-helper.d.ts +102 -0
  616. package/dist/view/inertia/form-helper.d.ts.map +1 -0
  617. package/dist/view/inertia/form-middleware.d.ts +53 -0
  618. package/dist/view/inertia/form-middleware.d.ts.map +1 -0
  619. package/dist/view/inertia/helpers.d.ts +149 -0
  620. package/dist/view/inertia/helpers.d.ts.map +1 -0
  621. package/dist/view/inertia/index.d.ts +18 -0
  622. package/dist/view/inertia/index.d.ts.map +1 -0
  623. package/dist/view/inertia/inertia-adapter.d.ts +93 -0
  624. package/dist/view/inertia/inertia-adapter.d.ts.map +1 -0
  625. package/dist/view/inertia/inertia-response.d.ts +51 -0
  626. package/dist/view/inertia/inertia-response.d.ts.map +1 -0
  627. package/dist/view/inertia/ssr/index.d.ts +13 -0
  628. package/dist/view/inertia/ssr/index.d.ts.map +1 -0
  629. package/dist/view/inertia/ssr/react-adapter.d.ts +33 -0
  630. package/dist/view/inertia/ssr/react-adapter.d.ts.map +1 -0
  631. package/dist/view/inertia/ssr/registry.d.ts +42 -0
  632. package/dist/view/inertia/ssr/registry.d.ts.map +1 -0
  633. package/dist/view/inertia/ssr/solid-adapter.d.ts +31 -0
  634. package/dist/view/inertia/ssr/solid-adapter.d.ts.map +1 -0
  635. package/dist/view/inertia/ssr/svelte-adapter.d.ts +31 -0
  636. package/dist/view/inertia/ssr/svelte-adapter.d.ts.map +1 -0
  637. package/dist/view/inertia/ssr/vue-adapter.d.ts +26 -0
  638. package/dist/view/inertia/ssr/vue-adapter.d.ts.map +1 -0
  639. package/dist/view/inertia/types.d.ts +131 -0
  640. package/dist/view/inertia/types.d.ts.map +1 -0
  641. package/dist/view/rendu.d.ts +11 -0
  642. package/dist/view/rendu.d.ts.map +1 -0
  643. package/dist/view/types.d.ts +52 -0
  644. package/dist/view/types.d.ts.map +1 -0
  645. package/dist/view/view-engine.d.ts +28 -0
  646. package/dist/view/view-engine.d.ts.map +1 -0
  647. package/dist/ws/client.d.ts +42 -0
  648. package/dist/ws/client.d.ts.map +1 -0
  649. package/dist/ws/decorators.d.ts +44 -0
  650. package/dist/ws/decorators.d.ts.map +1 -0
  651. package/dist/ws/index.d.ts +57 -0
  652. package/dist/ws/index.d.ts.map +1 -0
  653. package/dist/ws/index.js +796 -0
  654. package/dist/ws/index.js.map +26 -0
  655. package/dist/ws/module.d.ts +48 -0
  656. package/dist/ws/module.d.ts.map +1 -0
  657. package/dist/ws/runtime/bun.d.ts +41 -0
  658. package/dist/ws/runtime/bun.d.ts.map +1 -0
  659. package/dist/ws/runtime/index.d.ts +14 -0
  660. package/dist/ws/runtime/index.d.ts.map +1 -0
  661. package/dist/ws/runtime/node.d.ts +46 -0
  662. package/dist/ws/runtime/node.d.ts.map +1 -0
  663. package/dist/ws/runtime/types.d.ts +18 -0
  664. package/dist/ws/runtime/types.d.ts.map +1 -0
  665. package/dist/ws/service.d.ts +65 -0
  666. package/dist/ws/service.d.ts.map +1 -0
  667. package/dist/ws/types.d.ts +77 -0
  668. package/dist/ws/types.d.ts.map +1 -0
  669. package/package.json +262 -0
package/README.md ADDED
@@ -0,0 +1,860 @@
1
+ # NexusJS
2
+
3
+ **Bun Native Fullstack Framework** — NestJS structure × Adonis productivity × Hono edge performance.
4
+
5
+ > **v0.6.5 — env-aware config + db:generate.** All 27 modules ship. Tier 1 and
6
+ > Tier 2 gaps from the NestJS / AdonisJS gap analyses are now fully
7
+ > closed. The view engine has moved to `nexusjs/view` as its own bundle
8
+ > entry point, with Rendu (default), Edge, and Eta adapters. See
9
+ > [CHANGELOG.md](./CHANGELOG.md) for the full v0.6 release notes.
10
+
11
+ ---
12
+
13
+ ## What's in v0.6
14
+
15
+ The framework now ships **27 independent modules** — every one is
16
+ its own bundle entry point, so you install only what you use. Tier 1
17
+ and Tier 2 gaps from the NestJS / AdonisJS gap analyses are now
18
+ fully closed.
19
+
20
+ | Module | Purpose |
21
+ | ------ | ------- |
22
+ | `nexusjs` (core) | MVC + DI + validation + 3 routing styles + view engines + Inertia.js |
23
+ | `nexusjs/cli` (`nx`) | Adonis ACE-style command runner — `new`, `init`, `make:*`, `migrate`, `info` |
24
+ | `nexusjs/auth` | better-auth integration with `@CurrentUser` and `authMiddleware` |
25
+ | `nexusjs/queue` | BullMQ + Cloudflare Queues + memory backends. `@OnQueueReady` decorator |
26
+ | `nexusjs/schedule` | Custom cron parser. `@Cron` / `@Interval` / `@Timeout` decorators |
27
+ | `nexusjs/events` | `NexusEventEmitter` with wildcards, priorities, guards. `@OnEvent` decorator |
28
+ | `nexusjs/session` | Cookie (HMAC) + memory + **Drizzle** backends. Sliding expiry, rotation |
29
+ | `nexusjs/health` | `/health/live` · `/health/ready` · `/health/startup`. Built-in indicators |
30
+ | `nexusjs/config` | Zod-validated configuration. Layered loading from env, `.env`, `load()` |
31
+ | `nexusjs/logger` | Pino-backed structured logging. Pretty-print in dev, JSON in prod |
32
+ | `nexusjs/static` | Static file serving with ETag, Range, path-traversal protection |
33
+ | `nexusjs/limiter` | Rate limiting. 3 strategies × memory / **Drizzle** storage |
34
+ | `nexusjs/shield` | Security suite: CSRF + HSTS + CSP + X-Frame-Options + Referrer-Policy |
35
+ | `nexusjs/cache` | Application cache. Memory (LRU) / **Drizzle** backends. Tag invalidation |
36
+ | `nexusjs/drive` | File storage abstraction. Memory / Local / S3 / R2 drivers |
37
+ | `nexusjs/mail` | Outbound email. Null / File / SMTP transports. MJML rendering |
38
+ | `nexusjs/drizzle` | **Default ORM.** 5 dialects, `DrizzleModel`, `DrizzleRepository`, migrations, raw SQL (injection-safe) |
39
+ | `nexusjs/openapi` | OpenAPI 3.1 spec generation + Scalar UI. Auto-derives from Zod validation schemas |
40
+ | `nexusjs/upload` | Multipart file upload. `@Upload()` / `@UploadedFile()` decorators. Size, MIME, count validation |
41
+ | `nexusjs/sse` | Server-Sent Events. `SseStream` with pending-write tracking. `sse(c, handler)` helper |
42
+ | `nexusjs/tracing` | OpenTelemetry distributed tracing. Lazy SDK loading. `@Trace()` decorator. W3C + B3 propagation |
43
+ | `nexusjs/metrics` | Prometheus / OpenMetrics. Counter / Gauge / Histogram / Summary. `@Counted()` / `@Timed()` decorators |
44
+ | **Request-scoped DI** *(core)* | `@Injectable({ scope: 'request' })` for per-request provider lifetime via `AsyncLocalStorage` |
45
+ | `nexusjs/ws` | WebSockets on Bun (primary) and Node (via `ws`). `@WebSocketGateway()`, `@OnWebSocketMessage()`, rooms, broadcast |
46
+ | `nexusjs/crypto` | AES-256-GCM encryption + HMAC + scrypt/argon2 password hashing. Single APP_KEY for sessions, CSRF, encrypted data |
47
+ | `nexusjs/i18n` | Locale-aware translations + date/number/currency formatters via `Intl`. `I18nService`, `@CurrentLocale()`, JSON message catalogs |
48
+ | `nexusjs/redis` | Runtime-aware Redis client (Bun / Node / Workers KV). Powers `redis` / `cloudflare-kv` session & cache backends |
49
+ | `nexusjs/grpc` | Reflection-based gRPC server + typed client. Loads `.proto` files at runtime via `@grpc/proto-loader`. Unary methods (streaming deferred to v2) |
50
+ | **`nexusjs/view`** *(extracted in v0.6.3)* | View engine with 3 adapters: Rendu (default, every runtime), Edge (Adonis-style `.edge`), Eta (EJS-style `.eta`). Auto-detects adapter by file extension. `setViewPaths()` for file-based templates |
51
+
52
+ See [docs/user-guide/drizzle.md](./docs/user-guide/drizzle.md) for the
53
+ Drizzle integration guide, [docs/user-guide/tracing.md](./docs/user-guide/tracing.md)
54
+ for OpenTelemetry, [docs/user-guide/metrics.md](./docs/user-guide/metrics.md)
55
+ for Prometheus, and [CHANGELOG.md](./CHANGELOG.md) for the detailed
56
+ v0.4 release notes.
57
+
58
+ > The module table now includes `nexusjs/grpc` and `nexusjs/view`,
59
+
60
+ ---
61
+
62
+ ## Why Nexus?
63
+
64
+ | Capability | NestJS | Adonis | Hono | **Nexus** |
65
+ | -------------------------------- | :----: | :----: | :---: | :-------: |
66
+ | Bun-native runtime | ❌ | △ | ✅ | ✅ |
67
+ | Cloudflare Workers / Edge | △ | ❌ | ✅ | ✅ |
68
+ | MVC + Service + Repository | △ | ✅ | ❌ | ✅ |
69
+ | Class decorators (Nest style) | ✅ | ❌ | ❌ | ✅ |
70
+ | Adonis-style router | ❌ | ✅ | ❌ | ✅ |
71
+ | Functional handler (Hono style) | △ | ❌ | ✅ | ✅ |
72
+ | Zod validation pipeline | △ | ✅ | ❌ | ✅ |
73
+ | Three view engines (Rendu/Edge/Inertia) | ❌ | ✅ | ❌ | ✅ |
74
+ | **Default ORM (Drizzle, 5 dialects)** | △ | Lucid | ❌ | ✅ |
75
+ | **Multi-pod session, cache, limiter via Drizzle** | △ | ✅ | ❌ | **✅** |
76
+ | **26 independent bundle entry points** | ❌ | △ | ❌ | ✅ |
77
+ | **SQL-injection-safe raw queries by construction** | △ | △ | ❌ | ✅ |
78
+ | **Migrations + autoMigrate on boot** | △ | ✅ | ❌ | ✅ |
79
+
80
+ ---
81
+
82
+ ## Install
83
+
84
+ ```bash
85
+ bunx create-nexus my-app # scaffold a new project
86
+ cd my-app
87
+ bun install
88
+ bun run dev
89
+ ```
90
+
91
+ Or use it as a library in an existing project:
92
+
93
+ ```bash
94
+ bun add nexus reflect-metadata zod hono
95
+ # Add the modules you need:
96
+ bun add nexus/auth nexus/queue nexus/drizzle
97
+ ```
98
+
99
+ Every module is its own bundle entry point — install only what you
100
+ use. The CLI (`nx`) is shipped as the `nx` bin and the `nexusjs/cli`
101
+ import:
102
+
103
+ ```bash
104
+ bun add nexus/cli # optional — for the `nx` command runner
105
+ ```
106
+
107
+ ---
108
+
109
+ ## Quick start
110
+
111
+ A minimal app with the **default ORM (Drizzle)** and the most
112
+ common modules:
113
+
114
+ ```ts
115
+ // src/db/schema.ts
116
+ import { pgTable, serial, text, timestamp } from 'drizzle-orm/pg-core';
117
+
118
+ export const users = pgTable('users', {
119
+ id: serial('id').primaryKey(),
120
+ email: text('email').notNull().unique(),
121
+ createdAt: timestamp('created_at').defaultNow().notNull(),
122
+ });
123
+ ```
124
+
125
+ ```ts
126
+ // app/app.module.ts
127
+ import { Module } from 'nexusjs';
128
+ import { DrizzleModule } from 'nexusjs/drizzle';
129
+ import { ConfigModule } from 'nexusjs/config';
130
+ import { LoggerModule } from 'nexusjs/logger';
131
+ import { HealthModule } from 'nexusjs/health';
132
+ import { LimiterModule } from 'nexusjs/limiter';
133
+ import { SessionModule } from 'nexusjs/session';
134
+ import { CacheModule } from 'nexusjs/cache';
135
+ import { DriveModule } from 'nexusjs/drive';
136
+ import { MailModule } from 'nexusjs/mail';
137
+ import { ShieldModule } from 'nexusjs/shield';
138
+ import { AuthModule } from 'nexusjs/auth';
139
+ import { OpenAPIModule } from 'nexusjs/openapi';
140
+ import { UploadModule } from 'nexusjs/upload';
141
+ import { TracingModule } from 'nexusjs/tracing';
142
+ import { MetricsModule } from 'nexusjs/metrics';
143
+ import { UserModule } from './modules/user.module.js';
144
+ import { configSchema } from './config/schema.js';
145
+
146
+ @Module({
147
+ imports: [
148
+ ConfigModule.forRoot({ schema: configSchema, exitOnError: true }),
149
+ LoggerModule.forRoot({ pretty: process.env.NODE_ENV !== 'production' }),
150
+ HealthModule.forRoot({ builtIn: { memory: true, disk: { threshold: 0.1 } } }),
151
+ DrizzleModule.forRoot({
152
+ dialect: 'postgres',
153
+ connection: { url: process.env.DATABASE_URL! },
154
+ }),
155
+ SessionModule.forRoot({ backend: 'cookie', cookie: { secret: process.env.SESSION_SECRET! } }),
156
+ CacheModule.forRoot({ defaultTtl: 300 }),
157
+ DriveModule.forRoot({ driver: new LocalDriver({ root: '/var/data' }) }),
158
+ MailModule.forRoot({ defaultFrom: 'no-reply@example.com' }),
159
+ LimiterModule.forRoot({ rules: [{ path: '/api/*', points: 100, duration: '1m' }] }),
160
+ ShieldModule.forRoot({ csrf: { enabled: true }, hsts: { maxAge: 31_536_000 } }),
161
+ AuthModule.forRoot({ /* better-auth config */ }),
162
+ OpenAPIModule.forRoot({ title: 'My App', version: '1.0.0', path: '/docs' }),
163
+ UploadModule.forRoot({ maxFileSize: 10 * 1024 * 1024 }),
164
+ TracingModule.forRoot({ serviceName: 'my-app', exporter: 'otlp-http' }),
165
+ MetricsModule.forRoot({ path: '/metrics' }),
166
+ UserModule,
167
+ ],
168
+ })
169
+ export class AppModule {}
170
+ ```
171
+
172
+ ```ts
173
+ // app/main.ts
174
+ import 'reflect-metadata';
175
+ import { Application } from 'nexusjs';
176
+ import { AppModule } from './app.module.js';
177
+
178
+ const app = new Application(AppModule);
179
+ await app.listen(3000);
180
+ ```
181
+
182
+ ```ts
183
+ // app/modules/user/user.module.ts
184
+ import { Module } from 'nexusjs';
185
+ import { UserController } from './user.controller.js';
186
+ import { UserService } from './user.service.js';
187
+ import { UserRepository } from './user.repository.js';
188
+
189
+ @Module({
190
+ controllers: [UserController],
191
+ providers: [UserService, UserRepository],
192
+ })
193
+ export class UserModule {}
194
+ ```
195
+
196
+ ```ts
197
+ // app/modules/user/user.service.ts
198
+ import { Inject, Injectable } from 'nexusjs';
199
+ import { DrizzleService } from 'nexusjs/drizzle';
200
+ import { eq } from 'drizzle-orm';
201
+ import { users } from '../../db/schema.js';
202
+
203
+ @Injectable()
204
+ export class UserService {
205
+ constructor(@Inject(DrizzleService.TOKEN) private db: DrizzleService) {}
206
+
207
+ findAll() { return this.db.select().from(users).all(); }
208
+ findById(id: number) { return this.db.select().from(users).where(eq(users.id, id)).get(); }
209
+ async create(email: string) {
210
+ return (await this.db.insert(users).values({ email }).returning())[0];
211
+ }
212
+ }
213
+ ```
214
+
215
+ ```ts
216
+ // app/modules/user/user.controller.ts
217
+ import { z } from 'zod';
218
+ import { Body, Controller, Delete, Get, Inject, Param, Post, Query, Validate } from 'nexusjs';
219
+ import { UserService } from './user.service.js';
220
+
221
+ const CreateUserSchema = z.object({
222
+ email: z.string().email(),
223
+ });
224
+
225
+ @Controller('/users')
226
+ export class UserController {
227
+ constructor(@Inject(UserService) private users: UserService) {}
228
+
229
+ @Get('/') async index() { return this.users.findAll(); }
230
+ @Get('/:id') async show(@Param('id') id: string) { return this.users.findById(Number(id)); }
231
+ @Post('/') @Validate({ body: CreateUserSchema }) async create(@Body() body: z.infer<typeof CreateUserSchema>) { return this.users.create(body.email); }
232
+ @Delete('/:id') async destroy(@Param('id') id: string) { /* ... */ }
233
+ }
234
+ ```
235
+
236
+ ```bash
237
+ $ bun run dev
238
+ [nexus] Routes registered. Listening on :3000
239
+ [nexus] Listening on http://localhost:3000
240
+
241
+ $ curl http://localhost:3000/users
242
+ [{"id":1,"email":"alice@example.com", ...}]
243
+
244
+ $ curl -X POST http://localhost:3000/users \
245
+ -H "Content-Type: application/json" \
246
+ -d '{"email":"bob@example.com"}'
247
+ {"id":2,"email":"bob@example.com"}
248
+ ```
249
+
250
+ ### Generate the schema with the CLI
251
+
252
+ ```bash
253
+ # Initialise nx.config.ts + drizzle.config.ts
254
+ nx init --orm drizzle --db postgres
255
+
256
+ # Generate a model
257
+ nx make:model User --columns 'email:text,status:boolean' --dialect postgres
258
+
259
+ # Generate a migration
260
+ nx make:migration create_users_table --dialect postgres --columns 'email:text'
261
+
262
+ # Apply pending migrations
263
+ nx db:migrate
264
+
265
+ # Inspect migration state
266
+ nx db:migrate --status
267
+
268
+ # Run database seeds
269
+ nx db:seed
270
+
271
+ # Scaffold a new seed file
272
+ nx db:seed --create users
273
+ ```
274
+
275
+ See [docs/user-guide/drizzle.md](./docs/user-guide/drizzle.md) for the
276
+ full Drizzle integration guide.
277
+
278
+ ---
279
+
280
+ ## Three routing styles
281
+
282
+ ### 1. Nest style (class decorators)
283
+
284
+ ```ts
285
+ @Controller('/users')
286
+ class UserController {
287
+ constructor(@Inject(UserService) private users: UserService) {}
288
+
289
+ @Get('/') list() {}
290
+ @Get('/:id') show(@Param('id') id: string) {}
291
+ @Post('/') create(@Body() body: CreateUserDto) {}
292
+ @Put('/:id') update(@Param('id') id: string, @Body() body: UpdateUserDto) {}
293
+ @Delete('/:id') destroy(@Param('id') id: string) {}
294
+ }
295
+ ```
296
+
297
+ ### 2. Adonis style
298
+
299
+ ```ts
300
+ app.server.router.add('GET', '/users', UserController, 'list');
301
+ app.server.router.add('POST', '/users', UserController, 'create');
302
+ app.server.router.add('GET', '/users/:id', UserController, 'show');
303
+ app.server.router.add('DELETE', '/users/:id', UserController, 'destroy');
304
+ ```
305
+
306
+ ### 3. Functional style (Hono-native)
307
+
308
+ ```ts
309
+ app.server.router.raw('GET', '/health', (c) => c.json({ ok: true }));
310
+ app.server.router.raw('POST', '/webhooks/stripe', async (c) => {
311
+ const event = await c.req.json();
312
+ // ...
313
+ });
314
+ ```
315
+
316
+ ---
317
+
318
+ ## Parameter decorators
319
+
320
+ | Decorator | Reads |
321
+ | ------------ | --------------------------------------------- |
322
+ | `@Body(key?)`| Parsed request body (JSON / form / multipart) |
323
+ | `@Query(k?)` | URL query string |
324
+ | `@Param(k?)` | Path parameters |
325
+ | `@Headers(k?)`| Request headers |
326
+ | `@Req()` / `@Ctx()` | Hono context |
327
+ | `@Res()` | Hono response |
328
+ | `@Next()` | next() callback (for middleware-style) |
329
+ | `@User()` | Authenticated user (set by auth middleware) |
330
+
331
+ When a parameter has no key argument (e.g. `@Body()`), the full parsed
332
+ object is injected. With a key (e.g. `@Param('id')`), only that property
333
+ is injected.
334
+
335
+ ---
336
+
337
+ ## Validation with Zod
338
+
339
+ ```ts
340
+ @Post('/')
341
+ @Validate({
342
+ body: z.object({ name: z.string(), email: z.string().email() }),
343
+ query: z.object({ dryRun: z.coerce.boolean().optional() }),
344
+ params: z.object({ id: z.coerce.number() }),
345
+ })
346
+ async create(@Body() body, @Query() query, @Param() params) { ... }
347
+ ```
348
+
349
+ Failed validation returns a 400 with details:
350
+
351
+ ```json
352
+ {
353
+ "error": "Validation failed",
354
+ "issues": [
355
+ { "code": "invalid_string", "validation": "email", "path": ["email"], "message": "Invalid email" }
356
+ ]
357
+ }
358
+ ```
359
+
360
+ ---
361
+
362
+ ## Dependency injection
363
+
364
+ NestJS-style constructor injection via the `@Inject(Token)` parameter
365
+ decorator. Use `@Injectable()` on services and repositories, and the
366
+ container resolves the dependency graph automatically.
367
+
368
+ ```ts
369
+ @Injectable()
370
+ class UserService {
371
+ constructor(@Inject('DB') private db: DrizzleLike) {}
372
+ }
373
+
374
+ @Injectable()
375
+ class UserRepository {
376
+ constructor(@Inject('DB') private db: DrizzleLike) {}
377
+ }
378
+
379
+ @Module({
380
+ providers: [
381
+ UserService,
382
+ UserRepository,
383
+ { provide: 'DB', useValue: drizzleInstance },
384
+ ],
385
+ exports: [UserService],
386
+ })
387
+ class UserModule {}
388
+ ```
389
+
390
+ > **Why `@Inject(Token)`?** Bun's native TypeScript transformer does not
391
+ > emit `design:paramtypes` metadata. The framework falls back to
392
+ > explicit `@Inject()` tokens for portability. If you build with `tsc`
393
+ > first and run with `node` or `bun src/...`, the bare-type form works.
394
+
395
+ ---
396
+
397
+ ## Inertia.js adapter
398
+
399
+ Single-page-app UX without writing an API. The framework ships a
400
+ server-side [Inertia.js v2/v3 protocol](https://inertiajs.com/the-protocol)
401
+ adapter that returns either JSON (XHR) or a full HTML shell (first
402
+ load) depending on the request.
403
+
404
+ ### Enable it
405
+
406
+ ```ts
407
+ const app = new Application(AppModule, {
408
+ inertia: {
409
+ version: '1.0.0', // asset version for 409 on mismatch
410
+ title: 'My App',
411
+ sharedProps: () => ({ // per-request global props
412
+ appName: 'My App',
413
+ currentUser: await getCurrentUser(),
414
+ }),
415
+ },
416
+ });
417
+ ```
418
+
419
+ ### Render a page
420
+
421
+ ```ts
422
+ @Controller('/users')
423
+ class UserController {
424
+ constructor(@Inject(Inertia.TOKEN) private inertia: Inertia) {}
425
+
426
+ @Get('/')
427
+ index() {
428
+ return this.inertia.render('Users/Index', {
429
+ users: this.userService.findAll(),
430
+ });
431
+ }
432
+ }
433
+ ```
434
+
435
+ The router detects the response (via a discriminator tag) and emits:
436
+
437
+ - **First load (no `X-Inertia` header)** — full HTML page with the page
438
+ object embedded as `data-page` JSON.
439
+ - **Subsequent visits (`X-Inertia: true`)** — JSON page object only.
440
+
441
+ ### Lazy-evaluation helpers
442
+
443
+ Wrap a callback in one of these helpers to control *when* it resolves
444
+ and how the client merges the value:
445
+
446
+ | Helper | Behaviour |
447
+ | --------------------- | ------------------------------------------------------ |
448
+ | `defer(fn, group?)` | Send `null` placeholder; client refetches later |
449
+ | `always(fn)` | Include on every partial reload, even if filtered out |
450
+ | `optional(fn, n?)` | Skip on partial reloads when length ≤ threshold |
451
+ | `merge(fn, ids?)` | Client merges new value with previous (pagination) |
452
+ | `deepMerge(fn)` | Client deep-merges new value with previous |
453
+ | `once(fn)` | Include only on the first (HTML) load |
454
+
455
+ ```ts
456
+ @Get('/dashboard')
457
+ dashboard() {
458
+ return this.inertia.render('Dashboard', {
459
+ // Always included, even when the client only fetches one prop.
460
+ currentUser: always(() => ({ id: 1, name: 'Alice' })),
461
+
462
+ // Deferred — placeholder, then a follow-up partial reload.
463
+ stats: defer(async () => ({ visits: 1234 }), 'metrics'),
464
+
465
+ // Pagination — the client appends to its existing array.
466
+ users: merge(() => this.userService.page(1), [['id']]),
467
+
468
+ // Only on first page load (HTML).
469
+ featureFlags: once(() => ({ newDashboard: true })),
470
+ });
471
+ }
472
+ ```
473
+
474
+ ### Asset versioning
475
+
476
+ When `version` is configured and the client's `X-Inertia-Version`
477
+ header doesn't match, the adapter responds with **409 Conflict** and
478
+ the `X-Inertia-Location` header pointing at the same URL — the client
479
+ then does a full page reload (refetching CSS/JS bundles).
480
+
481
+ ```http
482
+ GET /dashboard
483
+ X-Inertia: true
484
+ X-Inertia-Version: 0.9.0
485
+
486
+ HTTP/1.1 409 Conflict
487
+ X-Inertia-Location: /dashboard
488
+ ```
489
+
490
+ ### Full-page navigation and history
491
+
492
+ Force the client to bypass Inertia's client-side history (useful for
493
+ logout or any flow where you want a clean reload):
494
+
495
+ ```ts
496
+ @Post('/logout')
497
+ logout() {
498
+ // 303-style redirect — full page reload to /login.
499
+ return this.inertia.location('/login');
500
+ }
501
+ ```
502
+
503
+ `inertia.back()` returns a 302 with `Location: back` — the client
504
+ steps back in its history.
505
+
506
+ ### Shared data
507
+
508
+ ```ts
509
+ app.inertia.share('flash', { type: 'success', message: 'Saved!' });
510
+ // or
511
+ app.inertia.share({ csrfToken: '...', currentUser: { id: 1 } });
512
+ ```
513
+
514
+ Shared props appear in every page response and survive partial reloads.
515
+
516
+ ### SSR
517
+
518
+ Plug in a server-side renderer for React, Vue, Svelte, or Solid:
519
+
520
+ ```ts
521
+ import { reactSsr } from '@nexus/inertia-react';
522
+
523
+ app.inertia.setSsrAdapter(reactSsr());
524
+ ```
525
+
526
+ Without an adapter the framework falls back to a minimal HTML shell —
527
+ the client hydrates from `data-page` after JS loads. (This is the
528
+ recommended starting point.)
529
+
530
+ ### Protocol reference
531
+
532
+ - **Response headers**
533
+ - `Vary: X-Inertia` — every response
534
+ - `X-Inertia: true` — JSON responses only
535
+ - `X-Inertia-Location: <url>` — on 409 (asset version mismatch) and
536
+ `inertia.location(...)`
537
+ - **Request headers** (sent by the client)
538
+ - `X-Inertia: true` — marks an XHR visit
539
+ - `X-Inertia-Version: <string>` — for asset mismatch checks
540
+ - `X-Inertia-Partial-Component: <name>` — for partial reloads
541
+ - `X-Inertia-Partial-Data: a,b,c` — `only` filter
542
+ - `X-Inertia-Partial-Except: a,b,c` — `except` filter
543
+ - `X-Inertia-Reset: a,b,c` — client-discard markers
544
+
545
+ ---
546
+
547
+ ### Forms (`<Form>` server-side helper)
548
+
549
+ Inertia v3's `<Form>` component pairs with this server-side helper to
550
+ keep form submissions out of the controller's hot path. The pattern
551
+ is the classic **Post/Redirect/Get**:
552
+
553
+ ```ts
554
+ import { z } from 'zod';
555
+ import { Body, Controller, Post } from 'nexusjs';
556
+ import { Inertia } from 'nexusjs/view/inertia';
557
+
558
+ const UserSchema = z.object({
559
+ name: z.string().min(2),
560
+ email: z.string().email(),
561
+ });
562
+
563
+ @Controller('/users')
564
+ class UserController {
565
+ constructor(@Inject(Inertia.TOKEN) private inertia: Inertia) {}
566
+
567
+ @Post('/')
568
+ async store(@Body() input: Record<string, any>) {
569
+ const form = this.inertia.form('Users/Create');
570
+ const result = UserSchema.safeParse(input);
571
+
572
+ if (!result.success) {
573
+ const errors: Record<string, string[]> = {};
574
+ for (const issue of result.error.issues) {
575
+ const path = issue.path.join('.');
576
+ (errors[path] ??= []).push(issue.message);
577
+ }
578
+ return form
579
+ .withErrorBag('createUser')
580
+ .withErrors(errors)
581
+ .withValues(input) // re-populate the form
582
+ .render();
583
+ }
584
+
585
+ return form.redirect('/users'); // 303 (PRG pattern)
586
+ }
587
+ }
588
+ ```
589
+
590
+ | Builder method | Effect |
591
+ | ---------------- | ---------------------------------------------------------- |
592
+ | `withProps()` | Merge a batch of props at once |
593
+ | `with(k, v)` | Set a single prop |
594
+ | `withErrors()` | Attach validation errors (string or string[]) per field |
595
+ | `withError()` | Add a single error to a field |
596
+ | `withErrorBag()` | Name the form's error namespace (multiple forms / page) |
597
+ | `withValues()` | Re-populate the form inputs after a failed submission |
598
+ | `render()` | Emit the page (with errors + values injected) |
599
+ | `redirect(url)` | 303 redirect (PRG — prevents double-submit) |
600
+ | `back(to?)` | 303 redirect to `back` (or a specific URL) |
601
+
602
+ ### Lazy props
603
+
604
+ `lazy(fn, tag?)` wraps a callback so its result is computed **once
605
+ per request** and shared across every key that points at the same
606
+ tag. Useful for any expensive computation that doesn't need to wait
607
+ for a partial reload but shouldn't repeat within the same response:
608
+
609
+ ```ts
610
+ return this.inertia.render('Dashboard', {
611
+ a: lazy(() => this.computeA(), 'stats'),
612
+ b: lazy(() => this.computeB(), 'stats'),
613
+ });
614
+ ```
615
+
616
+ ### SSR adapters
617
+
618
+ The framework ships first-class adapters for React, Vue, Svelte,
619
+ and Solid. Each lazy-imports its engine — install only what you
620
+ use:
621
+
622
+ ```ts
623
+ import { createReactAdapter, ComponentRegistry } from 'nexusjs/view/inertia/ssr';
624
+
625
+ const components = new ComponentRegistry()
626
+ .register('Home', HomePage)
627
+ .register('Users/Index', UsersIndexPage);
628
+
629
+ app.inertia.setSsrAdapter(createReactAdapter({ components }));
630
+ ```
631
+
632
+ | Adapter | Engine | SSR API |
633
+ | ------------------------ | --------- | ---------------------------------------------- |
634
+ | `createReactAdapter` | React 18+ | `react-dom/server.renderToString` |
635
+ | `createVueAdapter` | Vue 3 | `vue/server-renderer.renderToString` |
636
+ | `createSvelteAdapter` | Svelte 4/5| `svelte/server.render` or `Component.render` |
637
+ | `createSolidAdapter` | Solid | `solid-js/web.renderToString` |
638
+
639
+ ### Form middleware (CSRF)
640
+
641
+ ```ts
642
+ import { inertiaFormMiddleware } from 'nexusjs/view/inertia';
643
+
644
+ app.server.app.use('*', inertiaFormMiddleware({
645
+ validateCsrf: true,
646
+ csrfHeader: 'X-CSRF-Token',
647
+ csrfField: '_token',
648
+ csrfSharedKey: 'csrfToken',
649
+ }));
650
+ ```
651
+
652
+ Returns **419 Page Expired** on mismatch. The form helper still owns
653
+ the per-field validation flow; this is the upstream CSRF gate.
654
+
655
+ ---
656
+
657
+ ---
658
+
659
+ ## View engine — `nexusjs/view`
660
+
661
+ The view engine is available as `nexusjs/view` — its own bundle entry
662
+ point. It ships three adapters:
663
+
664
+ | Adapter | Extension | Style | Runtime support |
665
+ |---------|-----------|-------|----------------|
666
+ | **Rendu** (default) | `.html`, `.rendu` | PHP-style `<?= expr ?>` | Bun / Node / Cloudflare Workers |
667
+ | **Edge** | `.edge` | Mustache-style `{{ expr }}` | Bun / Node |
668
+ | **Eta** | `.eta` | EJS-style `<%= expr %>` | Bun / Node / Deno / Workers |
669
+
670
+ ### Auto-detection by file extension
671
+
672
+ When you return `{ view: 'about.html', data }` from a controller, the
673
+ framework picks the right adapter based on the file extension:
674
+
675
+ - `.html` / `.rendu` → RenduAdapter
676
+ - `.edge` → EdgeAdapter
677
+ - `.eta` → EtaAdapter
678
+
679
+ ### File-based views
680
+
681
+ The Application auto-loads `viewPaths` from `nx.config.ts` at boot,
682
+ so no explicit call is needed:
683
+
684
+ ```ts
685
+ // nx.config.ts — all you need
686
+ export default {
687
+ view: 'rendu',
688
+ viewPaths: 'resources/views',
689
+ };
690
+ ```
691
+
692
+ Then controllers reference view files directly:
693
+
694
+ ```ts
695
+ @Get('/')
696
+ index() {
697
+ return {
698
+ view: 'welcome.html',
699
+ data: { year: new Date().getFullYear() },
700
+ };
701
+ }
702
+ ```
703
+
704
+ ### Override the adapter at runtime
705
+
706
+ ```ts
707
+ app.setViewAdapter(new EdgeAdapter());
708
+ ```
709
+
710
+ Or implement the `ViewAdapter` interface for a custom engine:
711
+
712
+ ```ts
713
+ import type { ViewAdapter } from 'nexusjs/view';
714
+
715
+ class MyEngine implements ViewAdapter {
716
+ readonly name = 'my-engine';
717
+ async render(template: string, data: Record<string, any>) { /* ... */ }
718
+ }
719
+
720
+ app.setViewAdapter(new MyEngine());
721
+ ```
722
+
723
+ ### Inline templates (no file system)
724
+
725
+ When `viewPaths` is empty (the default), the `view` value is treated
726
+ as an inline Rendu template:
727
+
728
+ ```ts
729
+ @Get('/users')
730
+ async index() {
731
+ return {
732
+ view: '<h1>Users</h1><?= users.length ?>',
733
+ data: { users: this.users.findAll() },
734
+ };
735
+ }
736
+ ```
737
+
738
+ ---
739
+
740
+ ## Runtime adapters
741
+
742
+ The framework auto-detects Bun, Node, and Cloudflare Workers and loads
743
+ the appropriate adapter.
744
+
745
+ ```ts
746
+ // Bun (default)
747
+ await app.listen(3000);
748
+
749
+ // Node
750
+ // (no extra setup — the server picks the Node adapter automatically)
751
+
752
+ // Cloudflare Workers
753
+ export default {
754
+ fetch: app.fetch,
755
+ };
756
+ ```
757
+
758
+ ---
759
+
760
+ ## Project layout (the framework source)
761
+
762
+ ```
763
+ src/
764
+ ├── core/ # Framework core (always shipped)
765
+ │ ├── constants.ts # Metadata keys, param types
766
+ │ ├── application.ts # Main Application class
767
+ │ ├── di/ # DIContainer, scanner, tokens
768
+ │ ├── decorators/ # @Module, @Controller, @Injectable, @Get, @Body, @Validate, ...
769
+ │ ├── http/ # NexusServer (Hono), multi-style router, middleware
770
+ │ ├── validation/ # Zod schema runner
771
+ │ ├── view/ # Rendu / Edge / Inertia adapters
772
+ │ └── runtime/ # Bun / Node / Cloudflare Workers adapters
773
+ ├── cli/ # `nx` command runner (optional bundle)
774
+ │ ├── commands/ # new, init, make:*, migrate, info
775
+ │ ├── templates/ # mustache-lite scaffolds
776
+ │ └── core/ # arg parser, prompts, fs helpers
777
+ ├── auth/ # `nexusjs/auth` (better-auth wrapper)
778
+ ├── queue/ # `nexusjs/queue` (BullMQ / Cloudflare / memory)
779
+ ├── schedule/ # `nexusjs/schedule` (custom cron parser)
780
+ ├── events/ # `nexusjs/events` (typed emitter)
781
+ ├── session/ # `nexusjs/session` (cookie / memory / drizzle backends)
782
+ ├── health/ # `nexusjs/health` (live/ready/startup + indicators)
783
+ ├── config/ # `nexusjs/config` (Zod-validated env config)
784
+ ├── logger/ # `nexusjs/logger` (Pino transports)
785
+ ├── static/ # `nexusjs/static` (file serving)
786
+ ├── limiter/ # `nexusjs/limiter` (rate limiting)
787
+ ├── shield/ # `nexusjs/shield` (CSRF + security headers)
788
+ ├── cache/ # `nexusjs/cache` (LRU + drizzle)
789
+ ├── drive/ # `nexusjs/drive` (storage abstraction)
790
+ ├── mail/ # `nexusjs/mail` (SMTP / File / Null)
791
+ └── drizzle/ # `nexusjs/drizzle` (default ORM)
792
+ ├── drivers/ # postgres / mysql / sqlite / bun-sqlite / d1
793
+ ├── repository/ # DrizzleRepository (Lucid-style)
794
+ ├── decorators/ # @Table / @Column / @PrimaryKey
795
+ ├── drizzle.service.ts # Main entry point
796
+ └── drizzle.module.ts # DI module
797
+ ```
798
+
799
+ ```
800
+
801
+ ---
802
+
803
+ ## Roadmap
804
+
805
+ The framework follows [Semantic Versioning](https://semver.org/).
806
+ Until v1.0, minor version bumps may include breaking changes. After
807
+ v1.0, only major bumps will.
808
+
809
+ ### Shipped
810
+
811
+ - **v0.1** (2026-04-30) — MVC core, DI, validation, Rendu / Edge / Inertia adapters, CLI bootstrap.
812
+ - **v0.2** (2026-05-15) — `nexusjs/auth`, `nexusjs/queue`, `nexusjs/schedule`, `nexusjs/events`, `nexusjs/session`, full `nx` CLI.
813
+ - **v0.3** (2026-06-21) — production basics, cross-cutting features, `nexusjs/drizzle` as the default ORM.
814
+ - **v0.4** (2026-06-22) — observability + DX: `nexusjs/openapi`, `nexusjs/upload`, `nexusjs/sse`, `nexusjs/tracing`, `nexusjs/metrics`, request-scoped DI in core.
815
+ - **v0.5** (2026-06-23) — realtime + crypto + i18n + redis: `nexusjs/ws`, `nexusjs/crypto`, `nexusjs/i18n`, `nexusjs/redis`.
816
+ - **v0.6** (2026-06-24) — gRPC + tooling: `nexusjs/grpc` (reflection-based server + typed client) and a publishable `dist/` pipeline (`bin` field, `dist/src/*` flatten).
817
+ - **v0.6.1** (2026-06-25) — patch: `nexus` → `nexusjs` rename across all sources (191 files), `bin` field fix, `dist/src/*` flatten, docs in sync with the published name. No new features.
818
+ - **v0.6.3** (2026-06-26) — view engine extracted to `nexusjs/view`, Eta adapter, file-based view paths, auto-detection by extension.
819
+ - **v0.6.4** (2026-06-22) — default view engine to Rendu, CLI view options include eta, Application auto-loads viewPaths from nx.config.ts, static file path fix, scaffold deduplication.
820
+ - **v0.6.5** (2026-06-22) — env-aware config, `nx db:generate`, built-in `sessionMiddleware()`, scaffold generates `.env`/`.env.local`/`.gitignore`, drizzle model import fix, `make:crud` repository fix.
821
+
822
+ ### Planned
823
+
824
+ - **v0.7** — `nexusjs/graphql` (code-first schema) and `nexusjs/resilience` (circuit breaker, retry, bulkhead).
825
+ - **v0.8** — `nexusjs/feature-flag` (canary / A/B testing), runtime parity test suite, performance benchmarks across Bun / Node / Workers.
826
+ - **v1.0** — stable public API surface with semver guarantees, removal of all v0.1 deprecated aliases, long-term LTS support plan.
827
+
828
+ Detailed release notes for every version live in
829
+ [`CHANGELOG.md`](./CHANGELOG.md).
830
+
831
+ ## License
832
+
833
+ [MIT](./LICENSE) — Copyright © 2026 NexusJS Contributors.
834
+
835
+ The framework is released under the permissive MIT License. You can
836
+ use it in commercial and non-commercial projects, modify the source,
837
+ and distribute derivative works — as long as you preserve the
838
+ copyright notice and the license text. See the [LICENSE](./LICENSE)
839
+ file for the full text.
840
+
841
+ ### Third-party notices
842
+
843
+ NexusJS depends on several open-source projects. Their licenses are
844
+ reproduced at install time via `bun install` (and `npm install`).
845
+ Notable runtime dependencies:
846
+
847
+ - **Hono** — MIT (web framework)
848
+ - **reflect-metadata** — Apache-2.0
849
+ - **Zod** — MIT (schema validation)
850
+ - **Rendu** — MIT (template engine)
851
+
852
+ Optional peer dependencies (each with its own license):
853
+
854
+ - **better-auth** — MIT
855
+ - **bullmq** — MIT
856
+ - **ioredis** — MIT
857
+ - **drizzle-orm** — Apache-2.0
858
+ - **@opentelemetry/*** — Apache-2.0
859
+ - **ws** — MIT
860
+ - **@grpc/grpc-js**, **@grpc/proto-loader** — Apache-2.0