@ozdao/martyrs 0.2.585 → 0.2.586

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 (386) hide show
  1. package/dist/auth.server.js +161 -96
  2. package/dist/{authJwt-J1csaMWA.js → authJwt-DKbMMjw0.js} +33 -0
  3. package/dist/chats.server.js +2 -2
  4. package/dist/community.server.js +1 -1
  5. package/dist/core.server.js +191 -2
  6. package/dist/{core.websocket-C2FxNmZ1.js → core.websocket-Cl76z2wT.js} +41 -5
  7. package/dist/{crud-q1ye5IhV.js → crud-DpOXTZep.js} +1 -1
  8. package/dist/events.server.js +2 -2
  9. package/dist/files.server.js +1 -1
  10. package/dist/gallery.server.js +1 -1
  11. package/dist/index-kvBwwb0w.js +427 -0
  12. package/dist/inventory.server.js +2 -2
  13. package/dist/{mailing-DuEFRsa3.js → mailing-DT7nbNjZ.js} +16 -3
  14. package/dist/{main-xL-jtBkT.js → main-BIf-WirR.js} +863 -865
  15. package/dist/marketplace.server.js +1 -1
  16. package/dist/martyrs/dist/{main-xL-jtBkT.js → main-BIf-WirR.js} +192 -38
  17. package/dist/martyrs/dist/main-BIf-WirR.js.map +1 -0
  18. package/dist/martyrs/dist/{web-BA6h6Z8P.js → web-O7lXcjg0.js} +2 -2
  19. package/dist/martyrs/dist/{web-BA6h6Z8P.js.map → web-O7lXcjg0.js.map} +1 -1
  20. package/dist/martyrs/src/components/Button/{Button.vue2.js → Button.vue.js} +8 -7
  21. package/dist/martyrs/src/components/Button/Button.vue.js.map +1 -0
  22. package/dist/martyrs/src/components/Feed/Feed.vue.js +1 -1
  23. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +1 -1
  24. package/dist/martyrs/src/components/Loader/Loader.vue.js +1 -1
  25. package/dist/martyrs/src/components/Loader/Loader.vue.js.map +1 -1
  26. package/dist/martyrs/src/components/Spoiler/{Spoiler.vue2.js → Spoiler.vue.js} +2 -2
  27. package/dist/martyrs/src/components/Spoiler/Spoiler.vue.js.map +1 -0
  28. package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.js +17 -22
  29. package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.js.map +1 -1
  30. package/dist/martyrs/src/modules/auth/auth.client.js +18 -24
  31. package/dist/martyrs/src/modules/auth/auth.client.js.map +1 -1
  32. package/dist/martyrs/src/modules/auth/views/components/blocks/OtpDialog.vue.js +178 -0
  33. package/dist/martyrs/src/modules/auth/views/components/blocks/OtpDialog.vue.js.map +1 -0
  34. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
  35. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +53 -45
  36. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js.map +1 -1
  37. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js +198 -14
  38. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js.map +1 -1
  39. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +1 -1
  40. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +70 -29
  41. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js.map +1 -1
  42. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +2 -2
  43. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js.map +1 -1
  44. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +86 -30
  45. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js.map +1 -1
  46. package/dist/martyrs/src/modules/auth/views/plugins/otp.plugin.js +100 -0
  47. package/dist/martyrs/src/modules/auth/views/plugins/otp.plugin.js.map +1 -0
  48. package/dist/martyrs/src/modules/auth/views/router/auth.router.js +2 -31
  49. package/dist/martyrs/src/modules/auth/views/router/auth.router.js.map +1 -1
  50. package/dist/martyrs/src/modules/auth/views/router/users.router.js +0 -14
  51. package/dist/martyrs/src/modules/auth/views/router/users.router.js.map +1 -1
  52. package/dist/martyrs/src/modules/auth/views/store/auth.js +1 -56
  53. package/dist/martyrs/src/modules/auth/views/store/auth.js.map +1 -1
  54. package/dist/martyrs/src/modules/auth/views/store/users.js +5 -1
  55. package/dist/martyrs/src/modules/auth/views/store/users.js.map +1 -1
  56. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +1 -1
  57. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  58. package/dist/martyrs/src/modules/core/views/components/blocks/CardHeader.vue.js +0 -1
  59. package/dist/martyrs/src/modules/core/views/components/blocks/CardHeader.vue.js.map +1 -1
  60. package/dist/martyrs/src/modules/core/views/components/blocks/PopupAuth.vue.js +1 -1
  61. package/dist/martyrs/src/modules/core/views/components/blocks/PopupDateSelector.vue.js +1 -1
  62. package/dist/martyrs/src/modules/core/views/components/elements/OnlineIndicator.vue.js +74 -0
  63. package/dist/martyrs/src/modules/core/views/components/elements/OnlineIndicator.vue.js.map +1 -0
  64. package/dist/martyrs/src/modules/core/views/components/layouts/App.vue.js.map +1 -1
  65. package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js +63 -47
  66. package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js.map +1 -1
  67. package/dist/martyrs/src/modules/core/views/components/partials/Header.vue.js +1 -1
  68. package/dist/martyrs/src/modules/core/views/components/partials/Navigation.vue.js +1 -1
  69. package/dist/martyrs/src/modules/core/views/components/partials/NavigationBar.vue.js +1 -1
  70. package/dist/martyrs/src/modules/core/views/components/sections/{Filters.vue2.js → Filters.vue.js} +2 -2
  71. package/dist/martyrs/src/modules/core/views/components/sections/Filters.vue.js.map +1 -0
  72. package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  73. package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  74. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  75. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  76. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +1 -1
  77. package/dist/martyrs/src/modules/events/components/sections/EditTickets.vue.js +1 -1
  78. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  79. package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +1 -1
  80. package/dist/martyrs/src/modules/inventory/components/forms/ColumnSettingsMenu.vue.js +1 -1
  81. package/dist/martyrs/src/modules/inventory/components/forms/HistoryView.vue.js +1 -1
  82. package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +1 -1
  83. package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +1 -1
  84. package/dist/martyrs/src/modules/landing/components/sections/SectionGuide.vue.js +1 -1
  85. package/dist/martyrs/src/modules/marketplace/views/components/pages/Marketplace.vue.js +1 -1
  86. package/dist/martyrs/src/modules/music/components/blocks/ActionButtons.vue.js +1 -1
  87. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js +1 -1
  88. package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.js +1 -1
  89. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js +1 -1
  90. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js +1 -1
  91. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +1 -1
  92. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +1 -1
  93. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +1 -1
  94. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js +1 -1
  95. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +1 -1
  96. package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +1 -1
  97. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +1 -1
  98. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js +1 -1
  99. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +1 -1
  100. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +1 -1
  101. package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +1 -1
  102. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js +0 -1
  103. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js.map +1 -1
  104. package/dist/martyrs/src/modules/music/components/player/FullscreenPlayer.vue.js +1 -1
  105. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js +1 -1
  106. package/dist/martyrs/src/modules/music/components/player/PlayerControls.vue.js +1 -1
  107. package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.js +1 -1
  108. package/dist/martyrs/src/modules/notifications/components/sections/NotificationPreferences.vue.js +1 -1
  109. package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +1 -1
  110. package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js +1 -1
  111. package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js +1 -2
  112. package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js.map +1 -1
  113. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  114. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
  115. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
  116. package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js +1 -1
  117. package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js +1 -1
  118. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  119. package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.js +1 -1
  120. package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  121. package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.js +1 -1
  122. package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.js +2 -2
  123. package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.js +1 -1
  124. package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.js +1 -1
  125. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  126. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -2
  127. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js.map +1 -1
  128. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  129. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +0 -1
  130. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js.map +1 -1
  131. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +0 -1
  132. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js.map +1 -1
  133. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
  134. package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
  135. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +0 -1
  136. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js.map +1 -1
  137. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
  138. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +0 -1
  139. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js.map +1 -1
  140. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  141. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +3 -3
  142. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js.map +1 -1
  143. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +1 -1
  144. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +1 -1
  145. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +1 -1
  146. package/dist/martyrs/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
  147. package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js +1 -1
  148. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js +1 -1
  149. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  150. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +1 -1
  151. package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js +1 -1
  152. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  153. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -1
  154. package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +1 -1
  155. package/dist/martyrs/src/modules/spots/components/pages/Spot.vue.js +1 -1
  156. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +1 -1
  157. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +1 -1
  158. package/dist/martyrs.css +1 -1
  159. package/dist/martyrs.es.js +1 -1
  160. package/dist/music.server.js +1 -1
  161. package/dist/notifications.server.js +1 -1
  162. package/dist/orders.server.js +7 -6
  163. package/dist/organizations.server.js +2 -2
  164. package/dist/products.server.js +2 -2
  165. package/dist/profile.schema-C31Lynn3.js +21 -0
  166. package/dist/rents.server.js +1 -1
  167. package/dist/sessions.service-COcwjd0f.js +86 -0
  168. package/dist/style.css +178 -108
  169. package/dist/{tickets.controller-B7r0mK-5.js → tickets.controller-DdF85W-i.js} +1 -1
  170. package/dist/visitors.service-B1dhhuSo.js +83 -0
  171. package/dist/wallet.server.js +2 -2
  172. package/dist/{web-BA6h6Z8P.js → web-O7lXcjg0.js} +1 -1
  173. package/package.json +5 -1
  174. package/src/cli/commands/create.js +106 -0
  175. package/src/cli/index.js +25 -0
  176. package/src/cli/templates/app/.env.development.mustache +14 -0
  177. package/src/cli/templates/app/.env.production.mustache +14 -0
  178. package/src/cli/templates/app/Dockerfile +36 -0
  179. package/src/cli/templates/app/babel.config.js +14 -0
  180. package/src/cli/templates/app/env.js +3 -0
  181. package/src/cli/templates/app/index.js +46 -0
  182. package/src/cli/templates/app/mongodb.config.js +18 -0
  183. package/src/cli/templates/app/package.json.mustache +65 -0
  184. package/src/cli/templates/app/src/client.js +22 -0
  185. package/src/cli/templates/app/src/components/pages/Index.vue +11 -0
  186. package/src/cli/templates/app/src/configs/global.config.js.mustache +40 -0
  187. package/src/cli/templates/app/src/localization/extensions.js +2 -0
  188. package/src/cli/templates/app/src/localization/index.js +44 -0
  189. package/src/cli/templates/app/src/localization/overrides.js +2 -0
  190. package/src/cli/templates/app/src/localization/translations.js +10 -0
  191. package/src/cli/templates/app/src/models/index.js +9 -0
  192. package/src/cli/templates/app/src/router/index.js +48 -0
  193. package/src/cli/templates/app/src/scss/theme.scss +18 -0
  194. package/src/cli/templates/app/src/server.js +68 -0
  195. package/src/cli/templates/app/src/store/index.js +9 -0
  196. package/src/cli/templates/docker-compose.yaml.mustache +47 -0
  197. package/src/cli/templates/nginx/Dockerfile +5 -0
  198. package/src/cli/templates/nginx/default.conf.mustache +55 -0
  199. package/src/cli/templates/public/favicon/.gitkeep +0 -0
  200. package/src/cli/templates/start-dev.sh.mustache +131 -0
  201. package/src/cli/templates/start-prod.sh.mustache +12 -0
  202. package/src/components/Button/Button.vue +61 -15
  203. package/src/components/Loader/Loader.vue +1 -1
  204. package/src/components/Tooltip/Tooltip.vue +31 -23
  205. package/src/modules/TASKS.MD +30 -1
  206. package/src/modules/auth/CLAUDE.md +381 -0
  207. package/src/modules/auth/FIXES.md +0 -38
  208. package/src/modules/auth/auth.client.js +4 -6
  209. package/src/modules/auth/auth.server.js +4 -15
  210. package/src/modules/auth/controllers/middlewares/authJwt.js +59 -17
  211. package/src/modules/auth/controllers/middlewares/index.js +4 -1
  212. package/src/modules/auth/controllers/middlewares/otp.middleware.js +166 -0
  213. package/src/modules/auth/controllers/middlewares/verifySignUp.js +0 -1
  214. package/src/modules/auth/controllers/middlewares/verifyUser.js +58 -11
  215. package/src/modules/auth/controllers/routes/auth.routes.js +48 -6
  216. package/src/modules/auth/controllers/routes/users.routes.js +29 -8
  217. package/src/modules/auth/controllers/services/auth.service.js +62 -12
  218. package/src/modules/auth/controllers/services/otp.service.js +109 -0
  219. package/src/modules/auth/controllers/services/users.service.js +46 -6
  220. package/src/modules/auth/models/otp.model.js +20 -0
  221. package/src/modules/auth/views/components/blocks/OtpDialog.vue +168 -0
  222. package/src/modules/auth/views/components/pages/Profile.vue +18 -13
  223. package/src/modules/auth/views/components/pages/ProfileEditAccount.vue +199 -45
  224. package/src/modules/auth/views/components/pages/ResetPassword.vue +170 -132
  225. package/src/modules/auth/views/components/pages/SignIn.vue +2 -1
  226. package/src/modules/auth/views/components/pages/SignUp.vue +203 -147
  227. package/src/modules/auth/views/plugins/otp.plugin.js +104 -0
  228. package/src/modules/auth/views/router/auth.router.js +1 -24
  229. package/src/modules/auth/views/router/users.router.js +1 -12
  230. package/src/modules/auth/views/store/auth.js +0 -68
  231. package/src/modules/auth/views/store/users.js +6 -2
  232. package/src/modules/core/controllers/classes/core.websocket.js +57 -6
  233. package/src/modules/core/controllers/middlewares/visitor.logger.js +49 -0
  234. package/src/modules/core/controllers/services/requests.service.js +53 -0
  235. package/src/modules/core/controllers/services/sessions.service.js +98 -0
  236. package/src/modules/core/controllers/services/visitors.service.js +102 -0
  237. package/src/modules/core/controllers/utils/mailing.js +16 -3
  238. package/src/modules/core/core.server.js +45 -3
  239. package/src/modules/core/models/request.model.js +30 -0
  240. package/src/modules/core/models/session.model.js +43 -0
  241. package/src/modules/core/models/visitor.model.js +28 -0
  242. package/src/modules/core/views/components/elements/OnlineIndicator.vue +115 -0
  243. package/src/modules/core/views/components/layouts/App.vue +2 -2
  244. package/src/modules/core/views/components/layouts/Client.vue +443 -477
  245. package/src/modules/orders/controllers/orders.controller.js +3 -3
  246. package/src/modules/products/components/pages/Products.vue +1 -1
  247. package/dist/_virtual/alignment-pattern.js +0 -5
  248. package/dist/_virtual/alignment-pattern.js.map +0 -1
  249. package/dist/_virtual/browser.js +0 -8
  250. package/dist/_virtual/browser.js.map +0 -1
  251. package/dist/_virtual/browser2.js +0 -5
  252. package/dist/_virtual/browser2.js.map +0 -1
  253. package/dist/_virtual/canvas.js +0 -5
  254. package/dist/_virtual/canvas.js.map +0 -1
  255. package/dist/_virtual/dijkstra.js +0 -5
  256. package/dist/_virtual/dijkstra.js.map +0 -1
  257. package/dist/_virtual/error-correction-code.js +0 -5
  258. package/dist/_virtual/error-correction-code.js.map +0 -1
  259. package/dist/_virtual/error-correction-level.js +0 -5
  260. package/dist/_virtual/error-correction-level.js.map +0 -1
  261. package/dist/_virtual/finder-pattern.js +0 -5
  262. package/dist/_virtual/finder-pattern.js.map +0 -1
  263. package/dist/_virtual/format-info.js +0 -5
  264. package/dist/_virtual/format-info.js.map +0 -1
  265. package/dist/_virtual/galois-field.js +0 -5
  266. package/dist/_virtual/galois-field.js.map +0 -1
  267. package/dist/_virtual/mask-pattern.js +0 -5
  268. package/dist/_virtual/mask-pattern.js.map +0 -1
  269. package/dist/_virtual/mode.js +0 -5
  270. package/dist/_virtual/mode.js.map +0 -1
  271. package/dist/_virtual/polynomial.js +0 -5
  272. package/dist/_virtual/polynomial.js.map +0 -1
  273. package/dist/_virtual/qrcode.js +0 -5
  274. package/dist/_virtual/qrcode.js.map +0 -1
  275. package/dist/_virtual/regex.js +0 -5
  276. package/dist/_virtual/regex.js.map +0 -1
  277. package/dist/_virtual/segments.js +0 -5
  278. package/dist/_virtual/segments.js.map +0 -1
  279. package/dist/_virtual/svg-tag.js +0 -5
  280. package/dist/_virtual/svg-tag.js.map +0 -1
  281. package/dist/_virtual/utils.js +0 -5
  282. package/dist/_virtual/utils.js.map +0 -1
  283. package/dist/_virtual/utils2.js +0 -5
  284. package/dist/_virtual/utils2.js.map +0 -1
  285. package/dist/_virtual/version-check.js +0 -5
  286. package/dist/_virtual/version-check.js.map +0 -1
  287. package/dist/_virtual/version.js +0 -5
  288. package/dist/_virtual/version.js.map +0 -1
  289. package/dist/index-_Edcmck_.js +0 -170
  290. package/dist/martyrs/dist/main-xL-jtBkT.js.map +0 -1
  291. package/dist/martyrs/node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.js +0 -1336
  292. package/dist/martyrs/node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.js.map +0 -1
  293. package/dist/martyrs/src/components/Button/Button.vue2.js.map +0 -1
  294. package/dist/martyrs/src/components/Spoiler/Spoiler.vue2.js.map +0 -1
  295. package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.js +0 -166
  296. package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.js.map +0 -1
  297. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +0 -118
  298. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js.map +0 -1
  299. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +0 -360
  300. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js.map +0 -1
  301. package/dist/martyrs/src/modules/auth/views/store/twofa.js +0 -40
  302. package/dist/martyrs/src/modules/auth/views/store/twofa.js.map +0 -1
  303. package/dist/martyrs/src/modules/core/views/components/sections/Filters.vue2.js.map +0 -1
  304. package/dist/martyrs/src/modules/wallet/views/components/blocks/CardBalanceReplenished.vue.js +0 -43
  305. package/dist/martyrs/src/modules/wallet/views/components/blocks/CardBalanceReplenished.vue.js.map +0 -1
  306. package/dist/martyrs/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +0 -47
  307. package/dist/martyrs/src/modules/wallet/views/components/blocks/CardDeposit.vue.js.map +0 -1
  308. package/dist/martyrs/src/modules/wallet/views/components/blocks/CashDeposit.vue.js +0 -29
  309. package/dist/martyrs/src/modules/wallet/views/components/blocks/CashDeposit.vue.js.map +0 -1
  310. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +0 -89
  311. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js.map +0 -1
  312. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDepositProcessing.vue.js +0 -136
  313. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDepositProcessing.vue.js.map +0 -1
  314. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +0 -238
  315. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js.map +0 -1
  316. package/dist/martyrs/src/modules/wallet/views/localization/wallet.json.js +0 -9
  317. package/dist/martyrs/src/modules/wallet/views/localization/wallet.json.js.map +0 -1
  318. package/dist/martyrs/src/modules/wallet/views/store/wallet.store.js +0 -134
  319. package/dist/martyrs/src/modules/wallet/views/store/wallet.store.js.map +0 -1
  320. package/dist/node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.js +0 -106
  321. package/dist/node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.js.map +0 -1
  322. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/browser.js +0 -79
  323. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/browser.js.map +0 -1
  324. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/can-promise.js +0 -14
  325. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/can-promise.js.map +0 -1
  326. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alignment-pattern.js +0 -43
  327. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alignment-pattern.js.map +0 -1
  328. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alphanumeric-data.js +0 -85
  329. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alphanumeric-data.js.map +0 -1
  330. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-buffer.js +0 -40
  331. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-buffer.js.map +0 -1
  332. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-matrix.js +0 -34
  333. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-matrix.js.map +0 -1
  334. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/byte-data.js +0 -36
  335. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/byte-data.js.map +0 -1
  336. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-code.js +0 -367
  337. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-code.js.map +0 -1
  338. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-level.js +0 -52
  339. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-level.js.map +0 -1
  340. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/finder-pattern.js +0 -25
  341. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/finder-pattern.js.map +0 -1
  342. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/format-info.js +0 -24
  343. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/format-info.js.map +0 -1
  344. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/galois-field.js +0 -38
  345. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/galois-field.js.map +0 -1
  346. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/kanji-data.js +0 -46
  347. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/kanji-data.js.map +0 -1
  348. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mask-pattern.js +0 -149
  349. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mask-pattern.js.map +0 -1
  350. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js +0 -90
  351. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js.map +0 -1
  352. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/numeric-data.js +0 -41
  353. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/numeric-data.js.map +0 -1
  354. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/polynomial.js +0 -44
  355. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/polynomial.js.map +0 -1
  356. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/qrcode.js +0 -279
  357. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/qrcode.js.map +0 -1
  358. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/reed-solomon-encoder.js +0 -38
  359. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/reed-solomon-encoder.js.map +0 -1
  360. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/regex.js +0 -33
  361. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/regex.js.map +0 -1
  362. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/segments.js +0 -201
  363. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/segments.js.map +0 -1
  364. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +0 -84
  365. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js.map +0 -1
  366. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version-check.js +0 -14
  367. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version-check.js.map +0 -1
  368. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version.js +0 -107
  369. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version.js.map +0 -1
  370. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/canvas.js +0 -61
  371. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/canvas.js.map +0 -1
  372. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg-tag.js +0 -64
  373. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg-tag.js.map +0 -1
  374. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +0 -87
  375. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js.map +0 -1
  376. package/dist/profile.schema-CjLOfG7b.js +0 -92
  377. package/src/modules/auth/controllers/middlewares/visitor.logger.js +0 -75
  378. package/src/modules/auth/controllers/routes/twofa.routes.js +0 -8
  379. package/src/modules/auth/controllers/services/twofa.service.js +0 -30
  380. package/src/modules/auth/models/request.model.js +0 -14
  381. package/src/modules/auth/models/visitor.model.js +0 -11
  382. package/src/modules/auth/views/components/pages/EnterCode.vue +0 -204
  383. package/src/modules/auth/views/components/pages/EnterPassword.vue +0 -123
  384. package/src/modules/auth/views/components/sections/ProfileEditCredentials.vue +0 -329
  385. package/src/modules/auth/views/store/twofa.js +0 -70
  386. package/src/modules/auth//320/220/320/240/320/245/320/230/320/242/320/225/320/232/320/242/320/243/320/240/320/220.md +0 -445
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ozdao/martyrs",
3
- "version": "0.2.585",
3
+ "version": "0.2.586",
4
4
  "description": "Fullstack framework focused on user experience and ease of development.",
