├── .env.example ├── .gitattributes ├── .prettierignore ├── .eslintignore ├── apps ├── consumer │ ├── src │ │ ├── consumers │ │ │ ├── index.ts │ │ │ └── cms │ │ │ │ └── index.ts │ │ ├── logger │ │ │ ├── index.ts │ │ │ └── consumer-logger.ts │ │ ├── controllers │ │ │ ├── index.ts │ │ │ └── health.controller.ts │ │ └── index.ts │ ├── nodemon.json │ ├── tsconfig.json │ └── package.json ├── texpress-api │ ├── src │ │ ├── schemas │ │ │ ├── index.ts │ │ │ └── tokens.ts │ │ ├── logger │ │ │ ├── index.ts │ │ │ └── api-logger.ts │ │ ├── entities │ │ │ ├── index.ts │ │ │ └── token.entity.ts │ │ ├── providers │ │ │ └── index.ts │ │ ├── types │ │ │ ├── enums │ │ │ │ ├── index.ts │ │ │ │ └── social-login-enum.ts │ │ │ ├── interfaces │ │ │ │ ├── index.ts │ │ │ │ └── social-login.interface.ts │ │ │ └── index.ts │ │ ├── exceptions │ │ │ ├── formats │ │ │ │ └── index.ts │ │ │ ├── handlers │ │ │ │ └── index.ts │ │ │ ├── interfaces │ │ │ │ ├── index.ts │ │ │ │ └── api-error-payloads.interface.ts │ │ │ └── index.ts │ │ ├── controllers │ │ │ ├── index.ts │ │ │ ├── api │ │ │ │ └── index.ts │ │ │ └── fallbacks │ │ │ │ └── index.ts │ │ ├── dtos │ │ │ ├── socail-login.dtos.ts │ │ │ ├── index.ts │ │ │ ├── refresh-token.dto.ts │ │ │ └── verify-otp.dto.ts │ │ ├── services │ │ │ ├── index.ts │ │ │ └── user.service.ts │ │ ├── configs │ │ │ ├── index.ts │ │ │ ├── server.config.ts │ │ │ ├── social-login.config.ts │ │ │ └── common.config.ts │ │ └── validators │ │ │ ├── index.ts │ │ │ ├── refresh-token.validator.ts │ │ │ └── verify-otp.validator.ts │ ├── test │ │ ├── utils │ │ │ └── constants.ts │ │ └── e2e │ │ │ ├── jest-e2e.json │ │ │ └── app │ │ │ └── app.e2e-spec.ts │ ├── nodemon.json │ ├── tsconfig.json │ └── .babelrc.json └── texpress-cms │ ├── public │ ├── backend │ │ ├── vendor │ │ │ ├── @popperjs │ │ │ │ └── core │ │ │ │ │ └── dist │ │ │ │ │ ├── esm │ │ │ │ │ ├── types.js │ │ │ │ │ ├── utils │ │ │ │ │ │ ├── getAltAxis.js │ │ │ │ │ │ ├── math.js │ │ │ │ │ │ ├── getVariation.js │ │ │ │ │ │ ├── getAltLen.js │ │ │ │ │ │ ├── getBasePlacement.js │ │ │ │ │ │ ├── getMainAxisFromPlacement.js │ │ │ │ │ │ ├── getFreshSideObject.js │ │ │ │ │ │ ├── expandToHashMap.js │ │ │ │ │ │ ├── mergePaddingObject.js │ │ │ │ │ │ ├── rectToClientRect.js │ │ │ │ │ │ ├── getOppositeVariationPlacement.js │ │ │ │ │ │ ├── within.js │ │ │ │ │ │ ├── uniqueBy.js │ │ │ │ │ │ ├── getOppositePlacement.js │ │ │ │ │ │ ├── format.js │ │ │ │ │ │ ├── debounce.js │ │ │ │ │ │ └── mergeByName.js │ │ │ │ │ ├── dom-utils │ │ │ │ │ │ ├── getNodeName.js │ │ │ │ │ │ ├── getComputedStyle.js │ │ │ │ │ │ ├── getHTMLElementScroll.js │ │ │ │ │ │ ├── isTableElement.js │ │ │ │ │ │ ├── getWindowScroll.js │ │ │ │ │ │ ├── getWindow.js │ │ │ │ │ │ ├── getDocumentElement.js │ │ │ │ │ │ ├── getNodeScroll.js │ │ │ │ │ │ ├── isScrollParent.js │ │ │ │ │ │ ├── getScrollParent.js │ │ │ │ │ │ ├── instanceOf.js │ │ │ │ │ │ ├── contains.js │ │ │ │ │ │ └── getWindowScrollBarX.js │ │ │ │ │ ├── popper-base.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── modifiers │ │ │ │ │ │ └── index.js │ │ │ │ │ └── popper-lite.js │ │ │ │ │ ├── cjs │ │ │ │ │ ├── enums.js.flow │ │ │ │ │ ├── popper.js.flow │ │ │ │ │ ├── popper-base.js.flow │ │ │ │ │ └── popper-lite.js.flow │ │ │ │ │ └── umd │ │ │ │ │ ├── enums.min.js.flow │ │ │ │ │ ├── popper.min.js.flow │ │ │ │ │ ├── popper-base.min.js.flow │ │ │ │ │ └── popper-lite.min.js.flow │ │ │ ├── sass │ │ │ │ ├── sass.default.dart.js │ │ │ │ └── sass.js │ │ │ ├── waypoints │ │ │ │ └── testem.json │ │ │ └── vanillajs-datepicker │ │ │ │ └── dist │ │ │ │ └── js │ │ │ │ └── locales │ │ │ │ ├── hr.js │ │ │ │ ├── he.js │ │ │ │ ├── ja.js │ │ │ │ ├── cy.js │ │ │ │ ├── az.js │ │ │ │ ├── bg.js │ │ │ │ ├── bs.js │ │ │ │ ├── gl.js │ │ │ │ ├── ms.js │ │ │ │ ├── th.js │ │ │ │ ├── kk.js │ │ │ │ ├── sl.js │ │ │ │ ├── mk.js │ │ │ │ ├── is.js │ │ │ │ ├── ko.js │ │ │ │ ├── ar-tn.js │ │ │ │ ├── sr.js │ │ │ │ ├── zh-CN.js │ │ │ │ ├── mn.js │ │ │ │ ├── ar.js │ │ │ │ ├── fo.js │ │ │ │ ├── oc.js │ │ │ │ ├── sr-latn.js │ │ │ │ ├── el.js │ │ │ │ ├── sv.js │ │ │ │ ├── tr.js │ │ │ │ ├── uk.js │ │ │ │ ├── fa.js │ │ │ │ ├── en-IE.js │ │ │ │ ├── me.js │ │ │ │ ├── vi.js │ │ │ │ ├── en-NZ.js │ │ │ │ ├── en-ZA.js │ │ │ │ ├── ro.js │ │ │ │ ├── pt-BR.js │ │ │ │ ├── de.js │ │ │ │ ├── sw.js │ │ │ │ ├── lv.js │ │ │ │ ├── uz-cyrl.js │ │ │ │ ├── br.js │ │ │ │ ├── eo.js │ │ │ │ ├── ka.js │ │ │ │ └── tk.js │ │ ├── css │ │ │ └── fonts │ │ │ │ ├── icofont.ttf │ │ │ │ ├── icofont.woff │ │ │ │ └── icofont.woff2 │ │ ├── favicon │ │ │ ├── favicon.ico │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── apple-touch-icon.png │ │ │ ├── android-chrome-192x192.png │ │ │ ├── android-chrome-512x512.png │ │ │ ├── site.webmanifest │ │ │ └── about.txt │ │ └── assets │ │ │ └── img │ │ │ ├── pages │ │ │ ├── 404.jpg │ │ │ ├── 500.jpg │ │ │ ├── lock.jpg │ │ │ ├── sign-in.jpg │ │ │ ├── sign-up.jpg │ │ │ ├── overview.jpg │ │ │ ├── settings.jpg │ │ │ ├── transactions.jpg │ │ │ ├── forgot-password.jpg │ │ │ ├── reset-password.jpg │ │ │ └── mockup-presentation.png │ │ │ ├── profile-cover.jpg │ │ │ ├── favicon │ │ │ ├── favicon.ico │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── mstile-150x150.png │ │ │ ├── apple-touch-icon.png │ │ │ ├── android-chrome-192x192.png │ │ │ ├── android-chrome-512x512.png │ │ │ ├── browserconfig.xml │ │ │ ├── site.webmanifest │ │ │ └── manifest.json │ │ │ ├── themesberg-mockup.jpg │ │ │ ├── mockup-presentation.png │ │ │ ├── mockup-map-presentation.png │ │ │ ├── team │ │ │ ├── profile-picture-1.jpg │ │ │ ├── profile-picture-2.jpg │ │ │ ├── profile-picture-3.jpg │ │ │ ├── profile-picture-4.jpg │ │ │ ├── profile-picture-5.jpg │ │ │ └── profile-picture-6.jpg │ │ │ ├── mockup-kanban-presentation.png │ │ │ ├── mockup-calendar-presentation.png │ │ │ ├── marker.svg │ │ │ ├── icons │ │ │ └── google_analytics.svg │ │ │ ├── brand │ │ │ └── light.svg │ │ │ ├── technologies │ │ │ └── vuejs-logo.svg │ │ │ └── flags │ │ │ └── japan.svg │ ├── uploads │ │ ├── logo │ │ │ └── logo.png │ │ └── admins │ │ │ └── default.jpg │ └── theme │ │ ├── assets │ │ └── img │ │ │ ├── pages │ │ │ ├── 404.jpg │ │ │ ├── 500.jpg │ │ │ ├── lock.jpg │ │ │ ├── sign-in.jpg │ │ │ ├── sign-up.jpg │ │ │ ├── overview.jpg │ │ │ ├── settings.jpg │ │ │ ├── transactions.jpg │ │ │ ├── reset-password.jpg │ │ │ ├── forgot-password.jpg │ │ │ └── mockup-presentation.png │ │ │ ├── profile-cover.jpg │ │ │ ├── favicon │ │ │ ├── favicon.ico │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── mstile-150x150.png │ │ │ ├── apple-touch-icon.png │ │ │ ├── android-chrome-192x192.png │ │ │ ├── android-chrome-512x512.png │ │ │ ├── browserconfig.xml │ │ │ ├── site.webmanifest │ │ │ └── manifest.json │ │ │ ├── themesberg-mockup.jpg │ │ │ ├── mockup-presentation.png │ │ │ ├── mockup-map-presentation.png │ │ │ ├── team │ │ │ ├── profile-picture-1.jpg │ │ │ ├── profile-picture-2.jpg │ │ │ ├── profile-picture-3.jpg │ │ │ ├── profile-picture-4.jpg │ │ │ ├── profile-picture-5.jpg │ │ │ └── profile-picture-6.jpg │ │ │ ├── mockup-calendar-presentation.png │ │ │ ├── mockup-kanban-presentation.png │ │ │ ├── marker.svg │ │ │ ├── icons │ │ │ └── google_analytics.svg │ │ │ ├── brand │ │ │ └── light.svg │ │ │ ├── technologies │ │ │ └── vuejs-logo.svg │ │ │ └── flags │ │ │ └── japan.svg │ │ └── vendor │ │ ├── sass │ │ ├── sass.default.dart.js │ │ └── sass.js │ │ └── waypoints │ │ └── testem.json │ ├── src │ ├── exceptions │ │ ├── index.ts │ │ └── handlers │ │ │ ├── index.ts │ │ │ ├── forbidden-exception.handler.ts │ │ │ └── unauthorized-exception.handler.ts │ ├── logger │ │ ├── index.ts │ │ └── cms-logger.ts │ ├── events │ │ ├── index.ts │ │ └── activity-logs │ │ │ ├── interfaces │ │ │ ├── index.ts │ │ │ └── activity-log-types.interface.ts │ │ │ ├── decorators │ │ │ ├── index.ts │ │ │ └── activity-log-event-emitter.decorator.ts │ │ │ └── index.ts │ ├── entities │ │ ├── index.ts │ │ └── cms-config.entity.ts │ ├── validators │ │ └── index.ts │ ├── controllers │ │ ├── index.ts │ │ ├── web │ │ │ ├── index.ts │ │ │ └── home.controller.ts │ │ └── fallbacks │ │ │ └── index.ts │ ├── configs │ │ ├── index.ts │ │ └── server.config.ts │ ├── dtos │ │ ├── index.ts │ │ ├── reset-password.dto.ts │ │ ├── update-user.dto.ts │ │ └── create-user.dto.ts │ ├── providers │ │ ├── index.ts │ │ └── view-engine.provider.ts │ ├── views │ │ ├── common │ │ │ ├── invalid-feedback.ejs │ │ │ ├── header.ejs │ │ │ ├── errors.ejs │ │ │ ├── partials │ │ │ │ └── _vendor-css.ejs │ │ │ ├── error.ejs │ │ │ ├── breadcrumbs.ejs │ │ │ ├── message.ejs │ │ │ └── input-field.ejs │ │ ├── base-login.ejs │ │ ├── home │ │ │ └── index.ejs │ │ ├── users │ │ │ └── change-password.ejs │ │ ├── roles │ │ │ └── partials │ │ │ │ └── _permission-switch.ejs │ │ └── base.ejs │ ├── services │ │ ├── index.ts │ │ └── cms-config.service.ts │ └── database │ │ └── migrations │ │ └── 1674332715660-add_uuid_extension.ts │ ├── resources │ ├── js │ │ ├── index.js │ │ ├── common │ │ │ ├── index.js │ │ │ ├── datepicker.js │ │ │ ├── success.js │ │ │ ├── error.js │ │ │ └── toast.js │ │ └── cms-configs │ │ │ └── index.js │ └── css │ │ └── index.css │ ├── tsconfig.json │ ├── nodemon.json │ ├── .babelrc.json │ └── esbuild.config.js ├── packages ├── shared │ ├── src │ │ ├── events │ │ │ ├── index.ts │ │ │ └── auth │ │ │ │ ├── index.ts │ │ │ │ ├── interfaces │ │ │ │ └── auth-events.interface.ts │ │ │ │ └── decorators │ │ │ │ └── auth-event-emitter.decorator.ts │ │ ├── constants │ │ │ ├── index.ts │ │ │ └── api-response.constants.ts │ │ ├── services │ │ │ ├── cache │ │ │ │ ├── decorators │ │ │ │ │ └── index.ts │ │ │ │ └── index.ts │ │ │ ├── two-fa │ │ │ │ ├── decorators │ │ │ │ │ ├── index.ts │ │ │ │ │ └── skip-two-fa.decorator.ts │ │ │ │ └── index.ts │ │ │ ├── rate-limiter │ │ │ │ ├── decorators │ │ │ │ │ └── index.ts │ │ │ │ ├── interfaces │ │ │ │ │ ├── index.ts │ │ │ │ │ └── rate-limiter.options.ts │ │ │ │ └── index.ts │ │ │ ├── mail │ │ │ │ ├── index.ts │ │ │ │ └── mails │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── cms-forgot-password.mail.ts │ │ │ │ │ ├── sent-otp.mail.ts │ │ │ │ │ └── setup-2fa.mail.ts │ │ │ ├── index.ts │ │ │ ├── user.service.ts │ │ │ └── email-template.service.ts │ │ ├── logger │ │ │ ├── decorators │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ └── console.logger.ts │ │ ├── validators │ │ │ ├── abstracts │ │ │ │ └── index.ts │ │ │ ├── customs │ │ │ │ ├── index.ts │ │ │ │ ├── unique-slug.validator.ts │ │ │ │ ├── gender.validator.ts │ │ │ │ └── unique-email.validator.ts │ │ │ └── index.ts │ │ ├── connections │ │ │ ├── index.ts │ │ │ └── postgres.ts │ │ ├── utils │ │ │ ├── index.ts │ │ │ └── user-status-enum.util.ts │ │ ├── data-sources │ │ │ ├── index.ts │ │ │ ├── migration.data-source.ts │ │ │ └── seeder.data-source.ts │ │ ├── interfaces │ │ │ ├── user.interface.ts │ │ │ ├── index.ts │ │ │ ├── role.interface.ts │ │ │ └── permission.interface.ts │ │ ├── providers │ │ │ └── index.ts │ │ ├── middlewares │ │ │ ├── index.ts │ │ │ └── jwt-auth.middleware.ts │ │ ├── dtos │ │ │ ├── update-user.interface.ts │ │ │ ├── forgot-password.dto.ts │ │ │ ├── index.ts │ │ │ ├── create-role.dto.ts │ │ │ ├── login.dto.ts │ │ │ ├── common-search-query.dto.ts │ │ │ ├── set-password.dto.ts │ │ │ └── create-user.interface.ts │ │ ├── exceptions │ │ │ ├── index.ts │ │ │ ├── bad-request.exception.ts │ │ │ ├── not-found.exception.ts │ │ │ ├── forbidden.exception.ts │ │ │ ├── unauthorized.exception.ts │ │ │ └── unprocessable-entity.exception.ts │ │ ├── configs │ │ │ ├── index.ts │ │ │ ├── common.config.ts │ │ │ ├── mail.config.ts │ │ │ ├── redis.config.ts │ │ │ ├── queue.config.ts │ │ │ ├── database.ts │ │ │ └── orm.config.ts │ │ └── entities │ │ │ ├── index.ts │ │ │ ├── email-template.entity.ts │ │ │ ├── permission.entity.ts │ │ │ ├── admin-activity-log.entity.ts │ │ │ └── user-role.entity.ts │ └── tsconfig.json ├── core │ ├── src │ │ ├── services │ │ │ └── index.ts │ │ ├── exceptions │ │ │ ├── handlers │ │ │ │ ├── index.ts │ │ │ │ └── exception.handler.ts │ │ │ ├── decorators │ │ │ │ ├── index.ts │ │ │ │ └── catch-async.decorator.ts │ │ │ ├── index.ts │ │ │ └── http.exception.ts │ │ ├── swagger │ │ │ ├── providers │ │ │ │ └── index.ts │ │ │ ├── utils │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ ├── interfaces │ │ │ │ ├── api-metadata.interface.ts │ │ │ │ ├── api-body.interface.ts │ │ │ │ ├── index.ts │ │ │ │ ├── api-parameter.interface.ts │ │ │ │ ├── schema.interface.ts │ │ │ │ └── api-response.interface.ts │ │ │ └── decorators │ │ │ │ ├── api-tag.decorator.ts │ │ │ │ ├── index.ts │ │ │ │ ├── api-bearer-auth.decorator.ts │ │ │ │ └── api-key-auth.decorator.ts │ │ ├── validators │ │ │ ├── helpers │ │ │ │ └── index.ts │ │ │ ├── constants │ │ │ │ ├── index.ts │ │ │ │ └── generic-validation-messages.constant.ts │ │ │ ├── index.ts │ │ │ └── interfaces │ │ │ │ ├── validation-options.interface.ts │ │ │ │ ├── custom-validator.interface.ts │ │ │ │ ├── index.ts │ │ │ │ ├── validation-message-options.interface.ts │ │ │ │ └── validator.interface.ts │ │ ├── controllers │ │ │ ├── api-format │ │ │ │ └── index.ts │ │ │ ├── interfaces │ │ │ │ ├── route-prefixes.interface.ts │ │ │ │ ├── router.interface.ts │ │ │ │ ├── typed-query.interface.ts │ │ │ │ ├── typed-request.interface.ts │ │ │ │ ├── typed-body.interface.ts │ │ │ │ ├── index.ts │ │ │ │ ├── route-options.interface.ts │ │ │ │ └── api-response.interface.ts │ │ │ ├── index.ts │ │ │ └── decorators │ │ │ │ ├── index.ts │ │ │ │ ├── can-access.decorator.ts │ │ │ │ ├── api-controller.decorator.ts │ │ │ │ ├── api-protected-route.decorator.ts │ │ │ │ └── controller.decorator.ts │ │ ├── events │ │ │ ├── factories │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ └── base-event.ts │ │ ├── entities │ │ │ ├── index.ts │ │ │ ├── decorators │ │ │ │ ├── index.ts │ │ │ │ ├── set-repository.decorator.ts │ │ │ │ └── get-repository.decorator.ts │ │ │ └── base.entity.ts │ │ ├── providers │ │ │ ├── index.ts │ │ │ ├── interfaces │ │ │ │ ├── index.ts │ │ │ │ ├── provider-with-options.interface.ts │ │ │ │ └── provider.interface.ts │ │ │ └── provider.abstract.ts │ │ ├── database │ │ │ ├── index.ts │ │ │ ├── database.interface.ts │ │ │ └── database.abstract.ts │ │ ├── interfaces │ │ │ ├── class.interface.ts │ │ │ ├── breadcrumb.interface.ts │ │ │ ├── index.ts │ │ │ ├── pagination │ │ │ │ └── pagination-options.interface.ts │ │ │ ├── search-query │ │ │ │ └── common-search-query.interface.ts │ │ │ └── startup-options.interface.ts │ │ └── utils │ │ │ ├── http-methods.util.ts │ │ │ ├── common-helpers.util.ts │ │ │ ├── index.ts │ │ │ ├── to-plain-decorator.util.ts │ │ │ └── provide-middleware.util.ts │ └── tsconfig.json ├── rabbitmq │ ├── src │ │ ├── consumer │ │ │ ├── decorators │ │ │ │ ├── index.ts │ │ │ │ └── consume.decorator.ts │ │ │ └── index.ts │ │ ├── service │ │ │ ├── decorators │ │ │ │ ├── index.ts │ │ │ │ └── inject-rmq-service.decorator.ts │ │ │ └── index.ts │ │ ├── publisher │ │ │ ├── index.ts │ │ │ └── inject-publisher.ts │ │ └── index.ts │ ├── tsconfig.json │ └── package.json ├── types │ ├── package.json │ ├── tsconfig.json │ ├── express-session │ │ └── index.d.ts │ └── express │ │ └── index.d.ts └── tsconfig │ └── package.json ├── .commitlintrc.json ├── .husky ├── pre-commit └── commit-msg ├── .prettierrc.json ├── .lintstagedrc.json ├── test ├── tsconfig.json └── api │ └── e2e │ └── jest-e2e.json ├── .gitignore ├── turbo.json ├── babel.config.json └── .eslintrc.json /.env.example: -------------------------------------------------------------------------------- 1 | NODE_CONFIG_DIR="../../config/" -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | **/public/** linguist-vendored 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules 3 | public 4 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules 3 | public 4 | .turbo -------------------------------------------------------------------------------- /apps/consumer/src/consumers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './cms'; 2 | -------------------------------------------------------------------------------- /packages/shared/src/events/index.ts: -------------------------------------------------------------------------------- 1 | export * from './auth'; 2 | -------------------------------------------------------------------------------- /apps/texpress-api/src/schemas/index.ts: -------------------------------------------------------------------------------- 1 | export * from './tokens'; 2 | -------------------------------------------------------------------------------- /apps/consumer/src/logger/index.ts: -------------------------------------------------------------------------------- 1 | export * from './consumer-logger'; 2 | -------------------------------------------------------------------------------- /apps/texpress-api/src/logger/index.ts: -------------------------------------------------------------------------------- 1 | export * from './api-logger'; 2 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/types.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/exceptions/index.ts: -------------------------------------------------------------------------------- 1 | export * from './handlers'; 2 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/logger/index.ts: -------------------------------------------------------------------------------- 1 | export * from './cms-logger'; 2 | -------------------------------------------------------------------------------- /packages/core/src/services/index.ts: -------------------------------------------------------------------------------- 1 | export * from './base.service'; 2 | -------------------------------------------------------------------------------- /apps/texpress-api/src/entities/index.ts: -------------------------------------------------------------------------------- 1 | export * from './token.entity'; 2 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/events/index.ts: -------------------------------------------------------------------------------- 1 | export * from './activity-logs'; 2 | -------------------------------------------------------------------------------- /apps/consumer/src/controllers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './health.controller'; 2 | -------------------------------------------------------------------------------- /apps/texpress-api/src/providers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './passport.provider'; 2 | -------------------------------------------------------------------------------- /apps/texpress-api/src/types/enums/index.ts: -------------------------------------------------------------------------------- 1 | export * from './social-login-enum'; 2 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/entities/index.ts: -------------------------------------------------------------------------------- 1 | export * from './cms-config.entity'; 2 | -------------------------------------------------------------------------------- /.commitlintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["@commitlint/config-conventional"] 3 | } 4 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/validators/index.ts: -------------------------------------------------------------------------------- 1 | export * from './permission-validator'; 2 | -------------------------------------------------------------------------------- /packages/core/src/exceptions/handlers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './exception.handler'; 2 | -------------------------------------------------------------------------------- /packages/core/src/swagger/providers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './swagger-doc.provider'; 2 | -------------------------------------------------------------------------------- /packages/core/src/validators/helpers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './customize-validator'; 2 | -------------------------------------------------------------------------------- /packages/shared/src/constants/index.ts: -------------------------------------------------------------------------------- 1 | export * from './api-response.constants'; 2 | -------------------------------------------------------------------------------- /apps/texpress-api/src/exceptions/formats/index.ts: -------------------------------------------------------------------------------- 1 | export * from './api-error-format'; 2 | -------------------------------------------------------------------------------- /apps/texpress-api/src/types/interfaces/index.ts: -------------------------------------------------------------------------------- 1 | export * from './social-login.interface'; 2 | -------------------------------------------------------------------------------- /packages/core/src/controllers/api-format/index.ts: -------------------------------------------------------------------------------- 1 | export * from './api-response-format'; 2 | -------------------------------------------------------------------------------- /packages/core/src/exceptions/decorators/index.ts: -------------------------------------------------------------------------------- 1 | export * from './catch-async.decorator'; 2 | -------------------------------------------------------------------------------- /packages/rabbitmq/src/consumer/decorators/index.ts: -------------------------------------------------------------------------------- 1 | export * from './consume.decorator'; 2 | -------------------------------------------------------------------------------- /packages/shared/src/services/cache/decorators/index.ts: -------------------------------------------------------------------------------- 1 | export * from './cache.decorator'; 2 | -------------------------------------------------------------------------------- /apps/texpress-api/src/exceptions/handlers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './api-exception.handler'; 2 | -------------------------------------------------------------------------------- /packages/core/src/events/factories/index.ts: -------------------------------------------------------------------------------- 1 | export * from './event-emitter-decorator.factory'; 2 | -------------------------------------------------------------------------------- /packages/shared/src/logger/decorators/index.ts: -------------------------------------------------------------------------------- 1 | export * from './logger-factory.decorator'; 2 | -------------------------------------------------------------------------------- /packages/shared/src/validators/abstracts/index.ts: -------------------------------------------------------------------------------- 1 | export * from './abstract-unique.validator'; 2 | -------------------------------------------------------------------------------- /apps/texpress-api/src/controllers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './api'; 2 | export * from './fallbacks'; 3 | -------------------------------------------------------------------------------- /apps/texpress-api/src/types/index.ts: -------------------------------------------------------------------------------- 1 | export * from './enums'; 2 | export * from './interfaces'; 3 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/controllers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './web'; 2 | export * from './fallbacks'; 3 | -------------------------------------------------------------------------------- /packages/core/src/events/index.ts: -------------------------------------------------------------------------------- 1 | export * from './base-event'; 2 | export * from './factories'; 3 | -------------------------------------------------------------------------------- /packages/rabbitmq/src/service/decorators/index.ts: -------------------------------------------------------------------------------- 1 | export * from './inject-rmq-service.decorator'; 2 | -------------------------------------------------------------------------------- /packages/shared/src/connections/index.ts: -------------------------------------------------------------------------------- 1 | export * from './postgres'; 2 | export * from './redis'; 3 | -------------------------------------------------------------------------------- /packages/shared/src/services/two-fa/decorators/index.ts: -------------------------------------------------------------------------------- 1 | export * from './skip-two-fa.decorator'; 2 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npm run precommit 5 | -------------------------------------------------------------------------------- /apps/texpress-api/src/exceptions/interfaces/index.ts: -------------------------------------------------------------------------------- 1 | export * from './api-error-payloads.interface'; 2 | -------------------------------------------------------------------------------- /packages/core/src/entities/index.ts: -------------------------------------------------------------------------------- 1 | export * from './base.entity'; 2 | export * from './decorators'; 3 | -------------------------------------------------------------------------------- /packages/core/src/validators/constants/index.ts: -------------------------------------------------------------------------------- 1 | export * from './generic-validation-messages.constant'; 2 | -------------------------------------------------------------------------------- /packages/shared/src/services/rate-limiter/decorators/index.ts: -------------------------------------------------------------------------------- 1 | export * from './rate-limiter.decorator'; 2 | -------------------------------------------------------------------------------- /packages/shared/src/services/rate-limiter/interfaces/index.ts: -------------------------------------------------------------------------------- 1 | export * from './rate-limiter.options'; 2 | -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npx commitlint --edit $1 5 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/configs/index.ts: -------------------------------------------------------------------------------- 1 | export * from './cms.config'; 2 | export * from './server.config'; 3 | -------------------------------------------------------------------------------- /packages/core/src/providers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './provider.abstract'; 2 | export * from './interfaces'; 3 | -------------------------------------------------------------------------------- /packages/rabbitmq/src/publisher/index.ts: -------------------------------------------------------------------------------- 1 | export * from './publisher'; 2 | export * from './inject-publisher'; 3 | -------------------------------------------------------------------------------- /packages/rabbitmq/src/service/index.ts: -------------------------------------------------------------------------------- 1 | export * from './decorators'; 2 | export * from './rabbitmq.service'; 3 | -------------------------------------------------------------------------------- /packages/shared/src/services/mail/index.ts: -------------------------------------------------------------------------------- 1 | export * from './mail-base.service'; 2 | export * from './mails'; 3 | -------------------------------------------------------------------------------- /apps/texpress-api/test/utils/constants.ts: -------------------------------------------------------------------------------- 1 | export const Constants = { 2 | apiPrefix: '/api/v1', 3 | } as const; 4 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/events/activity-logs/interfaces/index.ts: -------------------------------------------------------------------------------- 1 | export * from './activity-log-types.interface'; 2 | -------------------------------------------------------------------------------- /packages/core/src/database/index.ts: -------------------------------------------------------------------------------- 1 | export * from './database.abstract'; 2 | export * from './database.interface'; 3 | -------------------------------------------------------------------------------- /packages/core/src/interfaces/class.interface.ts: -------------------------------------------------------------------------------- 1 | export interface Class { 2 | new (...args: any[]): any; 3 | } 4 | -------------------------------------------------------------------------------- /packages/shared/src/services/cache/index.ts: -------------------------------------------------------------------------------- 1 | export * from './cache.service'; 2 | export * from './decorators'; 3 | -------------------------------------------------------------------------------- /packages/shared/src/services/two-fa/index.ts: -------------------------------------------------------------------------------- 1 | export * from './two-fa.service'; 2 | export * from './decorators'; 3 | -------------------------------------------------------------------------------- /packages/types/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "types", 3 | "version": "1.0.0", 4 | "private": true 5 | } 6 | -------------------------------------------------------------------------------- /apps/consumer/nodemon.json: -------------------------------------------------------------------------------- 1 | { 2 | "exec": "ts-node ./dist/index.js", 3 | "watch": [".", "../../packages"] 4 | } 5 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/events/activity-logs/decorators/index.ts: -------------------------------------------------------------------------------- 1 | export * from './activity-log-event-emitter.decorator'; 2 | -------------------------------------------------------------------------------- /packages/shared/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './common-helpers.util'; 2 | export * from './user-status-enum.util'; 3 | -------------------------------------------------------------------------------- /packages/tsconfig/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tsconfig", 3 | "version": "0.0.1", 4 | "private": true 5 | } 6 | -------------------------------------------------------------------------------- /apps/texpress-api/nodemon.json: -------------------------------------------------------------------------------- 1 | { 2 | "exec": "ts-node ./dist/index.js", 3 | "watch": [".", "../../packages"] 4 | } 5 | -------------------------------------------------------------------------------- /apps/texpress-api/src/controllers/api/index.ts: -------------------------------------------------------------------------------- 1 | export * from './auth.controller'; 2 | export * from './user.controller'; 3 | -------------------------------------------------------------------------------- /packages/rabbitmq/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './consumer'; 2 | export * from './publisher'; 3 | export * from './service'; 4 | -------------------------------------------------------------------------------- /packages/shared/src/data-sources/index.ts: -------------------------------------------------------------------------------- 1 | export * from './migration.data-source'; 2 | export * from './seeder.data-source'; 3 | -------------------------------------------------------------------------------- /packages/core/src/swagger/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './security-schemes.util'; 2 | export * from './swagger-helpers.util'; 3 | -------------------------------------------------------------------------------- /apps/consumer/src/consumers/cms/index.ts: -------------------------------------------------------------------------------- 1 | export * from './activity-log.consumer'; 2 | export * from './generate-thumbnail.consumer'; 3 | -------------------------------------------------------------------------------- /apps/texpress-api/src/exceptions/index.ts: -------------------------------------------------------------------------------- 1 | export * from './formats'; 2 | export * from './handlers'; 3 | export * from './interfaces'; 4 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/cjs/enums.js.flow: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | export * from '../../lib/enums.js' 4 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/cjs/popper.js.flow: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | export * from '../../lib/popper.js' 4 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/umd/enums.min.js.flow: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | export * from '../../lib/enums.js' 4 | -------------------------------------------------------------------------------- /packages/core/src/interfaces/breadcrumb.interface.ts: -------------------------------------------------------------------------------- 1 | export interface Breadcrumb { 2 | url: string; 3 | name: string; 4 | } 5 | -------------------------------------------------------------------------------- /packages/core/src/validators/index.ts: -------------------------------------------------------------------------------- 1 | export * from './interfaces'; 2 | export * from './constants'; 3 | export * from './helpers'; 4 | -------------------------------------------------------------------------------- /packages/shared/src/logger/index.ts: -------------------------------------------------------------------------------- 1 | export * from './decorators'; 2 | export * from './logger'; 3 | export * from './console.logger'; 4 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/umd/popper.min.js.flow: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | export * from '../../lib/popper.js' 4 | -------------------------------------------------------------------------------- /apps/texpress-cms/resources/js/index.js: -------------------------------------------------------------------------------- 1 | export * from './common'; 2 | export * from './permissions'; 3 | export * from './cms-configs'; 4 | -------------------------------------------------------------------------------- /packages/core/src/entities/decorators/index.ts: -------------------------------------------------------------------------------- 1 | export * from './get-repository.decorator'; 2 | export * from './set-repository.decorator'; 3 | -------------------------------------------------------------------------------- /packages/core/src/exceptions/index.ts: -------------------------------------------------------------------------------- 1 | export * from './http.exception'; 2 | export * from './decorators'; 3 | export * from './handlers'; 4 | -------------------------------------------------------------------------------- /apps/texpress-api/src/dtos/socail-login.dtos.ts: -------------------------------------------------------------------------------- 1 | export class SocialLoginDto { 2 | socialType: string; 3 | accessToken: string; 4 | } 5 | -------------------------------------------------------------------------------- /apps/texpress-api/src/services/index.ts: -------------------------------------------------------------------------------- 1 | export * from './user.service'; 2 | export * from './auth.service'; 3 | export * from './token.service'; 4 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/cjs/popper-base.js.flow: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | export * from '../../lib/popper-base.js' 4 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/cjs/popper-lite.js.flow: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | export * from '../../lib/popper-lite.js' 4 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/uploads/logo/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/uploads/logo/logo.png -------------------------------------------------------------------------------- /packages/core/src/providers/interfaces/index.ts: -------------------------------------------------------------------------------- 1 | export * from './provider.interface'; 2 | export * from './provider-with-options.interface'; 3 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/umd/popper-base.min.js.flow: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | export * from '../../lib/popper-base.js' 4 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/umd/popper-lite.min.js.flow: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | export * from '../../lib/popper-lite.js' 4 | -------------------------------------------------------------------------------- /packages/rabbitmq/src/consumer/index.ts: -------------------------------------------------------------------------------- 1 | export * from './consumer.base'; 2 | export * from './consumer.server'; 3 | export * from './decorators'; 4 | -------------------------------------------------------------------------------- /apps/texpress-api/src/configs/index.ts: -------------------------------------------------------------------------------- 1 | export * from './server.config'; 2 | export * from './social-login.config'; 3 | export * from './common.config'; 4 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/uploads/admins/default.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/uploads/admins/default.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/src/dtos/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-user.dto'; 2 | export * from './update-user.dto'; 3 | export * from './reset-password.dto'; 4 | -------------------------------------------------------------------------------- /packages/shared/src/interfaces/user.interface.ts: -------------------------------------------------------------------------------- 1 | import { IRole } from './role.interface'; 2 | 3 | export interface IUser { 4 | role: IRole[]; 5 | } 6 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "es5", 3 | "tabWidth": 4, 4 | "singleQuote": true, 5 | "semi": true, 6 | "endOfLine": "auto" 7 | } 8 | -------------------------------------------------------------------------------- /apps/consumer/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tsconfig/tsconfig.base.json", 3 | "compilerOptions": { 4 | "outDir": "./dist" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /apps/texpress-api/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tsconfig/tsconfig.base.json", 3 | "compilerOptions": { 4 | "outDir": "./dist" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/css/fonts/icofont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/css/fonts/icofont.ttf -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/favicon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/favicon/favicon.ico -------------------------------------------------------------------------------- /apps/texpress-cms/src/events/activity-logs/index.ts: -------------------------------------------------------------------------------- 1 | export * from './activity-logs.event'; 2 | export * from './decorators'; 3 | export * from './interfaces'; 4 | -------------------------------------------------------------------------------- /apps/texpress-cms/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tsconfig/tsconfig.base.json", 3 | "compilerOptions": { 4 | "outDir": "./dist" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/core/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tsconfig/tsconfig.base.json", 3 | "compilerOptions": { 4 | "outDir": "./dist" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/rabbitmq/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tsconfig/tsconfig.base.json", 3 | "compilerOptions": { 4 | "outDir": "./dist" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/shared/src/interfaces/index.ts: -------------------------------------------------------------------------------- 1 | export * from './permission.interface'; 2 | export * from './role.interface'; 3 | export * from './user.interface'; 4 | -------------------------------------------------------------------------------- /packages/shared/src/providers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './common.provider'; 2 | export * from './static-serve.provider'; 3 | export * from './cors.provider'; 4 | -------------------------------------------------------------------------------- /packages/shared/src/services/rate-limiter/index.ts: -------------------------------------------------------------------------------- 1 | export * from './rate-limiter.service'; 2 | export * from './decorators'; 3 | export * from './interfaces'; 4 | -------------------------------------------------------------------------------- /packages/shared/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tsconfig/tsconfig.base.json", 3 | "compilerOptions": { 4 | "outDir": "./dist" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/types/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tsconfig/tsconfig.base.json", 3 | "compilerOptions": { 4 | "composite": true 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/css/fonts/icofont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/css/fonts/icofont.woff -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/css/fonts/icofont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/css/fonts/icofont.woff2 -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/sass/sass.default.dart.js: -------------------------------------------------------------------------------- 1 | var library = require('./sass.dart.js'); 2 | library.load({}); 3 | 4 | module.exports = library; 5 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/pages/404.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/theme/assets/img/pages/404.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/pages/500.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/theme/assets/img/pages/500.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/pages/lock.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/theme/assets/img/pages/lock.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/vendor/sass/sass.default.dart.js: -------------------------------------------------------------------------------- 1 | var library = require('./sass.dart.js'); 2 | library.load({}); 3 | 4 | module.exports = library; 5 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/providers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './passport.provider'; 2 | export * from './view-engine.provider'; 3 | export * from './app-locals.provider'; 4 | -------------------------------------------------------------------------------- /packages/core/src/controllers/interfaces/route-prefixes.interface.ts: -------------------------------------------------------------------------------- 1 | export interface RoutePrefixes { 2 | cmsPrefix?: string; 3 | apiPrefix?: string; 4 | } 5 | -------------------------------------------------------------------------------- /packages/core/src/swagger/index.ts: -------------------------------------------------------------------------------- 1 | export * from './decorators'; 2 | export * from './interfaces'; 3 | export * from './providers'; 4 | export * from './utils'; 5 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/pages/404.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/assets/img/pages/404.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/pages/500.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/assets/img/pages/500.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/pages/lock.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/assets/img/pages/lock.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/favicon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/favicon/favicon-16x16.png -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/favicon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/favicon/favicon-32x32.png -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/utils/getAltAxis.js: -------------------------------------------------------------------------------- 1 | export default function getAltAxis(axis) { 2 | return axis === 'x' ? 'y' : 'x'; 3 | } -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/utils/math.js: -------------------------------------------------------------------------------- 1 | export var max = Math.max; 2 | export var min = Math.min; 3 | export var round = Math.round; -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/pages/sign-in.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/theme/assets/img/pages/sign-in.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/pages/sign-up.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/theme/assets/img/pages/sign-up.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/profile-cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/theme/assets/img/profile-cover.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/resources/js/common/index.js: -------------------------------------------------------------------------------- 1 | export * from './error'; 2 | export * from './success'; 3 | export * from './toast'; 4 | export * from './datepicker'; 5 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/views/common/invalid-feedback.ejs: -------------------------------------------------------------------------------- 1 |
"><%= get(locals.errorMessage) %>
-------------------------------------------------------------------------------- /packages/shared/src/services/mail/mails/index.ts: -------------------------------------------------------------------------------- 1 | export * from './sent-otp.mail'; 2 | export * from './cms-forgot-password.mail'; 3 | export * from './setup-2fa.mail'; 4 | -------------------------------------------------------------------------------- /.lintstagedrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "./apps/**/*.{ts,js,json,mdx,*rc}": ["npm run prettier:write"], 3 | "./packages/**/*.{ts,js,json,mdx,*rc}": ["npm run prettier:write"] 4 | } 5 | -------------------------------------------------------------------------------- /apps/texpress-api/src/types/enums/social-login-enum.ts: -------------------------------------------------------------------------------- 1 | export enum SocialLoginEnum { 2 | Facebook = 'facebook', 3 | Google = 'google', 4 | Apple = 'apple', 5 | } 6 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/pages/sign-in.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/assets/img/pages/sign-in.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/pages/sign-up.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/assets/img/pages/sign-up.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/profile-cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/assets/img/profile-cover.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/favicon/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/favicon/apple-touch-icon.png -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/utils/getVariation.js: -------------------------------------------------------------------------------- 1 | export default function getVariation(placement) { 2 | return placement.split('-')[1]; 3 | } -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/favicon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/theme/assets/img/favicon/favicon.ico -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/pages/overview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/theme/assets/img/pages/overview.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/pages/settings.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/theme/assets/img/pages/settings.jpg -------------------------------------------------------------------------------- /packages/shared/src/validators/customs/index.ts: -------------------------------------------------------------------------------- 1 | export * from './unique-email.validator'; 2 | export * from './gender.validator'; 3 | export * from './unique-slug.validator'; 4 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/favicon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/assets/img/favicon/favicon.ico -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/pages/overview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/assets/img/pages/overview.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/pages/settings.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/assets/img/pages/settings.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/utils/getAltLen.js: -------------------------------------------------------------------------------- 1 | export default function getAltLen(len) { 2 | return len === 'width' ? 'height' : 'width'; 3 | } -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/pages/transactions.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/theme/assets/img/pages/transactions.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/themesberg-mockup.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/theme/assets/img/themesberg-mockup.jpg -------------------------------------------------------------------------------- /packages/core/src/validators/interfaces/validation-options.interface.ts: -------------------------------------------------------------------------------- 1 | export interface ValidationOptions { 2 | fieldDisplayName?: string; 3 | message?: string; 4 | } 5 | -------------------------------------------------------------------------------- /packages/shared/src/interfaces/role.interface.ts: -------------------------------------------------------------------------------- 1 | import { IPermission } from './permission.interface'; 2 | 3 | export interface IRole { 4 | permissions: IPermission[]; 5 | } 6 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/pages/transactions.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/assets/img/pages/transactions.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/themesberg-mockup.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/assets/img/themesberg-mockup.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/mockup-presentation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/theme/assets/img/mockup-presentation.png -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/pages/reset-password.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/theme/assets/img/pages/reset-password.jpg -------------------------------------------------------------------------------- /packages/shared/src/validators/index.ts: -------------------------------------------------------------------------------- 1 | export * from './user.validator'; 2 | export * from './role.validator'; 3 | export * from './customs'; 4 | export * from './password.validator'; 5 | -------------------------------------------------------------------------------- /apps/texpress-cms/nodemon.json: -------------------------------------------------------------------------------- 1 | { 2 | "exec": "ts-node ./dist/index.js", 3 | "watch": [".", "../../packages"], 4 | "ignore": ["./public/**/*.js", "./resources/js/**/*.js"] 5 | } 6 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/favicon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/assets/img/favicon/favicon-16x16.png -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/favicon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/assets/img/favicon/favicon-32x32.png -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/mockup-presentation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/assets/img/mockup-presentation.png -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/pages/forgot-password.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/assets/img/pages/forgot-password.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/pages/reset-password.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/assets/img/pages/reset-password.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/favicon/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/favicon/android-chrome-192x192.png -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/favicon/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/favicon/android-chrome-512x512.png -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/favicon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/theme/assets/img/favicon/favicon-16x16.png -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/favicon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/theme/assets/img/favicon/favicon-32x32.png -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/favicon/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/theme/assets/img/favicon/mstile-150x150.png -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/mockup-map-presentation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/theme/assets/img/mockup-map-presentation.png -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/pages/forgot-password.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/theme/assets/img/pages/forgot-password.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/team/profile-picture-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/theme/assets/img/team/profile-picture-1.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/team/profile-picture-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/theme/assets/img/team/profile-picture-2.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/team/profile-picture-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/theme/assets/img/team/profile-picture-3.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/team/profile-picture-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/theme/assets/img/team/profile-picture-4.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/team/profile-picture-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/theme/assets/img/team/profile-picture-5.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/team/profile-picture-6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/theme/assets/img/team/profile-picture-6.jpg -------------------------------------------------------------------------------- /packages/core/src/controllers/interfaces/router.interface.ts: -------------------------------------------------------------------------------- 1 | import { RouteOptions } from './route-options.interface'; 2 | 3 | export type Router = RouteOptions & { handlerName: string }; 4 | -------------------------------------------------------------------------------- /packages/core/src/swagger/interfaces/api-metadata.interface.ts: -------------------------------------------------------------------------------- 1 | export interface ApiMetadataProps { 2 | description?: string; 3 | summary?: string; 4 | consumes?: string[]; 5 | } 6 | -------------------------------------------------------------------------------- /packages/shared/src/events/auth/index.ts: -------------------------------------------------------------------------------- 1 | export * from './auth.event'; 2 | export * from './interfaces/auth-events.interface'; 3 | export * from './decorators/auth-event-emitter.decorator'; 4 | -------------------------------------------------------------------------------- /apps/texpress-api/src/dtos/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-user.dto'; 2 | export * from './verify-otp.dto'; 3 | export * from './refresh-token.dto'; 4 | export * from './socail-login.dtos'; 5 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/favicon/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/assets/img/favicon/mstile-150x150.png -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/mockup-map-presentation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/assets/img/mockup-map-presentation.png -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/team/profile-picture-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/assets/img/team/profile-picture-1.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/team/profile-picture-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/assets/img/team/profile-picture-2.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/team/profile-picture-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/assets/img/team/profile-picture-3.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/team/profile-picture-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/assets/img/team/profile-picture-4.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/team/profile-picture-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/assets/img/team/profile-picture-5.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/team/profile-picture-6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/assets/img/team/profile-picture-6.jpg -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/favicon/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/theme/assets/img/favicon/apple-touch-icon.png -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/pages/mockup-presentation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/theme/assets/img/pages/mockup-presentation.png -------------------------------------------------------------------------------- /packages/shared/src/interfaces/permission.interface.ts: -------------------------------------------------------------------------------- 1 | export interface IPermission { 2 | route: string; 3 | method: string; 4 | action: string; 5 | [key: string]: any; 6 | } 7 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/favicon/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/assets/img/favicon/apple-touch-icon.png -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/mockup-kanban-presentation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/assets/img/mockup-kanban-presentation.png -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/pages/mockup-presentation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/assets/img/pages/mockup-presentation.png -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/mockup-calendar-presentation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/theme/assets/img/mockup-calendar-presentation.png -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/mockup-kanban-presentation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/theme/assets/img/mockup-kanban-presentation.png -------------------------------------------------------------------------------- /apps/texpress-cms/resources/js/common/datepicker.js: -------------------------------------------------------------------------------- 1 | const el = document.querySelector('.datepicker'); 2 | if (el) { 3 | new Datepicker(el, { 4 | format: 'yyyy/mm/dd', 5 | }); 6 | } 7 | -------------------------------------------------------------------------------- /packages/core/src/controllers/interfaces/typed-query.interface.ts: -------------------------------------------------------------------------------- 1 | import { Request } from 'express'; 2 | 3 | export interface TypedQuery extends Request { 4 | query: Query & {}; 5 | } 6 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/mockup-calendar-presentation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/assets/img/mockup-calendar-presentation.png -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/favicon/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/theme/assets/img/favicon/android-chrome-192x192.png -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/favicon/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/theme/assets/img/favicon/android-chrome-512x512.png -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/favicon/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/assets/img/favicon/android-chrome-192x192.png -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/favicon/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonish777/t-express/HEAD/apps/texpress-cms/public/backend/assets/img/favicon/android-chrome-512x512.png -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/dom-utils/getNodeName.js: -------------------------------------------------------------------------------- 1 | export default function getNodeName(element) { 2 | return element ? (element.nodeName || '').toLowerCase() : null; 3 | } -------------------------------------------------------------------------------- /packages/core/src/providers/provider.abstract.ts: -------------------------------------------------------------------------------- 1 | import { Express } from 'express'; 2 | 3 | export abstract class AbstractProvider { 4 | public abstract apply(app: Express, ...rest: any[]): void; 5 | } 6 | -------------------------------------------------------------------------------- /packages/core/src/validators/interfaces/custom-validator.interface.ts: -------------------------------------------------------------------------------- 1 | import { Meta } from 'express-validator'; 2 | 3 | export interface CustomValidator { 4 | validate(value: any, meta: Meta): any; 5 | } 6 | -------------------------------------------------------------------------------- /packages/shared/src/middlewares/index.ts: -------------------------------------------------------------------------------- 1 | export * from './auth.middleware'; 2 | export * from './jwt-auth.middleware'; 3 | export * from './can-access.middleware'; 4 | export * from './validate.middleware'; 5 | -------------------------------------------------------------------------------- /apps/texpress-cms/resources/css/index.css: -------------------------------------------------------------------------------- 1 | .accordion-button:not(.collapsed) { 2 | background-color: #c4c8d0; 3 | } 4 | 5 | .accordion-button::after { 6 | background-image: none; 7 | content: ''; 8 | } 9 | -------------------------------------------------------------------------------- /packages/core/src/controllers/interfaces/typed-request.interface.ts: -------------------------------------------------------------------------------- 1 | import { Request } from 'express'; 2 | 3 | export interface ProtectedRequest extends Request { 4 | user: NonNullable; 5 | } 6 | -------------------------------------------------------------------------------- /packages/core/src/utils/http-methods.util.ts: -------------------------------------------------------------------------------- 1 | export enum HTTPMethods { 2 | Get = 'get', 3 | Post = 'post', 4 | Put = 'put', 5 | Patch = 'patch', 6 | Delete = 'delete', 7 | All = 'all', 8 | } 9 | -------------------------------------------------------------------------------- /packages/shared/src/services/rate-limiter/interfaces/rate-limiter.options.ts: -------------------------------------------------------------------------------- 1 | export interface RateLimiterOptions { 2 | attempts?: number; 3 | windowDuration?: number; 4 | blockDuration?: number; 5 | } 6 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/dtos/reset-password.dto.ts: -------------------------------------------------------------------------------- 1 | import { Expose } from 'class-transformer'; 2 | 3 | export class ResetPasswordDto { 4 | @Expose() password: string; 5 | @Expose() confirmPassword: string; 6 | } 7 | -------------------------------------------------------------------------------- /packages/shared/src/utils/user-status-enum.util.ts: -------------------------------------------------------------------------------- 1 | export enum UserStatusEnum { 2 | Inactive = 'inactive', 3 | OTPVerified = 'otp_verified', 4 | Active = 'active', 5 | Deactivated = 'deactivated', 6 | } 7 | -------------------------------------------------------------------------------- /apps/texpress-api/src/validators/index.ts: -------------------------------------------------------------------------------- 1 | export * from './verify-otp.validator'; 2 | export * from './set-password.validator'; 3 | export * from './refresh-token.validator'; 4 | export * from './social-login.validator'; 5 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/utils/getBasePlacement.js: -------------------------------------------------------------------------------- 1 | import { auto } from "../enums.js"; 2 | export default function getBasePlacement(placement) { 3 | return placement.split('-')[0]; 4 | } -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/utils/getMainAxisFromPlacement.js: -------------------------------------------------------------------------------- 1 | export default function getMainAxisFromPlacement(placement) { 2 | return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y'; 3 | } -------------------------------------------------------------------------------- /apps/texpress-cms/src/services/index.ts: -------------------------------------------------------------------------------- 1 | export * from './user.service'; 2 | export * from './auth.service'; 3 | export * from './role.service'; 4 | export * from './permission.service'; 5 | export * from './cms-config.service'; 6 | -------------------------------------------------------------------------------- /packages/core/src/database/database.interface.ts: -------------------------------------------------------------------------------- 1 | export interface DatabaseInitializeOptions { 2 | dbName: string; 3 | dbHost: string; 4 | dbPort: number; 5 | dbUsername: string; 6 | dbPassword: string; 7 | } 8 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/utils/getFreshSideObject.js: -------------------------------------------------------------------------------- 1 | export default function getFreshSideObject() { 2 | return { 3 | top: 0, 4 | right: 0, 5 | bottom: 0, 6 | left: 0 7 | }; 8 | } -------------------------------------------------------------------------------- /packages/shared/src/services/index.ts: -------------------------------------------------------------------------------- 1 | export * from './mail'; 2 | export * from './email-template.service'; 3 | export * from './cache'; 4 | export * from './rate-limiter'; 5 | export * from './user.service'; 6 | export * from './two-fa'; 7 | -------------------------------------------------------------------------------- /packages/types/express-session/index.d.ts: -------------------------------------------------------------------------------- 1 | import { SessionData } from 'express-session'; 2 | 3 | declare module 'express-session' { 4 | interface SessionData extends SessionData { 5 | twoFAVerified?: boolean; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /apps/texpress-api/src/types/interfaces/social-login.interface.ts: -------------------------------------------------------------------------------- 1 | export interface SocialLoginInterface { 2 | socialType: string; 3 | socialToken: string; 4 | email: string; 5 | firstName: string; 6 | lastName: string; 7 | } 8 | -------------------------------------------------------------------------------- /packages/shared/src/dtos/update-user.interface.ts: -------------------------------------------------------------------------------- 1 | export interface UpdateUser { 2 | firstName?: string; 3 | lastName?: string; 4 | dob?: string; 5 | gender?: string; 6 | email?: string; 7 | mobileNumber?: string; 8 | } 9 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/dom-utils/getComputedStyle.js: -------------------------------------------------------------------------------- 1 | import getWindow from "./getWindow.js"; 2 | export default function getComputedStyle(element) { 3 | return getWindow(element).getComputedStyle(element); 4 | } -------------------------------------------------------------------------------- /apps/texpress-cms/resources/js/common/success.js: -------------------------------------------------------------------------------- 1 | import { toastSuccess } from './toast'; 2 | 3 | const message = 4 | document.getElementById('success_toast_message')?.innerText || ''; 5 | 6 | if (message) { 7 | toastSuccess(message); 8 | } 9 | -------------------------------------------------------------------------------- /packages/core/src/validators/interfaces/index.ts: -------------------------------------------------------------------------------- 1 | export * from './validator.interface'; 2 | export * from './custom-validator.interface'; 3 | export * from './validation-options.interface'; 4 | export * from './validation-message-options.interface'; 5 | -------------------------------------------------------------------------------- /packages/core/src/validators/interfaces/validation-message-options.interface.ts: -------------------------------------------------------------------------------- 1 | export type ValidationMessageOptions = Partial<{ 2 | field: string; 3 | value: string; 4 | min: number; 5 | max: number; 6 | options: string; 7 | }>; 8 | -------------------------------------------------------------------------------- /packages/core/src/providers/interfaces/provider-with-options.interface.ts: -------------------------------------------------------------------------------- 1 | import { Provider } from './provider.interface'; 2 | 3 | export interface ProviderWithOptions { 4 | class: Provider; 5 | options: ProviderOptions; 6 | } 7 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/dom-utils/getHTMLElementScroll.js: -------------------------------------------------------------------------------- 1 | export default function getHTMLElementScroll(element) { 2 | return { 3 | scrollLeft: element.scrollLeft, 4 | scrollTop: element.scrollTop 5 | }; 6 | } -------------------------------------------------------------------------------- /apps/texpress-cms/resources/js/common/error.js: -------------------------------------------------------------------------------- 1 | import { toastError } from './toast'; 2 | 3 | const errorMessage = 4 | document.getElementById('error_toast_message')?.innerText || ''; 5 | 6 | if (errorMessage) { 7 | toastError(errorMessage); 8 | } 9 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/dom-utils/isTableElement.js: -------------------------------------------------------------------------------- 1 | import getNodeName from "./getNodeName.js"; 2 | export default function isTableElement(element) { 3 | return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0; 4 | } -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/utils/expandToHashMap.js: -------------------------------------------------------------------------------- 1 | export default function expandToHashMap(value, keys) { 2 | return keys.reduce(function (hashMap, key) { 3 | hashMap[key] = value; 4 | return hashMap; 5 | }, {}); 6 | } -------------------------------------------------------------------------------- /apps/texpress-cms/src/exceptions/handlers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './global-exception.handler'; 2 | export * from './unauthorized-exception.handler'; 3 | export * from './unprocessable-entity-exception.handler'; 4 | export * from './forbidden-exception.handler'; 5 | -------------------------------------------------------------------------------- /packages/core/src/controllers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './base.controller'; 2 | export * from './resource.controller'; 3 | export * from './api-base.controller'; 4 | export * from './decorators'; 5 | export * from './interfaces'; 6 | export * from './api-format'; 7 | -------------------------------------------------------------------------------- /packages/core/src/swagger/interfaces/api-body.interface.ts: -------------------------------------------------------------------------------- 1 | import { Class } from 'core/interfaces'; 2 | 3 | export interface ApiBodyProps { 4 | contentType?: 'application/json' | 'multipart/form-data'; 5 | schema?: Class; 6 | required?: boolean; 7 | } 8 | -------------------------------------------------------------------------------- /apps/texpress-api/src/dtos/refresh-token.dto.ts: -------------------------------------------------------------------------------- 1 | import { Schema, SchemaProperty } from 'core/swagger'; 2 | 3 | @Schema() 4 | export class RefreshTokenDto { 5 | @SchemaProperty({ 6 | type: 'string', 7 | }) 8 | refreshToken: string; 9 | } 10 | -------------------------------------------------------------------------------- /packages/shared/src/exceptions/index.ts: -------------------------------------------------------------------------------- 1 | export * from './unauthorized.exception'; 2 | export * from './unprocessable-entity.exception'; 3 | export * from './forbidden.exception'; 4 | export * from './not-found.exception'; 5 | export * from './bad-request.exception'; 6 | -------------------------------------------------------------------------------- /apps/texpress-api/src/configs/server.config.ts: -------------------------------------------------------------------------------- 1 | import config from 'config'; 2 | 3 | export const ServerConfig = { 4 | URL: `${config.get('server.api:host')}:${config.get('server.api:port')}`, 5 | PORT: process.env.API_PORT || config.get('server.api:port'), 6 | }; 7 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/configs/server.config.ts: -------------------------------------------------------------------------------- 1 | import config from 'config'; 2 | 3 | export const ServerConfig = { 4 | URL: `${config.get('server.cms:host')}:${config.get('server.cms:port')}`, 5 | PORT: process.env.CMS_PORT || config.get('server.cms:port'), 6 | }; 7 | -------------------------------------------------------------------------------- /apps/texpress-api/.babelrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | [ 4 | "module-resolver", 5 | { 6 | "alias": { 7 | "@api": "./src" 8 | } 9 | } 10 | ] 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /apps/texpress-cms/.babelrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | [ 4 | "module-resolver", 5 | { 6 | "alias": { 7 | "@cms": "./src" 8 | } 9 | } 10 | ] 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/popper-base.js: -------------------------------------------------------------------------------- 1 | import { createPopper, popperGenerator, detectOverflow } from "./createPopper.js"; 2 | // eslint-disable-next-line import/no-unused-modules 3 | export { createPopper, popperGenerator, detectOverflow }; -------------------------------------------------------------------------------- /packages/shared/src/configs/index.ts: -------------------------------------------------------------------------------- 1 | export * from './database'; 2 | export * from './mail.config'; 3 | export * from './orm.config'; 4 | export * from './redis.config'; 5 | export * from './common.config'; 6 | export * from './queue.config'; 7 | export * from './multer.config'; 8 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/utils/mergePaddingObject.js: -------------------------------------------------------------------------------- 1 | import getFreshSideObject from "./getFreshSideObject.js"; 2 | export default function mergePaddingObject(paddingObject) { 3 | return Object.assign({}, getFreshSideObject(), paddingObject); 4 | } -------------------------------------------------------------------------------- /packages/core/src/utils/common-helpers.util.ts: -------------------------------------------------------------------------------- 1 | import bcrypt from 'bcrypt'; 2 | 3 | export const validatePassword = ( 4 | suppliedPassword: string, 5 | hashedPassword: string 6 | ): Promise => { 7 | return bcrypt.compare(suppliedPassword, hashedPassword); 8 | }; 9 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/vendor/sass/sass.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var library = require('./sass.dart.js'); 4 | library.load({ 5 | readline: require("readline"), 6 | chokidar: require("chokidar"), 7 | }); 8 | 9 | library.cli_pkg_main_0_(process.argv.slice(2)); 10 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/sass/sass.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var library = require('./sass.dart.js'); 4 | library.load({ 5 | readline: require("readline"), 6 | chokidar: require("chokidar"), 7 | }); 8 | 9 | library.cli_pkg_main_0_(process.argv.slice(2)); 10 | -------------------------------------------------------------------------------- /packages/core/src/interfaces/index.ts: -------------------------------------------------------------------------------- 1 | export * from './startup-options.interface'; 2 | export * from './pagination/pagination-options.interface'; 3 | export * from './search-query/common-search-query.interface'; 4 | export * from './class.interface'; 5 | export * from './breadcrumb.interface'; 6 | -------------------------------------------------------------------------------- /packages/core/src/swagger/decorators/api-tag.decorator.ts: -------------------------------------------------------------------------------- 1 | import { SwaggerMetadataKeys } from 'core/utils'; 2 | 3 | export function ApiTag(tag: string): ClassDecorator { 4 | return (target) => { 5 | Reflect.defineMetadata(SwaggerMetadataKeys.API_TAG, tag, target); 6 | }; 7 | } 8 | -------------------------------------------------------------------------------- /packages/shared/src/constants/api-response.constants.ts: -------------------------------------------------------------------------------- 1 | export const MetaConstant = { 2 | meta: { 3 | copyright: 'Typescript Express', 4 | email: 'no-reply@texpress.com', 5 | api: { 6 | version: '1', 7 | }, 8 | }, 9 | } as const; 10 | -------------------------------------------------------------------------------- /packages/shared/src/dtos/forgot-password.dto.ts: -------------------------------------------------------------------------------- 1 | import { Schema, SchemaProperty } from 'core/swagger'; 2 | 3 | @Schema() 4 | export class ForgotPasswordDto { 5 | @SchemaProperty({ 6 | type: 'string', 7 | required: true, 8 | }) 9 | username: string; 10 | } 11 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/utils/rectToClientRect.js: -------------------------------------------------------------------------------- 1 | export default function rectToClientRect(rect) { 2 | return Object.assign({}, rect, { 3 | left: rect.x, 4 | top: rect.y, 5 | right: rect.x + rect.width, 6 | bottom: rect.y + rect.height 7 | }); 8 | } -------------------------------------------------------------------------------- /test/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../packages/tsconfig/tsconfig.base.json", 3 | "compilerOptions": { 4 | "declaration": false, 5 | "esModuleInterop": true, 6 | "allowJs": true 7 | }, 8 | "exclude": ["node_modules", "dist", "test", "**/*spec.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /apps/texpress-api/src/schemas/tokens.ts: -------------------------------------------------------------------------------- 1 | import { Schema, SchemaProperty } from 'core/swagger'; 2 | 3 | @Schema() 4 | export class Tokens { 5 | @SchemaProperty({ type: 'string' }) 6 | accessToken: string; 7 | 8 | @SchemaProperty({ type: 'string' }) 9 | refreshToken: string; 10 | } 11 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/views/common/header.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |

<%= get(locals.title) %>

4 | <%- include('./breadcrumbs') %> 5 |
6 |
7 | -------------------------------------------------------------------------------- /packages/core/src/providers/interfaces/provider.interface.ts: -------------------------------------------------------------------------------- 1 | import { Express } from 'express'; 2 | 3 | export interface Provider { 4 | new (...args: any[]): any; 5 | register(app: Express, ...rest: any[]): void; 6 | } 7 | 8 | export type ProviderStaticMethod = InstanceType; 9 | -------------------------------------------------------------------------------- /packages/core/src/swagger/interfaces/index.ts: -------------------------------------------------------------------------------- 1 | export * from './schema.interface'; 2 | export * from './api-metadata.interface'; 3 | export * from './api-parameter.interface'; 4 | export * from './api-body.interface'; 5 | export * from './swagger-spec.interface'; 6 | export * from './api-response.interface'; 7 | -------------------------------------------------------------------------------- /packages/shared/src/services/two-fa/decorators/skip-two-fa.decorator.ts: -------------------------------------------------------------------------------- 1 | import { TwoFAMetadataKeys } from 'core/utils'; 2 | 3 | export const SkipTwoFA: MethodDecorator = (target, prop, descriptor) => { 4 | Reflect.metadata(TwoFAMetadataKeys.SKIP_TWO_FA, true)(target, prop); 5 | return descriptor; 6 | }; 7 | -------------------------------------------------------------------------------- /apps/texpress-api/test/e2e/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": "../../", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | }, 9 | "modulePaths": ["."] 10 | } 11 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/favicon/site.webmanifest: -------------------------------------------------------------------------------- 1 | {"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} -------------------------------------------------------------------------------- /packages/shared/src/entities/index.ts: -------------------------------------------------------------------------------- 1 | export * from './user.entity'; 2 | export * from './role.entity'; 3 | export * from './user-role.entity'; 4 | export * from './permission.entity'; 5 | export * from './api-user.entity'; 6 | export * from './email-template.entity'; 7 | export * from './admin-activity-log.entity'; 8 | -------------------------------------------------------------------------------- /apps/consumer/src/logger/consumer-logger.ts: -------------------------------------------------------------------------------- 1 | import { LogDecoratorFactory, Logger } from 'shared/logger'; 2 | 3 | export const logger = Logger.configure(); 4 | 5 | export const Log = (title?: string, message?: string) => 6 | LogDecoratorFactory(logger, title, message, { 7 | rethrowError: false, 8 | }); 9 | -------------------------------------------------------------------------------- /packages/core/src/controllers/decorators/index.ts: -------------------------------------------------------------------------------- 1 | export * from './controller.decorator'; 2 | export * from './api-controller.decorator'; 3 | export * from './route.decorator'; 4 | export * from './protected-route.decorator'; 5 | export * from './api-protected-route.decorator'; 6 | export * from './can-access.decorator'; 7 | -------------------------------------------------------------------------------- /packages/core/src/interfaces/pagination/pagination-options.interface.ts: -------------------------------------------------------------------------------- 1 | export interface PaginationOptions { 2 | page?: number; 3 | take?: number; 4 | } 5 | 6 | export interface PaginationResponse extends PaginationOptions { 7 | total: number; 8 | totalPages: number; 9 | data: K[]; 10 | } 11 | -------------------------------------------------------------------------------- /packages/shared/src/dtos/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-role.dto'; 2 | export * from './create-user.interface'; 3 | export * from './update-user.interface'; 4 | export * from './login.dto'; 5 | export * from './set-password.dto'; 6 | export * from './forgot-password.dto'; 7 | export * from './common-search-query.dto'; 8 | -------------------------------------------------------------------------------- /packages/core/src/interfaces/search-query/common-search-query.interface.ts: -------------------------------------------------------------------------------- 1 | import { PaginationOptions } from '../pagination/pagination-options.interface'; 2 | 3 | export interface CommonSearchQuery extends PaginationOptions { 4 | keywords?: string; 5 | active?: boolean | [column: string, value: string | boolean]; 6 | } 7 | -------------------------------------------------------------------------------- /packages/core/src/controllers/decorators/can-access.decorator.ts: -------------------------------------------------------------------------------- 1 | import { ControllerMetadataKeys } from 'core/utils'; 2 | 3 | export const CanAccess: ClassDecorator = (target) => { 4 | Reflect.defineMetadata( 5 | ControllerMetadataKeys.CHECK_PERMISSIONS, 6 | true, 7 | target 8 | ); 9 | }; 10 | -------------------------------------------------------------------------------- /packages/core/src/validators/interfaces/validator.interface.ts: -------------------------------------------------------------------------------- 1 | import { ValidationChain } from 'express-validator'; 2 | 3 | export interface Validator { 4 | new (...args: any[]): any; 5 | get rules(): Record; 6 | } 7 | 8 | export type ValidatorWithStaticProps = InstanceType; 9 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/utils/getOppositeVariationPlacement.js: -------------------------------------------------------------------------------- 1 | var hash = { 2 | start: 'end', 3 | end: 'start' 4 | }; 5 | export default function getOppositeVariationPlacement(placement) { 6 | return placement.replace(/start|end/g, function (matched) { 7 | return hash[matched]; 8 | }); 9 | } -------------------------------------------------------------------------------- /packages/core/src/entities/decorators/set-repository.decorator.ts: -------------------------------------------------------------------------------- 1 | import Container from 'typedi'; 2 | import { DataSource } from 'typeorm'; 3 | 4 | export function SetRepository(dataSource: DataSource): ClassDecorator { 5 | return (target) => { 6 | Container.set(target, dataSource.getRepository(target)); 7 | }; 8 | } 9 | -------------------------------------------------------------------------------- /packages/types/express/index.d.ts: -------------------------------------------------------------------------------- 1 | import { ApiUserEntity, UserEntity } from 'shared/entities'; 2 | 3 | export {}; 4 | 5 | declare global { 6 | namespace Express { 7 | interface User extends Partial { 8 | id: number; 9 | _id: string; 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/core/src/controllers/interfaces/typed-body.interface.ts: -------------------------------------------------------------------------------- 1 | import { Request } from 'express'; 2 | import { ProtectedRequest } from './typed-request.interface'; 3 | 4 | export interface TypedBody extends Request { 5 | body: K; 6 | } 7 | 8 | export interface ProtectedTypedBody extends ProtectedRequest { 9 | body: K; 10 | } 11 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/favicon/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #ffffff 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/favicon/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #ffffff 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /packages/core/src/controllers/interfaces/index.ts: -------------------------------------------------------------------------------- 1 | export * from './router.interface'; 2 | export * from './route-options.interface'; 3 | export * from './route-prefixes.interface'; 4 | export * from './typed-body.interface'; 5 | export * from './typed-query.interface'; 6 | export * from './typed-request.interface'; 7 | export * from './api-response.interface'; 8 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/utils/within.js: -------------------------------------------------------------------------------- 1 | import { max as mathMax, min as mathMin } from "./math.js"; 2 | export function within(min, value, max) { 3 | return mathMax(min, mathMin(value, max)); 4 | } 5 | export function withinMaxClamp(min, value, max) { 6 | var v = within(min, value, max); 7 | return v > max ? max : v; 8 | } -------------------------------------------------------------------------------- /packages/shared/src/configs/common.config.ts: -------------------------------------------------------------------------------- 1 | import config from 'config'; 2 | 3 | export const CommonSharedConfigs = { 4 | Throttle: { 5 | Attempts: config.get('throttle.attempts'), 6 | WindowDuration: config.get('throttle.windowDuration'), 7 | BlockDuration: config.get('throttle.blockDuration'), 8 | }, 9 | }; 10 | -------------------------------------------------------------------------------- /packages/shared/src/exceptions/bad-request.exception.ts: -------------------------------------------------------------------------------- 1 | import { HttpException } from 'core/exceptions'; 2 | import { HttpStatus } from 'core/utils'; 3 | 4 | export class BadRequestException extends HttpException { 5 | constructor(public readonly message = 'Bad request') { 6 | super(HttpStatus.BAD_REQUEST, message, BadRequestException.name, true); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/shared/src/exceptions/not-found.exception.ts: -------------------------------------------------------------------------------- 1 | import { HttpException } from 'core/exceptions'; 2 | import { HttpStatus } from 'core/utils'; 3 | 4 | export class NotFoundException extends HttpException { 5 | constructor(public readonly message = 'Resource not found') { 6 | super(HttpStatus.NOT_FOUND, message, NotFoundException.name, true); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/utils/uniqueBy.js: -------------------------------------------------------------------------------- 1 | export default function uniqueBy(arr, fn) { 2 | var identifiers = new Set(); 3 | return arr.filter(function (item) { 4 | var identifier = fn(item); 5 | 6 | if (!identifiers.has(identifier)) { 7 | identifiers.add(identifier); 8 | return true; 9 | } 10 | }); 11 | } -------------------------------------------------------------------------------- /apps/texpress-cms/src/controllers/web/index.ts: -------------------------------------------------------------------------------- 1 | export * from './user.controller'; 2 | export * from './auth.controller'; 3 | export * from './home.controller'; 4 | export * from './role.controller'; 5 | export * from './api-user.controller'; 6 | export * from './email-template.controller'; 7 | export * from './cms-configs.controller'; 8 | export * from './permission.controller'; 9 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/events/activity-logs/interfaces/activity-log-types.interface.ts: -------------------------------------------------------------------------------- 1 | export interface ActivityLogEventTypes { 2 | 'log-event': [ 3 | { 4 | module: string; 5 | action: string; 6 | description: string; 7 | userId: number; 8 | activityTimestamp: Date; 9 | } 10 | ]; 11 | } 12 | -------------------------------------------------------------------------------- /packages/shared/src/dtos/create-role.dto.ts: -------------------------------------------------------------------------------- 1 | import { Expose, Transform } from 'class-transformer'; 2 | 3 | export class CreateRole { 4 | @Expose() name: string; 5 | 6 | @Expose() slug: string; 7 | 8 | @Expose() 9 | @Transform(({ value }) => 10 | value && !Array.isArray(value) ? [value] : value 11 | ) 12 | permissions: string[]; 13 | } 14 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/utils/getOppositePlacement.js: -------------------------------------------------------------------------------- 1 | var hash = { 2 | left: 'right', 3 | right: 'left', 4 | bottom: 'top', 5 | top: 'bottom' 6 | }; 7 | export default function getOppositePlacement(placement) { 8 | return placement.replace(/left|right|bottom|top/g, function (matched) { 9 | return hash[matched]; 10 | }); 11 | } -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/dom-utils/getWindowScroll.js: -------------------------------------------------------------------------------- 1 | import getWindow from "./getWindow.js"; 2 | export default function getWindowScroll(node) { 3 | var win = getWindow(node); 4 | var scrollLeft = win.pageXOffset; 5 | var scrollTop = win.pageYOffset; 6 | return { 7 | scrollLeft: scrollLeft, 8 | scrollTop: scrollTop 9 | }; 10 | } -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/utils/format.js: -------------------------------------------------------------------------------- 1 | export default function format(str) { 2 | for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { 3 | args[_key - 1] = arguments[_key]; 4 | } 5 | 6 | return [].concat(args).reduce(function (p, c) { 7 | return p.replace(/%s/, c); 8 | }, str); 9 | } -------------------------------------------------------------------------------- /apps/texpress-cms/src/views/common/errors.ejs: -------------------------------------------------------------------------------- 1 | <% if(exists(locals.errors)) { %> 2 | 6 | <% } %> -------------------------------------------------------------------------------- /packages/core/src/swagger/decorators/index.ts: -------------------------------------------------------------------------------- 1 | export * from './schema.decorator'; 2 | export * from './api-metadata.decorator'; 3 | export * from './api-tag.decorator'; 4 | export * from './api-parameter.decorator'; 5 | export * from './api-body.decorator'; 6 | export * from './api-bearer-auth.decorator'; 7 | export * from './api-key-auth.decorator'; 8 | export * from './api-response.decorator'; 9 | -------------------------------------------------------------------------------- /packages/shared/src/dtos/login.dto.ts: -------------------------------------------------------------------------------- 1 | import { Schema, SchemaProperty } from 'core/swagger'; 2 | @Schema() 3 | export class LoginDto { 4 | @SchemaProperty({ 5 | type: 'string', 6 | required: true, 7 | }) 8 | username: string; 9 | 10 | @SchemaProperty({ 11 | type: 'string', 12 | required: true, 13 | }) 14 | password: string; 15 | } 16 | -------------------------------------------------------------------------------- /packages/core/src/exceptions/handlers/exception.handler.ts: -------------------------------------------------------------------------------- 1 | import { NextFunction, Request, Response } from 'express'; 2 | import { HttpException } from '../http.exception'; 3 | 4 | export abstract class ExceptionHandler { 5 | public abstract handle( 6 | error: HttpException, 7 | req: Request, 8 | res: Response, 9 | next: NextFunction 10 | ): void; 11 | } 12 | -------------------------------------------------------------------------------- /packages/core/src/swagger/interfaces/api-parameter.interface.ts: -------------------------------------------------------------------------------- 1 | import { Class } from 'core/interfaces'; 2 | 3 | export interface ApiParametersProps { 4 | in: 'path' | 'query'; 5 | schema?: 6 | | { 7 | name: string; 8 | type: string; 9 | required?: boolean; 10 | }[] 11 | | Class; 12 | description?: string; 13 | } 14 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/favicon/about.txt: -------------------------------------------------------------------------------- 1 | This favicon was generated using the following font: 2 | 3 | - Font Title: Bakbak One 4 | - Font Author: Copyright 2021 The Bakbak One Project Authors (https://github.com/googlefonts/bakbak) 5 | - Font Source: http://fonts.gstatic.com/s/bakbakone/v6/zOL54pXAl6RI-p_ardnuycRuv-hHkOs.ttf 6 | - Font License: SIL Open Font License, 1.1 (http://scripts.sil.org/OFL)) 7 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/dom-utils/getWindow.js: -------------------------------------------------------------------------------- 1 | export default function getWindow(node) { 2 | if (node == null) { 3 | return window; 4 | } 5 | 6 | if (node.toString() !== '[object Window]') { 7 | var ownerDocument = node.ownerDocument; 8 | return ownerDocument ? ownerDocument.defaultView || window : window; 9 | } 10 | 11 | return node; 12 | } -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/marker.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/marker.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/dom-utils/getDocumentElement.js: -------------------------------------------------------------------------------- 1 | import { isElement } from "./instanceOf.js"; 2 | export default function getDocumentElement(element) { 3 | // $FlowFixMe[incompatible-return]: assume body is always available 4 | return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing] 5 | element.document) || window.document).documentElement; 6 | } -------------------------------------------------------------------------------- /apps/texpress-cms/src/views/common/partials/_vendor-css.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/core/src/swagger/decorators/api-bearer-auth.decorator.ts: -------------------------------------------------------------------------------- 1 | import { SwaggerMetadataKeys } from 'core/utils'; 2 | 3 | export function ApiBearerAuth(): MethodDecorator { 4 | return (target, propKey) => { 5 | Reflect.defineMetadata( 6 | SwaggerMetadataKeys.API_BEARER_AUTH, 7 | true, 8 | target.constructor, 9 | propKey 10 | ); 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /packages/shared/src/configs/mail.config.ts: -------------------------------------------------------------------------------- 1 | import config from 'config'; 2 | 3 | export const MailConfig = { 4 | host: config.get('mail.host'), 5 | port: config.get('mail.port'), 6 | username: config.get('mail.username'), 7 | password: config.get('mail.password'), 8 | secure: config.get('mail.secure'), 9 | from: config.get('mail.from'), 10 | }; 11 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/dtos/update-user.dto.ts: -------------------------------------------------------------------------------- 1 | import { Expose } from 'class-transformer'; 2 | 3 | export class UpdateUserDto { 4 | @Expose() firstName: string; 5 | @Expose() lastName: string; 6 | @Expose() dob: string; 7 | @Expose() gender: string; 8 | @Expose() email: string; 9 | @Expose() mobileNumber: string; 10 | @Expose() roleId: string; 11 | @Expose() twoFAEnabled: string; 12 | } 13 | -------------------------------------------------------------------------------- /packages/shared/src/configs/redis.config.ts: -------------------------------------------------------------------------------- 1 | import config from 'config'; 2 | 3 | export const RedisConfig = { 4 | Protocol: 'http', 5 | Host: config.get('redis.host'), 6 | Port: config.get('redis.port'), 7 | Username: config.get('redis.username'), 8 | Password: config.get('redis.password'), 9 | TTL: config.get('redis.ttl') || 1800, // 30 minutes 10 | }; 11 | -------------------------------------------------------------------------------- /packages/shared/src/events/auth/interfaces/auth-events.interface.ts: -------------------------------------------------------------------------------- 1 | export interface AuthEventsTypes { 2 | 'send-otp': [{ user_name: string; otp_code: string; to_email: string }]; 3 | 'cms-forgot-password': [ 4 | { user_name: string; reset_password_link: string; to_email: string } 5 | ]; 6 | 'setup-2fa': [ 7 | { user_name: string; qr_code_data: string; to_email: string } 8 | ]; 9 | } 10 | -------------------------------------------------------------------------------- /packages/shared/src/services/mail/mails/cms-forgot-password.mail.ts: -------------------------------------------------------------------------------- 1 | import { Service } from 'typedi'; 2 | import { Mailer } from '../mail-base.service'; 3 | 4 | @Service() 5 | export class ForgotPasswordMailer extends Mailer { 6 | async send(data: Record) { 7 | (await this.parseTemplate('CMS_FORGOT_PASSWORD', data)) 8 | .to(data.email) 9 | .sendEmail(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/core/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './common-helpers.util'; 2 | export * from './provide-middleware.util'; 3 | export * from './metadata.util'; 4 | export * from './http-methods.util'; 5 | export * from './http-status-code.util'; 6 | export * from './validation-builder.util'; 7 | export * from './sanitize-decorator.util'; 8 | export * from './to-plain-decorator.util'; 9 | export * from './api-responder-decorator.util'; 10 | -------------------------------------------------------------------------------- /packages/shared/src/exceptions/forbidden.exception.ts: -------------------------------------------------------------------------------- 1 | import { HttpException } from 'core/exceptions'; 2 | import { HttpStatus } from 'core/utils'; 3 | 4 | export class ForbiddenException extends HttpException { 5 | constructor( 6 | public readonly message: string = 'You are not allowed to perform this action' 7 | ) { 8 | super(HttpStatus.FORBIDDEN, message, ForbiddenException.name, true); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | .env 4 | logs 5 | yarn-error.log 6 | **/config/*.json 7 | !**/config/*.example.json 8 | 9 | **/public/** 10 | !**/public/theme 11 | !**/blic/theme/** 12 | !**/public/backend 13 | !**/public/backend/** 14 | !**/public/uploads 15 | !**/public/uploads/logo 16 | !**/public/uploads/logo/logo.png 17 | !**/public/uploads 18 | !**/public/uploads/admins 19 | !**/public/uploads/admins/default.jpg 20 | 21 | .turbo -------------------------------------------------------------------------------- /apps/texpress-cms/src/views/base-login.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <%- include('common/head') %> 5 | 6 | 7 | <%- include('common/partials/_vendor-js') %> 8 | <%- include('common/error') %> 9 | <%- include('common/errors') %> 10 | <%- include('common/message') %> 11 | <%- include(page) %> 12 | 13 | 14 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/views/home/index.ejs: -------------------------------------------------------------------------------- 1 |

