@mantajs/core 0.2.0-beta.0 → 0.2.0-beta.10

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 (371) hide show
  1. package/dist/adapters/auth-mock.d.ts +3 -3
  2. package/dist/adapters/auth-mock.d.ts.map +1 -1
  3. package/dist/adapters/cache-memory.d.ts +1 -1
  4. package/dist/adapters/cache-memory.d.ts.map +1 -1
  5. package/dist/adapters/database-memory.d.ts +1 -1
  6. package/dist/adapters/database-memory.d.ts.map +1 -1
  7. package/dist/adapters/database-memory.js +1 -1
  8. package/dist/adapters/database-memory.js.map +1 -1
  9. package/dist/adapters/eventbus-memory.d.ts +1 -1
  10. package/dist/adapters/eventbus-memory.d.ts.map +1 -1
  11. package/dist/adapters/eventbus-memory.js +1 -1
  12. package/dist/adapters/eventbus-memory.js.map +1 -1
  13. package/dist/adapters/file-memory.d.ts +2 -5
  14. package/dist/adapters/file-memory.d.ts.map +1 -1
  15. package/dist/adapters/file-memory.js +2 -2
  16. package/dist/adapters/file-memory.js.map +1 -1
  17. package/dist/adapters/http-memory.d.ts +1 -1
  18. package/dist/adapters/http-memory.d.ts.map +1 -1
  19. package/dist/adapters/http-memory.js +1 -1
  20. package/dist/adapters/http-memory.js.map +1 -1
  21. package/dist/adapters/index.d.ts +13 -13
  22. package/dist/adapters/index.d.ts.map +1 -1
  23. package/dist/adapters/index.js +13 -13
  24. package/dist/adapters/index.js.map +1 -1
  25. package/dist/adapters/job-scheduler-memory.d.ts +2 -2
  26. package/dist/adapters/job-scheduler-memory.d.ts.map +1 -1
  27. package/dist/adapters/job-scheduler-memory.js +1 -1
  28. package/dist/adapters/job-scheduler-memory.js.map +1 -1
  29. package/dist/adapters/locking-memory.d.ts +1 -1
  30. package/dist/adapters/locking-memory.d.ts.map +1 -1
  31. package/dist/adapters/locking-memory.js +1 -1
  32. package/dist/adapters/locking-memory.js.map +1 -1
  33. package/dist/adapters/logger-test.d.ts +1 -1
  34. package/dist/adapters/logger-test.d.ts.map +1 -1
  35. package/dist/adapters/notification-memory.d.ts +1 -1
  36. package/dist/adapters/notification-memory.d.ts.map +1 -1
  37. package/dist/adapters/notification-memory.js +1 -1
  38. package/dist/adapters/notification-memory.js.map +1 -1
  39. package/dist/adapters/relational-query-memory.d.ts +1 -1
  40. package/dist/adapters/relational-query-memory.d.ts.map +1 -1
  41. package/dist/adapters/repository-factory-memory.d.ts +3 -3
  42. package/dist/adapters/repository-factory-memory.d.ts.map +1 -1
  43. package/dist/adapters/repository-factory-memory.js +1 -1
  44. package/dist/adapters/repository-factory-memory.js.map +1 -1
  45. package/dist/adapters/repository-memory.d.ts +1 -1
  46. package/dist/adapters/repository-memory.d.ts.map +1 -1
  47. package/dist/adapters/repository-memory.js +1 -1
  48. package/dist/adapters/repository-memory.js.map +1 -1
  49. package/dist/ai/index.js +1 -1
  50. package/dist/ai/index.js.map +1 -1
  51. package/dist/app/index.d.ts +10 -10
  52. package/dist/app/index.d.ts.map +1 -1
  53. package/dist/app/index.js +3 -3
  54. package/dist/app/index.js.map +1 -1
  55. package/dist/auth/auth-module-service.d.ts +3 -3
  56. package/dist/auth/auth-module-service.d.ts.map +1 -1
  57. package/dist/auth/auth-module-service.js +1 -1
  58. package/dist/auth/auth-module-service.js.map +1 -1
  59. package/dist/auth/index.d.ts +6 -6
  60. package/dist/auth/index.d.ts.map +1 -1
  61. package/dist/auth/index.js +4 -4
  62. package/dist/auth/index.js.map +1 -1
  63. package/dist/auth/middleware.d.ts +2 -2
  64. package/dist/auth/middleware.d.ts.map +1 -1
  65. package/dist/auth/middleware.js +1 -1
  66. package/dist/auth/middleware.js.map +1 -1
  67. package/dist/auth/models/auth-identity.d.ts +8 -8
  68. package/dist/auth/models/auth-identity.js +1 -1
  69. package/dist/auth/models/auth-identity.js.map +1 -1
  70. package/dist/auth/providers/emailpass.d.ts +1 -1
  71. package/dist/auth/providers/emailpass.d.ts.map +1 -1
  72. package/dist/auth/providers/emailpass.js.map +1 -1
  73. package/dist/command/define-command-graph.d.ts +1 -1
  74. package/dist/command/define-command-graph.d.ts.map +1 -1
  75. package/dist/command/define-command-graph.js +1 -1
  76. package/dist/command/define-command-graph.js.map +1 -1
  77. package/dist/command/dml-to-zod.d.ts +1 -1
  78. package/dist/command/dml-to-zod.d.ts.map +1 -1
  79. package/dist/command/dml-to-zod.js +1 -1
  80. package/dist/command/dml-to-zod.js.map +1 -1
  81. package/dist/command/generate-entity-commands.d.ts +3 -3
  82. package/dist/command/generate-entity-commands.d.ts.map +1 -1
  83. package/dist/command/generate-entity-commands.js +2 -2
  84. package/dist/command/generate-entity-commands.js.map +1 -1
  85. package/dist/command/index.d.ts +9 -9
  86. package/dist/command/index.d.ts.map +1 -1
  87. package/dist/command/index.js +5 -5
  88. package/dist/command/index.js.map +1 -1
  89. package/dist/command/types.d.ts +5 -5
  90. package/dist/command/types.d.ts.map +1 -1
  91. package/dist/config/built-in-presets.d.ts +1 -1
  92. package/dist/config/built-in-presets.d.ts.map +1 -1
  93. package/dist/config/built-in-presets.js +1 -1
  94. package/dist/config/built-in-presets.js.map +1 -1
  95. package/dist/config/config-manager.d.ts +1 -1
  96. package/dist/config/config-manager.d.ts.map +1 -1
  97. package/dist/config/config-manager.js +2 -2
  98. package/dist/config/config-manager.js.map +1 -1
  99. package/dist/config/define-config.d.ts +1 -1
  100. package/dist/config/define-config.d.ts.map +1 -1
  101. package/dist/config/define-config.js +2 -2
  102. package/dist/config/define-config.js.map +1 -1
  103. package/dist/config/index.d.ts +8 -8
  104. package/dist/config/index.d.ts.map +1 -1
  105. package/dist/config/index.js +6 -6
  106. package/dist/config/index.js.map +1 -1
  107. package/dist/config/presets.js +1 -1
  108. package/dist/config/presets.js.map +1 -1
  109. package/dist/config/types.d.ts +37 -17
  110. package/dist/config/types.d.ts.map +1 -1
  111. package/dist/config/types.js +4 -2
  112. package/dist/config/types.js.map +1 -1
  113. package/dist/context/index.d.ts +1 -1
  114. package/dist/context/index.d.ts.map +1 -1
  115. package/dist/context/index.js +2 -2
  116. package/dist/context/index.js.map +1 -1
  117. package/dist/context/registry.d.ts +1 -1
  118. package/dist/context/registry.d.ts.map +1 -1
  119. package/dist/context/registry.js +1 -1
  120. package/dist/context/registry.js.map +1 -1
  121. package/dist/db/index.d.ts +1 -1
  122. package/dist/db/index.d.ts.map +1 -1
  123. package/dist/db/index.js +1 -1
  124. package/dist/db/index.js.map +1 -1
  125. package/dist/dml/entity.js +1 -1
  126. package/dist/dml/entity.js.map +1 -1
  127. package/dist/dml/from-zod.js +2 -2
  128. package/dist/dml/from-zod.js.map +1 -1
  129. package/dist/dml/generator/index.js +1 -1
  130. package/dist/dml/generator/index.js.map +1 -1
  131. package/dist/dml/index.d.ts +10 -10
  132. package/dist/dml/index.d.ts.map +1 -1
  133. package/dist/dml/index.js +8 -8
  134. package/dist/dml/index.js.map +1 -1
  135. package/dist/dml/infer.d.ts +1 -1
  136. package/dist/dml/infer.d.ts.map +1 -1
  137. package/dist/dml/model.d.ts +2 -2
  138. package/dist/dml/model.d.ts.map +1 -1
  139. package/dist/dml/model.js +12 -12
  140. package/dist/dml/model.js.map +1 -1
  141. package/dist/dml/modifiers.d.ts +1 -1
  142. package/dist/dml/modifiers.d.ts.map +1 -1
  143. package/dist/dml/properties/array.d.ts +1 -1
  144. package/dist/dml/properties/array.d.ts.map +1 -1
  145. package/dist/dml/properties/array.js +1 -1
  146. package/dist/dml/properties/array.js.map +1 -1
  147. package/dist/dml/properties/autoincrement.d.ts +1 -1
  148. package/dist/dml/properties/autoincrement.d.ts.map +1 -1
  149. package/dist/dml/properties/autoincrement.js +1 -1
  150. package/dist/dml/properties/autoincrement.js.map +1 -1
  151. package/dist/dml/properties/base.js +2 -2
  152. package/dist/dml/properties/base.js.map +1 -1
  153. package/dist/dml/properties/big-number.d.ts +1 -1
  154. package/dist/dml/properties/big-number.d.ts.map +1 -1
  155. package/dist/dml/properties/big-number.js +1 -1
  156. package/dist/dml/properties/big-number.js.map +1 -1
  157. package/dist/dml/properties/boolean.d.ts +1 -1
  158. package/dist/dml/properties/boolean.d.ts.map +1 -1
  159. package/dist/dml/properties/boolean.js +1 -1
  160. package/dist/dml/properties/boolean.js.map +1 -1
  161. package/dist/dml/properties/computed.d.ts +1 -1
  162. package/dist/dml/properties/computed.d.ts.map +1 -1
  163. package/dist/dml/properties/computed.js +1 -1
  164. package/dist/dml/properties/computed.js.map +1 -1
  165. package/dist/dml/properties/date-time.d.ts +1 -1
  166. package/dist/dml/properties/date-time.d.ts.map +1 -1
  167. package/dist/dml/properties/date-time.js +1 -1
  168. package/dist/dml/properties/date-time.js.map +1 -1
  169. package/dist/dml/properties/enum.d.ts +2 -2
  170. package/dist/dml/properties/enum.d.ts.map +1 -1
  171. package/dist/dml/properties/enum.js +1 -1
  172. package/dist/dml/properties/enum.js.map +1 -1
  173. package/dist/dml/properties/float.d.ts +1 -1
  174. package/dist/dml/properties/float.d.ts.map +1 -1
  175. package/dist/dml/properties/float.js +1 -1
  176. package/dist/dml/properties/float.js.map +1 -1
  177. package/dist/dml/properties/index.d.ts +14 -14
  178. package/dist/dml/properties/index.d.ts.map +1 -1
  179. package/dist/dml/properties/index.js +14 -14
  180. package/dist/dml/properties/index.js.map +1 -1
  181. package/dist/dml/properties/json.d.ts +1 -1
  182. package/dist/dml/properties/json.d.ts.map +1 -1
  183. package/dist/dml/properties/json.js +1 -1
  184. package/dist/dml/properties/json.js.map +1 -1
  185. package/dist/dml/properties/nullable.d.ts +1 -1
  186. package/dist/dml/properties/nullable.d.ts.map +1 -1
  187. package/dist/dml/properties/number.d.ts +2 -2
  188. package/dist/dml/properties/number.d.ts.map +1 -1
  189. package/dist/dml/properties/number.js +2 -2
  190. package/dist/dml/properties/number.js.map +1 -1
  191. package/dist/dml/properties/primary-key.d.ts +1 -1
  192. package/dist/dml/properties/primary-key.d.ts.map +1 -1
  193. package/dist/dml/properties/text.d.ts +2 -2
  194. package/dist/dml/properties/text.d.ts.map +1 -1
  195. package/dist/dml/properties/text.js +2 -2
  196. package/dist/dml/properties/text.js.map +1 -1
  197. package/dist/dml/relations/belongs-to.d.ts +1 -1
  198. package/dist/dml/relations/belongs-to.d.ts.map +1 -1
  199. package/dist/dml/relations/has-many.d.ts +1 -1
  200. package/dist/dml/relations/has-many.d.ts.map +1 -1
  201. package/dist/dml/relations/has-one.d.ts +1 -1
  202. package/dist/dml/relations/has-one.d.ts.map +1 -1
  203. package/dist/dml/relations/many-to-many.d.ts +1 -1
  204. package/dist/dml/relations/many-to-many.d.ts.map +1 -1
  205. package/dist/events/index.d.ts +2 -2
  206. package/dist/events/index.d.ts.map +1 -1
  207. package/dist/events/index.js +1 -1
  208. package/dist/events/index.js.map +1 -1
  209. package/dist/events/message-aggregator.d.ts +1 -1
  210. package/dist/events/message-aggregator.d.ts.map +1 -1
  211. package/dist/events/types.d.ts +1 -1
  212. package/dist/events/types.d.ts.map +1 -1
  213. package/dist/index.d.ts +54 -54
  214. package/dist/index.d.ts.map +1 -1
  215. package/dist/index.js +30 -30
  216. package/dist/index.js.map +1 -1
  217. package/dist/job/index.d.ts +4 -4
  218. package/dist/job/index.d.ts.map +1 -1
  219. package/dist/job/index.js +1 -1
  220. package/dist/job/index.js.map +1 -1
  221. package/dist/link/index.js +1 -1
  222. package/dist/link/index.js.map +1 -1
  223. package/dist/middleware/define-middleware.js +1 -1
  224. package/dist/middleware/define-middleware.js.map +1 -1
  225. package/dist/middleware/index.d.ts +3 -3
  226. package/dist/middleware/index.d.ts.map +1 -1
  227. package/dist/middleware/index.js +1 -1
  228. package/dist/middleware/index.js.map +1 -1
  229. package/dist/module/index.d.ts +1 -1
  230. package/dist/module/index.d.ts.map +1 -1
  231. package/dist/module/versioning.d.ts +1 -1
  232. package/dist/module/versioning.d.ts.map +1 -1
  233. package/dist/naming.js +1 -1
  234. package/dist/naming.js.map +1 -1
  235. package/dist/ports/auth.d.ts +2 -2
  236. package/dist/ports/auth.d.ts.map +1 -1
  237. package/dist/ports/database.d.ts +1 -1
  238. package/dist/ports/database.d.ts.map +1 -1
  239. package/dist/ports/event-bus.d.ts +2 -2
  240. package/dist/ports/event-bus.d.ts.map +1 -1
  241. package/dist/ports/file.d.ts +9 -5
  242. package/dist/ports/file.d.ts.map +1 -1
  243. package/dist/ports/in-memory-progress-channel.d.ts +1 -1
  244. package/dist/ports/in-memory-progress-channel.d.ts.map +1 -1
  245. package/dist/ports/in-memory-queue.d.ts +1 -1
  246. package/dist/ports/in-memory-queue.d.ts.map +1 -1
  247. package/dist/ports/index.d.ts +26 -26
  248. package/dist/ports/index.d.ts.map +1 -1
  249. package/dist/ports/index.js +3 -3
  250. package/dist/ports/index.js.map +1 -1
  251. package/dist/ports/job-scheduler.d.ts +2 -2
  252. package/dist/ports/job-scheduler.d.ts.map +1 -1
  253. package/dist/ports/repository-factory.d.ts +1 -1
  254. package/dist/ports/repository-factory.d.ts.map +1 -1
  255. package/dist/ports/repository.d.ts +1 -1
  256. package/dist/ports/repository.d.ts.map +1 -1
  257. package/dist/ports/schema-generator.d.ts +1 -1
  258. package/dist/ports/schema-generator.d.ts.map +1 -1
  259. package/dist/ports/types.d.ts +2 -2
  260. package/dist/ports/types.d.ts.map +1 -1
  261. package/dist/query/define-query-graph.d.ts +1 -1
  262. package/dist/query/define-query-graph.d.ts.map +1 -1
  263. package/dist/query/define-query-graph.js +1 -1
  264. package/dist/query/define-query-graph.js.map +1 -1
  265. package/dist/query/define-query.d.ts +20 -4
  266. package/dist/query/define-query.d.ts.map +1 -1
  267. package/dist/query/define-query.js +1 -1
  268. package/dist/query/define-query.js.map +1 -1
  269. package/dist/query/extend-query-graph.d.ts +2 -2
  270. package/dist/query/extend-query-graph.d.ts.map +1 -1
  271. package/dist/query/index.d.ts +10 -10
  272. package/dist/query/index.d.ts.map +1 -1
  273. package/dist/query/index.js +11 -5
  274. package/dist/query/index.js.map +1 -1
  275. package/dist/service/define.d.ts +14 -6
  276. package/dist/service/define.d.ts.map +1 -1
  277. package/dist/service/define.js +1 -1
  278. package/dist/service/define.js.map +1 -1
  279. package/dist/service/index.d.ts +6 -6
  280. package/dist/service/index.d.ts.map +1 -1
  281. package/dist/service/index.js +4 -4
  282. package/dist/service/index.js.map +1 -1
  283. package/dist/service/instantiate.d.ts +11 -5
  284. package/dist/service/instantiate.d.ts.map +1 -1
  285. package/dist/service/instantiate.js +11 -4
  286. package/dist/service/instantiate.js.map +1 -1
  287. package/dist/service/snapshot-repository.d.ts +1 -1
  288. package/dist/service/snapshot-repository.d.ts.map +1 -1
  289. package/dist/service/types.d.ts +1 -1
  290. package/dist/service/types.d.ts.map +1 -1
  291. package/dist/strict-mode/index.js +1 -1
  292. package/dist/strict-mode/index.js.map +1 -1
  293. package/dist/subscriber/index.d.ts +5 -5
  294. package/dist/subscriber/index.d.ts.map +1 -1
  295. package/dist/subscriber/index.js +1 -1
  296. package/dist/subscriber/index.js.map +1 -1
  297. package/dist/testing/relational-query-suite.d.ts +1 -1
  298. package/dist/testing/relational-query-suite.d.ts.map +1 -1
  299. package/dist/user/auto-routes.d.ts +12 -6
  300. package/dist/user/auto-routes.d.ts.map +1 -1
  301. package/dist/user/auto-routes.js +70 -8
  302. package/dist/user/auto-routes.js.map +1 -1
  303. package/dist/user/define-user.d.ts +2 -2
  304. package/dist/user/define-user.d.ts.map +1 -1
  305. package/dist/user/define-user.js +6 -6
  306. package/dist/user/define-user.js.map +1 -1
  307. package/dist/user/index.d.ts +6 -6
  308. package/dist/user/index.d.ts.map +1 -1
  309. package/dist/user/index.js +4 -4
  310. package/dist/user/index.js.map +1 -1
  311. package/dist/user/models/user.d.ts +12 -12
  312. package/dist/user/models/user.js +1 -1
  313. package/dist/user/models/user.js.map +1 -1
  314. package/dist/user/user-module-service.d.ts +2 -2
  315. package/dist/user/user-module-service.d.ts.map +1 -1
  316. package/dist/user/user-module-service.js +1 -1
  317. package/dist/user/user-module-service.js.map +1 -1
  318. package/dist/workflows/ai-step.js +1 -1
  319. package/dist/workflows/ai-step.js.map +1 -1
  320. package/dist/workflows/create-step.d.ts +1 -1
  321. package/dist/workflows/create-step.d.ts.map +1 -1
  322. package/dist/workflows/create-step.js +4 -4
  323. package/dist/workflows/create-step.js.map +1 -1
  324. package/dist/workflows/create-workflow.d.ts +1 -1
  325. package/dist/workflows/create-workflow.d.ts.map +1 -1
  326. package/dist/workflows/define-workflow.d.ts +1 -1
  327. package/dist/workflows/define-workflow.d.ts.map +1 -1
  328. package/dist/workflows/define-workflow.js +1 -1
  329. package/dist/workflows/define-workflow.js.map +1 -1
  330. package/dist/workflows/emit-event-step.d.ts +1 -1
  331. package/dist/workflows/emit-event-step.d.ts.map +1 -1
  332. package/dist/workflows/for-each.d.ts +1 -1
  333. package/dist/workflows/for-each.d.ts.map +1 -1
  334. package/dist/workflows/for-each.js +1 -1
  335. package/dist/workflows/for-each.js.map +1 -1
  336. package/dist/workflows/index.d.ts +14 -14
  337. package/dist/workflows/index.d.ts.map +1 -1
  338. package/dist/workflows/index.js +10 -10
  339. package/dist/workflows/index.js.map +1 -1
  340. package/dist/workflows/manager.d.ts +5 -5
  341. package/dist/workflows/manager.d.ts.map +1 -1
  342. package/dist/workflows/manager.js +4 -4
  343. package/dist/workflows/manager.js.map +1 -1
  344. package/dist/workflows/orphan-reaper.d.ts +3 -3
  345. package/dist/workflows/orphan-reaper.d.ts.map +1 -1
  346. package/dist/workflows/progress-helper.d.ts +2 -2
  347. package/dist/workflows/progress-helper.d.ts.map +1 -1
  348. package/dist/workflows/progress-helper.js +1 -1
  349. package/dist/workflows/progress-helper.js.map +1 -1
  350. package/dist/workflows/step.d.ts +1 -1
  351. package/dist/workflows/step.d.ts.map +1 -1
  352. package/dist/workflows/step.js +8 -8
  353. package/dist/workflows/step.js.map +1 -1
  354. package/dist/workflows/types.d.ts +4 -4
  355. package/dist/workflows/types.d.ts.map +1 -1
  356. package/docs/00-overview.md +9 -10
  357. package/docs/01-getting-started.md +26 -29
  358. package/docs/03-services.md +23 -5
  359. package/docs/04-users.md +47 -3
  360. package/docs/05-commands.md +1 -1
  361. package/docs/06-queries.md +54 -23
  362. package/docs/10-spa.md +63 -1
  363. package/docs/11-config.md +158 -39
  364. package/docs/14-adapters.md +52 -2
  365. package/docs/15-hosts.md +17 -2
  366. package/docs/16-reference.md +32 -3
  367. package/docs/17-dashboard.md +4 -2
  368. package/docs/AGENT.md +51 -4
  369. package/package.json +5 -3
  370. package/skills/mantajs/SKILL.md +67 -0
  371. package/skills/mantajs/agents/openai.yaml +3 -0