5
5
  "author": "OZ DAO <hello@ozdao.dev>",
6
6
  "license": "GPL-3.0-or-later",
@@ -15,6 +15,9 @@
15
15
  "vue3",
16
16
  "express"
17
17
  ],
18
+ "bin": {
19
+ "martyrs": "./src/cli/index.js"
20
+ },
18
21
  "type": "module",
19
22
  "sideEffects": [
20
23
  "*.css",
@@ -73,6 +76,7 @@
73
76
  },
74
77
  "dependencies": {
75
78
  "@capacitor/core": "7.4.4",
79
+ "commander": "12.1.0",
76
80
  "@capacitor/preferences": "7.0.2",
77
81
  "@googlemaps/google-maps-services-js": "3.4.0",
78
82
  "@vitejs/plugin-vue": "6.0.1",
@@ -0,0 +1,106 @@
1
+ import { mkdir, readFile, writeFile, readdir, stat, chmod, copyFile } from 'fs/promises';
2
+ import { join, dirname, relative } from 'path';
3
+ import { fileURLToPath } from 'url';
4
+ import Mustache from 'mustache';
5
+ import { execSync } from 'child_process';
6
+
7
+ const __filename = fileURLToPath(import.meta.url);
8
+ const __dirname = dirname(__filename);
9
+
10
+ const TEMPLATES_DIR = join(__dirname, '../templates');
11
+
12
+ export async function createProject(projectName, options) {
13
+ const targetDir = join(process.cwd(), projectName);
14
+
15
+ console.log(`\nCreating project: ${projectName}\n`);
16
+
17
+ // Контекст для шаблонов
18
+ const context = {
19
+ projectName,
20
+ projectNameLower: projectName.toLowerCase().replace(/[^a-z0-9]/g, ''),
21
+ martyrsVersion: '^0.2.585',
22
+ year: new Date().getFullYear(),
23
+ port: '8040',
24
+ portNginx: '8041',
25
+ portWss: '8020',
26
+ };
27
+
28
+ // Копируем шаблоны
29
+ await copyTemplates(TEMPLATES_DIR, targetDir, context);
30
+
31
+ // Делаем скрипты исполняемыми
32
+ try {
33
+ await chmod(join(targetDir, 'start-dev.sh'), 0o755);
34
+ await chmod(join(targetDir, 'start-prod.sh'), 0o755);
35
+ } catch (e) {
36
+ // Игнорируем если файлов нет
37
+ }
38
+
39
+ // Git init
40
+ try {
41
+ execSync('git init', { cwd: targetDir, stdio: 'pipe' });
42
+ console.log('✓ Git repository initialized');
43
+ } catch (e) {
44
+ console.log('⚠ Git init skipped');
45
+ }
46
+
47
+ // pnpm install
48
+ if (!options.skipInstall) {
49
+ console.log('\nInstalling dependencies...\n');
50
+ try {
51
+ execSync('pnpm install', { cwd: join(targetDir, 'app'), stdio: 'inherit' });
52
+ console.log('\n✓ Dependencies installed');
53
+ } catch (e) {
54
+ console.log('\n⚠ Install failed. Run manually: cd app && pnpm install');
55
+ }
56
+ }
57
+
58
+ // Инструкции
59
+ console.log(`
60
+ ═══════════════════════════════════════════
61
+ Project "${projectName}" created!
62
+ ═══════════════════════════════════════════
63
+
64
+ Next steps:
65
+
66
+ cd ${projectName}/app
67
+ ${options.skipInstall ? 'pnpm install\n ' : ''}pnpm dev:nginx
68
+
69
+ Then open: http://localhost:${context.portNginx}
70
+
71
+ ═══════════════════════════════════════════
72
+ `);
73
+ }
74
+
75
+ async function copyTemplates(srcDir, destDir, context) {
76
+ await mkdir(destDir, { recursive: true });
77
+
78
+ const entries = await readdir(srcDir, { withFileTypes: true });
79
+
80
+ for (const entry of entries) {
81
+ const srcPath = join(srcDir, entry.name);
82
+ let destName = entry.name;
83
+
84
+ // Убираем .mustache из имени
85
+ if (destName.endsWith('.mustache')) {
86
+ destName = destName.replace('.mustache', '');
87
+ }
88
+
89
+ const destPath = join(destDir, destName);
90
+
91
+ if (entry.isDirectory()) {
92
+ await copyTemplates(srcPath, destPath, context);
93
+ } else {
94
+ const content = await readFile(srcPath, 'utf8');
95
+
96
+ // Обрабатываем .mustache файлы
97
+ let output = content;
98
+ if (entry.name.endsWith('.mustache')) {
99
+ output = Mustache.render(content, context);
100
+ }
101
+
102
+ await mkdir(dirname(destPath), { recursive: true });
103
+ await writeFile(destPath, output);
104
+ }
105
+ }
106
+ }
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { program } from 'commander';
4
+ import { createProject } from './commands/create.js';
5
+ import { fileURLToPath } from 'url';
6
+ import { dirname, join } from 'path';
7
+ import { readFileSync } from 'fs';
8
+
9
+ const __filename = fileURLToPath(import.meta.url);
10
+ const __dirname = dirname(__filename);
11
+
12
+ const pkg = JSON.parse(readFileSync(join(__dirname, '../../package.json'), 'utf8'));
13
+
14
+ program
15
+ .name('martyrs')
16
+ .description('CLI for @ozdao/martyrs framework')
17
+ .version(pkg.version);
18
+
19
+ program
20
+ .command('create <project-name>')
21
+ .description('Create a new martyrs project')
22
+ .option('--skip-install', 'Skip pnpm install after creation')
23
+ .action(createProject);
24
+
25
+ program.parse();
@@ -0,0 +1,14 @@
1
+ NODE_ENV=development
2
+ PORT={{port}}
3
+ PORT_WSS={{portWss}}
4
+ SSL=false
5
+ APP_NAME={{projectName}}
6
+
7
+ DOMAIN_URL=localhost
8
+ API_URL=http://localhost:{{port}}
9
+ WSS_URL=ws://localhost:{{portNginx}}/api/ws
10
+
11
+ DB_ADDRESS='mongodb://localhost:27017/{{projectNameLower}}?authSource=admin'
12
+ SECRET_KEY=change-me-in-production
13
+
14
+ GOOGLE_TAG_ID=
@@ -0,0 +1,14 @@
1
+ NODE_ENV=production
2
+ PORT=8080
3
+ PORT_WSS=8020
4
+ SSL=false
5
+ APP_NAME={{projectName}}
6
+
7
+ DOMAIN_URL=example.com
8
+ API_URL=https://example.com
9
+ WSS_URL=wss://example.com/api/ws
10
+
11
+ DB_ADDRESS='mongodb://user:password@localhost:27017/{{projectNameLower}}?authSource=admin'
12
+ SECRET_KEY=change-me-in-production
13
+
14
+ GOOGLE_TAG_ID=
@@ -0,0 +1,36 @@
1
+ FROM node:22.14.0-alpine
2
+
3
+ WORKDIR /app
4
+
5
+ RUN apk update && apk upgrade && apk add --no-cache \
6
+ build-base \
7
+ git \
8
+ make \
9
+ gcc \
10
+ g++ \
11
+ libc6-compat \
12
+ vips-dev \
13
+ python3 \
14
+ py3-setuptools \
15
+ linux-headers \
16
+ libuv-dev \
17
+ openssl-dev \
18
+ zlib-dev
19
+
20
+ COPY app/package*.json ./
21
+ COPY public/sw.js public/sw.js
22
+
23
+ RUN corepack enable
24
+ RUN corepack prepare pnpm@latest --activate
25
+
26
+ RUN pnpm install
27
+
28
+ COPY app/ .
29
+
30
+ ENV TZ=Europe/Moscow
31
+
32
+ EXPOSE 8080
33
+
34
+ RUN pnpm run build
35
+
36
+ CMD ["pnpm", "run", "start"]
@@ -0,0 +1,14 @@
1
+ module.exports = {
2
+ presets: [
3
+ [
4
+ '@babel/preset-env',
5
+ {
6
+ useBuiltIns: 'usage',
7
+ corejs: { version: 3, proposals: true },
8
+ debug: false,
9
+ },
10
+ ],
11
+ ['@babel/preset-flow']
12
+ ],
13
+ plugins:['@babel/transform-runtime'],
14
+ };
@@ -0,0 +1,3 @@
1
+ import dotenv from 'dotenv';
2
+
3
+ dotenv.config({ path: `.env.${process.env.NODE_ENV}` });
@@ -0,0 +1,46 @@
1
+ import './env.js';
2
+ import path from 'path';
3
+ import { fileURLToPath } from 'url';
4
+ import { rspack } from '@rspack/core';
5
+
6
+ const __filename = fileURLToPath(import.meta.url);
7
+ const projectRoot = path.dirname(__filename);
8
+
9
+ const command = process.argv[2];
10
+ const MODE = process.env.MODE || 'SSR';
11
+ const isDev = process.env.NODE_ENV !== 'production';
12
+
13
+ import {
14
+ createSsrRspackDevServer,
15
+ createSsrProdServer,
16
+ createSpaRspackDevServer,
17
+ createSpaProdServer,
18
+ rspackConfigs
19
+ } from '@ozdao/martyrs/builder';
20
+ import createServer from './src/server.js';
21
+
22
+ const configs = {
23
+ api: rspackConfigs.apiConfig(projectRoot),
24
+ spa: rspackConfigs.spaConfig(projectRoot),
25
+ client: rspackConfigs.clientConfig(projectRoot),
26
+ ssr: rspackConfigs.ssrConfig(projectRoot)
27
+ };
28
+
29
+ if (command === 'build') {
30
+ const toBuild = MODE === 'SSR' ? [configs.client, configs.ssr] : [configs.spa];
31
+
32
+ for (const config of toBuild) {
33
+ const compiler = rspack(config);
34
+ await new Promise(resolve => compiler.run(() => compiler.close(resolve)));
35
+ }
36
+
37
+ console.log('Build done');
38
+ process.exit(0);
39
+ }
40
+
41
+ const serverFunc = MODE === 'SSR'
42
+ ? (isDev ? createSsrRspackDevServer : createSsrProdServer)
43
+ : (isDev ? createSpaRspackDevServer : createSpaProdServer);
44
+
45
+ const start = serverFunc(projectRoot, configs, createServer);
46
+ start();
@@ -0,0 +1,18 @@
1
+ let adressDB = process.env.DB_ADDRESS;
2
+
3
+ import db from "./src/models/index.js";
4
+
5
+ db.mongoose
6
+ .connect(adressDB, {
7
+ connectTimeoutMS: 20000,
8
+ socketTimeoutMS: 50000,
9
+ })
10
+ .then(() => {
11
+ console.log("Successfully connect to MongoDB.");
12
+ })
13
+ .catch(err => {
14
+ console.error("Connection error", err);
15
+ process.exit();
16
+ });
17
+
18
+ export default db;
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "{{projectName}}",
3
+ "version": "0.0.1",
4
+ "description": "Project created with @ozdao/martyrs",
5
+ "author": "",
6
+ "license": "ISC",
7
+ "private": true,
8
+ "type": "module",
9
+ "main": "./index.js",
10
+ "scripts": {
11
+ "preinstall": "npx only-allow pnpm",
12
+ "dev": "NODE_ENV=development node --loader esm-module-alias/loader index.js",
13
+ "dev:spa": "NODE_ENV=development MODE=SPA node --loader esm-module-alias/loader index.js",
14
+ "dev:nginx": "../start-dev.sh",
15
+ "build": "NODE_ENV=production node --loader esm-module-alias/loader index.js build",
16
+ "build:spa": "NODE_ENV=production MODE=SPA node --loader esm-module-alias/loader index.js build",
17
+ "start": "NODE_ENV=production node --loader esm-module-alias/loader index.js",
18
+ "start:nginx": "../start-prod.sh"
19
+ },
20
+ "dependencies": {
21
+ "@ozdao/martyrs": "{{martyrsVersion}}",
22
+ "@rspack/cli": "1.5.3",
23
+ "@unhead/ssr": "1.9.16",
24
+ "@unhead/vue": "1.9.16",
25
+ "@vue/compiler-sfc": "3.4.38",
26
+ "@vue/server-renderer": "3.5.13",
27
+ "axios": "1.7.4",
28
+ "cookie-parser": "1.4.6",
29
+ "cors": "2.8.5",
30
+ "express": "4.19.2",
31
+ "js-cookie": "3.0.5",
32
+ "mongodb": "6.8.0",
33
+ "mongoose": "8.5.3",
34
+ "mustache": "4.2.0",
35
+ "uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.56.0",
36
+ "vue": "3.5.13",
37
+ "vue-i18n": "9.14.0",
38
+ "vue-router": "4.4.3",
39
+ "webpack-dev-middleware": "7.3.0"
40
+ },
41
+ "devDependencies": {
42
+ "@babel/core": "7.25.2",
43
+ "@babel/plugin-transform-runtime": "7.24.7",
44
+ "@babel/preset-env": "7.25.3",
45
+ "@babel/preset-flow": "7.24.7",
46
+ "@babel/runtime": "7.27.0",
47
+ "@rspack/core": "1.5.3",
48
+ "babel-loader": "9.1.3",
49
+ "body-parser": "1.20.2",
50
+ "core-js": "3.38.0",
51
+ "css-loader": "7.1.2",
52
+ "dotenv": "16.4.5",
53
+ "esm-module-alias": "2.2.1",
54
+ "only-allow": "1.2.1",
55
+ "sass": "1.77.8",
56
+ "sass-loader": "16.0.0",
57
+ "vue-loader": "17.4.2"
58
+ },
59
+ "aliases": {
60
+ "@": "./src"
61
+ },
62
+ "_moduleAliases": {
63
+ "@": "./src"
64
+ }
65
+ }
@@ -0,0 +1,22 @@
1
+ import 'martyrs-jit.css';
2
+ import '@/scss/theme.scss';
3
+
4
+ import { createUniversalApp } from '@ozdao/martyrs/modules/core/client';
5
+
6
+ import { getConfig } from '@/configs/global.config.js';
7
+ import { getRouter } from '@/router/index.js';
8
+ import { getStore } from '@/store/index.js';
9
+ import { getLocales } from '@/localization/index.js';
10
+
11
+ const appPromise = createUniversalApp({
12
+ getConfig,
13
+ getRouter,
14
+ getLocales,
15
+ getStore,
16
+ });
17
+
18
+ export async function _renderApp({ url, cookies, languages, ssrContext }) {
19
+ const { renderApp } = await appPromise;
20
+
21
+ return renderApp({ url, cookies, languages, ssrContext });
22
+ }
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <div class="wrapper pd-medium">
3
+ <div class="flex flex-column gap-medium align-center justify-center h-100vh">
4
+ <h1 class="t-center">{{ $t('welcome') }}</h1>
5
+ <p class="t-dark-semi t-center">Your martyrs project is ready!</p>
6
+ </div>
7
+ </div>
8
+ </template>
9
+
10
+ <script setup>
11
+ </script>
@@ -0,0 +1,40 @@
1
+ export async function getConfig() {
2
+ return {
3
+ env: {
4
+ isMobileApp: process.env.MOBILE_APP || false,
5
+ },
6
+
7
+ core: {
8
+ websocket: true,
9
+ },
10
+
11
+ app: {
12
+ support: {
13
+ url: 'https://t.me/support'
14
+ },
15
+ messages: {
16
+ en: {
17
+ meta: {
18
+ title: '{{projectName}}',
19
+ description: 'Project built with @ozdao/martyrs',
20
+ },
21
+ },
22
+ ru: {
23
+ meta: {
24
+ title: '{{projectName}}',
25
+ description: 'Проект на @ozdao/martyrs',
26
+ },
27
+ }
28
+ }
29
+ },
30
+
31
+ modules: {
32
+ auth: {
33
+ loader: () => import('@ozdao/martyrs/modules/auth/client'),
34
+ routes: ['/'],
35
+ priority: 'high',
36
+ dependencies: []
37
+ },
38
+ },
39
+ };
40
+ }
@@ -0,0 +1,2 @@
1
+ export default {
2
+ };
@@ -0,0 +1,44 @@
1
+ import { createI18n } from 'vue-i18n';
2
+ import { i18nManager } from '@ozdao/martyrs/modules/core/client';
3
+
4
+ import translations from './translations.js';
5
+ import overrides from './overrides.js';
6
+ import extensions from './extensions.js';
7
+
8
+ const supportedLocales = {
9
+ en: "🇬🇧 EN",
10
+ ru: "🇷🇺 RU"
11
+ };
12
+
13
+ export function getLocales() {
14
+ if (translations) {
15
+ Object.entries(translations).forEach(([module, locales]) => {
16
+ i18nManager.register(module, locales);
17
+ });
18
+ }
19
+
20
+ if (extensions) {
21
+ Object.entries(extensions).forEach(([module, locales]) => {
22
+ i18nManager.extend(module, locales);
23
+ });
24
+ }
25
+
26
+ if (overrides) {
27
+ Object.entries(overrides).forEach(([module, locales]) => {
28
+ i18nManager.override(module, locales);
29
+ });
30
+ }
31
+
32
+ const messages = i18nManager.getAllMessages();
33
+
34
+ const i18n = createI18n({
35
+ legacy: false,
36
+ locale: 'en',
37
+ fallbackLocale: 'en',
38
+ messages,
39
+ globalInjection: true,
40
+ availableLocales: Object.keys(supportedLocales),
41
+ });
42
+
43
+ return i18n;
44
+ }
@@ -0,0 +1,2 @@
1
+ export default {
2
+ };
@@ -0,0 +1,10 @@
1
+ export default {
2
+ app: {
3
+ en: {
4
+ welcome: 'Welcome',
5
+ },
6
+ ru: {
7
+ welcome: 'Добро пожаловать',
8
+ }
9
+ }
10
+ };
@@ -0,0 +1,9 @@
1
+ import mongoose from 'mongoose';
2
+
3
+ mongoose.Promise = global.Promise;
4
+
5
+ const db = { mongoose: mongoose };
6
+
7
+ db.ROLES = ["user", "admin", "moderator"];
8
+
9
+ export default db;
@@ -0,0 +1,48 @@
1
+ import {
2
+ createRouter,
3
+ createMemoryHistory,
4
+ createWebHistory,
5
+ } from 'vue-router';
6
+
7
+ import { scrollBehavior, layoutClient, Header, Sidebar, Navigation, NavigationBar } from '@ozdao/martyrs/modules/core/client';
8
+
9
+ const isServer = typeof window === 'undefined';
10
+
11
+ let history = isServer ? createMemoryHistory() : createWebHistory();
12
+
13
+ const routes = [{
14
+ path: '/:locale?',
15
+
16
+ components: {
17
+ default: layoutClient
18
+ },
19
+
20
+ name: 'Home',
21
+
22
+ meta: {
23
+ header: Header,
24
+ sidebar: Sidebar,
25
+ sidebar_navigation: Navigation,
26
+ navigationbar: NavigationBar,
27
+ },
28
+
29
+ children: [{
30
+ path: '',
31
+ name: "Index",
32
+ meta: {
33
+ title: {
34
+ en: 'Home',
35
+ ru: 'Главная'
36
+ },
37
+ },
38
+ component: () => import('@/components/pages/Index.vue'),
39
+ }]
40
+ }];
41
+
42
+ export function getRouter() {
43
+ return createRouter({
44
+ routes,
45
+ history,
46
+ scrollBehavior
47
+ });
48
+ }
@@ -0,0 +1,18 @@
1
+ @import '/node_modules/@ozdao/martyrs/dist/style.css';
2
+ @import '/node_modules/@ozdao/martyrs/src/styles/theme.scss';
3
+
4
+ :root {
5
+ color-scheme: light dark;
6
+
7
+ --main: 59, 130, 246;
8
+ --second: 139, 92, 246;
9
+ --third: 34, 197, 94;
10
+
11
+ --black: 0, 0, 0;
12
+ --dark: 64, 64, 64;
13
+ --grey: 156, 163, 175;
14
+ --light: 243, 244, 246;
15
+ --white: 255, 255, 255;
16
+
17
+ --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
18
+ }
@@ -0,0 +1,68 @@
1
+ import path from 'path';
2
+ import express from 'express';
3
+ import cors from 'cors';
4
+ import cookies from 'cookie-parser';
5
+ import http from 'http';
6
+ import dotenv from 'dotenv';
7
+ import { fileURLToPath } from 'url';
8
+
9
+ import core from '@ozdao/martyrs/modules/core/server';
10
+ import auth from '@ozdao/martyrs/modules/auth/server';
11
+ import db from '../mongodb.config.js';
12
+
13
+ const __filename = fileURLToPath(import.meta.url);
14
+ const __dirname = path.dirname(__filename);
15
+
16
+ dotenv.config({ path: `.env.${process.env.NODE_ENV}` });
17
+
18
+ const port = process.env.PORT || 8080;
19
+ const publicPath = path.join(__dirname, '../../public');
20
+
21
+ const createServer = async () => {
22
+ const app = express();
23
+
24
+ const allowedOrigins = [
25
+ process.env.API_URL,
26
+ 'http://localhost',
27
+ 'http://localhost:8080',
28
+ 'http://localhost:8040',
29
+ 'http://localhost:8041',
30
+ 'http://localhost:3000',
31
+ ];
32
+
33
+ app.use(cors({
34
+ credentials: true,
35
+ origin: (origin, callback) => {
36
+ if (allowedOrigins.includes(origin) || !origin) {
37
+ callback(null, true);
38
+ } else {
39
+ callback(new Error('Origin not allowed by CORS'));
40
+ }
41
+ },
42
+ }));
43
+
44
+ app.set("trust proxy", 1);
45
+ app.use(express.json());
46
+ app.use(express.urlencoded({ extended: true }));
47
+ app.use(cookies());
48
+ app.use(express.static(path.resolve(__dirname, "../../public")));
49
+
50
+ const server = http.createServer(app);
51
+
52
+ const wss = await core.WebSocketManager();
53
+
54
+ wss.listen(process.env.PORT_WSS || 8020, () => {
55
+ console.log(`WebSocket server listening on port ${process.env.PORT_WSS || 8020}`);
56
+ });
57
+
58
+ core.initialize(app, db, allowedOrigins, publicPath);
59
+ auth.initialize(app, db, allowedOrigins, publicPath);
60
+
61
+ return { app, server };
62
+ };
63
+
64
+ export { createServer };
65
+
66
+ export default {
67
+ createServer
68
+ };
@@ -0,0 +1,9 @@
1
+ import { useStore } from '@ozdao/martyrs/modules/core/client';
2
+
3
+ export function getStore() {
4
+ return useStore();
5
+ }
6
+
7
+ export { useStore };
8
+
9
+ export default useStore();