WELCOME TO TEXPRESS

2 |
3 |
4 |
5 |

6 | © texpress 7 |

8 |
9 |
10 |
11 | -------------------------------------------------------------------------------- /packages/rabbitmq/src/publisher/inject-publisher.ts: -------------------------------------------------------------------------------- 1 | import Container from 'typedi'; 2 | import { Publisher } from './publisher'; 3 | 4 | export function InjectPublisher(fn: Function) { 5 | const originalMethod = fn; 6 | fn = async function (...args: any[]) { 7 | const publisher = Container.get(Publisher); 8 | return originalMethod.call(fn, publisher, ...args); 9 | }; 10 | return fn; 11 | } 12 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/utils/debounce.js: -------------------------------------------------------------------------------- 1 | export default function debounce(fn) { 2 | var pending; 3 | return function () { 4 | if (!pending) { 5 | pending = new Promise(function (resolve) { 6 | Promise.resolve().then(function () { 7 | pending = undefined; 8 | resolve(fn()); 9 | }); 10 | }); 11 | } 12 | 13 | return pending; 14 | }; 15 | } -------------------------------------------------------------------------------- /packages/shared/src/services/mail/mails/sent-otp.mail.ts: -------------------------------------------------------------------------------- 1 | import { Service } from 'typedi'; 2 | import { Mailer } from '../mail-base.service'; 3 | 4 | @Service() 5 | export class SendOTPMailer extends Mailer { 6 | private readonly code = 'SEND_OTP'; 7 | async send(data: Record) { 8 | (await this.parseTemplate(this.code, data)) 9 | .to(data.to_email) 10 | .sendEmail(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/core/src/controllers/interfaces/route-options.interface.ts: -------------------------------------------------------------------------------- 1 | import { HTTPMethods } from 'core/utils'; 2 | import { Validator } from 'core/validators'; 3 | import { Handler } from 'express'; 4 | 5 | export interface RouteOptions { 6 | method: HTTPMethods; 7 | path: string; 8 | middlewares?: Handler[]; 9 | validators?: Validator[]; 10 | } 11 | 12 | export interface FallbackRouteOptions { 13 | fallback: true; 14 | } 15 | -------------------------------------------------------------------------------- /packages/shared/src/data-sources/migration.data-source.ts: -------------------------------------------------------------------------------- 1 | import { DataSource } from 'typeorm'; 2 | import { OrmConfig } from '../configs/orm.config'; 3 | 4 | export default new DataSource({ 5 | ...OrmConfig, 6 | migrationsTableName: 'migrations', 7 | migrations: [ 8 | __dirname + 9 | '/../../../../apps/texpress-cms/src/database/migrations/*{.ts,.js}', 10 | ], 11 | migrationsTransactionMode: 'each', 12 | }); 13 | -------------------------------------------------------------------------------- /packages/core/src/exceptions/http.exception.ts: -------------------------------------------------------------------------------- 1 | export class HttpException extends Error { 2 | constructor( 3 | public readonly statusCode: number, 4 | message: string, 5 | public readonly name = HttpException.name, 6 | public readonly isOperational = false 7 | ) { 8 | super(message); 9 | Object.setPrototypeOf(this, new.target.prototype); 10 | Error.captureStackTrace(this); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/shared/src/data-sources/seeder.data-source.ts: -------------------------------------------------------------------------------- 1 | import { DataSource } from 'typeorm'; 2 | import { OrmConfig } from '../configs/orm.config'; 3 | 4 | export const seederDataSource = new DataSource({ 5 | ...OrmConfig, 6 | migrationsTableName: 'seeders', 7 | migrations: [ 8 | __dirname + 9 | '/../../../../apps/texpress-cms/src/database/seeders/*{.ts,.js}', 10 | ], 11 | migrationsTransactionMode: 'each', 12 | }); 13 | -------------------------------------------------------------------------------- /packages/shared/src/exceptions/unauthorized.exception.ts: -------------------------------------------------------------------------------- 1 | import { HttpException } from 'core/exceptions'; 2 | import { HttpStatus } from 'core/utils'; 3 | 4 | export class UnauthorizedException extends HttpException { 5 | constructor(message = 'You are not authorized') { 6 | super( 7 | HttpStatus.UNAUTHORIZED, 8 | message, 9 | UnauthorizedException.name, 10 | true 11 | ); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/icons/google_analytics.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/icons/google_analytics.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/texpress-api/src/entities/token.entity.ts: -------------------------------------------------------------------------------- 1 | import { BaseEntity, SetRepository } from 'core/entities'; 2 | import { postgresDataSource } from 'shared/connections'; 3 | import { Column, Entity } from 'typeorm'; 4 | 5 | @Entity({ name: 'tokens' }) 6 | @SetRepository(postgresDataSource) 7 | export class TokenEntity extends BaseEntity { 8 | @Column() 9 | _id: string; 10 | 11 | @Column() 12 | userId: number; 13 | 14 | @Column() 15 | isRevoked: boolean; 16 | } 17 | -------------------------------------------------------------------------------- /packages/core/src/utils/to-plain-decorator.util.ts: -------------------------------------------------------------------------------- 1 | import { instanceToPlain } from 'class-transformer'; 2 | 3 | export const ToPlain: MethodDecorator = function ( 4 | _target, 5 | _prop, 6 | descriptor: PropertyDescriptor 7 | ) { 8 | const originalMethod = descriptor.value; 9 | descriptor.value = async function (...args: any[]) { 10 | const result = await originalMethod.apply(this, args); 11 | return instanceToPlain(result); 12 | }; 13 | }; 14 | -------------------------------------------------------------------------------- /apps/texpress-api/src/dtos/verify-otp.dto.ts: -------------------------------------------------------------------------------- 1 | import { Expose } from 'class-transformer'; 2 | import { Schema, SchemaProperty } from 'core/swagger'; 3 | 4 | @Schema() 5 | export class VerifyOTPDto { 6 | @Expose() 7 | @SchemaProperty({ 8 | type: 'string', 9 | required: true, 10 | }) 11 | username: string; 12 | 13 | @Expose() 14 | @SchemaProperty({ 15 | type: 'string', 16 | required: true, 17 | }) 18 | otpCode: string; 19 | } 20 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/brand/light.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/services/cms-config.service.ts: -------------------------------------------------------------------------------- 1 | import { CMSConfigEntity } from '@cms/entities'; 2 | import { GetRepository } from 'core/entities'; 3 | import { BaseService } from 'core/services'; 4 | import { Service } from 'typedi'; 5 | import { Repository } from 'typeorm'; 6 | 7 | @Service() 8 | export class CMSConfigService extends BaseService { 9 | @GetRepository(CMSConfigEntity) 10 | protected readonly repository: Repository; 11 | } 12 | -------------------------------------------------------------------------------- /apps/consumer/src/index.ts: -------------------------------------------------------------------------------- 1 | import config from 'config'; 2 | import { ConsumerServer } from 'rabbitmq'; 3 | import * as consumers from './consumers'; 4 | import * as controllers from './controllers'; 5 | 6 | function bootstrap() { 7 | const server = new ConsumerServer({ 8 | consumers, 9 | controllers, 10 | }); 11 | server.startupConsumer(config.get('server.consumer:port'), { 12 | name: 'Consumer Server', 13 | }); 14 | } 15 | 16 | bootstrap(); 17 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/brand/light.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/core/src/swagger/interfaces/schema.interface.ts: -------------------------------------------------------------------------------- 1 | export interface SchemaPropertyProps { 2 | type: string; 3 | required?: boolean; 4 | format?: string; 5 | example?: string; 6 | } 7 | 8 | export interface SchemaSpec { 9 | type: 'object'; 10 | required: string[]; 11 | properties: { 12 | [propertyName: string]: SchemaPropertyProps; 13 | }; 14 | } 15 | 16 | export interface SchemaDefinitionSpec { 17 | [propertyName: string]: SchemaSpec; 18 | } 19 | -------------------------------------------------------------------------------- /packages/shared/src/events/auth/decorators/auth-event-emitter.decorator.ts: -------------------------------------------------------------------------------- 1 | import { EventEmitterDecoratorFactory } from 'core/events'; 2 | import { AuthEvents } from '../auth.event'; 3 | import { AuthEventsTypes } from '../interfaces/auth-events.interface'; 4 | 5 | export const AuthEventsEmitter = ( 6 | event: EventName, 7 | mapper: (returnedValue: any) => AuthEventsTypes[EventName] | false 8 | ) => EventEmitterDecoratorFactory(AuthEvents, event, mapper); 9 | -------------------------------------------------------------------------------- /apps/texpress-api/src/logger/api-logger.ts: -------------------------------------------------------------------------------- 1 | import { LogDecoratorFactory, Logger, LoggerConfig } from 'shared/logger'; 2 | 3 | const loggerConfigs: LoggerConfig[] = [ 4 | { level: 'error', fileName: 'error.log' }, 5 | { fileName: 'combined.log' }, 6 | ]; 7 | 8 | export const ApiLogger = Logger.configure(loggerConfigs, { 9 | dirname: __dirname + '/../../logs', 10 | }); 11 | 12 | export const Log = (title = '', message = '') => 13 | LogDecoratorFactory(ApiLogger, title, message); 14 | -------------------------------------------------------------------------------- /packages/shared/src/connections/postgres.ts: -------------------------------------------------------------------------------- 1 | import { DataSource } from 'typeorm'; 2 | import { Database } from 'core/database'; 3 | import { OrmConfig } from '../configs/orm.config'; 4 | 5 | class PostgresConnection extends Database { 6 | public connection: DataSource = new DataSource({ 7 | ...OrmConfig, 8 | }); 9 | 10 | constructor() { 11 | super(); 12 | this.init(); 13 | } 14 | } 15 | export const postgresDataSource = new PostgresConnection().connection; 16 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/views/common/error.ejs: -------------------------------------------------------------------------------- 1 | <% if(exists(locals.error)) { %> 2 | 7 | <% } else if(exists(locals.errorToast)) { %> 8 | <%= locals.errorToast %> 9 | <% } %> -------------------------------------------------------------------------------- /packages/core/src/validators/constants/generic-validation-messages.constant.ts: -------------------------------------------------------------------------------- 1 | export const ValidationMessages = { 2 | required: '%field% is a required field', 3 | email: '%field% is not a valid email address', 4 | min: '%field% must be at least %min% characters', 5 | max: '%field% cannot exceed %max% characters', 6 | date: '%field% is not a valid date', 7 | confirmPassword: 'Passwords do not match', 8 | shouldContain: '%field% should contain either of %options%', 9 | } as const; 10 | -------------------------------------------------------------------------------- /packages/shared/src/configs/queue.config.ts: -------------------------------------------------------------------------------- 1 | import config, { IConfig } from 'config'; 2 | const exchangeConfig = config.get('queue:exchanges'); 3 | 4 | export const QueueConfig = { 5 | Cms: { 6 | Exchange: exchangeConfig.get('cms'), 7 | ActivityLogQueue: 'activity_log', 8 | }, 9 | Api: { 10 | Exchange: exchangeConfig.get('api'), 11 | }, 12 | Shared: { 13 | GenerateThumbnailQueue: 'generate_thumbnail', 14 | }, 15 | } as const; 16 | -------------------------------------------------------------------------------- /packages/shared/src/entities/email-template.entity.ts: -------------------------------------------------------------------------------- 1 | import { BaseEntity, SetRepository } from 'core/entities'; 2 | import { postgresDataSource } from 'shared/connections'; 3 | import { Column, Entity } from 'typeorm'; 4 | 5 | @Entity({ name: 'email_templates' }) 6 | @SetRepository(postgresDataSource) 7 | export class EmailTemplateEntity extends BaseEntity { 8 | @Column() 9 | code: string; 10 | 11 | @Column() 12 | subject: string; 13 | 14 | @Column() 15 | content: string; 16 | } 17 | -------------------------------------------------------------------------------- /apps/consumer/src/controllers/health.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Route } from 'core/controllers'; 2 | import { HTTPMethods } from 'core/utils'; 3 | import { Request, Response } from 'express'; 4 | 5 | @Controller('/healthz') 6 | export class HealthController { 7 | @Route({ method: HTTPMethods.Get, path: '/' }) 8 | async getHealth(req: Request, res: Response) { 9 | return res.status(200).json({ 10 | status: 'Running', 11 | code: 200, 12 | }); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/logger/cms-logger.ts: -------------------------------------------------------------------------------- 1 | import { LogDecoratorFactory, Logger } from 'shared/logger'; 2 | 3 | export const CmsLogger = Logger.configure( 4 | [ 5 | { fileName: 'combined.log' }, 6 | { 7 | fileName: 'error.log', 8 | level: 'error', 9 | }, 10 | ], 11 | { 12 | dirname: __dirname + '/../../logs', 13 | } 14 | ); 15 | 16 | export const Log = (title = '', message = '') => 17 | LogDecoratorFactory(CmsLogger, title, message); 18 | -------------------------------------------------------------------------------- /packages/rabbitmq/src/service/decorators/inject-rmq-service.decorator.ts: -------------------------------------------------------------------------------- 1 | import Container from 'typedi'; 2 | import { RabbitMQClient } from '../rabbitmq.service'; 3 | 4 | export function InjectRMQ(): any { 5 | return (target: any, prop: string | symbol) => { 6 | const rmqClient = Container.get('RMQ_SERVICE'); 7 | Object.defineProperty(target, prop, { 8 | value: rmqClient, 9 | writable: true, 10 | }); 11 | return target; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /packages/shared/src/validators/customs/unique-slug.validator.ts: -------------------------------------------------------------------------------- 1 | import { RoleEntity } from 'shared/entities'; 2 | import { AbstractUniqueValidator } from '../abstracts'; 3 | import { Repository } from 'typeorm'; 4 | import { GetRepository } from 'core/entities'; 5 | 6 | export class UniqueSlugValidator extends AbstractUniqueValidator { 7 | @GetRepository(RoleEntity) 8 | protected repository: Repository; 9 | 10 | constructor() { 11 | super(['slug']); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /apps/texpress-api/src/configs/social-login.config.ts: -------------------------------------------------------------------------------- 1 | import config from 'config'; 2 | 3 | export const SocialLoginConfig = { 4 | FACEBOOK_FETCH_PROFILE_URL: 5 | process.env.FACEBOOK_FETCH_URL || 6 | config.get('socialLogin.facebook'), 7 | GOOGLE_FETCH_PROFILE_URL: 8 | process.env.GOOGLE_FETCH_URL || 9 | config.get('socialLogin.google'), 10 | APPLE_FETCH_PROFILE_URL: 11 | process.env.APPLE_FETCH_URL || config.get('socialLogin.apple'), 12 | }; 13 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/dom-utils/getNodeScroll.js: -------------------------------------------------------------------------------- 1 | import getWindowScroll from "./getWindowScroll.js"; 2 | import getWindow from "./getWindow.js"; 3 | import { isHTMLElement } from "./instanceOf.js"; 4 | import getHTMLElementScroll from "./getHTMLElementScroll.js"; 5 | export default function getNodeScroll(node) { 6 | if (node === getWindow(node) || !isHTMLElement(node)) { 7 | return getWindowScroll(node); 8 | } else { 9 | return getHTMLElementScroll(node); 10 | } 11 | } -------------------------------------------------------------------------------- /apps/texpress-cms/src/views/common/breadcrumbs.ejs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/core/src/entities/decorators/get-repository.decorator.ts: -------------------------------------------------------------------------------- 1 | import Container from 'typedi'; 2 | import { BaseEntity } from '../base.entity'; 3 | 4 | export function GetRepository(entity: ThisType): PropertyDecorator { 5 | return (target: any, propertyKey: string | symbol) => { 6 | target[propertyKey] = Container.get(entity); 7 | Object.defineProperty(target, propertyKey, { 8 | value: Container.get(entity), 9 | }); 10 | return target; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/index.js: -------------------------------------------------------------------------------- 1 | export * from "./enums.js"; 2 | export * from "./modifiers/index.js"; // eslint-disable-next-line import/no-unused-modules 3 | 4 | export { popperGenerator, detectOverflow, createPopper as createPopperBase } from "./createPopper.js"; // eslint-disable-next-line import/no-unused-modules 5 | 6 | export { createPopper } from "./popper.js"; // eslint-disable-next-line import/no-unused-modules 7 | 8 | export { createPopper as createPopperLite } from "./popper-lite.js"; -------------------------------------------------------------------------------- /apps/texpress-api/src/configs/common.config.ts: -------------------------------------------------------------------------------- 1 | import config from 'config'; 2 | 3 | export const CommonConfigs = { 4 | Jwt: { 5 | AccessSecret: config.get('jwt.access:secret'), 6 | AccessExpiresIn: config.get('jwt.access:expiresIn'), 7 | RefreshSecret: config.get('jwt.refresh:secret'), 8 | RefreshExpiresIn: config.get('jwt.refresh:expiresIn'), 9 | }, 10 | Otp: { 11 | NextOtpWaitTime: config.get('otp.nextOtpWaitTime'), 12 | }, 13 | }; 14 | -------------------------------------------------------------------------------- /apps/texpress-api/src/exceptions/interfaces/api-error-payloads.interface.ts: -------------------------------------------------------------------------------- 1 | export interface APIErrorPayload { 2 | name: string; 3 | message: string; 4 | statusCode: number; 5 | stack?: string; 6 | } 7 | 8 | export interface ValidationErrorsArray { 9 | field: string; 10 | errors: string[]; 11 | } 12 | 13 | export interface APIValidationErrorPayload { 14 | name: string; 15 | message: string; 16 | statusCode: number; 17 | detail: ValidationErrorsArray[]; 18 | stack?: string; 19 | } 20 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/views/common/message.ejs: -------------------------------------------------------------------------------- 1 | <% if(exists(locals.message)) { %> 2 | 7 | <% } else if(exists(locals.messageToast)) { %> 8 | <%= get(locals.messageToast) %> 9 | <% } %> -------------------------------------------------------------------------------- /apps/texpress-cms/src/dtos/create-user.dto.ts: -------------------------------------------------------------------------------- 1 | import { Expose } from 'class-transformer'; 2 | 3 | export class CreateUserDto { 4 | @Expose() firstName: string; 5 | @Expose() lastName: string; 6 | @Expose() dob: string; 7 | @Expose() gender: string; 8 | @Expose() email: string; 9 | @Expose() mobileNumber: string; 10 | @Expose() roleId: string; 11 | @Expose() password: string; 12 | @Expose() status: string; 13 | @Expose() sendActivationLink: string; 14 | @Expose() twoFAEnabled: string; 15 | } 16 | -------------------------------------------------------------------------------- /packages/core/src/controllers/decorators/api-controller.decorator.ts: -------------------------------------------------------------------------------- 1 | import { ControllerMetadataKeys } from 'core/utils'; 2 | import { Service } from 'typedi'; 3 | 4 | export function ApiController(basePath = ''): ClassDecorator { 5 | return (target) => { 6 | Reflect.defineMetadata( 7 | ControllerMetadataKeys.BASE_PATH, 8 | basePath, 9 | target 10 | ); 11 | Reflect.defineMetadata(ControllerMetadataKeys.IS_API, true, target); 12 | Service()(target); 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /apps/texpress-api/src/services/user.service.ts: -------------------------------------------------------------------------------- 1 | import { Service } from 'typedi'; 2 | import { Repository } from 'typeorm'; 3 | import { GetRepository } from 'core/entities'; 4 | import { BaseService } from 'core/services'; 5 | import { ApiUserEntity } from 'shared/entities'; 6 | 7 | @Service() 8 | export class ApiUserService extends BaseService { 9 | @GetRepository(ApiUserEntity) 10 | protected readonly repository: Repository; 11 | protected readonly filterColumns = ['firstName', 'lastName']; 12 | } 13 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/database/migrations/1674332715660-add_uuid_extension.ts: -------------------------------------------------------------------------------- 1 | import { MigrationInterface, QueryRunner } from 'typeorm'; 2 | 3 | export class addUuidExtension1674332715660 implements MigrationInterface { 4 | public async up(queryRunner: QueryRunner): Promise { 5 | await queryRunner.query(`create extension if not exists "uuid-ossp"`); 6 | } 7 | 8 | public async down(queryRunner: QueryRunner): Promise { 9 | await queryRunner.query(`drop extension if exists "uuid-ossp"`); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/core/src/controllers/decorators/api-protected-route.decorator.ts: -------------------------------------------------------------------------------- 1 | import { jwtAuth } from 'shared/middlewares'; 2 | import { RouteOptions } from '../interfaces'; 3 | import { Route } from './route.decorator'; 4 | 5 | export function APIProtectedRoute({ 6 | method, 7 | path, 8 | middlewares = [], 9 | validators = [], 10 | }: RouteOptions): MethodDecorator { 11 | return Route({ 12 | method, 13 | path, 14 | middlewares: [jwtAuth, ...middlewares], 15 | validators, 16 | }); 17 | } 18 | -------------------------------------------------------------------------------- /packages/core/src/utils/provide-middleware.util.ts: -------------------------------------------------------------------------------- 1 | import { Provider, ProviderWithOptions } from 'core/providers'; 2 | 3 | /** 4 | * Returns a middleware provider 5 | * 6 | * @export 7 | * @template K 8 | * @param {Middleware} providerClass 9 | * @param {K} options 10 | * @returns {ProviderWithOptions} 11 | */ 12 | export function provideMiddleware( 13 | providerClass: Provider, 14 | options: K 15 | ): ProviderWithOptions { 16 | return { 17 | class: providerClass, 18 | options, 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /packages/shared/src/services/user.service.ts: -------------------------------------------------------------------------------- 1 | import { Service } from 'typedi'; 2 | import { Repository } from 'typeorm'; 3 | import { GetRepository } from 'core/entities'; 4 | import { BaseService } from 'core/services'; 5 | import { ApiUserEntity } from 'shared/entities'; 6 | 7 | @Service() 8 | export class ApiUserService extends BaseService { 9 | @GetRepository(ApiUserEntity) 10 | protected readonly repository: Repository; 11 | protected readonly filterColumns = ['firstName', 'lastName']; 12 | } 13 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/views/users/change-password.ejs: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |

Change password

5 | <%- include('../common/change-password-form', { 6 | formSubmitUrl: '', 7 | email: get(locals.data.user.email), 8 | mappedErrors: locals.mappedErrors, 9 | inputData: locals.inputData 10 | }) %> 11 |
12 |
13 | -------------------------------------------------------------------------------- /packages/core/src/controllers/interfaces/api-response.interface.ts: -------------------------------------------------------------------------------- 1 | import { PaginationOptions } from 'core/interfaces'; 2 | import { APIErrorPayload, APIValidationErrorPayload } from '@api/exceptions'; 3 | 4 | export interface APIResponse { 5 | meta?: MetaInterface; 6 | error?: Partial | Partial; 7 | data?: K; 8 | } 9 | 10 | export interface MetaInterface { 11 | copyright: string; 12 | email: string; 13 | api: Record; 14 | pagination?: PaginationOptions; 15 | } 16 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/dom-utils/isScrollParent.js: -------------------------------------------------------------------------------- 1 | import getComputedStyle from "./getComputedStyle.js"; 2 | export default function isScrollParent(element) { 3 | // Firefox wants us to check `-x` and `-y` variations as well 4 | var _getComputedStyle = getComputedStyle(element), 5 | overflow = _getComputedStyle.overflow, 6 | overflowX = _getComputedStyle.overflowX, 7 | overflowY = _getComputedStyle.overflowY; 8 | 9 | return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX); 10 | } -------------------------------------------------------------------------------- /packages/shared/src/exceptions/unprocessable-entity.exception.ts: -------------------------------------------------------------------------------- 1 | import { HttpException } from 'core/exceptions'; 2 | import { HttpStatus } from 'core/utils'; 3 | 4 | export class UnprocessableEntityException< 5 | ValidationResultType 6 | > extends HttpException { 7 | constructor(public readonly validationResult: ValidationResultType) { 8 | super( 9 | HttpStatus.UNPROCESSABLE_ENTITY, 10 | 'Unprocessable Entity', 11 | UnprocessableEntityException.name, 12 | true 13 | ); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/shared/src/validators/customs/gender.validator.ts: -------------------------------------------------------------------------------- 1 | import { CustomValidator } from 'core/validators'; 2 | 3 | enum Gender { 4 | Male = 'male', 5 | Female = 'female', 6 | Other = 'other', 7 | } 8 | 9 | export class GenderValidator implements CustomValidator { 10 | validate(value: Gender) { 11 | if (Object.values(Gender).indexOf(value) < 0) { 12 | throw new Error( 13 | `Gender should be ${Object.values(Gender).join(', or ')}` 14 | ); 15 | } 16 | return true; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/shared/src/middlewares/jwt-auth.middleware.ts: -------------------------------------------------------------------------------- 1 | import { NextFunction, Request, Response } from 'express'; 2 | import passport from 'passport'; 3 | import { UnauthorizedException } from '../exceptions'; 4 | 5 | export const jwtAuth = (req: Request, res: Response, next: NextFunction) => { 6 | passport.authenticate('jwt', { session: false }, (err: any, user: any) => { 7 | if (err || !user) { 8 | return next(new UnauthorizedException()); 9 | } 10 | req.user = user; 11 | return next(); 12 | })(req, res, next); 13 | }; 14 | -------------------------------------------------------------------------------- /packages/core/src/entities/base.entity.ts: -------------------------------------------------------------------------------- 1 | import { Exclude } from 'class-transformer'; 2 | import { 3 | CreateDateColumn, 4 | PrimaryGeneratedColumn, 5 | UpdateDateColumn, 6 | } from 'typeorm'; 7 | 8 | export class BaseEntity { 9 | @PrimaryGeneratedColumn() 10 | @Exclude({ toPlainOnly: true }) 11 | id: number; 12 | 13 | @CreateDateColumn({ 14 | default: `now()`, 15 | }) 16 | createdAt: Date; 17 | 18 | @UpdateDateColumn({ 19 | default: `now()`, 20 | onUpdate: 'now()', 21 | }) 22 | updatedAt: Date; 23 | } 24 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/favicon/site.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Themesberg", 3 | "short_name": "Themesberg", 4 | "icons": [ 5 | { 6 | "src": "/android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "/android-chrome-512x512.png", 12 | "sizes": "512x512", 13 | "type": "image/png" 14 | } 15 | ], 16 | "theme_color": "#ffffff", 17 | "background_color": "#ffffff", 18 | "display": "standalone" 19 | } 20 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/entities/cms-config.entity.ts: -------------------------------------------------------------------------------- 1 | import { BaseEntity, SetRepository } from 'core/entities'; 2 | import { postgresDataSource } from 'shared/connections'; 3 | import { Column, Entity } from 'typeorm'; 4 | 5 | @Entity({ name: 'cms_configs' }) 6 | @SetRepository(postgresDataSource) 7 | export class CMSConfigEntity extends BaseEntity { 8 | @Column() 9 | _id: string; 10 | 11 | @Column() 12 | name: string; 13 | 14 | @Column() 15 | slug: string; 16 | 17 | @Column() 18 | value: string; 19 | 20 | @Column() 21 | type: string; 22 | } 23 | -------------------------------------------------------------------------------- /packages/core/src/interfaces/startup-options.interface.ts: -------------------------------------------------------------------------------- 1 | import { Handler } from 'express'; 2 | import { ExceptionHandler } from 'core/exceptions'; 3 | import { Provider, ProviderWithOptions } from 'core/providers'; 4 | 5 | export interface StartupOptions { 6 | name?: string; 7 | middlewares?: Handler[]; 8 | middlewareProviders?: (Provider | ProviderWithOptions)[]; 9 | locals?: Record[]; 10 | routePrefixes?: { 11 | cmsPrefix?: string; 12 | apiPrefix?: string; 13 | }; 14 | exceptionHandlers?: ExceptionHandler[]; 15 | } 16 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/favicon/site.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Themesberg", 3 | "short_name": "Themesberg", 4 | "icons": [ 5 | { 6 | "src": "/android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "/android-chrome-512x512.png", 12 | "sizes": "512x512", 13 | "type": "image/png" 14 | } 15 | ], 16 | "theme_color": "#ffffff", 17 | "background_color": "#ffffff", 18 | "display": "standalone" 19 | } 20 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/modifiers/index.js: -------------------------------------------------------------------------------- 1 | export { default as applyStyles } from "./applyStyles.js"; 2 | export { default as arrow } from "./arrow.js"; 3 | export { default as computeStyles } from "./computeStyles.js"; 4 | export { default as eventListeners } from "./eventListeners.js"; 5 | export { default as flip } from "./flip.js"; 6 | export { default as hide } from "./hide.js"; 7 | export { default as offset } from "./offset.js"; 8 | export { default as popperOffsets } from "./popperOffsets.js"; 9 | export { default as preventOverflow } from "./preventOverflow.js"; -------------------------------------------------------------------------------- /packages/shared/src/dtos/common-search-query.dto.ts: -------------------------------------------------------------------------------- 1 | import { CommonSearchQuery } from 'core/interfaces'; 2 | import { Schema, SchemaProperty } from 'core/swagger'; 3 | 4 | @Schema() 5 | export class CommonSearchQueryDto implements CommonSearchQuery { 6 | @SchemaProperty({ 7 | type: 'string', 8 | }) 9 | keywords?: string; 10 | 11 | @SchemaProperty({ 12 | type: 'number', 13 | example: '1', 14 | }) 15 | page?: number; 16 | 17 | @SchemaProperty({ 18 | type: 'number', 19 | example: '25', 20 | }) 21 | take?: number; 22 | } 23 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/controllers/web/home.controller.ts: -------------------------------------------------------------------------------- 1 | import { Request, Response } from 'express'; 2 | import { BaseController, Controller, ProtectedRoute } from 'core/controllers'; 3 | import { HTTPMethods } from 'core/utils'; 4 | 5 | @Controller('/home') 6 | export class HomeController extends BaseController { 7 | _title = 'Home'; 8 | _viewPath = 'home'; 9 | _module = 'home'; 10 | 11 | @ProtectedRoute({ 12 | path: '/', 13 | method: HTTPMethods.Get, 14 | }) 15 | index(req: Request, res: Response) { 16 | return this.render(res); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/views/roles/partials/_permission-switch.ejs: -------------------------------------------------------------------------------- 1 |
2 | ` ${o} `): '' %> 12 | /> 13 | 14 |
-------------------------------------------------------------------------------- /packages/core/src/swagger/interfaces/api-response.interface.ts: -------------------------------------------------------------------------------- 1 | import { Class } from 'core/interfaces'; 2 | 3 | export interface ApiResponseProps { 4 | code?: string; 5 | description?: string; 6 | contentType?: 7 | | 'application/json' 8 | | 'text/plain' 9 | | 'application/pdf' 10 | | string; 11 | schema?: 12 | | Class 13 | | { 14 | type: string; 15 | properties?: Record; 16 | format?: string; 17 | example?: any; 18 | [props: string]: any; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/favicon/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Bootstrap", 3 | "short_name": "Bootstrap", 4 | "icons": [ 5 | { 6 | "src": "/docs/4.3/assets/img/favicons/android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "/docs/4.3/assets/img/favicons/android-chrome-512x512.png", 12 | "sizes": "512x512", 13 | "type": "image/png" 14 | } 15 | ], 16 | "start_url": "/?utm_source=a2hs", 17 | "theme_color": "#563d7c", 18 | "background_color": "#563d7c", 19 | "display": "standalone" 20 | } 21 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/favicon/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Bootstrap", 3 | "short_name": "Bootstrap", 4 | "icons": [ 5 | { 6 | "src": "/docs/4.3/assets/img/favicons/android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "/docs/4.3/assets/img/favicons/android-chrome-512x512.png", 12 | "sizes": "512x512", 13 | "type": "image/png" 14 | } 15 | ], 16 | "start_url": "/?utm_source=a2hs", 17 | "theme_color": "#563d7c", 18 | "background_color": "#563d7c", 19 | "display": "standalone" 20 | } 21 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/events/activity-logs/decorators/activity-log-event-emitter.decorator.ts: -------------------------------------------------------------------------------- 1 | import { EventEmitterDecoratorFactory } from 'core/events'; 2 | import { ActivityLogsEvents } from '../activity-logs.event'; 3 | import { ActivityLogEventTypes } from '../interfaces/activity-log-types.interface'; 4 | 5 | export function ActivityLogEventEmitter< 6 | EventName extends keyof ActivityLogEventTypes 7 | >( 8 | event: EventName, 9 | mapper: (returnedValue: any) => ActivityLogEventTypes[EventName] | false 10 | ) { 11 | return EventEmitterDecoratorFactory(ActivityLogsEvents, event, mapper); 12 | } 13 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/views/base.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <%- include('common/head') %> 5 | 6 | 7 | <%- include('common/partials/_vendor-js') %> 8 | <%- include('common/message') %> 9 | <%- include('common/sidebar') %> 10 |
11 | <%- include('common/navbar') %> 12 | <%- include('common/error') %> 13 | <%- include('common/errors') %> 14 | <%- include('common/header') %> 15 | <%- include(page) %> 16 |
17 | 18 | 19 | -------------------------------------------------------------------------------- /turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "pipeline": { 3 | "dev": { 4 | "cache": false, 5 | "persistent": true 6 | }, 7 | "build": { 8 | "dependsOn": ["^build"], 9 | "outputs": ["dist/**"] 10 | }, 11 | "watch:js": { "cache": false }, 12 | "build:js": { "cache": true }, 13 | "lint": { "cache": true }, 14 | "lint:fix": { "cache": true }, 15 | "clean": { "cache": false }, 16 | "build:tsc": { "cache": false, "outputs": ["dist/**"] }, 17 | "start": { "cache": false, "dependsOn": ["build"] } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/vendor/waypoints/testem.json: -------------------------------------------------------------------------------- 1 | { 2 | "framework": "jasmine", 3 | "launch_in_dev": [ 4 | "PhantomJS" 5 | ], 6 | "launch_in_ci": [ 7 | "PhantomJS" 8 | ], 9 | "src_files": [ 10 | "bower_components/jquery/dist/jquery.js", 11 | "bower_components/jasmine-jquery/lib/jasmine-jquery.js", 12 | "bower_components/zepto/zepto.js", 13 | 14 | "src/waypoint.js", 15 | "src/context.js", 16 | "src/group.js", 17 | "src/debug.js", 18 | "src/adapters/*.js", 19 | "src/shortcuts/*.js", 20 | 21 | "test/settings.js", 22 | "test/*-spec.js" 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/waypoints/testem.json: -------------------------------------------------------------------------------- 1 | { 2 | "framework": "jasmine", 3 | "launch_in_dev": [ 4 | "PhantomJS" 5 | ], 6 | "launch_in_ci": [ 7 | "PhantomJS" 8 | ], 9 | "src_files": [ 10 | "bower_components/jquery/dist/jquery.js", 11 | "bower_components/jasmine-jquery/lib/jasmine-jquery.js", 12 | "bower_components/zepto/zepto.js", 13 | 14 | "src/waypoint.js", 15 | "src/context.js", 16 | "src/group.js", 17 | "src/debug.js", 18 | "src/adapters/*.js", 19 | "src/shortcuts/*.js", 20 | 21 | "test/settings.js", 22 | "test/*-spec.js" 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /apps/texpress-api/test/e2e/app/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import request from 'supertest'; 2 | import { AppFactory } from '../../factories/app'; 3 | 4 | describe('App e2e', () => { 5 | jest.setTimeout(5000); 6 | let app: AppFactory; 7 | 8 | beforeAll(async () => { 9 | app = await AppFactory.new(); 10 | }); 11 | 12 | afterEach(async () => { 13 | if (app) await app.cleanDB(); 14 | }); 15 | 16 | afterAll(async () => { 17 | if (app) await app.close(); 18 | }); 19 | 20 | it('/ (GET)', () => { 21 | return request(app.appInstance).get('/').expect(400); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /apps/texpress-api/src/validators/refresh-token.validator.ts: -------------------------------------------------------------------------------- 1 | import { ValidationBuilder } from 'core/utils'; 2 | import { ValidatorWithStaticProps } from 'core/validators'; 3 | import { ValidationChain } from 'express-validator'; 4 | 5 | export class RefreshTokenValidator 6 | implements ValidatorWithStaticProps 7 | { 8 | static get rules(): Record { 9 | return { 10 | refreshToken: ValidationBuilder.ForField('refreshToken') 11 | .Required({ fieldDisplayName: 'Refresh token' }) 12 | .build(), 13 | }; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/shared/src/dtos/set-password.dto.ts: -------------------------------------------------------------------------------- 1 | import { Expose } from 'class-transformer'; 2 | import { Schema, SchemaProperty } from 'core/swagger'; 3 | 4 | @Schema() 5 | export class SetPasswordDto { 6 | @Expose() 7 | @SchemaProperty({ 8 | type: 'string', 9 | required: true, 10 | }) 11 | username: string; 12 | 13 | @Expose() 14 | @SchemaProperty({ 15 | type: 'string', 16 | required: true, 17 | }) 18 | password: string; 19 | 20 | @Expose() 21 | @SchemaProperty({ 22 | type: 'string', 23 | required: true, 24 | }) 25 | confirmPassword: string; 26 | } 27 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/technologies/vuejs-logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/technologies/vuejs-logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/shared/src/logger/console.logger.ts: -------------------------------------------------------------------------------- 1 | import { Service } from 'typedi'; 2 | import winston from 'winston'; 3 | 4 | @Service() 5 | export class ConsoleLogger { 6 | public logger: winston.Logger; 7 | constructor() { 8 | this.logger = winston.createLogger({ 9 | format: winston.format.simple(), 10 | transports: new winston.transports.Console(), 11 | }); 12 | } 13 | 14 | log(message: string, ...args: any[]) { 15 | this.logger.info(message, ...args); 16 | } 17 | 18 | error(message: string, ...args: any[]) { 19 | this.logger.error(message, ...args); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/utils/mergeByName.js: -------------------------------------------------------------------------------- 1 | export default function mergeByName(modifiers) { 2 | var merged = modifiers.reduce(function (merged, current) { 3 | var existing = merged[current.name]; 4 | merged[current.name] = existing ? Object.assign({}, existing, current, { 5 | options: Object.assign({}, existing.options, current.options), 6 | data: Object.assign({}, existing.data, current.data) 7 | }) : current; 8 | return merged; 9 | }, {}); // IE11 does not support Object.values 10 | 11 | return Object.keys(merged).map(function (key) { 12 | return merged[key]; 13 | }); 14 | } -------------------------------------------------------------------------------- /apps/texpress-cms/src/controllers/fallbacks/index.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Route } from 'core/controllers'; 2 | import { HttpException } from 'core/exceptions'; 3 | import { HTTPMethods } from 'core/utils'; 4 | import { HttpStatus } from 'core/utils'; 5 | import { NextFunction, Request, Response } from 'express'; 6 | 7 | @Controller('*', { fallback: true }) 8 | export class FallbackController { 9 | @Route({ 10 | path: '', 11 | method: HTTPMethods.All, 12 | }) 13 | handleFallback(_req: Request, _res: Response, next: NextFunction) { 14 | return next(new HttpException(HttpStatus.NOT_FOUND, 'Not found')); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /test/api/e2e/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": "../../../apps/texpress-api/test", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | }, 9 | "modulePaths": ["."], 10 | "moduleNameMapper": { 11 | "^shared(|/.*)$": "/../../../packages/shared/src/$1", 12 | "^core(|/.*)$": "/../../../packages/core/src/$1", 13 | "^@api(|/.*)$": "/../../../apps/texpress-api/src/$1", 14 | "^@cms(|/.*)$": "/../../../apps/texpress-cms/src/$1" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/shared/src/configs/database.ts: -------------------------------------------------------------------------------- 1 | import config from 'config'; 2 | 3 | export const DatabaseConfig = { 4 | HOST: process.env.DATABASE_HOST || config.get('database.host'), 5 | PORT: Number( 6 | process.env.DATABASE_PORT || config.get('database.port') 7 | ), 8 | USERNAME: 9 | process.env.DATABASE_USERNAME || 10 | config.get('database.username'), 11 | PASSWORD: 12 | process.env.DATABASE_PASSWORD || 13 | config.get('database.password'), 14 | DATABASE_NAME: 15 | process.env.DATABASE_NAME || 16 | config.get('database.database_name'), 17 | }; 18 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/views/common/input-field.ejs: -------------------------------------------------------------------------------- 1 | 2 | " 4 | class="form-control <%= get(locals.errorMessage) ? "is-invalid": "" %>" 5 | id="<%= get(locals.name) %>" 6 | name="<%= get(locals.name) %>" 7 | value="<%= get(locals.value) %>" 8 | placeholder="<%= get(locals.placeholder) %>" 9 | <%= typeof (required) !== 'undefined' && !required ? '': 'required' %> 10 | <%= typeof (options) !== 'undefined' && Array.isArray(options) ? options.map(option => ` ${option} `): '' %> 11 | /> 12 | <%- include('./invalid-feedback') %> -------------------------------------------------------------------------------- /packages/rabbitmq/src/consumer/decorators/consume.decorator.ts: -------------------------------------------------------------------------------- 1 | import { ConsumersMetadataKeys } from 'core/utils'; 2 | 3 | export function Consume(exchange: string, bindingKey: string): MethodDecorator { 4 | return (target, prop, descriptor) => { 5 | const consumers = 6 | Reflect.getMetadata(ConsumersMetadataKeys.CONSUMERS, target) || []; 7 | consumers.push({ 8 | name: `${exchange}.${bindingKey}`, 9 | handler: descriptor.value, 10 | }); 11 | Reflect.defineMetadata( 12 | ConsumersMetadataKeys.CONSUMERS, 13 | consumers, 14 | target 15 | ); 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /packages/core/src/controllers/decorators/controller.decorator.ts: -------------------------------------------------------------------------------- 1 | import { ControllerMetadataKeys } from 'core/utils'; 2 | import { Service } from 'typedi'; 3 | 4 | export function Controller( 5 | basePath = '', 6 | options?: { fallback: boolean } 7 | ): ClassDecorator { 8 | return (target) => { 9 | Reflect.defineMetadata( 10 | ControllerMetadataKeys.BASE_PATH, 11 | basePath, 12 | target 13 | ); 14 | Reflect.defineMetadata( 15 | ControllerMetadataKeys.IS_FALLBACK, 16 | options?.fallback || false, 17 | target 18 | ); 19 | Service()(target); 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /packages/core/src/events/base-event.ts: -------------------------------------------------------------------------------- 1 | import EventEmitter from 'events'; 2 | 3 | export abstract class BaseEvent> { 4 | private emitter = new EventEmitter(); 5 | 6 | emit( 7 | eventName: TEventName & string, 8 | ...args: TEvents[TEventName] 9 | ) { 10 | this.emitter.emit(eventName, ...(args as TEvents[TEventName][])); 11 | } 12 | 13 | on( 14 | eventName: TEventName & string, 15 | handler: (...args: TEvents[TEventName]) => void 16 | ) { 17 | this.emitter.on(eventName, handler as any); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/shared/src/entities/permission.entity.ts: -------------------------------------------------------------------------------- 1 | import { postgresDataSource } from '../connections'; 2 | import { BaseEntity, SetRepository } from 'core/entities'; 3 | import { Column, Entity } from 'typeorm'; 4 | 5 | @Entity({ name: 'permissions' }) 6 | @SetRepository(postgresDataSource) 7 | export class PermissionEntity extends BaseEntity { 8 | @Column({ type: 'uuid', default: () => 'uuid_generate_v4()' }) 9 | _id: string; 10 | 11 | @Column() 12 | name: string; 13 | 14 | @Column() 15 | route: string; 16 | 17 | @Column() 18 | method: string; 19 | 20 | @Column() 21 | action: string; 22 | 23 | @Column() 24 | module: string; 25 | } 26 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/dom-utils/getScrollParent.js: -------------------------------------------------------------------------------- 1 | import getParentNode from "./getParentNode.js"; 2 | import isScrollParent from "./isScrollParent.js"; 3 | import getNodeName from "./getNodeName.js"; 4 | import { isHTMLElement } from "./instanceOf.js"; 5 | export default function getScrollParent(node) { 6 | if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) { 7 | // $FlowFixMe[incompatible-return]: assume body is always available 8 | return node.ownerDocument.body; 9 | } 10 | 11 | if (isHTMLElement(node) && isScrollParent(node)) { 12 | return node; 13 | } 14 | 15 | return getScrollParent(getParentNode(node)); 16 | } -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/hr.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Croatian localisation 3 | */ 4 | (function () { 5 | Datepicker.locales.hr = { 6 | days: ["Nedjelja", "Ponedjeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota"], 7 | daysShort: ["Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub"], 8 | daysMin: ["Ne", "Po", "Ut", "Sr", "Če", "Pe", "Su"], 9 | months: ["Siječanj", "Veljača", "Ožujak", "Travanj", "Svibanj", "Lipanj", "Srpanj", "Kolovoz", "Rujan", "Listopad", "Studeni", "Prosinac"], 10 | monthsShort: ["Sij", "Velj", "Ožu", "Tra", "Svi", "Lip", "Srp", "Kol", "Ruj", "Lis", "Stu", "Pro"], 11 | today: "Danas" 12 | }; 13 | }()); 14 | -------------------------------------------------------------------------------- /apps/texpress-cms/resources/js/cms-configs/index.js: -------------------------------------------------------------------------------- 1 | $('.toggle-config-input').click(function (e) { 2 | const configName = $(this).data('config'); 3 | $(`input#${configName}`)?.prop('disabled', false); 4 | $(this).addClass('d-none'); 5 | $(`#toggle-done_${configName}`).removeClass('d-none'); 6 | $(`#toggle-cancel_${configName}`).removeClass('d-none'); 7 | }); 8 | 9 | $('.cancel').click(function (e) { 10 | const configName = $(this).data('config'); 11 | $(`input#${configName}`)?.prop('disabled', true); 12 | $(this).addClass('d-none'); 13 | $(`#toggle-done_${configName}`).addClass('d-none'); 14 | $(`#toggle-edit_${configName}`).removeClass('d-none'); 15 | }); 16 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/popper-lite.js: -------------------------------------------------------------------------------- 1 | import { popperGenerator, detectOverflow } from "./createPopper.js"; 2 | import eventListeners from "./modifiers/eventListeners.js"; 3 | import popperOffsets from "./modifiers/popperOffsets.js"; 4 | import computeStyles from "./modifiers/computeStyles.js"; 5 | import applyStyles from "./modifiers/applyStyles.js"; 6 | var defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles]; 7 | var createPopper = /*#__PURE__*/popperGenerator({ 8 | defaultModifiers: defaultModifiers 9 | }); // eslint-disable-next-line import/no-unused-modules 10 | 11 | export { createPopper, popperGenerator, defaultModifiers, detectOverflow }; -------------------------------------------------------------------------------- /packages/core/src/database/database.abstract.ts: -------------------------------------------------------------------------------- 1 | import { DataSource } from 'typeorm'; 2 | import { ConsoleLogger } from 'shared/logger'; 3 | import Container from 'typedi'; 4 | 5 | export abstract class Database { 6 | protected abstract connection: DataSource; 7 | protected readonly logger: ConsoleLogger; 8 | constructor() { 9 | this.logger = Container.get(ConsoleLogger); 10 | } 11 | async init() { 12 | try { 13 | await this.connection.initialize(); 14 | this.logger.log('Database connection established successfully!'); 15 | } catch (error) { 16 | this.logger.error('Database connection failed', error); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/he.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Hebrew translation for bootstrap-datepicker 3 | * Sagie Maoz 4 | */ 5 | (function () { 6 | Datepicker.locales.he = { 7 | days: ["ראשון", "שני", "שלישי", "רביעי", "חמישי", "שישי", "שבת", "ראשון"], 8 | daysShort: ["א", "ב", "ג", "ד", "ה", "ו", "ש", "א"], 9 | daysMin: ["א", "ב", "ג", "ד", "ה", "ו", "ש", "א"], 10 | months: ["ינואר", "פברואר", "מרץ", "אפריל", "מאי", "יוני", "יולי", "אוגוסט", "ספטמבר", "אוקטובר", "נובמבר", "דצמבר"], 11 | monthsShort: ["ינו", "פבר", "מרץ", "אפר", "מאי", "יונ", "יול", "אוג", "ספט", "אוק", "נוב", "דצמ"], 12 | today: "היום", 13 | rtl: true 14 | }; 15 | }()); 16 | -------------------------------------------------------------------------------- /packages/shared/src/entities/admin-activity-log.entity.ts: -------------------------------------------------------------------------------- 1 | import { BaseEntity, SetRepository } from 'core/entities'; 2 | import { postgresDataSource } from 'shared/connections'; 3 | import { Column, Entity } from 'typeorm'; 4 | 5 | @Entity({ name: 'adminActivityLogs' }) 6 | @SetRepository(postgresDataSource) 7 | export class AdminActivityLogEntity extends BaseEntity { 8 | @Column({ type: 'uuid', default: () => 'uuid_generate_v4()' }) 9 | _id: string; 10 | 11 | @Column() 12 | module: string; 13 | 14 | @Column() 15 | action: string; 16 | 17 | @Column() 18 | description: string; 19 | 20 | @Column() 21 | userId: number; 22 | 23 | @Column() 24 | activityTimestamp: Date; 25 | } 26 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/ja.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Japanese translation for bootstrap-datepicker 3 | * Norio Suzuki 4 | */ 5 | (function () { 6 | Datepicker.locales.ja = { 7 | days: ["日曜", "月曜", "火曜", "水曜", "木曜", "金曜", "土曜"], 8 | daysShort: ["日", "月", "火", "水", "木", "金", "土"], 9 | daysMin: ["日", "月", "火", "水", "木", "金", "土"], 10 | months: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], 11 | monthsShort: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], 12 | today: "今日", 13 | format: "yyyy/mm/dd", 14 | titleFormat: "y年mm月", 15 | clear: "クリア" 16 | }; 17 | }()); 18 | -------------------------------------------------------------------------------- /packages/core/src/swagger/decorators/api-key-auth.decorator.ts: -------------------------------------------------------------------------------- 1 | import { SwaggerMetadataKeys } from 'core/utils'; 2 | 3 | export function ApiKeyAuth(root = false): any { 4 | if (root === true) { 5 | return function (target: Function): void { 6 | Reflect.defineMetadata( 7 | SwaggerMetadataKeys.API_KEY_AUTH, 8 | true, 9 | target 10 | ); 11 | } as ClassDecorator; 12 | } 13 | return function (target, propKey) { 14 | Reflect.defineMetadata( 15 | SwaggerMetadataKeys.API_KEY_AUTH, 16 | true, 17 | target.constructor, 18 | propKey 19 | ); 20 | } as MethodDecorator; 21 | } 22 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/cy.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Welsh translation for bootstrap-datepicker 3 | * S. Morris 4 | */ 5 | (function () { 6 | Datepicker.locales.cy = { 7 | days: ["Sul", "Llun", "Mawrth", "Mercher", "Iau", "Gwener", "Sadwrn"], 8 | daysShort: ["Sul", "Llu", "Maw", "Mer", "Iau", "Gwe", "Sad"], 9 | daysMin: ["Su", "Ll", "Ma", "Me", "Ia", "Gwe", "Sa"], 10 | months: ["Ionawr", "Chewfror", "Mawrth", "Ebrill", "Mai", "Mehefin", "Gorfennaf", "Awst", "Medi", "Hydref", "Tachwedd", "Rhagfyr"], 11 | monthsShort: ["Ion", "Chw", "Maw", "Ebr", "Mai", "Meh", "Gor", "Aws", "Med", "Hyd", "Tach", "Rha"], 12 | today: "Heddiw" 13 | }; 14 | }()); 15 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/az.js: -------------------------------------------------------------------------------- 1 | // Azerbaijani 2 | (function () { 3 | Datepicker.locales.az = { 4 | days: ["Bazar", "Bazar ertəsi", "Çərşənbə axşamı", "Çərşənbə", "Cümə axşamı", "Cümə", "Şənbə"], 5 | daysShort: ["B.", "B.e", "Ç.a", "Ç.", "C.a", "C.", "Ş."], 6 | daysMin: ["B.", "B.e", "Ç.a", "Ç.", "C.a", "C.", "Ş."], 7 | months: ["Yanvar", "Fevral", "Mart", "Aprel", "May", "İyun", "İyul", "Avqust", "Sentyabr", "Oktyabr", "Noyabr", "Dekabr"], 8 | monthsShort: ["Yan", "Fev", "Mar", "Apr", "May", "İyun", "İyul", "Avq", "Sen", "Okt", "Noy", "Dek"], 9 | today: "Bu gün", 10 | weekStart: 1, 11 | clear: "Təmizlə", 12 | monthsTitle: 'Aylar' 13 | }; 14 | }()); 15 | -------------------------------------------------------------------------------- /apps/texpress-cms/resources/js/common/toast.js: -------------------------------------------------------------------------------- 1 | const notyf = new Notyf({ 2 | position: { 3 | x: 'right', 4 | y: 'top', 5 | }, 6 | types: [ 7 | { 8 | type: 'error', 9 | dismissible: true, 10 | duration: 5000, 11 | }, 12 | { 13 | type: 'success', 14 | dismissible: true, 15 | duration: 5000, 16 | }, 17 | ], 18 | }); 19 | 20 | export function toastError(message) { 21 | notyf.open({ 22 | type: 'error', 23 | message: message, 24 | }); 25 | } 26 | 27 | export function toastSuccess(message) { 28 | notyf.open({ 29 | type: 'success', 30 | message: message, 31 | }); 32 | } 33 | -------------------------------------------------------------------------------- /babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["@babel/preset-typescript", "@babel/preset-env"], 3 | "plugins": [ 4 | [ 5 | "@babel/plugin-transform-typescript", 6 | { "onlyRemoveTypeImports": true, "strictMode": true } 7 | ], 8 | "babel-plugin-transform-typescript-metadata", 9 | ["@babel/plugin-proposal-decorators", { "legacy": true }], 10 | ["@babel/plugin-proposal-class-properties", { "loose": true }], 11 | [ 12 | "@babel/plugin-proposal-private-property-in-object", 13 | { "loose": true } 14 | ], 15 | ["@babel/plugin-proposal-private-methods", { "loose": true }] 16 | ], 17 | "babelrcRoots": [".", "apps/*", "packages/*"] 18 | } 19 | -------------------------------------------------------------------------------- /packages/core/src/exceptions/decorators/catch-async.decorator.ts: -------------------------------------------------------------------------------- 1 | import { NextFunction, Request, Response } from 'express'; 2 | 3 | export const CatchAsync: MethodDecorator = function ( 4 | _target: Object, 5 | _propertyKey, 6 | descriptor: PropertyDescriptor 7 | ) { 8 | const routeHandler = descriptor.value; 9 | descriptor.value = function ( 10 | req: Request, 11 | res: Response, 12 | next: NextFunction 13 | ) { 14 | if (routeHandler) { 15 | const response = routeHandler.bind(this)(req, res, next); 16 | if (response instanceof Promise) { 17 | response.catch(next); 18 | } 19 | } 20 | }; 21 | return descriptor; 22 | }; 23 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/bg.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Bulgarian translation for bootstrap-datepicker 3 | * Apostol Apostolov 4 | */ 5 | (function () { 6 | Datepicker.locales.bg = { 7 | days: ["Неделя", "Понеделник", "Вторник", "Сряда", "Четвъртък", "Петък", "Събота"], 8 | daysShort: ["Нед", "Пон", "Вто", "Сря", "Чет", "Пет", "Съб"], 9 | daysMin: ["Н", "П", "В", "С", "Ч", "П", "С"], 10 | months: ["Януари", "Февруари", "Март", "Април", "Май", "Юни", "Юли", "Август", "Септември", "Октомври", "Ноември", "Декември"], 11 | monthsShort: ["Ян", "Фев", "Мар", "Апр", "Май", "Юни", "Юли", "Авг", "Сеп", "Окт", "Ное", "Дек"], 12 | today: "днес" 13 | }; 14 | }()); 15 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/bs.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Bosnian translation for bootstrap-datepicker 3 | */ 4 | (function () { 5 | Datepicker.locales.bs = { 6 | days: ["Nedjelja","Ponedjeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota"], 7 | daysShort: ["Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub"], 8 | daysMin: ["N", "Po", "U", "Sr", "Č", "Pe", "Su"], 9 | months: ["Januar", "Februar", "Mart", "April", "Maj", "Juni", "Juli", "August", "Septembar", "Oktobar", "Novembar", "Decembar"], 10 | monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], 11 | today: "Danas", 12 | weekStart: 1, 13 | format: "dd.mm.yyyy" 14 | }; 15 | }()); 16 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/gl.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Galician translation 3 | */ 4 | (function () { 5 | Datepicker.locales.gl = { 6 | days: ["Domingo", "Luns", "Martes", "Mércores", "Xoves", "Venres", "Sábado"], 7 | daysShort: ["Dom", "Lun", "Mar", "Mér", "Xov", "Ven", "Sáb"], 8 | daysMin: ["Do", "Lu", "Ma", "Me", "Xo", "Ve", "Sa"], 9 | months: ["Xaneiro", "Febreiro", "Marzo", "Abril", "Maio", "Xuño", "Xullo", "Agosto", "Setembro", "Outubro", "Novembro", "Decembro"], 10 | monthsShort: ["Xan", "Feb", "Mar", "Abr", "Mai", "Xun", "Xul", "Ago", "Sep", "Out", "Nov", "Dec"], 11 | today: "Hoxe", 12 | clear: "Limpar", 13 | weekStart: 1, 14 | format: "dd/mm/yyyy" 15 | }; 16 | }()); 17 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/exceptions/handlers/forbidden-exception.handler.ts: -------------------------------------------------------------------------------- 1 | import { ExceptionHandler } from 'core/exceptions'; 2 | import { HttpStatus } from 'core/utils'; 3 | import { ForbiddenException } from 'shared/exceptions'; 4 | import { Request, Response, NextFunction } from 'express'; 5 | 6 | export class ForbiddenExceptionHandler extends ExceptionHandler { 7 | public handle( 8 | error: ForbiddenException, 9 | req: Request, 10 | res: Response, 11 | next: NextFunction 12 | ): void { 13 | if (error.statusCode !== HttpStatus.FORBIDDEN) { 14 | return next(error); 15 | } 16 | req.flash('error:toast', error.message); 17 | return res.redirect('back'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/shared/src/configs/orm.config.ts: -------------------------------------------------------------------------------- 1 | import { DataSourceOptions } from 'typeorm'; 2 | import { DatabaseConfig } from './database'; 3 | 4 | export const OrmConfig: DataSourceOptions = { 5 | type: 'postgres', 6 | host: DatabaseConfig.HOST, 7 | port: DatabaseConfig.PORT, 8 | username: DatabaseConfig.USERNAME, 9 | password: DatabaseConfig.PASSWORD, 10 | database: DatabaseConfig.DATABASE_NAME, 11 | entities: [ 12 | __dirname + '/../entities/*.entity{.ts,.js}', 13 | __dirname + 14 | '/../../../../apps/texpress-api/**/entities/*.entity{.ts,.js}', 15 | __dirname + 16 | '/../../../../apps/texpress-cms/**/entities/*.entity{.ts,.js}', 17 | ], 18 | synchronize: false, 19 | }; 20 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/exceptions/handlers/unauthorized-exception.handler.ts: -------------------------------------------------------------------------------- 1 | import { HttpException } from 'core/exceptions'; 2 | import { ExceptionHandler } from 'core/exceptions'; 3 | import { HttpStatus } from 'core/utils'; 4 | import { Request, Response, NextFunction } from 'express'; 5 | 6 | export class UnauthorizedExceptionHandler extends ExceptionHandler { 7 | public handle( 8 | error: HttpException, 9 | req: Request, 10 | res: Response, 11 | next: NextFunction 12 | ): void { 13 | if (error.statusCode !== HttpStatus.UNAUTHORIZED) { 14 | return next(error); 15 | } 16 | req.flash('error:toast', error.message); 17 | return res.redirect('/auth/login'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/ms.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Malay translation for bootstrap-datepicker 3 | * Ateman Faiz 4 | */ 5 | (function () { 6 | Datepicker.locales.ms = { 7 | days: ["Ahad", "Isnin", "Selasa", "Rabu", "Khamis", "Jumaat", "Sabtu"], 8 | daysShort: ["Aha", "Isn", "Sel", "Rab", "Kha", "Jum", "Sab"], 9 | daysMin: ["Ah", "Is", "Se", "Ra", "Kh", "Ju", "Sa"], 10 | months: ["Januari", "Februari", "Mac", "April", "Mei", "Jun", "Julai", "Ogos", "September", "Oktober", "November", "Disember"], 11 | monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Ogo", "Sep", "Okt", "Nov", "Dis"], 12 | today: "Hari Ini", 13 | clear: "Bersihkan" 14 | }; 15 | }()); 16 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/th.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Thai translation for bootstrap-datepicker 3 | * Suchau Jiraprapot 4 | */ 5 | (function () { 6 | Datepicker.locales.th = { 7 | days: ["อาทิตย์", "จันทร์", "อังคาร", "พุธ", "พฤหัส", "ศุกร์", "เสาร์", "อาทิตย์"], 8 | daysShort: ["อา", "จ", "อ", "พ", "พฤ", "ศ", "ส", "อา"], 9 | daysMin: ["อา", "จ", "อ", "พ", "พฤ", "ศ", "ส", "อา"], 10 | months: ["มกราคม", "กุมภาพันธ์", "มีนาคม", "เมษายน", "พฤษภาคม", "มิถุนายน", "กรกฎาคม", "สิงหาคม", "กันยายน", "ตุลาคม", "พฤศจิกายน", "ธันวาคม"], 11 | monthsShort: ["ม.ค.", "ก.พ.", "มี.ค.", "เม.ย.", "พ.ค.", "มิ.ย.", "ก.ค.", "ส.ค.", "ก.ย.", "ต.ค.", "พ.ย.", "ธ.ค."], 12 | today: "วันนี้" 13 | }; 14 | }()); 15 | -------------------------------------------------------------------------------- /apps/texpress-api/src/controllers/fallbacks/index.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Route } from 'core/controllers'; 2 | import { HttpException } from 'core/exceptions'; 3 | import { HTTPMethods, HttpStatus } from 'core/utils'; 4 | import { NextFunction, Request, Response } from 'express'; 5 | 6 | @Controller('*', { fallback: true }) 7 | export class FallbackController { 8 | @Route({ 9 | path: '', 10 | method: HTTPMethods.All, 11 | }) 12 | handleFallback(_req: Request, _res: Response, next: NextFunction) { 13 | return next( 14 | new HttpException( 15 | HttpStatus.NOT_FOUND, 16 | 'Not found', 17 | 'Fallback', 18 | false 19 | ) 20 | ); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/kk.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kazakh translation for bootstrap-datepicker 3 | * Yerzhan Tolekov 4 | */ 5 | (function () { 6 | Datepicker.locales.kk = { 7 | days: ["Жексенбі", "Дүйсенбі", "Сейсенбі", "Сәрсенбі", "Бейсенбі", "Жұма", "Сенбі"], 8 | daysShort: ["Жек", "Дүй", "Сей", "Сәр", "Бей", "Жұм", "Сен"], 9 | daysMin: ["Жк", "Дс", "Сс", "Ср", "Бс", "Жм", "Сн"], 10 | months: ["Қаңтар", "Ақпан", "Наурыз", "Сәуір", "Мамыр", "Маусым", "Шілде", "Тамыз", "Қыркүйек", "Қазан", "Қараша", "Желтоқсан"], 11 | monthsShort: ["Қаң", "Ақп", "Нау", "Сәу", "Мам", "Мау", "Шіл", "Там", "Қыр", "Қаз", "Қар", "Жел"], 12 | today: "Бүгін", 13 | weekStart: 1 14 | }; 15 | }()); 16 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/sl.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Slovene translation for bootstrap-datepicker 3 | * Gregor Rudolf 4 | */ 5 | (function () { 6 | Datepicker.locales.sl = { 7 | days: ["Nedelja", "Ponedeljek", "Torek", "Sreda", "Četrtek", "Petek", "Sobota"], 8 | daysShort: ["Ned", "Pon", "Tor", "Sre", "Čet", "Pet", "Sob"], 9 | daysMin: ["Ne", "Po", "To", "Sr", "Če", "Pe", "So"], 10 | months: ["Januar", "Februar", "Marec", "April", "Maj", "Junij", "Julij", "Avgust", "September", "Oktober", "November", "December"], 11 | monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Avg", "Sep", "Okt", "Nov", "Dec"], 12 | today: "Danes", 13 | weekStart: 1 14 | }; 15 | }()); 16 | -------------------------------------------------------------------------------- /packages/rabbitmq/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rabbitmq", 3 | "version": "1.0.0", 4 | "private": true, 5 | "main": "src/index.ts", 6 | "scripts": { 7 | "clean": "rimraf dist .turbo", 8 | "build:tsc": "npx tsc", 9 | "dev": "rimraf ./dist/ && cross-env NODE_ENV=development npm run build:dev", 10 | "build:dev": "babel ./src --root-mode upward --out-dir dist --extensions \".ts,.tsx\" --source-maps inline --watch --copy-files", 11 | "build": "babel ./src --root-mode upward --out-dir dist --extensions \".ts,.tsx\" --copy-files", 12 | "lint": "eslint ./src" 13 | }, 14 | "devDependencies": { 15 | "tsconfig": "*" 16 | }, 17 | "exports": { 18 | ".": "./dist/index.js" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/mk.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Macedonian translation for bootstrap-datepicker 3 | * Marko Aleksic 4 | */ 5 | (function () { 6 | Datepicker.locales.mk = { 7 | days: ["Недела", "Понеделник", "Вторник", "Среда", "Четврток", "Петок", "Сабота"], 8 | daysShort: ["Нед", "Пон", "Вто", "Сре", "Чет", "Пет", "Саб"], 9 | daysMin: ["Не", "По", "Вт", "Ср", "Че", "Пе", "Са"], 10 | months: ["Јануари", "Февруари", "Март", "Април", "Мај", "Јуни", "Јули", "Август", "Септември", "Октомври", "Ноември", "Декември"], 11 | monthsShort: ["Јан", "Фев", "Мар", "Апр", "Мај", "Јун", "Јул", "Авг", "Сеп", "Окт", "Ное", "Дек"], 12 | today: "Денес", 13 | format: "dd.mm.yyyy" 14 | }; 15 | }()); 16 | -------------------------------------------------------------------------------- /apps/texpress-cms/src/providers/view-engine.provider.ts: -------------------------------------------------------------------------------- 1 | import { Express } from 'express'; 2 | import path from 'path'; 3 | import { ProviderStaticMethod } from 'core/providers'; 4 | 5 | export interface ViewEngineOptions { 6 | engine: string; 7 | path?: string; 8 | options?: Object; 9 | } 10 | 11 | export class ViewEngineProvider 12 | implements ProviderStaticMethod 13 | { 14 | public static register(app: Express, viewOptions: ViewEngineOptions) { 15 | app.set('view engine', viewOptions.engine); 16 | app.set('views', viewOptions.path || path.join(__dirname, '../views')); 17 | if (viewOptions.options) { 18 | app.set('view options', { ...viewOptions.options }); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/shared/src/entities/user-role.entity.ts: -------------------------------------------------------------------------------- 1 | import { postgresDataSource } from '../connections'; 2 | import { BaseEntity, SetRepository } from 'core/entities'; 3 | import { Column, Entity, JoinColumn, OneToOne } from 'typeorm'; 4 | import { RoleEntity } from './role.entity'; 5 | 6 | @Entity({ name: 'user_roles' }) 7 | @SetRepository(postgresDataSource) 8 | export class UserRoleEntity extends BaseEntity { 9 | @Column({ type: 'uuid', default: () => 'uuid_generate_v4()' }) 10 | _id: string; 11 | 12 | @Column() 13 | userId: number; 14 | 15 | @Column() 16 | roleId: number; 17 | 18 | @OneToOne(() => RoleEntity) 19 | @JoinColumn({ 20 | name: 'roleId', 21 | referencedColumnName: 'id', 22 | }) 23 | role: RoleEntity; 24 | } 25 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/is.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Icelandic translation for bootstrap-datepicker 3 | * Hinrik Örn Sigurðsson 4 | */ 5 | (function () { 6 | Datepicker.locales.is = { 7 | days: ["Sunnudagur", "Mánudagur", "Þriðjudagur", "Miðvikudagur", "Fimmtudagur", "Föstudagur", "Laugardagur"], 8 | daysShort: ["Sun", "Mán", "Þri", "Mið", "Fim", "Fös", "Lau"], 9 | daysMin: ["Su", "Má", "Þr", "Mi", "Fi", "Fö", "La"], 10 | months: ["Janúar", "Febrúar", "Mars", "Apríl", "Maí", "Júní", "Júlí", "Ágúst", "September", "Október", "Nóvember", "Desember"], 11 | monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maí", "Jún", "Júl", "Ágú", "Sep", "Okt", "Nóv", "Des"], 12 | today: "Í Dag" 13 | }; 14 | }()); 15 | -------------------------------------------------------------------------------- /packages/shared/src/services/email-template.service.ts: -------------------------------------------------------------------------------- 1 | import { GetRepository } from 'core/entities'; 2 | import { BaseService } from 'core/services'; 3 | import { EmailTemplateEntity } from 'shared/entities'; 4 | import { Service } from 'typedi'; 5 | import { Repository } from 'typeorm'; 6 | 7 | @Service() 8 | export class EmailTemplateService extends BaseService { 9 | @GetRepository(EmailTemplateEntity) 10 | protected repository: Repository; 11 | protected readonly resource: string = 'Email Template'; 12 | 13 | protected readonly filterColumns: string[] = ['subject', 'code']; 14 | 15 | findTemplateByCode(code: string) { 16 | return this.findOrFail({ 17 | code, 18 | }); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /apps/consumer/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "consumer", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "start": "node dist/index.js", 6 | "clean": "rimraf dist .turbo", 7 | "build:tsc": "npx tsc", 8 | "build:dev": "babel src --root-mode upward --out-dir dist --extensions \".ts,.tsx\" --source-maps inline --watch --copy-files", 9 | "dev": "rimraf ./dist/ && cross-env NODE_ENV=development concurrently \"npm run build:dev\" \"wait-on ./dist/index.js && nodemon\"", 10 | "build": "babel ./src --root-mode upward --out-dir dist --extensions \".ts,.tsx\" --copy-files", 11 | "lint": "eslint ./src" 12 | }, 13 | "dependencies": { 14 | "core": "*", 15 | "shared": "*", 16 | "rabbitmq": "*" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /apps/texpress-api/src/validators/verify-otp.validator.ts: -------------------------------------------------------------------------------- 1 | import { ValidationBuilder } from 'core/utils'; 2 | import { ValidatorWithStaticProps } from 'core/validators'; 3 | import { ValidationChain } from 'express-validator'; 4 | 5 | export class VerifyOTPValidator 6 | implements ValidatorWithStaticProps 7 | { 8 | static get rules(): Record { 9 | return { 10 | username: ValidationBuilder.ForField('username') 11 | .Required({ fieldDisplayName: 'Email or Mobile number' }) 12 | .build(), 13 | otpCode: ValidationBuilder.ForField('otpCode') 14 | .Required({ fieldDisplayName: 'OTP Code' }) 15 | .build(), 16 | }; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/ko.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Korean translation for bootstrap-datepicker 3 | * This is a port from https: //github.com/moment/moment/blob/develop/src/locale/ko.js 4 | */ 5 | (function () { 6 | Datepicker.locales.ko = { 7 | days: ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"], 8 | daysShort: ["일", "월", "화", "수", "목", "금", "토"], 9 | daysMin: ["일", "월", "화", "수", "목", "금", "토"], 10 | months: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], 11 | monthsShort: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], 12 | today: "오늘", 13 | clear: "삭제", 14 | format: "yyyy-mm-dd", 15 | titleFormat: "y년mm월", 16 | weekStart: 0 17 | }; 18 | }()); 19 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/dom-utils/instanceOf.js: -------------------------------------------------------------------------------- 1 | import getWindow from "./getWindow.js"; 2 | 3 | function isElement(node) { 4 | var OwnElement = getWindow(node).Element; 5 | return node instanceof OwnElement || node instanceof Element; 6 | } 7 | 8 | function isHTMLElement(node) { 9 | var OwnElement = getWindow(node).HTMLElement; 10 | return node instanceof OwnElement || node instanceof HTMLElement; 11 | } 12 | 13 | function isShadowRoot(node) { 14 | // IE 11 has no ShadowRoot 15 | if (typeof ShadowRoot === 'undefined') { 16 | return false; 17 | } 18 | 19 | var OwnElement = getWindow(node).ShadowRoot; 20 | return node instanceof OwnElement || node instanceof ShadowRoot; 21 | } 22 | 23 | export { isElement, isHTMLElement, isShadowRoot }; -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/ar-tn.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Arabic-Tunisia translation for bootstrap-datepicker 3 | * Souhaieb Besbes 4 | */ 5 | (function () { 6 | Datepicker.locales['ar-tn'] = { 7 | days: ["الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت", "الأحد"], 8 | daysShort: ["أحد", "اثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت", "أحد"], 9 | daysMin: ["ح", "ن", "ث", "ع", "خ", "ج", "س", "ح"], 10 | months: ["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويليه","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"], 11 | monthsShort: ["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويليه","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"], 12 | today: "هذا اليوم", 13 | rtl: true 14 | }; 15 | }()); 16 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/sr.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Serbian cyrillic translation for bootstrap-datepicker 3 | * Bojan Milosavlević 4 | */ 5 | (function () { 6 | Datepicker.locales.sr = { 7 | days: ["Недеља","Понедељак", "Уторак", "Среда", "Четвртак", "Петак", "Субота"], 8 | daysShort: ["Нед", "Пон", "Уто", "Сре", "Чет", "Пет", "Суб"], 9 | daysMin: ["Н", "По", "У", "Ср", "Ч", "Пе", "Су"], 10 | months: ["Јануар", "Фебруар", "Март", "Април", "Мај", "Јун", "Јул", "Август", "Септембар", "Октобар", "Новембар", "Децембар"], 11 | monthsShort: ["Јан", "Феб", "Мар", "Апр", "Мај", "Јун", "Јул", "Авг", "Сеп", "Окт", "Нов", "Дец"], 12 | today: "Данас", 13 | weekStart: 1, 14 | format: "dd.mm.yyyy" 15 | }; 16 | }()); 17 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/zh-CN.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Simplified Chinese translation for bootstrap-datepicker 3 | * Yuan Cheung 4 | */ 5 | (function () { 6 | Datepicker.locales['zh-CN'] = { 7 | days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"], 8 | daysShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], 9 | daysMin: ["日", "一", "二", "三", "四", "五", "六"], 10 | months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], 11 | monthsShort: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], 12 | today: "今天", 13 | monthsTitle: "选择月份", 14 | clear: "清除", 15 | format: "yyyy-mm-dd", 16 | titleFormat: "y年mm月", 17 | weekStart: 1 18 | }; 19 | }()); 20 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/mn.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Mongolian translation for bootstrap-datepicker 3 | * Andrey Torsunov 4 | */ 5 | (function () { 6 | Datepicker.locales.mn = { 7 | days: ["Ням", "Даваа", "Мягмар", "Лхагва", "Пүрэв", "Баасан", "Бямба"], 8 | daysShort: ["Ням", "Дав", "Мяг", "Лха", "Пүр", "Баа", "Бям"], 9 | daysMin: ["Ня", "Да", "Мя", "Лх", "Пү", "Ба", "Бя"], 10 | months: ["Хулгана", "Үхэр", "Бар", "Туулай", "Луу", "Могой", "Морь", "Хонь", "Бич", "Тахиа", "Нохой", "Гахай"], 11 | monthsShort: ["Хул", "Үхэ", "Бар", "Туу", "Луу", "Мог", "Мор", "Хон", "Бич", "Тах", "Нох", "Гах"], 12 | today: "Өнөөдөр", 13 | clear: "Тодорхой", 14 | format: "yyyy.mm.dd", 15 | weekStart: 1 16 | }; 17 | }()); 18 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/ar.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Arabic translation for bootstrap-datepicker 3 | * Mohammed Alshehri 4 | */ 5 | (function () { 6 | Datepicker.locales.ar = { 7 | days: ["الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت", "الأحد"], 8 | daysShort: ["أحد", "اثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت", "أحد"], 9 | daysMin: ["ح", "ن", "ث", "ع", "خ", "ج", "س", "ح"], 10 | months: ["يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"], 11 | monthsShort: ["يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"], 12 | today: "هذا اليوم", 13 | rtl: true 14 | }; 15 | }()); 16 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/fo.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Faroese translation for bootstrap-datepicker 3 | * Theodor Johannesen 4 | */ 5 | (function () { 6 | Datepicker.locales.fo = { 7 | days: ["Sunnudagur", "Mánadagur", "Týsdagur", "Mikudagur", "Hósdagur", "Fríggjadagur", "Leygardagur"], 8 | daysShort: ["Sun", "Mán", "Týs", "Mik", "Hós", "Frí", "Ley"], 9 | daysMin: ["Su", "Má", "Tý", "Mi", "Hó", "Fr", "Le"], 10 | months: ["Januar", "Februar", "Marts", "Apríl", "Mei", "Juni", "Juli", "August", "Septembur", "Oktobur", "Novembur", "Desembur"], 11 | monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Des"], 12 | today: "Í Dag", 13 | clear: "Reinsa" 14 | }; 15 | }()); 16 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/oc.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Occitan translation for bootstrap-datepicker 3 | */ 4 | (function () { 5 | Datepicker.locales.oc = { 6 | days: ["Dimenge", "Diluns", "Dimars", "Dimècres", "Dijòus", "Divendres", "Dissabte"], 7 | daysShort: ["Dim", "Dil", "Dmr", "Dmc", "Dij", "Div", "Dis"], 8 | daysMin: ["dg", "dl", "dr", "dc", "dj", "dv", "ds"], 9 | months: ["Genièr", "Febrièr", "Març", "Abrial", "Mai", "Junh", "Julhet", "Agost", "Setembre", "Octobre", "Novembre", "Decembre"], 10 | monthsShort: ["Gen", "Feb", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Oct", "Nov", "Dec"], 11 | today: "Uèi", 12 | monthsTitle: "Meses", 13 | clear: "Escafar", 14 | weekStart: 1, 15 | format: "dd/mm/yyyy" 16 | }; 17 | }()); 18 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/sr-latn.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Serbian latin translation for bootstrap-datepicker 3 | * Bojan Milosavlević 4 | */ 5 | (function () { 6 | Datepicker.locales['sr-latn'] = { 7 | days: ["Nedelja","Ponedeljak", "Utorak", "Sreda", "Četvrtak", "Petak", "Subota"], 8 | daysShort: ["Ned", "Pon", "Uto", "Sre", "Čet", "Pet", "Sub"], 9 | daysMin: ["N", "Po", "U", "Sr", "Č", "Pe", "Su"], 10 | months: ["Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"], 11 | monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Avg", "Sep", "Okt", "Nov", "Dec"], 12 | today: "Danas", 13 | weekStart: 1, 14 | format: "dd.mm.yyyy" 15 | }; 16 | }()); 17 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/el.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Greek translation for bootstrap-datepicker 3 | */ 4 | (function () { 5 | Datepicker.locales.el = { 6 | days: ["Κυριακή", "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", "Παρασκευή", "Σάββατο"], 7 | daysShort: ["Κυρ", "Δευ", "Τρι", "Τετ", "Πεμ", "Παρ", "Σαβ"], 8 | daysMin: ["Κυ", "Δε", "Τρ", "Τε", "Πε", "Πα", "Σα"], 9 | months: ["Ιανουάριος", "Φεβρουάριος", "Μάρτιος", "Απρίλιος", "Μάιος", "Ιούνιος", "Ιούλιος", "Αύγουστος", "Σεπτέμβριος", "Οκτώβριος", "Νοέμβριος", "Δεκέμβριος"], 10 | monthsShort: ["Ιαν", "Φεβ", "Μαρ", "Απρ", "Μάι", "Ιουν", "Ιουλ", "Αυγ", "Σεπ", "Οκτ", "Νοε", "Δεκ"], 11 | today: "Σήμερα", 12 | clear: "Καθαρισμός", 13 | weekStart: 1, 14 | format: "d/m/yyyy" 15 | }; 16 | }()); 17 | -------------------------------------------------------------------------------- /packages/shared/src/services/mail/mails/setup-2fa.mail.ts: -------------------------------------------------------------------------------- 1 | import { Service } from 'typedi'; 2 | import { Mailer } from '../mail-base.service'; 3 | 4 | @Service() 5 | export class Setup2FAMailer extends Mailer { 6 | private readonly code = 'TWO_FACTOR_AUTH'; 7 | async send( 8 | data: Record, 9 | attachmentMetadata: { 10 | qrCodeFileName: string; 11 | } 12 | ) { 13 | (await this.parseTemplate(this.code, data)) 14 | .to(data.to_email) 15 | .attachments([ 16 | { 17 | cid: 'qr_code', 18 | path: data.qr_code_data, 19 | filename: attachmentMetadata.qrCodeFileName, 20 | }, 21 | ]) 22 | .sendEmail(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "es2021": true 5 | }, 6 | "extends": [ 7 | "eslint:recommended", 8 | "plugin:@typescript-eslint/recommended", 9 | "plugin:prettier/recommended" 10 | ], 11 | "overrides": [], 12 | "parser": "@typescript-eslint/parser", 13 | "parserOptions": { 14 | "ecmaVersion": "latest", 15 | "sourceType": "module" 16 | }, 17 | "plugins": ["@typescript-eslint", "prettier"], 18 | "rules": { 19 | "@typescript-eslint/no-unused-vars": "warn", 20 | "@typescript-eslint/no-explicit-any": "off", 21 | "@typescript-eslint/ban-types": "off", 22 | "@typescript-eslint/consistent-type-definitions": ["warn", "interface"], 23 | "no-console": "warn" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/sv.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Swedish translation for bootstrap-datepicker 3 | * Patrik Ragnarsson 4 | */ 5 | (function () { 6 | Datepicker.locales.sv = { 7 | days: ["söndag", "måndag", "tisdag", "onsdag", "torsdag", "fredag", "lördag"], 8 | daysShort: ["sön", "mån", "tis", "ons", "tor", "fre", "lör"], 9 | daysMin: ["sö", "må", "ti", "on", "to", "fr", "lö"], 10 | months: ["januari", "februari", "mars", "april", "maj", "juni", "juli", "augusti", "september", "oktober", "november", "december"], 11 | monthsShort: ["jan", "feb", "mar", "apr", "maj", "jun", "jul", "aug", "sep", "okt", "nov", "dec"], 12 | today: "Idag", 13 | format: "yyyy-mm-dd", 14 | weekStart: 1, 15 | clear: "Rensa" 16 | }; 17 | }()); 18 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/tr.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Turkish translation for bootstrap-datepicker 3 | * Serkan Algur 4 | */ 5 | (function () { 6 | Datepicker.locales.tr = { 7 | days: ["Pazar", "Pazartesi", "Salı", "Çarşamba", "Perşembe", "Cuma", "Cumartesi"], 8 | daysShort: ["Pz", "Pzt", "Sal", "Çrş", "Prş", "Cu", "Cts"], 9 | daysMin: ["Pz", "Pzt", "Sa", "Çr", "Pr", "Cu", "Ct"], 10 | months: ["Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık"], 11 | monthsShort: ["Oca", "Şub", "Mar", "Nis", "May", "Haz", "Tem", "Ağu", "Eyl", "Eki", "Kas", "Ara"], 12 | today: "Bugün", 13 | clear: "Temizle", 14 | weekStart: 1, 15 | format: "dd.mm.yyyy" 16 | }; 17 | }()); 18 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/uk.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Ukrainian translation for bootstrap-datepicker 3 | * Igor Polynets 4 | */ 5 | (function () { 6 | Datepicker.locales.uk = { 7 | days: ["Неділя", "Понеділок", "Вівторок", "Середа", "Четвер", "П'ятниця", "Субота"], 8 | daysShort: ["Нед", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Суб"], 9 | daysMin: ["Нд", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"], 10 | months: ["Cічень", "Лютий", "Березень", "Квітень", "Травень", "Червень", "Липень", "Серпень", "Вересень", "Жовтень", "Листопад", "Грудень"], 11 | monthsShort: ["Січ", "Лют", "Бер", "Кві", "Тра", "Чер", "Лип", "Сер", "Вер", "Жов", "Лис", "Гру"], 12 | today: "Сьогодні", 13 | clear: "Очистити", 14 | format: "dd.mm.yyyy", 15 | weekStart: 1 16 | }; 17 | }()); 18 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/fa.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Persian translation for bootstrap-datepicker 3 | * Mostafa Rokooie 4 | */ 5 | (function () { 6 | Datepicker.locales.fa = { 7 | days: ["یک‌شنبه", "دوشنبه", "سه‌شنبه", "چهارشنبه", "پنج‌شنبه", "جمعه", "شنبه", "یک‌شنبه"], 8 | daysShort: ["یک", "دو", "سه", "چهار", "پنج", "جمعه", "شنبه", "یک"], 9 | daysMin: ["ی", "د", "س", "چ", "پ", "ج", "ش", "ی"], 10 | months: ["ژانویه", "فوریه", "مارس", "آوریل", "مه", "ژوئن", "ژوئیه", "اوت", "سپتامبر", "اکتبر", "نوامبر", "دسامبر"], 11 | monthsShort: ["ژان", "فور", "مار", "آور", "مه", "ژون", "ژوی", "اوت", "سپت", "اکت", "نوا", "دسا"], 12 | today: "امروز", 13 | clear: "پاک کن", 14 | weekStart: 1, 15 | format: "yyyy/mm/dd" 16 | }; 17 | }()); 18 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/en-IE.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Irish English translation for bootstrap-datepicker 3 | */ 4 | (function () { 5 | Datepicker.locales['en-IE'] = { 6 | days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], 7 | daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], 8 | daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], 9 | months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], 10 | monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], 11 | today: "Today", 12 | monthsTitle: "Months", 13 | clear: "Clear", 14 | weekStart: 1, 15 | format: "dd/mm/yyyy" 16 | }; 17 | }()); 18 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/me.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Montenegrin translation for bootstrap-datepicker 3 | * Miodrag Nikač 4 | */ 5 | (function () { 6 | Datepicker.locales.me = { 7 | days: ["Nedjelja","Ponedjeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota"], 8 | daysShort: ["Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub"], 9 | daysMin: ["Ne", "Po", "Ut", "Sr", "Če", "Pe", "Su"], 10 | months: ["Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"], 11 | monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Avg", "Sep", "Okt", "Nov", "Dec"], 12 | today: "Danas", 13 | weekStart: 1, 14 | clear: "Izbriši", 15 | format: "dd.mm.yyyy" 16 | }; 17 | }()); 18 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/vi.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Vietnamese translation for bootstrap-datepicker 3 | * An Vo 4 | */ 5 | (function () { 6 | Datepicker.locales.vi = { 7 | days: ["Chủ nhật", "Thứ hai", "Thứ ba", "Thứ tư", "Thứ năm", "Thứ sáu", "Thứ bảy"], 8 | daysShort: ["CN", "Thứ 2", "Thứ 3", "Thứ 4", "Thứ 5", "Thứ 6", "Thứ 7"], 9 | daysMin: ["CN", "T2", "T3", "T4", "T5", "T6", "T7"], 10 | months: ["Tháng 1", "Tháng 2", "Tháng 3", "Tháng 4", "Tháng 5", "Tháng 6", "Tháng 7", "Tháng 8", "Tháng 9", "Tháng 10", "Tháng 11", "Tháng 12"], 11 | monthsShort: ["Th1", "Th2", "Th3", "Th4", "Th5", "Th6", "Th7", "Th8", "Th9", "Th10", "Th11", "Th12"], 12 | today: "Hôm nay", 13 | clear: "Xóa", 14 | format: "dd/mm/yyyy" 15 | }; 16 | }()); 17 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/assets/img/flags/japan.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/en-NZ.js: -------------------------------------------------------------------------------- 1 | /** 2 | * New Zealand English translation for bootstrap-datepicker 3 | */ 4 | (function () { 5 | Datepicker.locales['en-NZ'] = { 6 | days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], 7 | daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], 8 | daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], 9 | months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], 10 | monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], 11 | today: "Today", 12 | monthsTitle: "Months", 13 | clear: "Clear", 14 | weekStart: 1, 15 | format: "d/mm/yyyy" 16 | }; 17 | }()); 18 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/en-ZA.js: -------------------------------------------------------------------------------- 1 | /** 2 | * South African English translation for bootstrap-datepicker 3 | */ 4 | (function () { 5 | Datepicker.locales['en-ZA'] = { 6 | days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], 7 | daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], 8 | daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], 9 | months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], 10 | monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], 11 | today: "Today", 12 | monthsTitle: "Months", 13 | clear: "Clear", 14 | weekStart: 1, 15 | format: "yyyy/mm/d" 16 | }; 17 | }()); 18 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/ro.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Romanian translation for bootstrap-datepicker 3 | * Cristian Vasile 4 | */ 5 | (function () { 6 | Datepicker.locales.ro = { 7 | days: ["Duminică", "Luni", "Marţi", "Miercuri", "Joi", "Vineri", "Sâmbătă"], 8 | daysShort: ["Dum", "Lun", "Mar", "Mie", "Joi", "Vin", "Sâm"], 9 | daysMin: ["Du", "Lu", "Ma", "Mi", "Jo", "Vi", "Sâ"], 10 | months: ["Ianuarie", "Februarie", "Martie", "Aprilie", "Mai", "Iunie", "Iulie", "August", "Septembrie", "Octombrie", "Noiembrie", "Decembrie"], 11 | monthsShort: ["Ian", "Feb", "Mar", "Apr", "Mai", "Iun", "Iul", "Aug", "Sep", "Oct", "Nov", "Dec"], 12 | today: "Astăzi", 13 | clear: "Șterge", 14 | weekStart: 1, 15 | format: "dd/mm/yyyy" 16 | }; 17 | }()); 18 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/theme/assets/img/flags/japan.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/pt-BR.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Brazilian translation for bootstrap-datepicker 3 | * Cauan Cabral 4 | */ 5 | (function () { 6 | Datepicker.locales['pt-BR'] = { 7 | days: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"], 8 | daysShort: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"], 9 | daysMin: ["Do", "Se", "Te", "Qu", "Qu", "Se", "Sa"], 10 | months: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"], 11 | monthsShort: ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"], 12 | today: "Hoje", 13 | monthsTitle: "Meses", 14 | clear: "Limpar", 15 | format: "dd/mm/yyyy" 16 | }; 17 | }()); 18 | -------------------------------------------------------------------------------- /packages/shared/src/dtos/create-user.interface.ts: -------------------------------------------------------------------------------- 1 | import { Schema, SchemaProperty } from 'core/swagger'; 2 | 3 | @Schema() 4 | export class CreateUserDto { 5 | @SchemaProperty({ 6 | type: 'string', 7 | }) 8 | firstName: string; 9 | 10 | @SchemaProperty({ 11 | type: 'string', 12 | }) 13 | lastName: string; 14 | 15 | @SchemaProperty({ 16 | type: 'string', 17 | }) 18 | dob: string; 19 | 20 | @SchemaProperty({ 21 | type: 'string', 22 | }) 23 | gender: string; 24 | 25 | @SchemaProperty({ 26 | type: 'string', 27 | }) 28 | email: string; 29 | 30 | @SchemaProperty({ 31 | type: 'string', 32 | }) 33 | mobileNumber: string; 34 | 35 | @SchemaProperty({ 36 | type: 'string', 37 | }) 38 | password: string; 39 | } 40 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/dom-utils/contains.js: -------------------------------------------------------------------------------- 1 | import { isShadowRoot } from "./instanceOf.js"; 2 | export default function contains(parent, child) { 3 | var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method 4 | 5 | if (parent.contains(child)) { 6 | return true; 7 | } // then fallback to custom implementation with Shadow DOM support 8 | else if (rootNode && isShadowRoot(rootNode)) { 9 | var next = child; 10 | 11 | do { 12 | if (next && parent.isSameNode(next)) { 13 | return true; 14 | } // $FlowFixMe[prop-missing]: need a better way to handle this... 15 | 16 | 17 | next = next.parentNode || next.host; 18 | } while (next); 19 | } // Give up, the result is false 20 | 21 | 22 | return false; 23 | } -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/de.js: -------------------------------------------------------------------------------- 1 | /** 2 | * German translation for bootstrap-datepicker 3 | * Sam Zurcher 4 | */ 5 | (function () { 6 | Datepicker.locales.de = { 7 | days: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"], 8 | daysShort: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"], 9 | daysMin: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"], 10 | months: ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"], 11 | monthsShort: ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"], 12 | today: "Heute", 13 | monthsTitle: "Monate", 14 | clear: "Löschen", 15 | weekStart: 1, 16 | format: "dd.mm.yyyy" 17 | }; 18 | }()); 19 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/sw.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Swahili translation for bootstrap-datepicker 3 | * Edwin Mugendi 4 | * Source: http: //scriptsource.org/cms/scripts/page.php?item_id=entry_detail&uid=xnfaqyzcku 5 | */ 6 | (function () { 7 | Datepicker.locales.sw = { 8 | days: ["Jumapili", "Jumatatu", "Jumanne", "Jumatano", "Alhamisi", "Ijumaa", "Jumamosi"], 9 | daysShort: ["J2", "J3", "J4", "J5", "Alh", "Ij", "J1"], 10 | daysMin: ["2", "3", "4", "5", "A", "I", "1"], 11 | months: ["Januari", "Februari", "Machi", "Aprili", "Mei", "Juni", "Julai", "Agosti", "Septemba", "Oktoba", "Novemba", "Desemba"], 12 | monthsShort: ["Jan", "Feb", "Mac", "Apr", "Mei", "Jun", "Jul", "Ago", "Sep", "Okt", "Nov", "Des"], 13 | today: "Leo" 14 | }; 15 | }()); 16 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/@popperjs/core/dist/esm/dom-utils/getWindowScrollBarX.js: -------------------------------------------------------------------------------- 1 | import getBoundingClientRect from "./getBoundingClientRect.js"; 2 | import getDocumentElement from "./getDocumentElement.js"; 3 | import getWindowScroll from "./getWindowScroll.js"; 4 | export default function getWindowScrollBarX(element) { 5 | // If has a CSS width greater than the viewport, then this will be 6 | // incorrect for RTL. 7 | // Popper 1 is broken in this case and never had a bug report so let's assume 8 | // it's not an issue. I don't think anyone ever specifies width on 9 | // anyway. 10 | // Browsers where the left scrollbar doesn't cause an issue report `0` for 11 | // this (e.g. Edge 2019, IE11, Safari) 12 | return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft; 13 | } -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/lv.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Latvian translation for bootstrap-datepicker 3 | * Artis Avotins 4 | */ 5 | 6 | (function () { 7 | Datepicker.locales.lv = { 8 | days: ["Svētdiena", "Pirmdiena", "Otrdiena", "Trešdiena", "Ceturtdiena", "Piektdiena", "Sestdiena"], 9 | daysShort: ["Sv", "P", "O", "T", "C", "Pk", "S"], 10 | daysMin: ["Sv", "Pr", "Ot", "Tr", "Ce", "Pk", "Se"], 11 | months: ["Janvāris", "Februāris", "Marts", "Aprīlis", "Maijs", "Jūnijs", "Jūlijs", "Augusts", "Septembris", "Oktobris", "Novembris", "Decembris"], 12 | monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jūn", "Jūl", "Aug", "Sep", "Okt", "Nov", "Dec"], 13 | monthsTitle: "Mēneši", 14 | today: "Šodien", 15 | clear: "Nodzēst", 16 | weekStart: 1 17 | }; 18 | }()); 19 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/uz-cyrl.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Uzbek cyrillic translation for bootstrap-datepicker 3 | * Kakhramonov Javlonbek 4 | */ 5 | (function () { 6 | Datepicker.locales['uz-cyrl'] = { 7 | days: ["Якшанба", "Душанба", "Сешанба", "Чоршанба", "Пайшанба", "Жума", "Шанба"], 8 | daysShort: ["Якш", "Ду", "Се", "Чор", "Пай", "Жу", "Ша"], 9 | daysMin: ["Як", "Ду", "Се", "Чо", "Па", "Жу", "Ша"], 10 | months: ["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"], 11 | monthsShort: ["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"], 12 | today: "Бугун", 13 | clear: "Ўчириш", 14 | format: "dd.mm.yyyy", 15 | weekStart: 1, 16 | monthsTitle: 'Ойлар' 17 | }; 18 | }()); 19 | -------------------------------------------------------------------------------- /apps/texpress-cms/esbuild.config.js: -------------------------------------------------------------------------------- 1 | const esbuild = require('esbuild'); 2 | 3 | const watchMode = process.argv?.[2] === '--watch'; 4 | 5 | const options = { 6 | entryPoints: [ 7 | { in: './resources/js/index', out: 'bundle' }, 8 | { in: './resources/css/index.css', out: 'bundle' }, 9 | ], 10 | bundle: true, 11 | outdir: './public/assets', 12 | minify: true, 13 | platform: 'browser', 14 | }; 15 | 16 | async function build() { 17 | if (watchMode) { 18 | const ctx = await esbuild.context({ ...options, logLevel: 'info' }); 19 | await ctx.watch(); 20 | console.log('watching...'); 21 | } else { 22 | esbuild 23 | .build(options) 24 | .then(() => console.log('⚡ JS Bundled')) 25 | .catch(() => process.exit(1)); 26 | } 27 | } 28 | 29 | build(); 30 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/br.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Breton translation for bootstrap-datepicker 3 | * Gwenn Meynier 4 | */ 5 | (function () { 6 | Datepicker.locales.br = { 7 | days: ["Sul", "Lun", "Meurzh", "Merc'her", "Yaou", "Gwener", "Sadorn"], 8 | daysShort: ["Sul", "Lun", "Meu.", "Mer.", "Yao.", "Gwe.", "Sad."], 9 | daysMin: ["Su", "L", "Meu", "Mer", "Y", "G", "Sa"], 10 | months: ["Genver", "C'hwevrer", "Meurzh", "Ebrel", "Mae", "Mezheven", "Gouere", "Eost", "Gwengolo", "Here", "Du", "Kerzu"], 11 | monthsShort: ["Genv.", "C'hw.", "Meur.", "Ebre.", "Mae", "Mezh.", "Goue.", "Eost", "Gwen.", "Here", "Du", "Kerz."], 12 | today: "Hiziv", 13 | monthsTitle: "Miz", 14 | clear: "Dilemel", 15 | weekStart: 1, 16 | format: "dd/mm/yyyy" 17 | }; 18 | }()); 19 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/eo.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Esperanto translation for bootstrap-datepicker 3 | * Emmanuel Debanne 4 | */ 5 | (function () { 6 | Datepicker.locales.eo = { 7 | days: ["dimanĉo", "lundo", "mardo", "merkredo", "ĵaŭdo", "vendredo", "sabato"], 8 | daysShort: ["dim.", "lun.", "mar.", "mer.", "ĵaŭ.", "ven.", "sam."], 9 | daysMin: ["d", "l", "ma", "me", "ĵ", "v", "s"], 10 | months: ["januaro", "februaro", "marto", "aprilo", "majo", "junio", "julio", "aŭgusto", "septembro", "oktobro", "novembro", "decembro"], 11 | monthsShort: ["jan.", "feb.", "mar.", "apr.", "majo", "jun.", "jul.", "aŭg.", "sep.", "okt.", "nov.", "dec."], 12 | today: "Hodiaŭ", 13 | clear: "Nuligi", 14 | weekStart: 1, 15 | format: "yyyy-mm-dd" 16 | }; 17 | }()); 18 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/ka.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Georgian translation for bootstrap-datepicker 3 | * Levan Melikishvili 4 | */ 5 | (function () { 6 | Datepicker.locales.ka = { 7 | days: ["კვირა", "ორშაბათი", "სამშაბათი", "ოთხშაბათი", "ხუთშაბათი", "პარასკევი", "შაბათი"], 8 | daysShort: ["კვი", "ორშ", "სამ", "ოთხ", "ხუთ", "პარ", "შაბ"], 9 | daysMin: ["კვ", "ორ", "სა", "ოთ", "ხუ", "პა", "შა"], 10 | months: ["იანვარი", "თებერვალი", "მარტი", "აპრილი", "მაისი", "ივნისი", "ივლისი", "აგვისტო", "სექტემბერი", "ოქტომბერი", "ნოემბერი", "დეკემბერი"], 11 | monthsShort: ["იან", "თებ", "მარ", "აპრ", "მაი", "ივნ", "ივლ", "აგვ", "სექ", "ოქტ", "ნოე", "დეკ"], 12 | today: "დღეს", 13 | clear: "გასუფთავება", 14 | weekStart: 1, 15 | format: "dd.mm.yyyy" 16 | }; 17 | }()); 18 | -------------------------------------------------------------------------------- /apps/texpress-cms/public/backend/vendor/vanillajs-datepicker/dist/js/locales/tk.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Turkmen translation for bootstrap-datepicker 3 | * N'Bayramberdiyev 4 | */ 5 | (function () { 6 | Datepicker.locales.tk = { 7 | days: ["Ýekşenbe", "Duşenbe", "Sişenbe", "Çarşenbe", "Penşenbe", "Anna", "Şenbe"], 8 | daysShort: ["Ýek", "Duş", "Siş", "Çar", "Pen", "Ann", "Şen"], 9 | daysMin: ["Ýe", "Du", "Si", "Ça", "Pe", "An", "Şe"], 10 | months: ["Ýanwar", "Fewral", "Mart", "Aprel", "Maý", "Iýun", "Iýul", "Awgust", "Sentýabr", "Oktýabr", "Noýabr", "Dekabr"], 11 | monthsShort: ["Ýan", "Few", "Mar", "Apr", "Maý", "Iýn", "Iýl", "Awg", "Sen", "Okt", "Noý", "Dek"], 12 | today: "Bu gün", 13 | monthsTitle: "Aýlar", 14 | clear: "Aýyr", 15 | weekStart: 1, 16 | format: "dd.mm.yyyy" 17 | }; 18 | }()); 19 | -------------------------------------------------------------------------------- /packages/shared/src/validators/customs/unique-email.validator.ts: -------------------------------------------------------------------------------- 1 | import { Repository } from 'typeorm'; 2 | import { GetRepository } from 'core/entities'; 3 | import { ApiUserEntity, UserEntity } from 'shared/entities'; 4 | import { AbstractUniqueValidator } from '../abstracts'; 5 | 6 | export class UniqueUserEmailValidator extends AbstractUniqueValidator { 7 | @GetRepository(UserEntity) 8 | protected readonly repository: Repository; 9 | 10 | constructor() { 11 | super(['email', 'mobileNumber']); 12 | } 13 | } 14 | 15 | export class UniqueApiUserEmailValidator extends AbstractUniqueValidator { 16 | @GetRepository(ApiUserEntity) 17 | protected readonly repository: Repository; 18 | 19 | constructor() { 20 | super(['email', 'mobileNumber']); 21 | } 22 | } 23 | --------------------------------------------------------------------------------