package/docs/11-config.md CHANGED
@@ -17,12 +17,15 @@ Creates a complete, functional Manta project. After `pnpm install`, the project
17
17
 
18
18
  ```
19
19
  my-app/
20
- ├── manta.config.ts # defineConfig() — database, http, admin: true
20
+ ├── manta.config.ts # defineConfig() — database, http, spa, presets
21
+ ├── nitro.config.ts # Nitro host config for standalone builds
21
22
  ├── package.json # @mantajs/core, @mantajs/cli, @mantajs/host-nitro, @mantajs/dashboard
22
23
  ├── tsconfig.json # ES2022, ESNext, JSX support, strict
23
24
  ├── .env / .env.example # DATABASE_URL, PORT, ANTHROPIC_API_KEY
24
- ├── .gitignore # .manta/, .manta/types/, node_modules/, .env
25
+ ├── .gitignore # .manta/, node_modules/, .env
25
26
  ├── AGENT.md # AI instructions (copied from @mantajs/core/docs/)
27
+ ├── .codex/skills/mantajs/ # Codex skill pointing to the shipped Manta docs
28
+ ├── .claude/skills/mantajs/ # Claude skill pointing to the same docs
26
29
  └── src/
27
30
  ├── modules/ # Your business modules (entities + services)
28
31
  ├── commands/ # Application commands (cross-module workflows)
@@ -31,48 +34,44 @@ my-app/
31
34
  ├── links/ # Cross-module relations
32
35
  ├── queries/ # CQRS read endpoints (defineQuery, defineQueryGraph)
33
36
  ├── agents/ # AI steps
34
- └── admin/ # Dashboard (index.html + main.tsx)
35
- ├── index.html
36
- └── main.tsx
37
+ └── spa/admin/ # Dashboard SPA pages, config, blocks
38
+ ├── config.ts
39
+ ├── pages/
40
+ └── blocks/
37
41
  ```
