nucleus-core-ts 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (415) hide show
  1. package/LICENSE +48 -0
  2. package/README.md +177 -0
  3. package/dist/client.d.ts +2 -0
  4. package/dist/client.js +1 -0
  5. package/dist/dist/index-0yyw12k6.d.ts +8 -0
  6. package/dist/dist/index-tv67j5qd.d.ts +488 -0
  7. package/dist/dist/index.d.ts +40 -0
  8. package/dist/fe/components/AbstractAnimatedBackground/index.d.ts +7 -0
  9. package/dist/fe/components/AuthorizationPage/components/AuthorizationPage.d.ts +3 -0
  10. package/dist/fe/components/AuthorizationPage/components/ClaimList.d.ts +3 -0
  11. package/dist/fe/components/AuthorizationPage/components/RoleClaimEditor.d.ts +3 -0
  12. package/dist/fe/components/AuthorizationPage/components/RoleList.d.ts +3 -0
  13. package/dist/fe/components/AuthorizationPage/index.d.ts +9 -0
  14. package/dist/fe/components/AuthorizationPage/store/index.d.ts +47 -0
  15. package/dist/fe/components/AuthorizationPage/theme/index.d.ts +82 -0
  16. package/dist/fe/components/AuthorizationPage/types/index.d.ts +64 -0
  17. package/dist/fe/components/Button/components/Button.d.ts +3 -0
  18. package/dist/fe/components/Button/components/ButtonSpinner.d.ts +3 -0
  19. package/dist/fe/components/Button/index.d.ts +6 -0
  20. package/dist/fe/components/Button/theme/index.d.ts +183 -0
  21. package/dist/fe/components/Button/types/index.d.ts +24 -0
  22. package/dist/fe/components/Button/utils/cn.d.ts +3 -0
  23. package/dist/fe/components/Captcha/components/Captcha.d.ts +4 -0
  24. package/dist/fe/components/Captcha/index.d.ts +4 -0
  25. package/dist/fe/components/Captcha/theme.d.ts +53 -0
  26. package/dist/fe/components/Captcha/types.d.ts +60 -0
  27. package/dist/fe/components/ChangePasswordPage/components/ChangePasswordForm.d.ts +4 -0
  28. package/dist/fe/components/ChangePasswordPage/components/ChangePasswordHeader.d.ts +4 -0
  29. package/dist/fe/components/ChangePasswordPage/components/ChangePasswordPage.d.ts +4 -0
  30. package/dist/fe/components/ChangePasswordPage/index.d.ts +7 -0
  31. package/dist/fe/components/ChangePasswordPage/store/index.d.ts +16 -0
  32. package/dist/fe/components/ChangePasswordPage/theme/index.d.ts +48 -0
  33. package/dist/fe/components/ChangePasswordPage/types/index.d.ts +56 -0
  34. package/dist/fe/components/Checkbox/components/Checkbox.d.ts +3 -0
  35. package/dist/fe/components/Checkbox/components/CheckboxIcon.d.ts +3 -0
  36. package/dist/fe/components/Checkbox/components/SwitchTrack.d.ts +3 -0
  37. package/dist/fe/components/Checkbox/index.d.ts +7 -0
  38. package/dist/fe/components/Checkbox/theme/index.d.ts +218 -0
  39. package/dist/fe/components/Checkbox/types/index.d.ts +39 -0
  40. package/dist/fe/components/Checkbox/utils/cn.d.ts +3 -0
  41. package/dist/fe/components/DataTable/DataTable.d.ts +3 -0
  42. package/dist/fe/components/DataTable/components/ActionCell.d.ts +10 -0
  43. package/dist/fe/components/DataTable/components/DataCell.d.ts +18 -0
  44. package/dist/fe/components/DataTable/components/EditableCell.d.ts +14 -0
  45. package/dist/fe/components/DataTable/components/EmptyState.d.ts +8 -0
  46. package/dist/fe/components/DataTable/components/HeaderCell.d.ts +16 -0
  47. package/dist/fe/components/DataTable/components/InfiniteScrollTrigger.d.ts +11 -0
  48. package/dist/fe/components/DataTable/components/LoadingSpinner.d.ts +7 -0
  49. package/dist/fe/components/DataTable/components/ResizeHandle.d.ts +9 -0
  50. package/dist/fe/components/DataTable/components/SelectionCell.d.ts +9 -0
  51. package/dist/fe/components/DataTable/components/SkeletonRow.d.ts +9 -0
  52. package/dist/fe/components/DataTable/components/SkeletonTable.d.ts +10 -0
  53. package/dist/fe/components/DataTable/components/SortIcon.d.ts +9 -0
  54. package/dist/fe/components/DataTable/components/TableHeader.d.ts +20 -0
  55. package/dist/fe/components/DataTable/components/TableRow.d.ts +20 -0
  56. package/dist/fe/components/DataTable/components/index.d.ts +15 -0
  57. package/dist/fe/components/DataTable/hooks/index.d.ts +3 -0
  58. package/dist/fe/components/DataTable/hooks/useAutoFitColumn.d.ts +8 -0
  59. package/dist/fe/components/DataTable/hooks/useResizeColumn.d.ts +12 -0
  60. package/dist/fe/components/DataTable/index.d.ts +6 -0
  61. package/dist/fe/components/DataTable/store/index.d.ts +52 -0
  62. package/dist/fe/components/DataTable/theme/index.d.ts +131 -0
  63. package/dist/fe/components/DataTable/types/index.d.ts +151 -0
  64. package/dist/fe/components/DataTable/utils/cn.d.ts +3 -0
  65. package/dist/fe/components/DatePicker/components/CalendarGrid.d.ts +3 -0
  66. package/dist/fe/components/DatePicker/components/CalendarHeader.d.ts +3 -0
  67. package/dist/fe/components/DatePicker/components/DatePicker.d.ts +3 -0
  68. package/dist/fe/components/DatePicker/components/MonthYearSelector.d.ts +10 -0
  69. package/dist/fe/components/DatePicker/index.d.ts +10 -0
  70. package/dist/fe/components/DatePicker/locales/index.d.ts +5 -0
  71. package/dist/fe/components/DatePicker/theme/index.d.ts +312 -0
  72. package/dist/fe/components/DatePicker/types/index.d.ts +88 -0
  73. package/dist/fe/components/DatePicker/utils/cn.d.ts +3 -0
  74. package/dist/fe/components/DatePicker/utils/date.d.ts +21 -0
  75. package/dist/fe/components/DevicesPage/components/DeviceCard.d.ts +4 -0
  76. package/dist/fe/components/DevicesPage/components/DevicesHeader.d.ts +4 -0
  77. package/dist/fe/components/DevicesPage/components/DevicesPage.d.ts +4 -0
  78. package/dist/fe/components/DevicesPage/index.d.ts +8 -0
  79. package/dist/fe/components/DevicesPage/store/index.d.ts +20 -0
  80. package/dist/fe/components/DevicesPage/theme/index.d.ts +92 -0
  81. package/dist/fe/components/DevicesPage/types/index.d.ts +147 -0
  82. package/dist/fe/components/ForgotPasswordPage/components/ForgotPasswordForm.d.ts +4 -0
  83. package/dist/fe/components/ForgotPasswordPage/components/ForgotPasswordHeader.d.ts +4 -0
  84. package/dist/fe/components/ForgotPasswordPage/components/ForgotPasswordPage.d.ts +4 -0
  85. package/dist/fe/components/ForgotPasswordPage/index.d.ts +7 -0
  86. package/dist/fe/components/ForgotPasswordPage/store/index.d.ts +14 -0
  87. package/dist/fe/components/ForgotPasswordPage/theme/index.d.ts +48 -0
  88. package/dist/fe/components/ForgotPasswordPage/types/index.d.ts +48 -0
  89. package/dist/fe/components/FormBuilder/components/FormBuilder.d.ts +3 -0
  90. package/dist/fe/components/FormBuilder/components/FormField.d.ts +3 -0
  91. package/dist/fe/components/FormBuilder/hooks/useFormBuilder.d.ts +3 -0
  92. package/dist/fe/components/FormBuilder/index.d.ts +6 -0
  93. package/dist/fe/components/FormBuilder/theme/index.d.ts +136 -0
  94. package/dist/fe/components/FormBuilder/types/index.d.ts +150 -0
  95. package/dist/fe/components/FormBuilder/utils/cn.d.ts +3 -0
  96. package/dist/fe/components/FormBuilder/utils/fieldMapping.d.ts +12 -0
  97. package/dist/fe/components/FormBuilder/utils/validation.d.ts +11 -0
  98. package/dist/fe/components/LoginPage/components/LoginForm.d.ts +4 -0
  99. package/dist/fe/components/LoginPage/components/LoginHeader.d.ts +4 -0
  100. package/dist/fe/components/LoginPage/components/LoginPage.d.ts +4 -0
  101. package/dist/fe/components/LoginPage/index.d.ts +8 -0
  102. package/dist/fe/components/LoginPage/store/index.d.ts +22 -0
  103. package/dist/fe/components/LoginPage/theme/index.d.ts +55 -0
  104. package/dist/fe/components/LoginPage/types/index.d.ts +129 -0
  105. package/dist/fe/components/MagicLinkVerifyPage/components/MagicLinkVerifyPage.d.ts +4 -0
  106. package/dist/fe/components/MagicLinkVerifyPage/index.d.ts +5 -0
  107. package/dist/fe/components/MagicLinkVerifyPage/store.d.ts +15 -0
  108. package/dist/fe/components/MagicLinkVerifyPage/theme.d.ts +37 -0
  109. package/dist/fe/components/MagicLinkVerifyPage/types.d.ts +35 -0
  110. package/dist/fe/components/NucleusEntityShowcase.d.ts +3 -0
  111. package/dist/fe/components/NucleusTextInput/components/FloatingLabel.d.ts +3 -0
  112. package/dist/fe/components/NucleusTextInput/components/InputIcons.d.ts +15 -0
  113. package/dist/fe/components/NucleusTextInput/components/NucleusTextInput.d.ts +3 -0
  114. package/dist/fe/components/NucleusTextInput/components/PasswordStrengthIndicator.d.ts +15 -0
  115. package/dist/fe/components/NucleusTextInput/components/TypewriterText.d.ts +3 -0
  116. package/dist/fe/components/NucleusTextInput/index.d.ts +11 -0
  117. package/dist/fe/components/NucleusTextInput/theme/index.d.ts +108 -0
  118. package/dist/fe/components/NucleusTextInput/types/index.d.ts +65 -0
  119. package/dist/fe/components/NucleusTextInput/utils/cn.d.ts +3 -0
  120. package/dist/fe/components/NucleusTextInput/utils/format.d.ts +8 -0
  121. package/dist/fe/components/NucleusTextInput/utils/validation.d.ts +23 -0
  122. package/dist/fe/components/ProfilePage/components/AddressCard.d.ts +4 -0
  123. package/dist/fe/components/ProfilePage/components/PhoneCard.d.ts +4 -0
  124. package/dist/fe/components/ProfilePage/components/ProfileHeader.d.ts +4 -0
  125. package/dist/fe/components/ProfilePage/components/ProfilePage.d.ts +4 -0
  126. package/dist/fe/components/ProfilePage/index.d.ts +10 -0
  127. package/dist/fe/components/ProfilePage/store/index.d.ts +37 -0
  128. package/dist/fe/components/ProfilePage/theme/index.d.ts +101 -0
  129. package/dist/fe/components/ProfilePage/types/index.d.ts +150 -0
  130. package/dist/fe/components/RangePicker/components/RangePicker.d.ts +3 -0
  131. package/dist/fe/components/RangePicker/components/RangeThumb.d.ts +3 -0
  132. package/dist/fe/components/RangePicker/components/RangeTooltip.d.ts +3 -0
  133. package/dist/fe/components/RangePicker/components/RangeTrack.d.ts +3 -0
  134. package/dist/fe/components/RangePicker/index.d.ts +8 -0
  135. package/dist/fe/components/RangePicker/theme/index.d.ts +90 -0
  136. package/dist/fe/components/RangePicker/types/index.d.ts +66 -0
  137. package/dist/fe/components/RangePicker/utils/cn.d.ts +3 -0
  138. package/dist/fe/components/RegisterPage/components/PasswordStrengthIndicator.d.ts +14 -0
  139. package/dist/fe/components/RegisterPage/components/RegisterForm.d.ts +4 -0
  140. package/dist/fe/components/RegisterPage/components/RegisterHeader.d.ts +4 -0
  141. package/dist/fe/components/RegisterPage/components/RegisterPage.d.ts +4 -0
  142. package/dist/fe/components/RegisterPage/index.d.ts +9 -0
  143. package/dist/fe/components/RegisterPage/store/index.d.ts +19 -0
  144. package/dist/fe/components/RegisterPage/theme/index.d.ts +81 -0
  145. package/dist/fe/components/RegisterPage/types/index.d.ts +141 -0
  146. package/dist/fe/components/ResetPasswordPage/components/ResetPasswordForm.d.ts +4 -0
  147. package/dist/fe/components/ResetPasswordPage/components/ResetPasswordHeader.d.ts +4 -0
  148. package/dist/fe/components/ResetPasswordPage/components/ResetPasswordPage.d.ts +4 -0
  149. package/dist/fe/components/ResetPasswordPage/index.d.ts +7 -0
  150. package/dist/fe/components/ResetPasswordPage/store/index.d.ts +15 -0
  151. package/dist/fe/components/ResetPasswordPage/theme/index.d.ts +56 -0
  152. package/dist/fe/components/ResetPasswordPage/types/index.d.ts +50 -0
  153. package/dist/fe/components/SearchBox/components/SearchBox.d.ts +3 -0
  154. package/dist/fe/components/SearchBox/components/SearchBoxDropdown.d.ts +3 -0
  155. package/dist/fe/components/SearchBox/index.d.ts +8 -0
  156. package/dist/fe/components/SearchBox/theme/index.d.ts +141 -0
  157. package/dist/fe/components/SearchBox/types/index.d.ts +47 -0
  158. package/dist/fe/components/SearchBox/utils/cn.d.ts +3 -0
  159. package/dist/fe/components/SearchBox/utils/debounce.d.ts +5 -0
  160. package/dist/fe/components/SearchBox/utils/sanitize.d.ts +9 -0
  161. package/dist/fe/components/SelectBox/components/SelectBox.d.ts +3 -0
  162. package/dist/fe/components/SelectBox/components/SelectDropdown.d.ts +6 -0
  163. package/dist/fe/components/SelectBox/components/SelectOptionItem.d.ts +3 -0
  164. package/dist/fe/components/SelectBox/components/SelectTrigger.d.ts +5 -0
  165. package/dist/fe/components/SelectBox/index.d.ts +8 -0
  166. package/dist/fe/components/SelectBox/theme/index.d.ts +100 -0
  167. package/dist/fe/components/SelectBox/types/index.d.ts +66 -0
  168. package/dist/fe/components/SelectBox/utils/cn.d.ts +3 -0
  169. package/dist/fe/components/SetPasswordPage/components/PasswordStrengthIndicator.d.ts +14 -0
  170. package/dist/fe/components/SetPasswordPage/components/SetPasswordForm.d.ts +4 -0
  171. package/dist/fe/components/SetPasswordPage/components/SetPasswordHeader.d.ts +4 -0
  172. package/dist/fe/components/SetPasswordPage/components/SetPasswordPage.d.ts +4 -0
  173. package/dist/fe/components/SetPasswordPage/index.d.ts +9 -0
  174. package/dist/fe/components/SetPasswordPage/store/index.d.ts +16 -0
  175. package/dist/fe/components/SetPasswordPage/theme/index.d.ts +95 -0
  176. package/dist/fe/components/SetPasswordPage/types/index.d.ts +137 -0
  177. package/dist/fe/components/UsersPage/components/InviteUserModal.d.ts +10 -0
  178. package/dist/fe/components/UsersPage/components/Pagination.d.ts +13 -0
  179. package/dist/fe/components/UsersPage/components/RoleAssignmentModal.d.ts +12 -0
  180. package/dist/fe/components/UsersPage/components/StatsCards.d.ts +10 -0
  181. package/dist/fe/components/UsersPage/components/UserDetailDrawer.d.ts +24 -0
  182. package/dist/fe/components/UsersPage/components/UserFilters.d.ts +18 -0
  183. package/dist/fe/components/UsersPage/components/UserListItem.d.ts +11 -0
  184. package/dist/fe/components/UsersPage/components/UserListSkeleton.d.ts +7 -0
  185. package/dist/fe/components/UsersPage/components/UsersPage.d.ts +8 -0
  186. package/dist/fe/components/UsersPage/index.d.ts +13 -0
  187. package/dist/fe/components/UsersPage/store/index.d.ts +51 -0
  188. package/dist/fe/components/UsersPage/theme/index.d.ts +180 -0
  189. package/dist/fe/components/UsersPage/types/index.d.ts +73 -0
  190. package/dist/fe/components/VerifyEmailPage/components/VerifyEmailPage.d.ts +4 -0
  191. package/dist/fe/components/VerifyEmailPage/index.d.ts +5 -0
  192. package/dist/fe/components/VerifyEmailPage/store/index.d.ts +18 -0
  193. package/dist/fe/components/VerifyEmailPage/theme/index.d.ts +49 -0
  194. package/dist/fe/components/VerifyEmailPage/types/index.d.ts +84 -0
  195. package/dist/fe/hooks/useNucleusEntity.d.ts +3 -0
  196. package/dist/fe/index.d.ts +42 -0
  197. package/dist/fe/index.js +1 -0
  198. package/dist/fe/types/index.d.ts +233 -0
  199. package/dist/fe/utils/cn.d.ts +3 -0
  200. package/dist/fe/utils/columnUtils.d.ts +63 -0
  201. package/dist/fe/utils/endpointKeys.d.ts +9 -0
  202. package/dist/index-0yyw12k6.js +1 -0
  203. package/dist/index-tv67j5qd.js +1 -0
  204. package/dist/index.d.ts +6 -0
  205. package/dist/index.js +1 -0
  206. package/dist/nucleus.config.d.ts +95 -0
  207. package/dist/public/components/CTA.d.ts +2 -0
  208. package/dist/public/components/Capabilities.d.ts +9 -0
  209. package/dist/public/components/Features.d.ts +9 -0
  210. package/dist/public/components/Footer.d.ts +2 -0
  211. package/dist/public/components/Hero.d.ts +2 -0
  212. package/dist/public/components/Managers.d.ts +7 -0
  213. package/dist/public/components/Nav.d.ts +2 -0
  214. package/dist/public/components/Stack.d.ts +7 -0
  215. package/dist/public/components/docs/Docs.d.ts +2 -0
  216. package/dist/public/components/docs/DocsContent.d.ts +19 -0
  217. package/dist/public/components/docs/DocsRightSidebar.d.ts +9 -0
  218. package/dist/public/components/docs/DocsSidebar.d.ts +8 -0
  219. package/dist/public/components/docs/content/authentication.d.ts +3 -0
  220. package/dist/public/components/docs/content/gettingStarted.d.ts +3 -0
  221. package/dist/public/components/docs/docsData.d.ts +18 -0
  222. package/dist/public/components/docs/index.d.ts +7 -0
  223. package/dist/public/components/index.d.ts +10 -0
  224. package/dist/public/index.d.ts +3 -0
  225. package/dist/public/store.d.ts +20 -0
  226. package/dist/scripts/build.d.ts +7 -0
  227. package/dist/scripts/generate-schema.d.ts +3 -0
  228. package/dist/scripts/generate-system-tables-types.d.ts +2 -0
  229. package/dist/scripts/generate-types-schema.d.ts +7 -0
  230. package/dist/scripts/publish.d.ts +7 -0
  231. package/dist/scripts/version.d.ts +7 -0
  232. package/dist/src/Client/ApiCaller/client.d.ts +5 -0
  233. package/dist/src/Client/ApiCaller/examples/usage.example.d.ts +8 -0
  234. package/dist/src/Client/ApiCaller/generator.d.ts +10 -0
  235. package/dist/src/Client/ApiCaller/index.d.ts +7 -0
  236. package/dist/src/Client/ApiCaller/server.d.ts +4 -0
  237. package/dist/src/Client/ApiCaller/system-tables.d.ts +1215 -0
  238. package/dist/src/Client/ApiCaller/types.d.ts +907 -0
  239. package/dist/src/Client/Proxy/httpProxy.d.ts +5 -0
  240. package/dist/src/Client/Proxy/index.d.ts +6 -0
  241. package/dist/src/Client/Proxy/index.js +1 -0
  242. package/dist/src/Client/Proxy/server.d.ts +5 -0
  243. package/dist/src/Client/Proxy/types.d.ts +69 -0
  244. package/dist/src/Client/Proxy/utils.d.ts +12 -0
  245. package/dist/src/Client/Proxy/wsProxy.d.ts +20 -0
  246. package/dist/src/Client/ServerFetch/index.d.ts +19 -0
  247. package/dist/src/Client/ServerFetch/types.d.ts +34 -0
  248. package/dist/src/Client/index.d.ts +4 -0
  249. package/dist/src/ElysiaPlugin/index.d.ts +12 -0
  250. package/dist/src/ElysiaPlugin/publicRoutes.d.ts +9 -0
  251. package/dist/src/ElysiaPlugin/routes/auth/captcha/index.d.ts +46 -0
  252. package/dist/src/ElysiaPlugin/routes/auth/emailVerification/index.d.ts +38 -0
  253. package/dist/src/ElysiaPlugin/routes/auth/index.d.ts +68 -0
  254. package/dist/src/ElysiaPlugin/routes/auth/invite/index.d.ts +43 -0
  255. package/dist/src/ElysiaPlugin/routes/auth/login/index.d.ts +68 -0
  256. package/dist/src/ElysiaPlugin/routes/auth/login/types.d.ts +22 -0
  257. package/dist/src/ElysiaPlugin/routes/auth/login/utils.d.ts +19 -0
  258. package/dist/src/ElysiaPlugin/routes/auth/logout/index.d.ts +33 -0
  259. package/dist/src/ElysiaPlugin/routes/auth/logout/types.d.ts +6 -0
  260. package/dist/src/ElysiaPlugin/routes/auth/logout/utils.d.ts +2 -0
  261. package/dist/src/ElysiaPlugin/routes/auth/magicLink/index.d.ts +41 -0
  262. package/dist/src/ElysiaPlugin/routes/auth/magicLink/types.d.ts +23 -0
  263. package/dist/src/ElysiaPlugin/routes/auth/magicLink/utils.d.ts +4 -0
  264. package/dist/src/ElysiaPlugin/routes/auth/me/index.d.ts +40 -0
  265. package/dist/src/ElysiaPlugin/routes/auth/passwordChange/index.d.ts +33 -0
  266. package/dist/src/ElysiaPlugin/routes/auth/passwordChange/types.d.ts +12 -0
  267. package/dist/src/ElysiaPlugin/routes/auth/passwordChange/utils.d.ts +2 -0
  268. package/dist/src/ElysiaPlugin/routes/auth/passwordReset/index.d.ts +36 -0
  269. package/dist/src/ElysiaPlugin/routes/auth/passwordReset/types.d.ts +16 -0
  270. package/dist/src/ElysiaPlugin/routes/auth/passwordReset/utils.d.ts +3 -0
  271. package/dist/src/ElysiaPlugin/routes/auth/passwordSet/index.d.ts +33 -0
  272. package/dist/src/ElysiaPlugin/routes/auth/passwordSet/types.d.ts +9 -0
  273. package/dist/src/ElysiaPlugin/routes/auth/refresh/index.d.ts +39 -0
  274. package/dist/src/ElysiaPlugin/routes/auth/refresh/types.d.ts +9 -0
  275. package/dist/src/ElysiaPlugin/routes/auth/refresh/utils.d.ts +2 -0
  276. package/dist/src/ElysiaPlugin/routes/auth/register/index.d.ts +47 -0
  277. package/dist/src/ElysiaPlugin/routes/auth/register/types.d.ts +18 -0
  278. package/dist/src/ElysiaPlugin/routes/auth/register/utils.d.ts +8 -0
  279. package/dist/src/ElysiaPlugin/routes/auth/sessions/index.d.ts +33 -0
  280. package/dist/src/ElysiaPlugin/routes/auth/sessions/types.d.ts +67 -0
  281. package/dist/src/ElysiaPlugin/routes/auth/sessions/utils.d.ts +36 -0
  282. package/dist/src/ElysiaPlugin/routes/auth/types.d.ts +153 -0
  283. package/dist/src/ElysiaPlugin/routes/entity/index.d.ts +5 -0
  284. package/dist/src/ElysiaPlugin/routes/entity/types.d.ts +50 -0
  285. package/dist/src/ElysiaPlugin/routes/entity/utils.d.ts +11 -0
  286. package/dist/src/ElysiaPlugin/routes/index.d.ts +5 -0
  287. package/dist/src/ElysiaPlugin/routes/monitoring/index.d.ts +58 -0
  288. package/dist/src/ElysiaPlugin/routes/storage/cdn.d.ts +51 -0
  289. package/dist/src/ElysiaPlugin/routes/storage/helpers.d.ts +53 -0
  290. package/dist/src/ElysiaPlugin/routes/storage/index.d.ts +3 -0
  291. package/dist/src/ElysiaPlugin/routes/verification/index.d.ts +39 -0
  292. package/dist/src/ElysiaPlugin/swagger.d.ts +28 -0
  293. package/dist/src/ElysiaPlugin/utils.d.ts +70 -0
  294. package/dist/src/Managers/Dapr/clients/binding-client.d.ts +15 -0
  295. package/dist/src/Managers/Dapr/clients/config-client.d.ts +27 -0
  296. package/dist/src/Managers/Dapr/clients/crypto-client.d.ts +27 -0
  297. package/dist/src/Managers/Dapr/clients/invoke-client.d.ts +32 -0
  298. package/dist/src/Managers/Dapr/clients/lock-client.d.ts +23 -0
  299. package/dist/src/Managers/Dapr/clients/pubsub-client.d.ts +23 -0
  300. package/dist/src/Managers/Dapr/clients/secret-client.d.ts +19 -0
  301. package/dist/src/Managers/Dapr/clients/state-client.d.ts +55 -0
  302. package/dist/src/Managers/Dapr/clients/workflow-client.d.ts +39 -0
  303. package/dist/src/Managers/Dapr/connection-manager.d.ts +51 -0
  304. package/dist/src/Managers/Dapr/constants.d.ts +49 -0
  305. package/dist/src/Managers/Dapr/dapr-manager.d.ts +160 -0
  306. package/dist/src/Managers/Dapr/error-handling.d.ts +29 -0
  307. package/dist/src/Managers/Dapr/index.d.ts +102 -0
  308. package/dist/src/Managers/Dapr/types.d.ts +121 -0
  309. package/dist/src/Managers/Dapr/utils.d.ts +44 -0
  310. package/dist/src/Managers/File/atomic.d.ts +64 -0
  311. package/dist/src/Managers/File/core.d.ts +188 -0
  312. package/dist/src/Managers/File/index.d.ts +18 -0
  313. package/dist/src/Managers/File/permissions.d.ts +72 -0
  314. package/dist/src/Managers/File/streaming.d.ts +30 -0
  315. package/dist/src/Managers/File/types.d.ts +146 -0
  316. package/dist/src/Managers/File/utils.d.ts +112 -0
  317. package/dist/src/Managers/Postgre/index.d.ts +25 -0
  318. package/dist/src/Managers/Redis/index.d.ts +33 -0
  319. package/dist/src/Managers/index.d.ts +5 -0
  320. package/dist/src/Services/Auth/Fingerprint/Generate/index.d.ts +3 -0
  321. package/dist/src/Services/Auth/Fingerprint/Validate/index.d.ts +3 -0
  322. package/dist/src/Services/Auth/Fingerprint/index.d.ts +5 -0
  323. package/dist/src/Services/Auth/Fingerprint/types.d.ts +20 -0
  324. package/dist/src/Services/Auth/Fingerprint/utils.d.ts +3 -0
  325. package/dist/src/Services/Auth/JWT/Decode/index.d.ts +3 -0
  326. package/dist/src/Services/Auth/JWT/Sign/index.d.ts +3 -0
  327. package/dist/src/Services/Auth/JWT/Verify/index.d.ts +3 -0
  328. package/dist/src/Services/Auth/JWT/index.d.ts +5 -0
  329. package/dist/src/Services/Auth/JWT/types.d.ts +38 -0
  330. package/dist/src/Services/Auth/JWT/utils.d.ts +10 -0
  331. package/dist/src/Services/Auth/Password/Generate/index.d.ts +3 -0
  332. package/dist/src/Services/Auth/Password/Validate/index.d.ts +3 -0
  333. package/dist/src/Services/Auth/Password/index.d.ts +2 -0
  334. package/dist/src/Services/Auth/Password/types.d.ts +16 -0
  335. package/dist/src/Services/Auth/RefreshToken/Delete/index.d.ts +3 -0
  336. package/dist/src/Services/Auth/RefreshToken/Generate/index.d.ts +11 -0
  337. package/dist/src/Services/Auth/RefreshToken/Read/index.d.ts +11 -0
  338. package/dist/src/Services/Auth/RefreshToken/Validate/index.d.ts +11 -0
  339. package/dist/src/Services/Auth/RefreshToken/index.d.ts +5 -0
  340. package/dist/src/Services/Auth/RefreshToken/types.d.ts +27 -0
  341. package/dist/src/Services/Auth/RefreshToken/utils.d.ts +6 -0
  342. package/dist/src/Services/Auth/Session/Issue/index.d.ts +9 -0
  343. package/dist/src/Services/Auth/Session/index.d.ts +2 -0
  344. package/dist/src/Services/Auth/Session/types.d.ts +13 -0
  345. package/dist/src/Services/Auth/SessionStore/Delete/index.d.ts +3 -0
  346. package/dist/src/Services/Auth/SessionStore/Generate/index.d.ts +11 -0
  347. package/dist/src/Services/Auth/SessionStore/Read/index.d.ts +3 -0
  348. package/dist/src/Services/Auth/SessionStore/Update/index.d.ts +24 -0
  349. package/dist/src/Services/Auth/SessionStore/Validate/index.d.ts +3 -0
  350. package/dist/src/Services/Auth/SessionStore/index.d.ts +7 -0
  351. package/dist/src/Services/Auth/SessionStore/types.d.ts +59 -0
  352. package/dist/src/Services/Auth/SessionStore/utils.d.ts +6 -0
  353. package/dist/src/Services/Auth/index.d.ts +7 -0
  354. package/dist/src/Services/Authorization/ClaimSeeder/index.d.ts +6 -0
  355. package/dist/src/Services/Authorization/GodminSetup/index.d.ts +10 -0
  356. package/dist/src/Services/Authorization/Middleware/index.d.ts +21 -0
  357. package/dist/src/Services/Authorization/index.d.ts +5 -0
  358. package/dist/src/Services/Authorization/types.d.ts +68 -0
  359. package/dist/src/Services/Captcha/index.d.ts +15 -0
  360. package/dist/src/Services/Captcha/types.d.ts +69 -0
  361. package/dist/src/Services/Gmail/index.d.ts +62 -0
  362. package/dist/src/Services/Logger/Logger.d.ts +77 -0
  363. package/dist/src/Services/Logger/index.d.ts +5 -0
  364. package/dist/src/Services/Logger/transports.d.ts +54 -0
  365. package/dist/src/Services/Logger/types.d.ts +88 -0
  366. package/dist/src/Services/Logger/utils.d.ts +8 -0
  367. package/dist/src/Services/Monitoring/AlertService.d.ts +29 -0
  368. package/dist/src/Services/Monitoring/collectors/ApplicationCollector.d.ts +30 -0
  369. package/dist/src/Services/Monitoring/collectors/SystemCollector.d.ts +13 -0
  370. package/dist/src/Services/Monitoring/collectors/index.d.ts +3 -0
  371. package/dist/src/Services/Monitoring/index.d.ts +109 -0
  372. package/dist/src/Services/Monitoring/types.d.ts +163 -0
  373. package/dist/src/Services/Notification/index.d.ts +31 -0
  374. package/dist/src/Services/Notification/types.d.ts +59 -0
  375. package/dist/src/Services/RateLimiter/index.d.ts +99 -0
  376. package/dist/src/Services/Verification/index.d.ts +23 -0
  377. package/dist/src/Services/Verification/types.d.ts +135 -0
  378. package/dist/src/Services/index.d.ts +10 -0
  379. package/dist/src/types.d.ts +588 -0
  380. package/package.json +99 -0
  381. package/public/components/CTA.tsx +25 -0
  382. package/public/components/Capabilities.tsx +69 -0
  383. package/public/components/Features.tsx +107 -0
  384. package/public/components/Footer.tsx +60 -0
  385. package/public/components/Hero.tsx +53 -0
  386. package/public/components/Managers.tsx +60 -0
  387. package/public/components/Nav.tsx +107 -0
  388. package/public/components/Stack.tsx +36 -0
  389. package/public/components/docs/Docs.tsx +62 -0
  390. package/public/components/docs/DocsContent.tsx +203 -0
  391. package/public/components/docs/DocsRightSidebar.tsx +53 -0
  392. package/public/components/docs/DocsSidebar.tsx +62 -0
  393. package/public/components/docs/content/authentication.ts +1670 -0
  394. package/public/components/docs/content/gettingStarted.ts +627 -0
  395. package/public/components/docs/docsData.ts +36 -0
  396. package/public/components/docs/index.ts +6 -0
  397. package/public/components/index.ts +9 -0
  398. package/public/docs.css +633 -0
  399. package/public/index.html +81 -0
  400. package/public/index.tsx +52 -0
  401. package/public/store.ts +79 -0
  402. package/public/styles.css +877 -0
  403. package/schemas/bckp/config.nucleus.json +1488 -0
  404. package/schemas/bckp/nucleus.tables.schema.json +24 -0
  405. package/schemas/bckp/table.schema.json +472 -0
  406. package/schemas/config.nucleus.json +1010 -0
  407. package/schemas/nucleus.tables.schema.json +19 -0
  408. package/schemas/table.schema.json +498 -0
  409. package/scripts/build.ts +197 -0
  410. package/scripts/generate-schema.ts +556 -0
  411. package/scripts/generate-system-tables-types.ts +18 -0
  412. package/scripts/generate-types-schema.ts +962 -0
  413. package/scripts/publish.ts +210 -0
  414. package/scripts/version.ts +125 -0
  415. package/src/system.tables.json +1590 -0