38
42
 
39
43
  **What it does NOT generate:**
40
- - No `nitro.config.ts` — the host adapter handles this internally
41
44
  - No `drizzle.config.ts` — the CLI handles this internally
42
45
  - No `src/api/` — routes are auto-generated from commands + queries
43
46
 
44
- The only config file the developer maintains is `manta.config.ts`.
47
+ The developer normally maintains `manta.config.ts`, `nitro.config.ts` only when deployment/static asset behavior needs customization, and the generated `AGENT.md` when project-specific conventions need to be added.
45
48
 
46
- ### `manta setup` — Add Manta to existing project
49
+ ### Existing projects
50
+
51
+ The current CLI does not expose a separate `manta setup` command. Existing projects should install or update the Manta packages, keep a `manta.config.ts` at the project root, then run:
47
52
 
48
53
  ```bash
49
- cd my-nextjs-app
50
- npx manta setup
54
+ manta dev
51
55
  ```
52
56
 
53
- Detects the existing framework and adapts:
54
-
55
- | Detected | Context | What it generates |
56
- |----------|---------|------------------|
57
- | `next.config.*` | Next.js | `AGENT.md` with Next.js + Manta instructions, `src/manta/` subdirectory |
58
- | `nuxt.config.*` | Nuxt | `AGENT.md` with Nuxt + Manta instructions, `server/manta/` subdirectory |
59
- | `workspaces` in package.json | Monorepo | `AGENT.md` at root, `packages/backend/` with Manta structure |
60
- | Nothing detected | Standalone | Full Manta project structure in current directory |
57
+ `manta dev` refreshes **`.codex/skills/mantajs/SKILL.md`** and **`.claude/skills/mantajs/SKILL.md`** from the installed `@mantajs/core` package before boot validation. This keeps Codex and Claude pointed at the docs shipped in `node_modules/@mantajs/core/docs/` even when a project already existed before the current framework version.
61
58
 