@@ -0,0 +1,627 @@
1
+ import type { DocItem } from "../docsData";
2
+
3
+ export const gettingStartedItems: DocItem[] = [
4
+ {
5
+ id: "what-is-nucleus",
6
+ title: "What is Nucleus",
7
+ subItems: [
8
+ {
9
+ id: "the-problem",
10
+ title: "The Problem",
11
+ content: `
12
+ ## The Problem
13
+
14
+ Building enterprise backend applications from scratch is **time-consuming** and **error-prone**. Every new project requires developers to solve the same fundamental challenges over and over again.
15
+
16
+ ### Common Pain Points
17
+
18
+ **1. Repetitive CRUD Operations**
19
+ Every database table needs create, read, update, and delete endpoints. For a typical application with 20+ tables, this means writing hundreds of nearly identical route handlers.
20
+
21
+ **2. Authentication Complexity**
22
+ Implementing secure authentication involves:
23
+ - Password hashing and verification
24
+ - JWT token generation and validation
25
+ - Session management
26
+ - Token refresh mechanisms
27
+ - Password reset flows
28
+ - Email verification
29
+
30
+ **3. Security Vulnerabilities**
31
+ Custom implementations often have security gaps:
32
+ - SQL injection vulnerabilities
33
+ - Improper token storage
34
+ - Missing rate limiting
35
+ - Inadequate input validation
36
+
37
+ **4. Inconsistent Codebases**
38
+ When each developer implements things differently, you end up with:
39
+ - Different error handling patterns
40
+ - Inconsistent API response formats
41
+ - Varied authorization approaches
42
+ - Mixed naming conventions
43
+
44
+ ### The Real Cost
45
+
46
+ | Task | Estimated Time |
47
+ |------|----------------|
48
+ | Basic CRUD for 20 tables | 40-60 hours |
49
+ | Authentication system | 20-30 hours |
50
+ | Session management | 10-15 hours |
51
+ | Audit logging | 8-12 hours |
52
+ | Email integration | 5-8 hours |
53
+ | **Total** | **83-125 hours** |
54
+
55
+ That's **2-3 weeks** of development time just for infrastructure, before writing any business logic.
56
+ `,
57
+ },
58
+ {
59
+ id: "the-solution",
60
+ title: "The Solution",
61
+ content: `
62
+ ## The Solution
63
+
64
+ Nucleus Core eliminates infrastructure overhead with a **configuration-driven approach**. Define what you need, and Nucleus generates it.
65
+
66
+ ### How It Works
67
+
68
+ \`\`\`mermaid
69
+ flowchart LR
70
+ A[Define Config] --> B[Nucleus Plugin]
71
+ B --> C[Auto-Generated Routes]
72
+ B --> D[Auth System]
73
+ B --> E[Session Management]
74
+ B --> F[Audit Logging]
75
+ B --> G[Swagger Docs]
76
+
77
+ style B fill:#3b82f6,color:#fff
78
+ \`\`\`
79
+
80
+ ### Configuration Example
81
+
82
+ \`\`\`typescript
83
+ import { nucleusPlugin } from 'nucleus-core'
84
+
85
+ const config = {
86
+ database: {
87
+ url: process.env.DATABASE_URL,
88
+ pushSchema: true,
89
+ },
90
+ authentication: {
91
+ enabled: true,
92
+ accessToken: { secret: process.env.JWT_SECRET, expiresIn: '15m' },
93
+ refreshToken: { secret: process.env.REFRESH_SECRET, expiresIn: '7d' },
94
+ sessionToken: { secret: process.env.SESSION_SECRET, expiresIn: '30d' },
95
+ login: { enabled: true, isPublic: true },
96
+ register: { enabled: true, isPublic: true },
97
+ logout: { enabled: true },
98
+ sessions: { enabled: true, maxActiveSessions: 5 },
99
+ },
100
+ audit: { enabled: true },
101
+ }
102
+
103
+ const app = new Elysia()
104
+ .use(nucleusPlugin(config))
105
+ .listen(3000)
106
+ \`\`\`
107
+
108
+ ### What You Get
109
+
110
+ | Feature | Manual Implementation | With Nucleus |
111
+ |---------|----------------------|--------------|
112
+ | CRUD Routes | 40-60 hours | **0 hours** (auto-generated) |
113
+ | Authentication | 20-30 hours | **5 minutes** (config) |
114
+ | Sessions | 10-15 hours | **2 minutes** (config) |
115
+ | Audit Logs | 8-12 hours | **1 minute** (config) |
116
+ | Swagger Docs | 4-6 hours | **0 hours** (auto-generated) |
117
+
118
+ ### Key Benefits
119
+
120
+ - **Type-Safe**: Full TypeScript support with inferred types
121
+ - **Secure by Default**: Industry-standard security practices built-in
122
+ - **Consistent**: Uniform API patterns across all endpoints
123
+ - **Documented**: Auto-generated OpenAPI/Swagger documentation
124
+ - **Extensible**: Add custom routes alongside generated ones
125
+ `,
126
+ },
127
+ {
128
+ id: "the-end-game",
129
+ title: "The End Game",
130
+ content: `
131
+ ## The End Game
132
+
133
+ Our vision is to make Nucleus the **standard foundation** for enterprise backend development.
134
+
135
+ ### Philosophy
136
+
137
+ \`\`\`mermaid
138
+ mindmap
139
+ root((Nucleus Philosophy))
140
+ Convention over Configuration
141
+ Sensible defaults
142
+ Override when needed
143
+ Security First
144
+ No shortcuts on security
145
+ Regular updates
146
+ Developer Experience
147
+ Minimal boilerplate
148
+ Clear error messages
149
+ Production Ready
150
+ Battle-tested patterns
151
+ Scalable architecture
152
+ \`\`\`
153
+
154
+ ### Roadmap
155
+
156
+ **Current (v3.x)**
157
+ - ✅ Generic CRUD routing
158
+ - ✅ JWT authentication
159
+ - ✅ Session management with Redis
160
+ - ✅ Device fingerprinting
161
+ - ✅ Audit logging
162
+ - ✅ Email integration (Gmail)
163
+ - ✅ Swagger auto-generation
164
+
165
+ **Planned (v4.x)**
166
+ - 🔲 Multi-tenant support
167
+ - 🔲 GraphQL layer
168
+ - 🔲 Real-time subscriptions
169
+ - 🔲 File upload management
170
+ - 🔲 Background job queue
171
+ - 🔲 Rate limiting per user/role
172
+
173
+ **Future**
174
+ - 🔲 Admin dashboard UI
175
+ - 🔲 Analytics integration
176
+ - 🔲 A/B testing framework
177
+ - 🔲 Feature flags
178
+ `,
179
+ },
180
+ ],
181
+ },
182
+ {
183
+ id: "quickstart",
184
+ title: "Quickstart",
185
+ subItems: [
186
+ {
187
+ id: "installation",
188
+ title: "Installation",
189
+ content: `
190
+ ## Installation
191
+
192
+ ### Prerequisites
193
+
194
+ - **Bun** v1.0+ (recommended) or Node.js v18+
195
+ - **PostgreSQL** 14+ database
196
+ - **Redis** 6+ for session storage
197
+
198
+ ### Install Package
199
+
200
+ \`\`\`bash
201
+ bun add nucleus-core elysia
202
+ \`\`\`
203
+
204
+ Or with npm:
205
+
206
+ \`\`\`bash
207
+ npm install nucleus-core elysia
208
+ \`\`\`
209
+
210
+ ### Peer Dependencies
211
+
212
+ Nucleus requires these peer dependencies:
213
+
214
+ \`\`\`bash
215
+ bun add drizzle-orm pg ioredis
216
+ \`\`\`
217
+
218
+ ### Project Structure
219
+
220
+ \`\`\`
221
+ my-api/
222
+ ├── src/
223
+ │ ├── index.ts # Elysia app entry
224
+ │ ├── config.ts # Nucleus configuration
225
+ │ └── drizzle/
226
+ │ ├── schema.ts # Database schema
227
+ │ └── index.ts # Drizzle client
228
+ ├── .env # Environment variables
229
+ ├── package.json
230
+ └── tsconfig.json
231
+ \`\`\`
232
+ `,
233
+ },
234
+ {
235
+ id: "config-file",
236
+ title: "Config File",
237
+ content: `
238
+ ## Configuration File
239
+
240
+ The configuration file is the heart of Nucleus. It defines all features and behaviors.
241
+
242
+ ### Basic Configuration
243
+
244
+ \`\`\`typescript
245
+ // src/config.ts
246
+ import type { NucleusConfigOptions } from 'nucleus-core'
247
+ import * as schema from './drizzle/schema'
248
+
249
+ export const config: NucleusConfigOptions = {
250
+ // Database connection
251
+ database: {
252
+ url: process.env.DATABASE_URL!,
253
+ pushSchema: true, // Auto-sync schema on startup
254
+ },
255
+
256
+ // Drizzle schema reference
257
+ schema,
258
+
259
+ // Authentication settings
260
+ authentication: {
261
+ enabled: true,
262
+
263
+ // Access token - short-lived, for API requests
264
+ accessToken: {
265
+ secret: process.env.ACCESS_TOKEN_SECRET!,
266
+ expiresIn: '15m',
267
+ algorithm: 'HS256',
268
+ },
269
+
270
+ // Refresh token - long-lived, for getting new access tokens
271
+ refreshToken: {
272
+ secret: process.env.REFRESH_TOKEN_SECRET!,
273
+ expiresIn: '7d',
274
+ },
275
+
276
+ // Session token - identifies the session
277
+ sessionToken: {
278
+ secret: process.env.SESSION_TOKEN_SECRET!,
279
+ expiresIn: '30d',
280
+ },
281
+
282
+ // Enable routes
283
+ login: { enabled: true, isPublic: true },
284
+ register: { enabled: true, isPublic: true },
285
+ logout: { enabled: true },
286
+ refresh: { enabled: true, isPublic: true },
287
+ },
288
+
289
+ // Redis for sessions
290
+ redis: {
291
+ url: process.env.REDIS_URL || 'redis://localhost:6379',
292
+ },
293
+
294
+ // Audit logging
295
+ audit: {
296
+ enabled: true,
297
+ },
298
+ }
299
+ \`\`\`
300
+
301
+ ### Environment Variables
302
+
303
+ \`\`\`bash
304
+ # .env
305
+ DATABASE_URL=postgresql://user:pass@localhost:5432/mydb
306
+ REDIS_URL=redis://localhost:6379
307
+
308
+ # Use strong, unique secrets (256-bit minimum)
309
+ ACCESS_TOKEN_SECRET=your-access-token-secret-min-32-chars
310
+ REFRESH_TOKEN_SECRET=your-refresh-token-secret-min-32-chars
311
+ SESSION_TOKEN_SECRET=your-session-token-secret-min-32-chars
312
+ \`\`\`
313
+ `,
314
+ },
315
+ {
316
+ id: "elysia-setup",
317
+ title: "Elysia Setup",
318
+ content: `
319
+ ## Elysia Integration
320
+
321
+ ### Basic Setup
322
+
323
+ \`\`\`typescript
324
+ // src/index.ts
325
+ import { Elysia } from 'elysia'
326
+ import { nucleusPlugin } from 'nucleus-core'
327
+ import { config } from './config'
328
+
329
+ const app = new Elysia()
330
+ // Add Nucleus plugin
331
+ .use(nucleusPlugin(config))
332
+
333
+ // Add your custom routes
334
+ .get('/health', () => ({ status: 'ok' }))
335
+
336
+ .listen(3000)
337
+
338
+ console.log(\`
339
+ 🚀 Server running at http://localhost:3000
340
+ 📚 Swagger docs at http://localhost:3000/docs
341
+ \`)
342
+ \`\`\`
343
+
344
+ ### What Gets Created
345
+
346
+ After starting the server, you'll have:
347
+
348
+ | Endpoint | Description |
349
+ |----------|-------------|
350
+ | \`POST /auth/login\` | User authentication |
351
+ | \`POST /auth/register\` | User registration |
352
+ | \`POST /auth/logout\` | Session termination |
353
+ | \`POST /auth/refresh\` | Token refresh |
354
+ | \`GET /auth/me\` | Current user info |
355
+ | \`GET /:entity\` | List entities (per table) |
356
+ | \`GET /:entity/:id\` | Get single entity |
357
+ | \`POST /:entity\` | Create entity |
358
+ | \`PUT /:entity/:id\` | Update entity |
359
+ | \`DELETE /:entity/:id\` | Delete entity |
360
+ | \`GET /docs\` | Swagger documentation |
361
+
362
+ ### Running the Server
363
+
364
+ \`\`\`bash
365
+ bun run src/index.ts
366
+ \`\`\`
367
+
368
+ Or with watch mode:
369
+
370
+ \`\`\`bash
371
+ bun --watch run src/index.ts
372
+ \`\`\`
373
+ `,
374
+ },
375
+ ],
376
+ },
377
+ {
378
+ id: "features",
379
+ title: "Features",
380
+ subItems: [
381
+ {
382
+ id: "generic-routing",
383
+ title: "Generic Routing",
384
+ content: `
385
+ ## Generic Entity Routing
386
+
387
+ Nucleus automatically creates CRUD routes for every table in your Drizzle schema.
388
+
389
+ ### Generated Routes
390
+
391
+ | Method | Route | Description | Auth Required |
392
+ |--------|-------|-------------|---------------|
393
+ | \`GET\` | \`/:entity\` | List with pagination | Configurable |
394
+ | \`GET\` | \`/:entity/:id\` | Get by ID | Configurable |
395
+ | \`POST\` | \`/:entity\` | Create new | Configurable |
396
+ | \`PUT\` | \`/:entity/:id\` | Update by ID | Configurable |
397
+ | \`DELETE\` | \`/:entity/:id\` | Delete by ID | Configurable |
398
+ | \`POST\` | \`/:entity/bulk\` | Bulk create | Configurable |
399
+ | \`PUT\` | \`/:entity/bulk\` | Bulk update | Configurable |
400
+ | \`DELETE\` | \`/:entity/bulk\` | Bulk delete | Configurable |
401
+
402
+ ### List Endpoint Features
403
+
404
+ \`\`\`typescript
405
+ // GET /users?page=1&limit=20&sort=createdAt&order=desc&search=john
406
+
407
+ // Response
408
+ {
409
+ "success": true,
410
+ "data": {
411
+ "items": [...],
412
+ "meta": {
413
+ "page": 1,
414
+ "limit": 20,
415
+ "totalItems": 150,
416
+ "totalPages": 8,
417
+ "hasNextPage": true,
418
+ "hasPrevPage": false
419
+ }
420
+ }
421
+ }
422
+ \`\`\`
423
+
424
+ ### Query Parameters
425
+
426
+ | Parameter | Type | Default | Description |
427
+ |-----------|------|---------|-------------|
428
+ | \`page\` | number | 1 | Page number (1-indexed) |
429
+ | \`limit\` | number | 20 | Items per page (max 100) |
430
+ | \`sort\` | string | 'createdAt' | Field to sort by |
431
+ | \`order\` | 'asc' \\| 'desc' | 'desc' | Sort direction |
432
+ | \`search\` | string | - | Search across text fields |
433
+
434
+ ### Authorization
435
+
436
+ Control access per entity in your config:
437
+
438
+ \`\`\`typescript
439
+ entities: {
440
+ users: {
441
+ authorizedRoles: ['admin'], // Only admins
442
+ },
443
+ posts: {
444
+ authorizedRoles: ['admin', 'editor'], // Admins and editors
445
+ },
446
+ comments: {
447
+ authorizedRoles: [], // Public access
448
+ },
449
+ }
450
+ \`\`\`
451
+ `,
452
+ },
453
+ {
454
+ id: "initialization",
455
+ title: "Initialization",
456
+ content: `
457
+ ## Initialization Flow
458
+
459
+ Understanding the startup sequence helps with debugging and customization.
460
+
461
+ ### Startup Sequence
462
+
463
+ \`\`\`mermaid
464
+ sequenceDiagram
465
+ participant App as Your App
466
+ participant Nucleus
467
+ participant DB as PostgreSQL
468
+ participant Redis
469
+
470
+ App->>Nucleus: use(nucleusPlugin(config))
471
+
472
+ Note over Nucleus: 1. Validate Config
473
+ Nucleus->>Nucleus: Check required fields
474
+ Nucleus->>Nucleus: Apply defaults
475
+
476
+ Note over Nucleus: 2. Database Setup
477
+ Nucleus->>DB: Connect
478
+ Nucleus->>DB: Push schema (if enabled)
479
+ Nucleus->>DB: Create system tables
480
+
481
+ Note over Nucleus: 3. Redis Setup
482
+ Nucleus->>Redis: Connect
483
+ Nucleus->>Redis: Test connection
484
+
485
+ Note over Nucleus: 4. Auth Setup
486
+ Nucleus->>Nucleus: Initialize JWT signing
487
+ Nucleus->>DB: Create/verify admin user
488
+
489
+ Note over Nucleus: 5. Route Registration
490
+ Nucleus->>Nucleus: Generate entity routes
491
+ Nucleus->>Nucleus: Register auth routes
492
+ Nucleus->>Nucleus: Setup middleware
493
+
494
+ Note over Nucleus: 6. Documentation
495
+ Nucleus->>Nucleus: Generate Swagger spec
496
+
497
+ Nucleus-->>App: Plugin ready
498
+ \`\`\`
499
+
500
+ ### System Tables
501
+
502
+ Nucleus creates these tables automatically:
503
+
504
+ | Table | Purpose |
505
+ |-------|---------|
506
+ | \`users\` | User accounts |
507
+ | \`userSessions\` | Active sessions |
508
+ | \`auditLogs\` | Operation history |
509
+ | \`passwordResetTokens\` | Reset tokens |
510
+ | \`magicLinkTokens\` | Magic link tokens |
511
+
512
+ ### Lifecycle Hooks
513
+
514
+ \`\`\`typescript
515
+ const config = {
516
+ // ... other config
517
+
518
+ hooks: {
519
+ onReady: async (app) => {
520
+ console.log('Nucleus is ready!')
521
+ },
522
+ onRequest: async (context) => {
523
+ // Called on every request
524
+ },
525
+ beforeEntityCreate: async (entity, data) => {
526
+ // Called before creating any entity
527
+ },
528
+ afterEntityCreate: async (entity, data, result) => {
529
+ // Called after creating any entity
530
+ },
531
+ }
532
+ }
533
+ \`\`\`
534
+ `,
535
+ },
536
+ {
537
+ id: "concepts",
538
+ title: "Core Concepts",
539
+ content: `
540
+ ## Core Concepts
541
+
542
+ Understanding these concepts will help you use Nucleus effectively.
543
+
544
+ ### Entities
545
+
546
+ An **entity** is any database table that Nucleus manages. Each entity automatically gets:
547
+ - CRUD API endpoints
548
+ - Request/response validation
549
+ - Swagger documentation
550
+ - Audit logging
551
+
552
+ ### Three-Token Architecture
553
+
554
+ \`\`\`mermaid
555
+ flowchart TB
556
+ subgraph Tokens
557
+ AT[Access Token<br/>15 min lifetime]
558
+ RT[Refresh Token<br/>7 day lifetime]
559
+ ST[Session Token<br/>30 day lifetime]
560
+ end
561
+
562
+ subgraph Purpose
563
+ AT --> P1[API Authentication]
564
+ RT --> P2[Get New Access Token]
565
+ ST --> P3[Device Tracking]
566
+ end
567
+
568
+ subgraph Storage
569
+ AT --> S1[HTTP-Only Cookie]
570
+ RT --> S2[HTTP-Only Cookie]
571
+ ST --> S3[HTTP-Only Cookie + Redis]
572
+ end
573
+ \`\`\`
574
+
575
+ ### Session vs Token
576
+
577
+ | Aspect | Session Token | Access Token |
578
+ |--------|--------------|--------------|
579
+ | **Lifetime** | Long (30 days) | Short (15 min) |
580
+ | **Storage** | Redis + Database | Stateless JWT |
581
+ | **Revocable** | Yes, immediately | No (until expiry) |
582
+ | **Purpose** | Device tracking | API authentication |
583
+ | **Contains** | Session ID | User ID, permissions |
584
+
585
+ ### Role-Based Access Control
586
+
587
+ Nucleus supports role-based authorization:
588
+
589
+ \`\`\`typescript
590
+ // User roles are stored in the users table
591
+ {
592
+ id: 'uuid',
593
+ email: 'user@example.com',
594
+ role: 'admin' | 'user' | 'editor' | ...
595
+ }
596
+
597
+ // Routes check roles in middleware
598
+ entities: {
599
+ sensitiveData: {
600
+ authorizedRoles: ['admin'],
601
+ }
602
+ }
603
+ \`\`\`
604
+
605
+ ### Audit Trail
606
+
607
+ Every mutation is logged:
608
+
609
+ \`\`\`typescript
610
+ // Audit log entry
611
+ {
612
+ id: 'uuid',
613
+ userId: 'uuid', // Who
614
+ action: 'CREATE', // What action
615
+ entityType: 'users', // Which table
616
+ entityId: 'uuid', // Which record
617
+ changes: {...}, // What changed
618
+ ipAddress: '...', // From where
619
+ userAgent: '...', // Which device
620
+ createdAt: '...' // When
621
+ }
622
+ \`\`\`
623
+ `,
624
+ },
625
+ ],
626
+ },
627
+ ];
@@ -0,0 +1,36 @@
1
+ import { authenticationItems } from "./content/authentication";
2
+ import { gettingStartedItems } from "./content/gettingStarted";
3
+
4
+ export interface DocSubItem {
5
+ id: string;
6
+ title: string;
7
+ content: string;
8
+ }
9
+
10
+ export interface DocItem {
11
+ id: string;
12
+ title: string;
13
+ subItems: DocSubItem[];
14
+ }
15
+
16
+ export interface DocSection {
17
+ id: string;
18
+ title: string;
19
+ icon: string;
20
+ items: DocItem[];
21
+ }
22
+
23
+ export const docsData: DocSection[] = [
24
+ {
25
+ id: "getting-started",
26
+ title: "Getting Started",
27
+ icon: "🚀",
28
+ items: gettingStartedItems,
29
+ },
30
+ {
31
+ id: "authentication",
32
+ title: "Authentication",
33
+ icon: "🔐",
34
+ items: authenticationItems,
35
+ },
36
+ ];
@@ -0,0 +1,6 @@
1
+ export { Docs } from "./Docs";
2
+ export { DocsContent } from "./DocsContent";
3
+ export { DocsRightSidebar } from "./DocsRightSidebar";
4
+ export { DocsSidebar } from "./DocsSidebar";
5
+ export type { DocItem, DocSection, DocSubItem } from "./docsData";
6
+ export { docsData } from "./docsData";
@@ -0,0 +1,9 @@
1
+ export { Capabilities } from "./Capabilities";
2
+ export { CTA } from "./CTA";
3
+ export { Docs } from "./docs";
4
+ export { Features } from "./Features";
5
+ export { Footer } from "./Footer";
6
+ export { Hero } from "./Hero";
7
+ export { Managers } from "./Managers";
8
+ export { Nav } from "./Nav";
9
+ export { Stack } from "./Stack";