62
- In all cases, `manta setup`:
63
- 1. Creates `manta.config.ts`
64
- 2. Creates module/command/subscriber directories
65
- 3. Generates **`AGENT.md` at the project root** — the first file an AI reads
66
- 4. The `AGENT.md` is context-aware (mentions the detected framework)
67
- 5. `AGENT.md` is committed to git (not gitignored) — every clone has it
68
-
69
- ### The AGENT.md
59
+ ### Agent docs and Codex skill
70
60
 
71
61
  The `AGENT.md` lives at the root of every Manta project. It's the first file an AI reads.
72
62
 
73
63
  **Canonical location:** `@mantajs/core/docs/AGENT.md` — alongside all other framework documentation. The CLI copies it to the project root during `manta init`.
74
64
 
75
- For `manta setup` (existing projects), context-specific templates exist in the CLI:
65
+ The Codex skill is intentionally separate and smaller:
66
+
67
+ ```
68
+ .codex/skills/mantajs/SKILL.md
69
+ .claude/skills/mantajs/SKILL.md
70
+ ```
71
+
72
+ It is copied from `@mantajs/core/skills/mantajs/SKILL.md` and tells Codex/Claude to load the relevant file from `node_modules/@mantajs/core/docs/` before changing Manta code. It is not installed with an npm `postinstall` hook; `manta init` creates it and `manta dev` refreshes it so existing projects stay aligned with the installed framework docs.
73
+
74
+ For future setup flows and framework-specific projects, context-specific templates exist in the CLI:
76
75
 
77
76
  ```
78
77
  packages/cli/src/templates/agent/
@@ -80,7 +79,7 @@ packages/cli/src/templates/agent/
80
79
  └── nuxt.md # Nuxt + Manta
81
80
  ```
82
81
 
83
- `manta init` copies the canonical AGENT.md from `@mantajs/core/docs/`. `manta setup` detects the context and uses the appropriate template. The developer can then edit it to add project-specific context (business domain, team conventions, etc.).
82
+ `manta init` copies the canonical AGENT.md from `@mantajs/core/docs/`. Framework-specific templates can be used by future setup flows or custom scaffolding. The developer can then edit the project AGENT.md to add project-specific context (business domain, team conventions, etc.).
84
83
 
85
84
  Each AGENT.md contains:
86
85
  - Stack description (what framework + Manta)
@@ -100,7 +99,9 @@ export default {
100
99
  pool: { min: 2, max: 10 },
101
100
  },
102
101
  http: { port: 3000 },
103
- admin: { enabled: true },
102
+ spa: {
103
+ admin: {}, // mounted at /admin by default
104
+ },
104
105
  }
105
106
  ```
106
107
 
@@ -113,7 +114,12 @@ export default defineConfig({
113
114
  auth: {
114
115
  jwtSecret: process.env.JWT_SECRET,
115
116
  },
116
- admin: { enabled: true },
117
+ spa: {
118
+ admin: {
119
+ // Default mount path is "/admin"; use "/" for admin.example.com routes.
120
+ mountPath: '/admin',
121
+ },
122
+ },
117
123
  strict: false,
118
124
  })
119
125
  ```
@@ -127,12 +133,61 @@ export default defineConfig({
127
133
  | `database` | `url`, `pool.min`, `pool.max` | Required |
128
134
  | `http` | `port` | `9000` |
129
135
  | `auth` | `jwtSecret`, `session.enabled`, `session.cookieName` | Dev: auto-generated secret |
130
- | `query` | `maxEntities`, `defaultLimit` | `10000`, `100` |
131
- | `admin` | `enabled` | `false` |
132
- | `preset` | `'dev'`, `'vercel'` | Auto-detected from `APP_ENV` |
136
+ | `query` | `maxTotalEntities` | `10000` |
137
+ | `admin` | Reserved legacy object | `{}` |
138
+ | `spa` | `{ [name]: { dashboard, preset, mountPath, vitePort } }` | Auto-detected from `src/spa/{name}` |
139
+ | `preset` | `'dev'`, `'vercel'`, custom preset object | Auto-detected from `APP_ENV` |
133
140
  | `strict` | `true`/`false` | `false` |
134
141
  | `plugins` | Array of plugin configs | `[]` |
135
142
 
143
+ ### SPA mount path
144
+
145
+ Standalone/Nitro SPAs are discovered from `src/spa/{name}/`. By default, the public mount path is `/{name}`:
146
+
147
+ ```typescript
148
+ export default defineConfig({
149
+ spa: {
150
+ admin: {}, // mounted at /admin
151
+ },
152
+ })
153
+ ```
154
+
155
+ For a dedicated admin subdomain such as `admin.fancypalas.com`, mount the SPA at the root:
156
+
157
+ ```typescript
158
+ export default defineConfig({
159
+ spa: {
160
+ admin: { mountPath: '/' },
161
+ },
162
+ })
163
+ ```
164
+
165
+ With `mountPath: '/'`, the Vite SPA uses `base: '/'`, builds into `public/`, and generated Vercel rewrites exclude `/api/*` so API routes remain server-side.
166
+
167
+ ### SPA dev port
168
+
169
+ `manta dev` starts SPA Vite servers at `5200`, then increments for additional SPAs. Use `vitePort` when a local project already owns that port:
170
+
171
+ ```typescript
172
+ export default defineConfig({
173
+ spa: {
174
+ admin: {
175
+ mountPath: '/admin',
176
+ vitePort: 5310,
177
+ },
178
+ },
179
+ })
180
+ ```
181
+
182
+ Environment overrides are supported for temporary local conflicts:
183
+
184
+ ```bash
185
+ MANTA_VITE_PORT=5310 manta dev
186
+ MANTA_VITE_PORT_ADMIN=5311 manta dev
187
+ ```
188
+
189
+ Precedence is `spa.{name}.vitePort`, then `MANTA_VITE_PORT_{NAME}`, then `MANTA_VITE_PORT`, then the default sequence.
190
+
136
191
  ## Presets (adapter bundles)
137
192
 
138
193
  The framework auto-detects the environment and loads appropriate adapters:
@@ -149,6 +204,64 @@ The framework auto-detects the environment and loads appropriate adapters:
149
204
 
150
205
  Detection: `APP_ENV` > `NODE_ENV` > default `'development'`.
151
206
 
207
+ ### Vercel Blob access
208
+
209
+ The Vercel preset wires `IFilePort` to `@mantajs/adapter-file-vercel-blob`. The adapter defaults to `access: 'public'` for compatibility with existing stores. For sensitive files, create a private Vercel Blob store and configure the adapter explicitly:
210
+
211
+ ```typescript
212
+ export default defineConfig({
213
+ preset: 'vercel',
214
+ adapters: {
215
+ IFilePort: {
216
+ adapter: '@mantajs/adapter-file-vercel-blob',
217
+ options: {
218
+ access: 'private',
219
+ signedUrlExpiresInSeconds: 300,
220
+ },
221
+ },
222
+ },
223
+ })
224
+ ```
225
+
226
+ Private file reads use Vercel Blob's server-side `get()` API via `getDownloadStream()`/`getAsBuffer()`. If the application needs a browser URL, `getPresignedDownloadUrl()` returns a short-lived signed URL instead of exposing the private Blob URL directly.
227
+
228
+ ### Durable cache for auth revocation
229
+
230
+ Production auth uses `ICachePort` for logout token revocation, refresh-token blacklist checks, reset flows, and session state. The Vercel and Cloudflare presets default to Upstash:
231
+
232
+ ```typescript
233
+ export default defineConfig({
234
+ preset: 'vercel',
235
+ adapters: {
236
+ ICachePort: {
237
+ adapter: '@mantajs/adapter-cache-upstash',
238
+ options: {
239
+ url: process.env.UPSTASH_REDIS_REST_URL,
240
+ token: process.env.UPSTASH_REDIS_REST_TOKEN,
241
+ },
242
+ },
243
+ },
244
+ })
245
+ ```
246
+
247
+ If Upstash REST credentials are not available or not reliable in the deployment runtime, use the Postgres-backed cache adapter:
248
+
249
+ ```typescript
250
+ export default defineConfig({
251
+ preset: 'vercel',
252
+ adapters: {
253
+ ICachePort: {
254
+ adapter: '@mantajs/adapter-database-pg/cache',
255
+ options: {
256
+ tableName: 'manta_cache',
257
+ },
258
+ },
259
+ },
260
+ })
261
+ ```
262
+
263
+ The Postgres cache reuses the configured `IDatabasePort` connection when bootstrapped by the Manta CLI and creates the cache table automatically by default.
264
+
152
265
  ## Environment variables
153
266
 
154
267
  | Variable | Required | Description |
@@ -156,6 +269,8 @@ Detection: `APP_ENV` > `NODE_ENV` > default `'development'`.
156
269
  | `DATABASE_URL` | Yes | PostgreSQL connection string |
157
270
  | `JWT_SECRET` | Prod only | JWT signing secret (dev: auto-generated) |
158
271
  | `APP_ENV` | No | Force environment (`development` or `production`) |
272
+ | `UPSTASH_REDIS_REST_URL` | Prod when using Upstash cache | Upstash Redis REST endpoint |
273
+ | `UPSTASH_REDIS_REST_TOKEN` | Prod when using Upstash cache | Upstash Redis REST token |
159
274
  | `ANTHROPIC_API_KEY` | No | Enable AI chat in admin dashboard |
160
275
 
161
276
  ## CLI commands
@@ -178,15 +293,21 @@ Detection: `APP_ENV` > `NODE_ENV` > default `'development'`.
178
293
 
179
294
  Starts development server. Auto-performs:
180
295
  1. Load env + config
181
- 2. Generate `.manta/types/` (TypeScript types for autocomplete)
296
+ 2. Generate `.manta/generated.d.ts` (TypeScript types for autocomplete)
182
297
  3. Start Nitro dev server with HMR
183
298
  4. On first request: connect DB, instantiate adapters, discover modules/commands/subscribers/jobs/links/queries
184
299
  5. Auto-create tables in dev mode (no manual migration needed)
185
300
  6. Wire all routes, subscribers, jobs
186
301
 
302
+ ### manta build --preset vercel
303
+
304
+ For Vercel deployments, `manta build --preset vercel` generates the framework-owned SPA rewrites and cron routes in `vercel.json`.
305
+
306
+ If `vercel.json` already exists, Manta preserves custom top-level project settings such as `buildCommand`, `installCommand`, `outputDirectory`, `functions`, `headers`, and other Vercel options. It also preserves custom `redirects`, `rewrites`, and `crons` unless they collide on the same `source` or `path` as a framework-generated entry.
307
+
187
308
  ### manta db:generate
188
309
 
189
- Scans `src/modules/*/models/` and `src/links/` to generate SQL migrations:
310
+ Scans entity definitions from `src/modules/*/entities/` and relation links from `src/links/` to generate SQL migrations:
190
311
 
191
312
  ```bash
192
313
  manta db:generate --name add-blog-post
@@ -212,15 +333,13 @@ manta exec scripts/seed.ts
212
333
  manta exec scripts/seed.ts --dry-run # Rollback after execution (test mode)
213
334
  ```
214
335
 
215
- ## Codegen (.manta/types/)
336
+ ## Codegen (`.manta/generated.d.ts`)
216
337
 
217
338
  On `manta dev` or `manta build`, the framework generates:
218
339
 
219
340
  | File | Content |
220
341
  |------|---------|
221
- | `types.ts` | `MantaEntities` typed step proxy for `step.service.catalog.create()` |
222
- | `app.d.ts` | `MantaAppModules` — typed `app.modules.catalog.listProducts()` |
223
- | `events.d.ts` | `MantaEventName` — union of all known event names |
342
+ | `.manta/generated.d.ts` | `MantaEntities`, `MantaAppModules`, `MantaEventName`, and module augmentation used by IDE autocomplete |
224
343
 
225
344
  These are TypeScript module augmentations. After codegen, `app.modules.*` has full autocomplete in your IDE.
226
345
 
@@ -8,7 +8,7 @@ Every infrastructure concern is abstracted behind a port. Here are all ports you
8
8
 
9
9
  | Port | Responsibility | Dev adapter | Prod adapter |
10
10
  |------|---------------|-------------|--------------|
11
- | `ICachePort` | Key-value cache | InMemoryCacheAdapter | UpstashCacheAdapter |
11
+ | `ICachePort` | Key-value cache | InMemoryCacheAdapter | UpstashCacheAdapter, PostgresCacheAdapter |
12
12
  | `IEventBusPort` | Event pub/sub | InMemoryEventBusAdapter | Upstash Queues |
13
13
  | `IFilePort` | File storage | InMemoryFileAdapter | VercelBlobAdapter |
14
14
  | `ILoggerPort` | Structured logging | TestLogger | PinoLoggerAdapter |
@@ -67,6 +67,25 @@ export class RedisCacheAdapter implements ICachePort {
67
67
  }
68
68
  ```
69
69
 
70
+ ## Built-in durable Postgres cache
71
+
72
+ When Redis/Upstash is not desirable, `@mantajs/adapter-database-pg` exposes a durable cache adapter:
73
+
74
+ ```typescript
75
+ export default defineConfig({
76
+ adapters: {
77
+ ICachePort: {
78
+ adapter: '@mantajs/adapter-database-pg/cache',
79
+ options: {
80
+ tableName: 'manta_cache',
81
+ },
82
+ },
83
+ },
84
+ })
85
+ ```
86
+
87
+ The CLI factory reuses the active `IDatabasePort` Postgres connection. This adapter is appropriate for auth logout/reset/session revocation state where durability matters more than sub-millisecond Redis latency.
88
+
70
89
  ### 2. Create the barrel export
71
90
 
72
91
  ```typescript
@@ -131,8 +150,17 @@ interface IEventBusPort {
131
150
  ### IFilePort
132
151
 
133
152
  ```typescript
153
+ type FileAccess = 'public' | 'private'
154
+
155
+ interface FileUploadResult {
156
+ key: string
157
+ url: string
158
+ access?: FileAccess
159
+ downloadUrl?: string
160
+ }
161
+
134
162
  interface IFilePort {
135
- upload(key: string, data: Buffer | ReadableStream, contentType?: string): Promise<{ key: string; url: string }>
163
+ upload(key: string, data: Buffer | ReadableStream, contentType?: string): Promise<FileUploadResult>
136
164
  delete(key: string | string[]): Promise<void>
137
165
  getPresignedDownloadUrl(key: string): Promise<string>
138
166
  getDownloadStream(key: string): Promise<ReadableStream>
@@ -141,6 +169,28 @@ interface IFilePort {
141
169
  }
142
170
  ```
143
171
 
172
+ #### Vercel Blob access mode
173
+
174
+ `@mantajs/adapter-file-vercel-blob` supports both Vercel Blob access modes:
175
+
176
+ ```typescript
177
+ export default defineConfig({
178
+ adapters: {
179
+ IFilePort: {
180
+ adapter: '@mantajs/adapter-file-vercel-blob',
181
+ options: {
182
+ access: 'private',
183
+ signedUrlExpiresInSeconds: 300,
184
+ },
185
+ },
186
+ },
187
+ })
188
+ ```
189
+
190
+ `access: 'public'` is the default for backward compatibility and should be reserved for public assets. For sensitive admin files, snapshots, invoices, or user content, use a Vercel Blob store created as private and set `access: 'private'`.
191
+
192
+ Private blobs are read through the server SDK in `getDownloadStream()` and `getAsBuffer()`, so the read-write token is never sent to the browser. `getPresignedDownloadUrl()` returns a short-lived signed URL for private blobs. You can also set `MANTA_VERCEL_BLOB_ACCESS=private` or `MANTA_FILE_ACCESS=private` when configuring through environment variables.
193
+
144
194
  ### ILockingPort
145
195
 
146
196
  ```typescript
package/docs/15-hosts.md CHANGED
@@ -17,6 +17,8 @@ Manta ships with a Nitro host (`packages/host-nitro/`). It:
17
17
  - Handles the catch-all route `server/routes/[...].ts`
18
18
  - Passes requests through to Manta's 12-step pipeline
19
19
 
20
+ For serverless and worker production builds, Nitro also receives generated route-level `defineQuery()` handlers under `server/routes/api/{context}/{query}.ts` when the query is compatible with the fast runtime. Those handlers bypass the catch-all route and do not call `bootstrapApp()`. The catch-all remains the fallback for command graphs, query graphs, workflows, custom API routes, auth routes, cron routes, and legacy context setups.
21
+
20
22
  ## Creating a custom host
21
23
 
22
24
  ### Example: Express host
@@ -33,7 +35,7 @@ export async function startExpressHost(options: { port?: number; cwd?: string }
33
35
  // Bootstrap the Manta app (same as manta dev / manta start)
34
36
  const { app, adapter, logger, shutdown } = await bootstrapApp({
35
37
  cwd,
36
- mode: 'production',
38
+ mode: 'prod',
37
39
  })
38
40
 
39
41
  // Create Express app
@@ -84,7 +86,7 @@ let bootstrapped: Awaited<ReturnType<typeof bootstrapApp>> | null = null
84
86
  export async function handler(event: APIGatewayProxyEventV2) {
85
87
  // Cold start: bootstrap once
86
88
  if (!bootstrapped) {
87
- bootstrapped = await bootstrapApp({ cwd: process.cwd(), mode: 'production' })
89
+ bootstrapped = await bootstrapApp({ cwd: process.cwd(), mode: 'prod' })
88
90
  }
89
91
 
90
92
  // Translate Lambda event to Web Request
@@ -117,6 +119,19 @@ A host must:
117
119
 
118
120
  The H3Adapter's `handleRequest(request: Request): Promise<Response>` is the single entry point. It runs the full 12-step pipeline (auth, validation, routing, error handling).
119
121
 
122
+ ## Production bootstrap mode
123
+
124
+ Production hosts must call `bootstrapApp()` with `mode: 'prod'`. Development tooling uses `mode: 'dev'`.
125
+
126
+ The Nitro production build generated by `@mantajs/host-nitro` writes a production bootstrap with `mode: 'prod'` for both manifest-based builds and runtime-discovery fallback builds. This matters because production error handling must not expose development stack traces.
127
+
128
+ For the Node preset, the generated Nitro catch-all route calls the Manta API first, then serves SPA fallbacks from the built static output when the API returns `404` for a `GET` request. This mirrors the generated Vercel routing locally:
129
+
130
+ - `/` redirects to the single SPA mount path when there is one SPA mounted away from `/`
131
+ - `/login`, `/reset-password`, and `/accept-invite` redirect under that mount path
132
+ - SPA subroutes such as `/admin/login` return the built `index.html`
133
+ - `/api/*` and file-extension asset paths are never handled by the SPA fallback
134
+
120
135
  ## What the pipeline provides
121
136
 
122
137
  Every request passing through `adapter.handleRequest()` goes through:
@@ -58,7 +58,7 @@ function defineLink(
58
58
  ): ResolvedLink
59
59
  ```
60
60
 
61
- ### defineContext(config)
61
+ ### defineContext(config) — legacy
62
62
 
63
63
  ```typescript
64
64
  function defineContext(config: {
@@ -71,12 +71,32 @@ function defineContext(config: {
71
71
  }): ContextDefinition
72
72
  ```
73
73
 
74
+ `defineContext()` is kept for legacy compatibility. New Manta apps should use filesystem contexts: `src/commands/{context}/` and `src/queries/{context}/` map to `/api/{context}/...`.
75
+
74
76
  ### defineConfig(config?)
75
77
 
76
78
  ```typescript
77
79
  function defineConfig(config?: Partial<MantaConfig>): MantaConfig
78
80
  ```
79
81
 
82
+ Common SPA config shape:
83
+
84
+ ```typescript
85
+ type SpaConfig = {
86
+ dashboard?: string | null // default: '@mantajs/dashboard'; null disables the shell
87
+ preset?: string | null // default: '@mantajs/ui'; null disables the preset
88
+ mountPath?: string | null // default: /{spaName}; use '/' for root-mounted SPA
89
+ }
90
+ ```
91
+
92
+ ```typescript
93
+ export default defineConfig({
94
+ spa: {
95
+ admin: { mountPath: '/' },
96
+ },
97
+ })
98
+ ```
99
+
80
100
  ## Helpers
81
101
 
82
102
  ### field property types
@@ -102,7 +122,7 @@ Modifiers: `.nullable()`, `.unique()`, `.indexed()`, `.searchable()`, `.default(
102
122
  function many(entity: DmlEntity): Many<DmlEntity>
103
123
  ```
104
124
 
105
- Cardinality modifier for `defineLink()`. See [Links](./07-links.md).
125
+ Cardinality modifier for `defineLink()`. See [Links](./08-links.md).
106
126
 
107
127
  ### Globals
108
128
 
@@ -111,7 +131,8 @@ All `define*` functions and helpers are globals — zero imports needed:
111
131
  | Global | Purpose |
112
132
  |--------|---------|
113
133
  | `defineModel`, `defineService`, `defineLink`, `defineCommand` | Core primitives |
114
- | `defineAgent`, `defineSubscriber`, `defineJob`, `defineContext` | Extended primitives |
134
+ | `defineAgent`, `defineSubscriber`, `defineJob` | Extended primitives |
135
+ | `defineContext` | Legacy context primitive; prefer filesystem contexts |
115
136
  | `defineConfig` | Configuration |
116
137
  | `field` | Property type factory |
117
138
  | `many` | Cardinality modifier |
@@ -137,6 +158,14 @@ function makeIdempotent<T>(
137
158
  ): (event: Message<T>) => Promise<void>
138
159
  ```
139
160
 
161
+ ### ICachePort production adapters
162
+
163
+ | Adapter | Package path | Notes |
164
+ | --- | --- | --- |
165
+ | Upstash Redis | `@mantajs/adapter-cache-upstash` | Default production cache for Vercel/Cloudflare presets |
166
+ | Postgres | `@mantajs/adapter-database-pg/cache` | Durable DB-backed fallback for auth revocation/session state |
167
+ | In-memory | `InMemoryCacheAdapter` | Dev/test only; not durable across instances |
168
+
140
169
  ## step API
141
170
 
142
171
  Used inside `defineCommand({ workflow: (input, { step }) => {...} })`:
@@ -51,6 +51,8 @@ src/spa/admin/
51
51
 
52
52
  **`.ts` not `.tsx`** — pages export `definePage()` or `defineForm()` specs (pure data), not JSX. Only files in `blocks/` and `components/` are `.tsx`.
53
53
 
54
+ **Mount path is project config, not page config.** A SPA named `admin` defaults to `/admin`. For a dedicated admin subdomain, set `spa.admin.mountPath = "/"` in `manta.config.ts`; page routes and navigation items remain SPA-local (`/products`, `/dashboard`, etc.).
55
+
54
56
  ---
55
57
 
56
58
  ## defineSpa()
@@ -141,7 +143,7 @@ export default definePage({
141
143
  { key: 'created_at', label: 'Created', format: 'date' },
142
144
  ],
143
145
  searchable: ['title'],
144
- navigateTo: '/admin/products/:id',
146
+ navigateTo: '/products/:id',
145
147
  },
146
148
  ],
147
149
  })
@@ -564,7 +566,7 @@ header: {
564
566
  actions: [
565
567
  'create',
566
568
  { label: 'Export', command: 'export-products' },
567
- { label: 'Import', to: '/admin/products/import' },
569
+ { label: 'Import', to: '/products/import' },
568
570
  ],
569
571
  }
570
572
  ```
package/docs/AGENT.md CHANGED
@@ -350,7 +350,7 @@ Tables: `admin_user`, `admin_invite`
350
350
 
351
351
  Auth routes (on `/api/admin/`):
352
352
  - `POST /login` (public) — returns JWT with `{ id, type: 'admin' }`
353
- - `DELETE /logout` (public) — blacklists token
353
+ - `DELETE /logout` (public) — clears auth cookies and attempts server-side token revocation
354
354
  - `POST /refresh` (public) — refresh token
355
355
  - `POST /forgot-password` (public) — reset flow
356
356
  - `POST /reset-password` (public) — confirm reset
@@ -362,7 +362,9 @@ Protected routes (JWT required, `type === 'admin'`):
362
362
  - `POST /create-user`, `POST /update-user`, `POST /delete-user`
363
363
  - `POST /create-invite`, `POST /refresh-invite`
364
364
 
365
- Middleware: all `/api/admin/*` routes verify JWT + `type === 'admin'`
365
+ Middleware: all `/api/admin/*` routes verify JWT, reject cache-blacklisted identities when cache is reachable, then require `type === 'admin'`
366
+
367
+ Production auth requires a durable `ICachePort` for logout/reset/session revocation. Default production presets use `@mantajs/adapter-cache-upstash`; use `@mantajs/adapter-database-pg/cache` when Postgres should be the durable cache backend.
366
368
 
367
369
  Override: create `src/commands/admin/login.ts` to replace auto-generated login.
368
370
  Override: create `src/middleware/admin.ts` to replace auto-generated middleware.
@@ -396,7 +398,13 @@ src/spa/admin/
396
398
  └── page.tsx # → /admin/products
397
399
  ```
398
400
 
399
- Defaults: `@mantajs/dashboard` (shell) + `@mantajs/ui` (preset). Override in config:
401
+ Defaults: `@mantajs/dashboard` (shell) + `@mantajs/ui` (preset). The generated Vite entry imports the dashboard CSS through the package export:
402
+
403
+ ```typescript
404
+ import '@mantajs/dashboard/index.css'
405
+ ```
406
+
407
+ Override in config:
400
408
 
401
409
  ```typescript
402
410
  // manta.config.ts
@@ -408,6 +416,42 @@ export default defineConfig({
408
416
  })
409
417
  ```
410
418
 
419
+ Mount paths:
420
+
421
+ ```typescript
422
+ export default defineConfig({
423
+ spa: {
424
+ admin: {}, // default: /admin
425
+ // admin: { mountPath: '/' } // root mount for admin.example.com
426
+ },
427
+ })
428
+ ```
429
+
430
+ When `mountPath` is `/`, generated Vercel rewrites exclude `/api/*` so API routes remain server-side.
431
+
432
+ Dev Vite ports:
433
+
434
+ ```typescript
435
+ export default defineConfig({
436
+ spa: {
437
+ admin: {
438
+ vitePort: 5310, // default starts at 5200
439
+ },
440
+ },
441
+ })
442
+ ```
443
+
444
+ Temporary local overrides also work:
445
+
446
+ ```bash
447
+ MANTA_VITE_PORT=5310 manta dev
448
+ MANTA_VITE_PORT_ADMIN=5311 manta dev
449
+ ```
450
+
451
+ `manta build` writes a SPA fallback manifest. With the Node preset, `manta start` mirrors Vercel SPA fallback behavior locally: root/login auth shortcuts redirect under the single SPA mount path, SPA subroutes serve `index.html`, and `/api/*` remains server-side.
452
+
453
+ `manta build --preset vercel` preserves existing custom `vercel.json` project settings such as `buildCommand`, `installCommand`, `outputDirectory`, `functions`, `headers`, plus custom redirects/rewrites/crons that do not collide with framework-generated SPA or cron entries.
454
+
411
455
  ### SDK — Frontend hooks
412
456
 
413
457
  ```typescript
@@ -497,5 +541,8 @@ Complete framework documentation is in `node_modules/@mantajs/core/docs/`:
497
541
  | [14-adapters](node_modules/@mantajs/core/docs/14-adapters.md) | Custom adapters |
498
542
  | [15-hosts](node_modules/@mantajs/core/docs/15-hosts.md) | Custom hosts |
499
543
  | [16-reference](node_modules/@mantajs/core/docs/16-reference.md) | API reference |
544
+ | [17-dashboard](node_modules/@mantajs/core/docs/17-dashboard.md) | Dashboard specs, pages, forms, blocks |
545
+
546
+ Projects generated by `manta init` include `.codex/skills/mantajs/SKILL.md` and `.claude/skills/mantajs/SKILL.md`. `manta dev` refreshes both from `@mantajs/core/skills/mantajs/SKILL.md` so Codex and Claude keep pointing at this same docs directory.
500
547
 
501
- **Read the relevant doc BEFORE writing code.** When in doubt, check [04-commands.md](node_modules/@mantajs/core/docs/04-commands.md) for workflow patterns.
548
+ **Read the relevant doc BEFORE writing code.** When in doubt, check [05-commands.md](node_modules/@mantajs/core/docs/05-commands.md) for workflow patterns.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mantajs/core",
3
- "version": "0.2.0-beta.0",
3
+ "version": "0.2.0-beta.10",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -36,7 +36,8 @@
36
36
  "default": "./dist/testing/relational-query-suite.js"
37
37
  },
38
38
  "./package.json": "./package.json",
39
- "./docs/*": "./docs/*"
39
+ "./docs/*": "./docs/*",
40
+ "./skills/*": "./skills/*"
40
41
  },
41
42
  "dependencies": {
42
43
  "drizzle-orm": "^0.35.0",
@@ -51,6 +52,7 @@
51
52
  },
52
53
  "files": [
53
54
  "dist",
54
- "docs"
55
+ "docs",
56
+ "skills"
55
57
  ]
56
58
  }