├── apps ├── .gitkeep ├── server │ ├── auth-ms │ │ ├── src │ │ │ ├── app │ │ │ │ ├── .gitkeep │ │ │ │ ├── constants │ │ │ │ │ ├── index.ts │ │ │ │ │ └── services.ts │ │ │ │ └── abstractions │ │ │ │ │ ├── index.ts │ │ │ │ │ └── auth-service.interface.ts │ │ │ ├── assets │ │ │ │ └── .gitkeep │ │ │ └── environments │ │ │ │ ├── environment.ts │ │ │ │ └── environment.prod.ts │ │ ├── tsconfig.json │ │ ├── tsconfig.spec.json │ │ ├── sql │ │ │ └── create-tables.sql │ │ ├── tsconfig.app.json │ │ ├── .eslintrc.json │ │ └── jest.config.ts │ ├── mail-ms │ │ ├── src │ │ │ ├── app │ │ │ │ ├── .gitkeep │ │ │ │ ├── domains │ │ │ │ │ ├── index.ts │ │ │ │ │ └── queue-jobs │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── confirm-registration-job-payload.ts │ │ │ │ ├── abstractions │ │ │ │ │ ├── index.ts │ │ │ │ │ └── mail-service.interface.ts │ │ │ │ ├── constants │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── services.ts │ │ │ │ │ └── queue.ts │ │ │ │ └── app.module.ts │ │ │ ├── assets │ │ │ │ └── .gitkeep │ │ │ ├── environments │ │ │ │ ├── environment.ts │ │ │ │ └── environment.prod.ts │ │ │ └── templates │ │ │ │ └── registration.hbs │ │ ├── tsconfig.json │ │ ├── tsconfig.spec.json │ │ ├── tsconfig.app.json │ │ ├── .eslintrc.json │ │ └── jest.config.ts │ ├── users-ms │ │ ├── src │ │ │ ├── app │ │ │ │ ├── .gitkeep │ │ │ │ ├── constants │ │ │ │ │ ├── index.ts │ │ │ │ │ └── services.ts │ │ │ │ ├── abstractions │ │ │ │ │ ├── index.ts │ │ │ │ │ └── users-service.interface.ts │ │ │ │ ├── modules │ │ │ │ │ └── users │ │ │ │ │ │ └── users.module.ts │ │ │ │ └── app.module.ts │ │ │ ├── assets │ │ │ │ └── .gitkeep │ │ │ └── environments │ │ │ │ ├── environment.ts │ │ │ │ └── environment.prod.ts │ │ ├── sql │ │ │ └── create-tables.sql │ │ ├── tsconfig.json │ │ ├── tsconfig.spec.json │ │ ├── tsconfig.app.json │ │ ├── .eslintrc.json │ │ └── jest.config.ts │ └── api-gateway │ │ ├── src │ │ ├── app │ │ │ ├── .gitkeep │ │ │ ├── modules │ │ │ │ └── auth │ │ │ │ │ ├── auth.guard.ts │ │ │ │ │ └── auth.strategy.ts │ │ │ └── app.module.ts │ │ ├── assets │ │ │ └── .gitkeep │ │ └── environments │ │ │ ├── environment.ts │ │ │ └── environment.prod.ts │ │ ├── tsconfig.json │ │ ├── tsconfig.spec.json │ │ ├── tsconfig.app.json │ │ ├── .eslintrc.json │ │ └── jest.config.ts └── client │ ├── auth-mfe │ ├── src │ │ ├── assets │ │ │ └── .gitkeep │ │ ├── main.ts │ │ ├── favicon.ico │ │ ├── styles.scss │ │ ├── environments │ │ │ └── environment.prod.ts │ │ ├── app │ │ │ ├── app.component.ts │ │ │ ├── login │ │ │ │ └── login-facade.service.spec.ts │ │ │ ├── register │ │ │ │ └── register-facade.service.spec.ts │ │ │ ├── app-routing.module.ts │ │ │ └── app.module.ts │ │ ├── index.html │ │ ├── bootstrap.ts │ │ └── test-setup.ts │ ├── tsconfig.editor.json │ ├── webpack.config.js │ ├── module-federation.config.js │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ ├── webpack.prod.config.js │ ├── tsconfig.json │ ├── .browserslistrc │ └── jest.config.ts │ ├── loaders-mfe │ ├── src │ │ ├── assets │ │ │ └── .gitkeep │ │ ├── main.ts │ │ ├── favicon.ico │ │ ├── styles.scss │ │ ├── environments │ │ │ └── environment.prod.ts │ │ ├── index.html │ │ ├── app │ │ │ ├── app.component.ts │ │ │ ├── spinner │ │ │ │ ├── spinner.module.ts │ │ │ │ └── spinner.component.ts │ │ │ ├── app.module.ts │ │ │ └── app-routing.module.ts │ │ ├── bootstrap.ts │ │ └── test-setup.ts │ ├── tsconfig.editor.json │ ├── webpack.config.js │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ ├── module-federation.config.js │ ├── webpack.prod.config.js │ ├── .browserslistrc │ ├── tsconfig.json │ └── jest.config.ts │ ├── shell-app │ ├── src │ │ ├── assets │ │ │ ├── .gitkeep │ │ │ └── module-federation.manifest.json │ │ ├── favicon.ico │ │ ├── styles.scss │ │ ├── environments │ │ │ └── environment.prod.ts │ │ ├── app │ │ │ ├── app.component.ts │ │ │ └── app.module.ts │ │ ├── main.ts │ │ ├── remotes.d.ts │ │ ├── index.html │ │ ├── bootstrap.ts │ │ └── test-setup.ts │ ├── module-federation.config.js │ ├── tsconfig.editor.json │ ├── webpack.config.js │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ ├── webpack.prod.config.js │ ├── tsconfig.json │ ├── jest.config.ts │ └── .browserslistrc │ ├── dashboard-mfe │ ├── src │ │ ├── assets │ │ │ └── .gitkeep │ │ ├── main.ts │ │ ├── favicon.ico │ │ ├── styles.scss │ │ ├── app │ │ │ ├── remote-entry │ │ │ │ ├── entry.service.ts │ │ │ │ └── entry.module.ts │ │ │ └── app.component.ts │ │ ├── environments │ │ │ └── environment.prod.ts │ │ ├── index.html │ │ ├── bootstrap.ts │ │ └── test-setup.ts │ ├── tsconfig.editor.json │ ├── webpack.config.js │ ├── module-federation.config.js │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ ├── webpack.prod.config.js │ ├── tsconfig.json │ ├── .browserslistrc │ └── jest.config.ts │ ├── fallbacks-mfe │ ├── src │ │ ├── assets │ │ │ └── .gitkeep │ │ ├── main.ts │ │ ├── favicon.ico │ │ ├── styles.scss │ │ ├── environments │ │ │ └── environment.prod.ts │ │ ├── index.html │ │ ├── app │ │ │ ├── app.component.ts │ │ │ ├── not-found │ │ │ │ ├── not-found.module.ts │ │ │ │ └── not-found.component.ts │ │ │ ├── mfe-fallback │ │ │ │ ├── mfe-fallback.module.ts │ │ │ │ └── mfe-fallback.component.ts │ │ │ ├── app.module.ts │ │ │ └── app-routing.module.ts │ │ ├── bootstrap.ts │ │ └── test-setup.ts │ ├── tsconfig.editor.json │ ├── webpack.config.js │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ ├── module-federation.config.js │ ├── webpack.prod.config.js │ ├── .browserslistrc │ ├── tsconfig.json │ └── jest.config.ts │ ├── auth-mfe-e2e │ ├── src │ │ ├── support │ │ │ ├── app.po.ts │ │ │ └── index.ts │ │ ├── fixtures │ │ │ └── example.json │ │ └── integration │ │ │ └── app.spec.ts │ ├── .eslintrc.json │ ├── cypress.json │ └── tsconfig.json │ ├── shell-app-e2e │ ├── src │ │ ├── support │ │ │ ├── app.po.ts │ │ │ └── index.ts │ │ ├── fixtures │ │ │ └── example.json │ │ └── integration │ │ │ └── app.spec.ts │ ├── .eslintrc.json │ ├── cypress.json │ └── tsconfig.json │ ├── dashboard-mfe-e2e │ ├── src │ │ ├── support │ │ │ ├── app.po.ts │ │ │ └── index.ts │ │ ├── fixtures │ │ │ └── example.json │ │ └── integration │ │ │ └── app.spec.ts │ ├── .eslintrc.json │ ├── cypress.json │ └── tsconfig.json │ ├── fallbacks-mfe-e2e │ ├── src │ │ ├── support │ │ │ ├── app.po.ts │ │ │ └── index.ts │ │ ├── fixtures │ │ │ └── example.json │ │ └── integration │ │ │ └── app.spec.ts │ ├── .eslintrc.json │ ├── cypress.json │ └── tsconfig.json │ └── loaders-mfe-e2e │ ├── src │ ├── support │ │ ├── app.po.ts │ │ └── index.ts │ ├── fixtures │ │ └── example.json │ └── integration │ │ └── app.spec.ts │ ├── .eslintrc.json │ ├── cypress.json │ └── tsconfig.json ├── libs ├── .gitkeep ├── client │ ├── assets │ │ ├── src │ │ │ ├── index.ts │ │ │ └── lib │ │ │ │ └── illustrations │ │ │ │ ├── illustration-1.png │ │ │ │ ├── illustration-2.png │ │ │ │ ├── illustration-3.png │ │ │ │ ├── illustration-4.png │ │ │ │ └── illustration-5.png │ │ ├── .babelrc │ │ ├── tsconfig.lib.json │ │ ├── README.md │ │ ├── .eslintrc.json │ │ ├── jest.config.ts │ │ ├── tsconfig.json │ │ └── tsconfig.spec.json │ ├── styles │ │ ├── src │ │ │ ├── index.ts │ │ │ └── lib │ │ │ │ ├── base │ │ │ │ ├── _variables.scss │ │ │ │ └── _index.scss │ │ │ │ ├── override │ │ │ │ ├── browser │ │ │ │ │ └── _index.scss │ │ │ │ ├── carbon │ │ │ │ │ ├── _prefix.scss │ │ │ │ │ ├── _index.scss │ │ │ │ │ ├── _button.scss │ │ │ │ │ ├── _checkbox.scss │ │ │ │ │ ├── _text-input.scss │ │ │ │ │ ├── _form.scss │ │ │ │ │ └── _label.scss │ │ │ │ └── _index.scss │ │ │ │ ├── utilities │ │ │ │ ├── _index.scss │ │ │ │ ├── _keyframes.scss │ │ │ │ └── _convert.scss │ │ │ │ └── _theme.scss │ │ ├── .babelrc │ │ ├── tsconfig.lib.json │ │ ├── README.md │ │ ├── .eslintrc.json │ │ ├── jest.config.ts │ │ ├── tsconfig.json │ │ └── tsconfig.spec.json │ ├── core │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── lib │ │ │ │ └── microfrontends.ts │ │ │ └── test-setup.ts │ │ ├── README.md │ │ ├── tsconfig.spec.json │ │ ├── tsconfig.lib.json │ │ ├── tsconfig.json │ │ └── jest.config.ts │ ├── mfe │ │ ├── src │ │ │ ├── lib │ │ │ │ ├── helpers │ │ │ │ │ └── index.ts │ │ │ │ ├── registry │ │ │ │ │ └── index.ts │ │ │ │ ├── tokens │ │ │ │ │ ├── index.ts │ │ │ │ │ └── options.token.ts │ │ │ │ ├── directives │ │ │ │ │ ├── index.ts │ │ │ │ │ └── mfe-outlet.directive.spec.ts │ │ │ │ ├── interfaces │ │ │ │ │ ├── mfe-config.interface.ts │ │ │ │ │ └── index.ts │ │ │ │ ├── types │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── mfe-outlet-inputs.ts │ │ │ │ │ ├── mfe-outlet-outputs.ts │ │ │ │ │ └── component-with-ng-module-ref.ts │ │ │ │ └── services │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── remote-components-cache.spec.ts │ │ │ │ │ ├── remote-component-loader.spec.ts │ │ │ │ │ └── dynamic-component-binding.spec.ts │ │ │ ├── index.ts │ │ │ └── test-setup.ts │ │ ├── README.md │ │ ├── tsconfig.spec.json │ │ ├── tsconfig.lib.json │ │ ├── tsconfig.json │ │ └── jest.config.ts │ ├── auth │ │ ├── src │ │ │ ├── lib │ │ │ │ ├── const │ │ │ │ │ ├── index.ts │ │ │ │ │ └── password-regexp.ts │ │ │ │ └── services │ │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ └── test-setup.ts │ │ ├── README.md │ │ ├── tsconfig.spec.json │ │ ├── tsconfig.lib.json │ │ ├── tsconfig.json │ │ └── jest.config.ts │ ├── ui │ │ ├── src │ │ │ ├── test-setup.ts │ │ │ ├── lib │ │ │ │ ├── logo │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── logo.component.html │ │ │ │ │ ├── logo.component.scss │ │ │ │ │ ├── logo.component.ts │ │ │ │ │ └── logo.component.spec.ts │ │ │ │ ├── divider │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── divider.module.ts │ │ │ │ │ ├── divider.component.scss │ │ │ │ │ └── divider.component.ts │ │ │ │ ├── password-strength │ │ │ │ │ ├── password-strength.types.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── password-strength.component.html │ │ │ │ │ ├── password-strength-bar.directive.spec.ts │ │ │ │ │ └── password-strength.module.ts │ │ │ │ ├── password-input │ │ │ │ │ ├── index.ts │ │ │ │ │ └── password-input-wrapper.directive.ts │ │ │ │ └── card │ │ │ │ │ ├── card-title.directive.ts │ │ │ │ │ ├── card-footer.directive.ts │ │ │ │ │ ├── card-header.directive.ts │ │ │ │ │ ├── card-content.directive.ts │ │ │ │ │ ├── card.component.html │ │ │ │ │ ├── card-subtitle.directive.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── card.component.ts │ │ │ └── index.ts │ │ ├── README.md │ │ ├── tsconfig.spec.json │ │ ├── tsconfig.lib.json │ │ ├── tsconfig.json │ │ └── project.json │ ├── common │ │ ├── src │ │ │ ├── lib │ │ │ │ ├── http-error │ │ │ │ │ ├── index.ts │ │ │ │ │ └── http-error.ts │ │ │ │ ├── coercion │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── css-pixel.ts │ │ │ │ │ ├── boolean.ts │ │ │ │ │ └── number.ts │ │ │ │ └── decorators │ │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ └── test-setup.ts │ │ ├── README.md │ │ ├── tsconfig.spec.json │ │ ├── tsconfig.lib.json │ │ ├── tsconfig.json │ │ └── jest.config.ts │ ├── forms │ │ ├── src │ │ │ ├── lib │ │ │ │ ├── validators │ │ │ │ │ ├── index.ts │ │ │ │ │ └── custom-validators.ts │ │ │ │ ├── decorators │ │ │ │ │ ├── helpers │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── validate-form.ts │ │ │ │ │ │ └── generate-metadata-key.ts │ │ │ │ │ └── index.ts │ │ │ │ └── client-forms.module.ts │ │ │ ├── index.ts │ │ │ └── test-setup.ts │ │ ├── README.md │ │ ├── tsconfig.spec.json │ │ ├── tsconfig.lib.json │ │ ├── tsconfig.json │ │ └── jest.config.ts │ ├── environment │ │ ├── src │ │ │ ├── lib │ │ │ │ ├── injection-tokens │ │ │ │ │ ├── index.ts │ │ │ │ │ └── environment.token.ts │ │ │ │ ├── interfaces │ │ │ │ │ ├── index.ts │ │ │ │ │ └── environment.interface.ts │ │ │ │ ├── environment.ts │ │ │ │ └── environment.prod.ts │ │ │ ├── index.ts │ │ │ └── test-setup.ts │ │ ├── README.md │ │ ├── tsconfig.spec.json │ │ ├── tsconfig.lib.json │ │ ├── tsconfig.json │ │ └── jest.config.ts │ └── injector-container │ │ ├── src │ │ ├── index.ts │ │ ├── test-setup.ts │ │ └── lib │ │ │ └── client-injector-container.module.ts │ │ ├── README.md │ │ ├── tsconfig.spec.json │ │ ├── tsconfig.lib.json │ │ ├── tsconfig.json │ │ └── .browserslistrc ├── server │ ├── common │ │ ├── src │ │ │ ├── index.ts │ │ │ └── lib │ │ │ │ ├── helpers │ │ │ │ ├── index.ts │ │ │ │ └── hash.ts │ │ │ │ ├── decorators │ │ │ │ ├── index.ts │ │ │ │ └── log-observable-error.decorator.ts │ │ │ │ └── index.ts │ │ ├── README.md │ │ ├── tsconfig.spec.json │ │ ├── tsconfig.lib.json │ │ ├── tsconfig.json │ │ ├── .eslintrc.json │ │ ├── jest.config.ts │ │ └── project.json │ ├── domains │ │ ├── src │ │ │ ├── lib │ │ │ │ ├── mail │ │ │ │ │ ├── index.ts │ │ │ │ │ └── confirm-registration-job.ts │ │ │ │ └── auth │ │ │ │ │ ├── user-metadata.ts │ │ │ │ │ ├── activation-token-payload.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── access-token.ts │ │ │ │ │ ├── refresh-token.ts │ │ │ │ │ ├── auth-token-payload.ts │ │ │ │ │ └── jwt-token.ts │ │ │ └── index.ts │ │ ├── .babelrc │ │ ├── README.md │ │ ├── tsconfig.json │ │ ├── tsconfig.lib.json │ │ ├── .eslintrc.json │ │ ├── tsconfig.spec.json │ │ └── jest.config.ts │ └── grpc │ │ ├── src │ │ ├── lib │ │ │ ├── interceptors │ │ │ │ └── index.ts │ │ │ ├── proto │ │ │ │ ├── utils.proto │ │ │ │ ├── index.ts │ │ │ │ ├── mail-ms.proto │ │ │ │ └── compile-proto.sh │ │ │ ├── exceptions │ │ │ │ ├── index.ts │ │ │ │ ├── grpc-exception.interface.ts │ │ │ │ └── grpc-exception.ts │ │ │ └── exception-filters │ │ │ │ └── index.ts │ │ └── index.ts │ │ ├── .babelrc │ │ ├── tsconfig.json │ │ ├── README.md │ │ ├── tsconfig.lib.json │ │ ├── .eslintrc.json │ │ ├── jest.config.ts │ │ └── tsconfig.spec.json └── shared │ ├── common │ ├── src │ │ ├── lib │ │ │ ├── types │ │ │ │ └── index.ts │ │ │ └── rxjs │ │ │ │ ├── operators │ │ │ │ ├── index.ts │ │ │ │ └── map-to-instance.ts │ │ │ │ ├── index.ts │ │ │ │ └── void.ts │ │ └── index.ts │ ├── .babelrc │ ├── tsconfig.lib.json │ ├── README.md │ ├── .eslintrc.json │ ├── jest.config.ts │ ├── tsconfig.json │ ├── tsconfig.spec.json │ └── project.json │ └── data-access │ ├── src │ ├── lib │ │ ├── requests │ │ │ ├── index.ts │ │ │ └── auth │ │ │ │ ├── registration.request.ts │ │ │ │ ├── index.ts │ │ │ │ ├── resend-register-confirmation.request.ts │ │ │ │ ├── login.request.ts │ │ │ │ └── credentials.request.ts │ │ └── responses │ │ │ ├── users │ │ │ ├── index.ts │ │ │ └── user.response.ts │ │ │ ├── auth │ │ │ ├── index.ts │ │ │ └── auth-tokens.response.ts │ │ │ ├── index.ts │ │ │ └── error │ │ │ ├── index.ts │ │ │ ├── server-error.response.ts │ │ │ └── default-http-error.response.ts │ └── index.ts │ ├── README.md │ ├── tsconfig.lib.json │ ├── tsconfig.spec.json │ ├── .eslintrc.json │ ├── jest.config.ts │ ├── tsconfig.json │ └── project.json ├── tools ├── generators │ ├── .gitkeep │ ├── index.ts │ └── mfe │ │ ├── types.ts │ │ ├── patterns │ │ ├── environment.txt │ │ ├── environment.prod.txt │ │ ├── host-webpack.config.txt │ │ ├── remote-webpack.config.txt │ │ └── entry.module.txt │ │ ├── schema.d.ts │ │ └── helpers │ │ ├── index.ts │ │ ├── get-available-mfe-port.ts │ │ ├── replace-remote-entry-module.ts │ │ └── replace-remote-mfe-app-module.ts ├── mfe │ ├── index.ts │ └── const │ │ ├── host-mfe-tag.ts │ │ ├── remote-mfe-tag.ts │ │ └── index.ts ├── pattern-engine │ ├── pattern-regexp.ts │ ├── index.ts │ └── replace-patterns.ts ├── index.ts ├── webpack │ └── index.js └── tsconfig.tools.json ├── .prettierignore ├── jest.preset.js ├── jest.config.ts ├── .npmrc ├── .prettierrc ├── .dockerignore └── .gitignore /apps/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /libs/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/generators/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /libs/client/assets/src/index.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /libs/client/styles/src/index.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/server/auth-ms/src/app/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/server/mail-ms/src/app/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/server/users-ms/src/app/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/client/auth-mfe/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/client/loaders-mfe/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/client/shell-app/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/server/api-gateway/src/app/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/server/api-gateway/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/server/auth-ms/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/server/mail-ms/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/server/users-ms/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/client/dashboard-mfe/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /libs/client/styles/src/lib/base/_variables.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/mfe/index.ts: -------------------------------------------------------------------------------- 1 | export * from './const'; 2 | -------------------------------------------------------------------------------- /tools/generators/index.ts: -------------------------------------------------------------------------------- 1 | export * from './mfe' 2 | -------------------------------------------------------------------------------- /libs/server/common/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib'; 2 | -------------------------------------------------------------------------------- /libs/client/core/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/core.module'; 2 | -------------------------------------------------------------------------------- /libs/client/mfe/src/lib/helpers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './load-mfe'; 2 | -------------------------------------------------------------------------------- /libs/client/styles/src/lib/base/_index.scss: -------------------------------------------------------------------------------- 1 | @forward './variables'; 2 | -------------------------------------------------------------------------------- /libs/server/common/src/lib/helpers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './hash'; 2 | -------------------------------------------------------------------------------- /tools/generators/mfe/types.ts: -------------------------------------------------------------------------------- 1 | export type Type = 'host' | 'remote'; 2 | -------------------------------------------------------------------------------- /apps/server/auth-ms/src/app/constants/index.ts: -------------------------------------------------------------------------------- 1 | export * from './services'; 2 | -------------------------------------------------------------------------------- /apps/server/mail-ms/src/app/domains/index.ts: -------------------------------------------------------------------------------- 1 | export * from './queue-jobs'; 2 | -------------------------------------------------------------------------------- /libs/client/auth/src/lib/const/index.ts: -------------------------------------------------------------------------------- 1 | export * from './password-regexp'; 2 | -------------------------------------------------------------------------------- /libs/client/mfe/src/lib/registry/index.ts: -------------------------------------------------------------------------------- 1 | export * from './mfe-registry'; 2 | -------------------------------------------------------------------------------- /libs/client/mfe/src/lib/tokens/index.ts: -------------------------------------------------------------------------------- 1 | export * from './options.token'; 2 | -------------------------------------------------------------------------------- /libs/client/ui/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | -------------------------------------------------------------------------------- /libs/shared/common/src/lib/types/index.ts: -------------------------------------------------------------------------------- 1 | export * from './type-gurads'; 2 | -------------------------------------------------------------------------------- /libs/shared/data-access/src/lib/requests/index.ts: -------------------------------------------------------------------------------- 1 | export * from './auth'; 2 | -------------------------------------------------------------------------------- /tools/mfe/const/host-mfe-tag.ts: -------------------------------------------------------------------------------- 1 | export const HOST_MFE_TAG = 'mfe:host'; 2 | -------------------------------------------------------------------------------- /apps/server/users-ms/src/app/constants/index.ts: -------------------------------------------------------------------------------- 1 | export * from './services'; 2 | -------------------------------------------------------------------------------- /libs/client/auth/src/lib/services/index.ts: -------------------------------------------------------------------------------- 1 | export * from './auth-api.service'; 2 | -------------------------------------------------------------------------------- /libs/client/common/src/lib/http-error/index.ts: -------------------------------------------------------------------------------- 1 | export * from './http-error'; 2 | -------------------------------------------------------------------------------- /libs/client/styles/src/lib/override/browser/_index.scss: -------------------------------------------------------------------------------- 1 | @forward './input'; 2 | -------------------------------------------------------------------------------- /libs/client/styles/src/lib/override/carbon/_prefix.scss: -------------------------------------------------------------------------------- 1 | $prefix: bx !default; 2 | -------------------------------------------------------------------------------- /tools/mfe/const/remote-mfe-tag.ts: -------------------------------------------------------------------------------- 1 | export const REMOTE_MFE_TAG = 'mfe:remote'; 2 | -------------------------------------------------------------------------------- /tools/pattern-engine/pattern-regexp.ts: -------------------------------------------------------------------------------- 1 | export const PATTERN_REGEXP = /{\*{3}}/; 2 | -------------------------------------------------------------------------------- /libs/client/forms/src/lib/validators/index.ts: -------------------------------------------------------------------------------- 1 | export * from './custom-validators'; 2 | -------------------------------------------------------------------------------- /libs/client/mfe/src/lib/directives/index.ts: -------------------------------------------------------------------------------- 1 | export * from './mfe-outlet.directive'; 2 | -------------------------------------------------------------------------------- /libs/server/domains/src/lib/mail/index.ts: -------------------------------------------------------------------------------- 1 | export * from './confirm-registration-job'; 2 | -------------------------------------------------------------------------------- /libs/shared/common/src/lib/rxjs/operators/index.ts: -------------------------------------------------------------------------------- 1 | export * from './map-to-instance'; 2 | -------------------------------------------------------------------------------- /libs/shared/data-access/src/lib/responses/users/index.ts: -------------------------------------------------------------------------------- 1 | export * from './user.response'; 2 | -------------------------------------------------------------------------------- /apps/client/auth-mfe-e2e/src/support/app.po.ts: -------------------------------------------------------------------------------- 1 | export const getGreeting = () => cy.get('h1'); 2 | -------------------------------------------------------------------------------- /apps/client/auth-mfe/src/main.ts: -------------------------------------------------------------------------------- 1 | import('./bootstrap').catch((err) => console.error(err)); 2 | -------------------------------------------------------------------------------- /apps/client/loaders-mfe/src/main.ts: -------------------------------------------------------------------------------- 1 | import('./bootstrap').catch((err) => console.error(err)); 2 | -------------------------------------------------------------------------------- /apps/client/shell-app-e2e/src/support/app.po.ts: -------------------------------------------------------------------------------- 1 | export const getGreeting = () => cy.get('h1'); 2 | -------------------------------------------------------------------------------- /apps/server/mail-ms/src/app/abstractions/index.ts: -------------------------------------------------------------------------------- 1 | export * from './mail-service.interface'; 2 | -------------------------------------------------------------------------------- /apps/server/users-ms/src/app/abstractions/index.ts: -------------------------------------------------------------------------------- 1 | export * from './users-service.interface'; 2 | -------------------------------------------------------------------------------- /libs/client/environment/src/lib/injection-tokens/index.ts: -------------------------------------------------------------------------------- 1 | export * from './environment.token'; 2 | -------------------------------------------------------------------------------- /libs/client/environment/src/lib/interfaces/index.ts: -------------------------------------------------------------------------------- 1 | export * from './environment.interface'; 2 | -------------------------------------------------------------------------------- /libs/server/domains/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/auth'; 2 | export * from './lib/mail'; 3 | -------------------------------------------------------------------------------- /libs/server/grpc/src/lib/interceptors/index.ts: -------------------------------------------------------------------------------- 1 | export * from './rpc-exception.interceptor'; 2 | -------------------------------------------------------------------------------- /libs/shared/common/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/rxjs'; 2 | export * from './lib/types'; 3 | -------------------------------------------------------------------------------- /tools/mfe/const/index.ts: -------------------------------------------------------------------------------- 1 | export * from './host-mfe-tag'; 2 | export * from './remote-mfe-tag'; 3 | -------------------------------------------------------------------------------- /apps/client/dashboard-mfe-e2e/src/support/app.po.ts: -------------------------------------------------------------------------------- 1 | export const getGreeting = () => cy.get('h1'); 2 | -------------------------------------------------------------------------------- /apps/client/dashboard-mfe/src/main.ts: -------------------------------------------------------------------------------- 1 | import('./bootstrap').catch((err) => console.error(err)); 2 | -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe-e2e/src/support/app.po.ts: -------------------------------------------------------------------------------- 1 | export const getGreeting = () => cy.get('h1'); 2 | -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe/src/main.ts: -------------------------------------------------------------------------------- 1 | import('./bootstrap').catch((err) => console.error(err)); 2 | -------------------------------------------------------------------------------- /apps/client/loaders-mfe-e2e/src/support/app.po.ts: -------------------------------------------------------------------------------- 1 | export const getGreeting = () => cy.get('h1'); 2 | -------------------------------------------------------------------------------- /libs/client/injector-container/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/client-injector-container.module'; 2 | -------------------------------------------------------------------------------- /libs/client/styles/src/lib/override/_index.scss: -------------------------------------------------------------------------------- 1 | @forward './carbon'; 2 | @forward './browser/'; 3 | -------------------------------------------------------------------------------- /libs/server/common/src/lib/decorators/index.ts: -------------------------------------------------------------------------------- 1 | export * from './log-observable-error.decorator'; 2 | -------------------------------------------------------------------------------- /libs/server/common/src/lib/index.ts: -------------------------------------------------------------------------------- 1 | export * from './decorators'; 2 | export * from './helpers'; 3 | -------------------------------------------------------------------------------- /libs/shared/common/src/lib/rxjs/index.ts: -------------------------------------------------------------------------------- 1 | export * from './operators'; 2 | export * from './void'; 3 | -------------------------------------------------------------------------------- /libs/shared/data-access/src/lib/responses/auth/index.ts: -------------------------------------------------------------------------------- 1 | export * from './auth-tokens.response'; 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | # Add files here to ignore them from prettier formatting 2 | 3 | /dist 4 | /coverage 5 | -------------------------------------------------------------------------------- /apps/server/mail-ms/src/app/constants/index.ts: -------------------------------------------------------------------------------- 1 | export * from './queue'; 2 | export * from './services'; 3 | -------------------------------------------------------------------------------- /libs/client/assets/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [["@nrwl/web/babel", { "useBuiltIns": "usage" }]] 3 | } 4 | -------------------------------------------------------------------------------- /libs/client/mfe/README.md: -------------------------------------------------------------------------------- 1 | # This lib is full copy of the [ngx-mfe](https://github.com/dkhrunov/ngx-mfe) 2 | -------------------------------------------------------------------------------- /libs/client/styles/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [["@nrwl/web/babel", { "useBuiltIns": "usage" }]] 3 | } 4 | -------------------------------------------------------------------------------- /libs/server/domains/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [["@nrwl/web/babel", { "useBuiltIns": "usage" }]] 3 | } 4 | -------------------------------------------------------------------------------- /libs/server/grpc/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [["@nrwl/web/babel", { "useBuiltIns": "usage" }]] 3 | } 4 | -------------------------------------------------------------------------------- /libs/shared/common/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [["@nrwl/web/babel", { "useBuiltIns": "usage" }]] 3 | } 4 | -------------------------------------------------------------------------------- /tools/index.ts: -------------------------------------------------------------------------------- 1 | export * from './generators'; 2 | export * from './mfe'; 3 | export * from './webpack'; 4 | -------------------------------------------------------------------------------- /tools/pattern-engine/index.ts: -------------------------------------------------------------------------------- 1 | export * from './pattern-regexp'; 2 | export * from './replace-patterns'; 3 | -------------------------------------------------------------------------------- /apps/server/mail-ms/src/app/domains/queue-jobs/index.ts: -------------------------------------------------------------------------------- 1 | export * from './confirm-registration-job-payload'; 2 | -------------------------------------------------------------------------------- /libs/client/ui/src/lib/logo/index.ts: -------------------------------------------------------------------------------- 1 | export * from './logo.component'; 2 | export * from './logo.module'; 3 | -------------------------------------------------------------------------------- /libs/server/grpc/src/lib/proto/utils.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package utils; 4 | 5 | message Empty {} -------------------------------------------------------------------------------- /libs/shared/data-access/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/requests'; 2 | export * from './lib/responses'; 3 | -------------------------------------------------------------------------------- /apps/server/auth-ms/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: false, 3 | }; 4 | -------------------------------------------------------------------------------- /apps/server/mail-ms/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: false, 3 | }; 4 | -------------------------------------------------------------------------------- /apps/server/users-ms/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: false, 3 | }; 4 | -------------------------------------------------------------------------------- /jest.preset.js: -------------------------------------------------------------------------------- 1 | const nxPreset = require('@nrwl/jest/preset').default; 2 | 3 | module.exports = { ...nxPreset }; 4 | -------------------------------------------------------------------------------- /libs/client/ui/src/lib/divider/index.ts: -------------------------------------------------------------------------------- 1 | export * from './divider.component'; 2 | export * from './divider.module'; 3 | -------------------------------------------------------------------------------- /apps/server/api-gateway/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: false, 3 | }; 4 | -------------------------------------------------------------------------------- /apps/server/auth-ms/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true, 3 | }; 4 | -------------------------------------------------------------------------------- /apps/server/mail-ms/src/app/constants/services.ts: -------------------------------------------------------------------------------- 1 | export enum Services { 2 | MAIL_SERVICE = 'MAIL_SERVICE', 3 | } 4 | -------------------------------------------------------------------------------- /apps/server/mail-ms/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true, 3 | }; 4 | -------------------------------------------------------------------------------- /apps/server/users-ms/src/app/constants/services.ts: -------------------------------------------------------------------------------- 1 | export enum Services { 2 | USER_SERVICE = 'USER_SERVICE', 3 | } 4 | -------------------------------------------------------------------------------- /apps/server/users-ms/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true, 3 | }; 4 | -------------------------------------------------------------------------------- /apps/client/shell-app/module-federation.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: 'client-shell-app', 3 | remotes: [], 4 | }; 5 | -------------------------------------------------------------------------------- /apps/server/api-gateway/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true, 3 | }; 4 | -------------------------------------------------------------------------------- /libs/client/styles/src/lib/utilities/_index.scss: -------------------------------------------------------------------------------- 1 | @forward './convert'; 2 | @forward './keyframes'; 3 | @forward './bemify'; 4 | -------------------------------------------------------------------------------- /libs/server/grpc/src/lib/exceptions/index.ts: -------------------------------------------------------------------------------- 1 | export * from './grpc-exception'; 2 | export * from './grpc-exception.interface'; 3 | -------------------------------------------------------------------------------- /apps/client/auth-mfe/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkhrunov/fullstack-angular-mfe/HEAD/apps/client/auth-mfe/src/favicon.ico -------------------------------------------------------------------------------- /jest.config.ts: -------------------------------------------------------------------------------- 1 | const { getJestProjects } = require('@nrwl/jest'); 2 | 3 | export default { 4 | projects: getJestProjects(), 5 | }; 6 | -------------------------------------------------------------------------------- /libs/client/auth/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/auth.module'; 2 | export * from './lib/const'; 3 | export * from './lib/services'; 4 | -------------------------------------------------------------------------------- /libs/client/forms/src/lib/decorators/helpers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './generate-metadata-key'; 2 | export * from './validate-form'; 3 | -------------------------------------------------------------------------------- /libs/client/ui/src/lib/password-strength/password-strength.types.ts: -------------------------------------------------------------------------------- 1 | export type Status = 'base' | 'error' | 'warning' | 'success'; 2 | -------------------------------------------------------------------------------- /libs/shared/data-access/src/lib/responses/index.ts: -------------------------------------------------------------------------------- 1 | export * from './auth'; 2 | export * from './error'; 3 | export * from './users'; 4 | -------------------------------------------------------------------------------- /apps/client/shell-app/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkhrunov/fullstack-angular-mfe/HEAD/apps/client/shell-app/src/favicon.ico -------------------------------------------------------------------------------- /apps/server/auth-ms/src/app/abstractions/index.ts: -------------------------------------------------------------------------------- 1 | export * from './auth-service.interface'; 2 | export * from './token-service.interface'; 3 | -------------------------------------------------------------------------------- /libs/client/common/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/coercion'; 2 | export * from './lib/decorators'; 3 | export * from './lib/http-error'; 4 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | registry=https://registry.npmjs.org/ 2 | 3 | # local Nexus container 4 | # @dekh:registry=http://localhost:8081/repository/npm-group/ 5 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "es5", 4 | "tabWidth": 2, 5 | "useTabs": false, 6 | "printWidth": 100 7 | } 8 | -------------------------------------------------------------------------------- /apps/client/auth-mfe-e2e/src/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io" 4 | } 5 | -------------------------------------------------------------------------------- /apps/client/dashboard-mfe/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkhrunov/fullstack-angular-mfe/HEAD/apps/client/dashboard-mfe/src/favicon.ico -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkhrunov/fullstack-angular-mfe/HEAD/apps/client/fallbacks-mfe/src/favicon.ico -------------------------------------------------------------------------------- /apps/client/loaders-mfe-e2e/src/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io" 4 | } 5 | -------------------------------------------------------------------------------- /apps/client/loaders-mfe/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkhrunov/fullstack-angular-mfe/HEAD/apps/client/loaders-mfe/src/favicon.ico -------------------------------------------------------------------------------- /apps/client/shell-app-e2e/src/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io" 4 | } 5 | -------------------------------------------------------------------------------- /libs/client/auth/src/lib/const/password-regexp.ts: -------------------------------------------------------------------------------- 1 | export const PASSWORD_REGEXP = /^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!%*#?&]*$/; 2 | -------------------------------------------------------------------------------- /libs/client/ui/src/lib/logo/logo.component.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /libs/client/ui/src/lib/password-strength/index.ts: -------------------------------------------------------------------------------- 1 | export * from './password-strength.component'; 2 | export * from './password-strength.module'; 3 | -------------------------------------------------------------------------------- /apps/client/dashboard-mfe-e2e/src/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io" 4 | } 5 | -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe-e2e/src/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io" 4 | } 5 | -------------------------------------------------------------------------------- /libs/client/forms/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/client-forms.module'; 2 | export * from './lib/decorators'; 3 | export * from './lib/validators'; 4 | -------------------------------------------------------------------------------- /libs/server/grpc/src/lib/exception-filters/index.ts: -------------------------------------------------------------------------------- 1 | export * from './grpc-exception.filter'; 2 | export * from './grpc-to-http-exception.filter'; 3 | -------------------------------------------------------------------------------- /libs/shared/data-access/src/lib/responses/error/index.ts: -------------------------------------------------------------------------------- 1 | export * from './default-http-error.response'; 2 | export * from './server-error.response'; 3 | -------------------------------------------------------------------------------- /apps/server/auth-ms/src/app/constants/services.ts: -------------------------------------------------------------------------------- 1 | export enum Services { 2 | AUTH_SERVICE = 'AUTH_SERVICE', 3 | TOKEN_SERVICE = 'TOKEN_SERVICE', 4 | } 5 | -------------------------------------------------------------------------------- /libs/client/environment/src/lib/interfaces/environment.interface.ts: -------------------------------------------------------------------------------- 1 | export interface IEnvironment { 2 | production: boolean; 3 | apiUrl: string; 4 | } 5 | -------------------------------------------------------------------------------- /tools/webpack/index.js: -------------------------------------------------------------------------------- 1 | export * from './create-app-webpack-config'; 2 | export * from './create-mfe-webpack-config'; 3 | export * from './shared-libs'; 4 | -------------------------------------------------------------------------------- /libs/client/forms/src/lib/decorators/index.ts: -------------------------------------------------------------------------------- 1 | export * from './form.decorator'; 2 | export * from './helpers'; 3 | export * from './if-form-valid.decorator'; 4 | -------------------------------------------------------------------------------- /libs/server/domains/src/lib/auth/user-metadata.ts: -------------------------------------------------------------------------------- 1 | export class UserMetadata { 2 | public readonly ip: string; 3 | public readonly userAgent: string; 4 | } 5 | -------------------------------------------------------------------------------- /apps/client/auth-mfe/src/styles.scss: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | @use 'libs/client/styles/src/lib/theme'; 3 | -------------------------------------------------------------------------------- /apps/client/loaders-mfe/src/styles.scss: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | @use 'libs/client/styles/src/lib/theme'; 3 | -------------------------------------------------------------------------------- /apps/client/shell-app/src/styles.scss: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | @use 'libs/client/styles/src/lib/theme'; 3 | -------------------------------------------------------------------------------- /libs/client/mfe/src/lib/interfaces/mfe-config.interface.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * MFE options. 3 | */ 4 | export interface MfeConfig { 5 | [mfeName: string]: string; 6 | } 7 | -------------------------------------------------------------------------------- /apps/client/dashboard-mfe/src/styles.scss: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | @use 'libs/client/styles/src/lib/theme'; 3 | -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe/src/styles.scss: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | @use 'libs/client/styles/src/lib/theme'; 3 | -------------------------------------------------------------------------------- /libs/client/mfe/src/lib/types/index.ts: -------------------------------------------------------------------------------- 1 | export * from './component-with-ng-module-ref'; 2 | export * from './mfe-outlet-inputs'; 3 | export * from './mfe-outlet-outputs'; 4 | -------------------------------------------------------------------------------- /libs/client/forms/src/lib/client-forms.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | @NgModule({ 4 | imports: [], 5 | }) 6 | export class ClientFormsModule {} 7 | -------------------------------------------------------------------------------- /libs/client/common/src/lib/coercion/index.ts: -------------------------------------------------------------------------------- 1 | export * from './boolean'; 2 | export * from './coercion.decorator'; 3 | export * from './css-pixel'; 4 | export * from './number'; 5 | -------------------------------------------------------------------------------- /libs/client/mfe/src/lib/types/mfe-outlet-inputs.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Inputs that projects to micro-frontend component. 3 | */ 4 | export type MfeOutletInputs = Record; 5 | -------------------------------------------------------------------------------- /libs/client/styles/src/lib/override/carbon/_index.scss: -------------------------------------------------------------------------------- 1 | @forward './form'; 2 | @forward './button'; 3 | @forward './text-input'; 4 | @forward './label'; 5 | @forward './checkbox'; 6 | -------------------------------------------------------------------------------- /apps/server/mail-ms/src/app/abstractions/mail-service.interface.ts: -------------------------------------------------------------------------------- 1 | export interface IMailService { 2 | confirmRegistration(recipient: string, token: string): Promise; 3 | } 4 | -------------------------------------------------------------------------------- /libs/client/assets/src/lib/illustrations/illustration-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkhrunov/fullstack-angular-mfe/HEAD/libs/client/assets/src/lib/illustrations/illustration-1.png -------------------------------------------------------------------------------- /libs/client/assets/src/lib/illustrations/illustration-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkhrunov/fullstack-angular-mfe/HEAD/libs/client/assets/src/lib/illustrations/illustration-2.png -------------------------------------------------------------------------------- /libs/client/assets/src/lib/illustrations/illustration-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkhrunov/fullstack-angular-mfe/HEAD/libs/client/assets/src/lib/illustrations/illustration-3.png -------------------------------------------------------------------------------- /libs/client/assets/src/lib/illustrations/illustration-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkhrunov/fullstack-angular-mfe/HEAD/libs/client/assets/src/lib/illustrations/illustration-4.png -------------------------------------------------------------------------------- /libs/client/assets/src/lib/illustrations/illustration-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkhrunov/fullstack-angular-mfe/HEAD/libs/client/assets/src/lib/illustrations/illustration-5.png -------------------------------------------------------------------------------- /libs/client/common/src/lib/decorators/index.ts: -------------------------------------------------------------------------------- 1 | export * from './confirmable.decorator'; 2 | export * from './outside-zone.decorator'; 3 | export * from './track-changes.decorator'; 4 | -------------------------------------------------------------------------------- /libs/client/mfe/src/lib/services/index.ts: -------------------------------------------------------------------------------- 1 | export * from './dynamic-component-binding'; 2 | export * from './remote-component-loader'; 3 | export * from './remote-components-cache'; 4 | -------------------------------------------------------------------------------- /libs/server/grpc/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/exception-filters'; 2 | export * from './lib/exceptions'; 3 | export * from './lib/interceptors'; 4 | export * from './lib/proto'; 5 | -------------------------------------------------------------------------------- /tools/generators/mfe/patterns/environment.txt: -------------------------------------------------------------------------------- 1 | import { baseConfig, IConfig } from '@nx-mfe/client/config'; 2 | 3 | export const environment: IConfig = { 4 | ...baseConfig, 5 | }; 6 | -------------------------------------------------------------------------------- /apps/server/mail-ms/src/app/constants/queue.ts: -------------------------------------------------------------------------------- 1 | // Queues 2 | export const MAIL_QUEUE = 'MAIL_QUEUE'; 3 | 4 | // Jobs 5 | export const CONFIRM_REGISTRATION_JOB = 'CONFIRM_REGISTRATION_JOB'; 6 | -------------------------------------------------------------------------------- /libs/client/mfe/src/lib/interfaces/index.ts: -------------------------------------------------------------------------------- 1 | export * from './mfe-config.interface'; 2 | export * from './mfe-module-options.interface'; 3 | export * from './remote-component.interface'; 4 | -------------------------------------------------------------------------------- /libs/client/ui/README.md: -------------------------------------------------------------------------------- 1 | # client-ui 2 | 3 | This library was generated with [Nx](https://nx.dev). 4 | 5 | ## Running unit tests 6 | 7 | Run `nx test client-ui` to execute the unit tests. 8 | -------------------------------------------------------------------------------- /libs/client/ui/src/lib/password-input/index.ts: -------------------------------------------------------------------------------- 1 | export * from './password-input-wrapper.directive'; 2 | export * from './password-input.component'; 3 | export * from './password-input.module'; 4 | -------------------------------------------------------------------------------- /libs/server/domains/src/lib/auth/activation-token-payload.ts: -------------------------------------------------------------------------------- 1 | import { AuthTokenPayload } from './auth-token-payload'; 2 | 3 | export class ActivationTokenPayload extends AuthTokenPayload {} 4 | -------------------------------------------------------------------------------- /tools/generators/mfe/patterns/environment.prod.txt: -------------------------------------------------------------------------------- 1 | import { baseProdConfig, IConfig } from '@nx-mfe/client/config'; 2 | 3 | export const environment: IConfig = { 4 | ...baseProdConfig, 5 | }; 6 | -------------------------------------------------------------------------------- /libs/client/auth/README.md: -------------------------------------------------------------------------------- 1 | # client-auth 2 | 3 | This library was generated with [Nx](https://nx.dev). 4 | 5 | ## Running unit tests 6 | 7 | Run `nx test client-auth` to execute the unit tests. 8 | -------------------------------------------------------------------------------- /libs/client/core/README.md: -------------------------------------------------------------------------------- 1 | # client-core 2 | 3 | This library was generated with [Nx](https://nx.dev). 4 | 5 | ## Running unit tests 6 | 7 | Run `nx test client-core` to execute the unit tests. 8 | -------------------------------------------------------------------------------- /libs/client/environment/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/environment'; 2 | export * from './lib/environment.prod'; 3 | export * from './lib/injection-tokens'; 4 | export * from './lib/interfaces'; 5 | -------------------------------------------------------------------------------- /libs/client/forms/README.md: -------------------------------------------------------------------------------- 1 | # client-forms 2 | 3 | This library was generated with [Nx](https://nx.dev). 4 | 5 | ## Running unit tests 6 | 7 | Run `nx test client-forms` to execute the unit tests. 8 | -------------------------------------------------------------------------------- /libs/client/mfe/src/lib/types/mfe-outlet-outputs.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Outputs that projects to micro-frontend component. 3 | */ 4 | export type MfeOutletOutputs = Record void>; 5 | -------------------------------------------------------------------------------- /libs/shared/common/src/lib/rxjs/void.ts: -------------------------------------------------------------------------------- 1 | import { Observable } from 'rxjs'; 2 | 3 | export const VOID = new Observable((observer) => { 4 | observer.next(); 5 | observer.complete(); 6 | }); 7 | -------------------------------------------------------------------------------- /libs/shared/data-access/src/lib/requests/auth/registration.request.ts: -------------------------------------------------------------------------------- 1 | import { CredentialsRequest } from './credentials.request'; 2 | 3 | export class RegisterRequest extends CredentialsRequest {} 4 | -------------------------------------------------------------------------------- /apps/client/dashboard-mfe/src/app/remote-entry/entry.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | 3 | @Injectable() 4 | export class EntryService { 5 | public data = 'Testing value'; 6 | } 7 | -------------------------------------------------------------------------------- /libs/client/common/README.md: -------------------------------------------------------------------------------- 1 | # client-common 2 | 3 | This library was generated with [Nx](https://nx.dev). 4 | 5 | ## Running unit tests 6 | 7 | Run `nx test client-common` to execute the unit tests. 8 | -------------------------------------------------------------------------------- /libs/client/styles/src/lib/override/carbon/_button.scss: -------------------------------------------------------------------------------- 1 | @use './prefix' as *; 2 | 3 | // ---------------- 4 | // Button Set 5 | // ---------------- 6 | .#{$prefix}--btn-set .bx--btn { 7 | flex: 1; 8 | } 9 | -------------------------------------------------------------------------------- /tools/generators/mfe/patterns/host-webpack.config.txt: -------------------------------------------------------------------------------- 1 | const createAppWebpackConfig = require('{***}/tools/webpack/create-app-webpack-config'); 2 | 3 | module.exports = createAppWebpackConfig('{***}'); 4 | -------------------------------------------------------------------------------- /libs/client/ui/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/card'; 2 | export * from './lib/divider'; 3 | export * from './lib/password-input'; 4 | export * from './lib/password-strength'; 5 | export * from './lib/logo'; 6 | -------------------------------------------------------------------------------- /apps/client/auth-mfe/tsconfig.editor.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "include": ["**/*.ts"], 4 | "compilerOptions": { 5 | "types": ["jest", "node"] 6 | }, 7 | "exclude": ["jest.config.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /apps/client/auth-mfe/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | import { environmentProd, IEnvironment } from '@nx-mfe/client/environment'; 2 | 3 | export const environment: IEnvironment = { 4 | ...environmentProd, 5 | }; 6 | -------------------------------------------------------------------------------- /apps/client/dashboard-mfe/tsconfig.editor.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "include": ["**/*.ts"], 4 | "compilerOptions": { 5 | "types": ["jest", "node"] 6 | }, 7 | "exclude": ["jest.config.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe/tsconfig.editor.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "include": ["**/*.ts"], 4 | "compilerOptions": { 5 | "types": ["jest", "node"] 6 | }, 7 | "exclude": ["jest.config.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /apps/client/loaders-mfe/tsconfig.editor.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "include": ["**/*.ts"], 4 | "compilerOptions": { 5 | "types": ["jest", "node"] 6 | }, 7 | "exclude": ["jest.config.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /apps/client/shell-app/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | import { environmentProd, IEnvironment } from '@nx-mfe/client/environment'; 2 | 3 | export const environment: IEnvironment = { 4 | ...environmentProd, 5 | }; 6 | -------------------------------------------------------------------------------- /apps/client/shell-app/tsconfig.editor.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "include": ["**/*.ts"], 4 | "compilerOptions": { 5 | "types": ["jest", "node"] 6 | }, 7 | "exclude": ["jest.config.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /libs/client/environment/README.md: -------------------------------------------------------------------------------- 1 | # client-environment 2 | 3 | This library was generated with [Nx](https://nx.dev). 4 | 5 | ## Running unit tests 6 | 7 | Run `nx test client-environment` to execute the unit tests. 8 | -------------------------------------------------------------------------------- /libs/client/environment/src/lib/environment.ts: -------------------------------------------------------------------------------- 1 | import { IEnvironment } from './interfaces'; 2 | 3 | export const environmentDev: IEnvironment = { 4 | production: false, 5 | apiUrl: 'http://localhost:3000/api', 6 | }; 7 | -------------------------------------------------------------------------------- /libs/server/grpc/src/lib/exceptions/grpc-exception.interface.ts: -------------------------------------------------------------------------------- 1 | import { status } from '@grpc/grpc-js'; 2 | 3 | export interface IGrpcException { 4 | code: status; 5 | message: string; 6 | details?: string; 7 | } 8 | -------------------------------------------------------------------------------- /apps/client/auth-mfe/webpack.config.js: -------------------------------------------------------------------------------- 1 | const { withModuleFederation } = require('@nrwl/angular/module-federation'); 2 | const config = require('./module-federation.config'); 3 | module.exports = withModuleFederation(config); 4 | -------------------------------------------------------------------------------- /apps/client/dashboard-mfe/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | import { environmentProd, IEnvironment } from '@nx-mfe/client/environment'; 2 | 3 | export const environment: IEnvironment = { 4 | ...environmentProd, 5 | }; 6 | -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | import { environmentProd, IEnvironment } from '@nx-mfe/client/environment'; 2 | 3 | export const environment: IEnvironment = { 4 | ...environmentProd, 5 | }; 6 | -------------------------------------------------------------------------------- /apps/client/loaders-mfe/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | import { environmentProd, IEnvironment } from '@nx-mfe/client/environment'; 2 | 3 | export const environment: IEnvironment = { 4 | ...environmentProd, 5 | }; 6 | -------------------------------------------------------------------------------- /libs/client/common/src/lib/http-error/http-error.ts: -------------------------------------------------------------------------------- 1 | import { HttpErrorResponse } from '@angular/common/http'; 2 | 3 | export class HttpError extends HttpErrorResponse { 4 | public override error: T | undefined; 5 | } 6 | -------------------------------------------------------------------------------- /libs/server/grpc/src/lib/proto/index.ts: -------------------------------------------------------------------------------- 1 | export * as AuthMs from './build/auth-ms'; 2 | export * as MailMs from './build/mail-ms'; 3 | export * as UsersMs from './build/users-ms'; 4 | export * as Utils from './build/utils'; 5 | -------------------------------------------------------------------------------- /apps/client/dashboard-mfe/webpack.config.js: -------------------------------------------------------------------------------- 1 | const { withModuleFederation } = require('@nrwl/angular/module-federation'); 2 | const config = require('./module-federation.config'); 3 | module.exports = withModuleFederation(config); 4 | -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe/webpack.config.js: -------------------------------------------------------------------------------- 1 | const { withModuleFederation } = require('@nrwl/angular/module-federation'); 2 | const config = require('./module-federation.config'); 3 | module.exports = withModuleFederation(config); 4 | -------------------------------------------------------------------------------- /apps/client/loaders-mfe/webpack.config.js: -------------------------------------------------------------------------------- 1 | const { withModuleFederation } = require('@nrwl/angular/module-federation'); 2 | const config = require('./module-federation.config'); 3 | module.exports = withModuleFederation(config); 4 | -------------------------------------------------------------------------------- /apps/client/shell-app/webpack.config.js: -------------------------------------------------------------------------------- 1 | const { withModuleFederation } = require('@nrwl/angular/module-federation'); 2 | const config = require('./module-federation.config'); 3 | module.exports = withModuleFederation(config); 4 | -------------------------------------------------------------------------------- /libs/client/common/src/lib/coercion/css-pixel.ts: -------------------------------------------------------------------------------- 1 | export function coerceCssPixel(value: unknown): string { 2 | if (value == null) { 3 | return ''; 4 | } 5 | 6 | return typeof value === 'string' ? value : `${value}px`; 7 | } 8 | -------------------------------------------------------------------------------- /libs/client/ui/src/lib/logo/logo.component.scss: -------------------------------------------------------------------------------- 1 | @use 'libs/client/styles/src/lib/carbon-theme'; 2 | 3 | :host { 4 | display: flex; 5 | } 6 | 7 | .ui-logo { 8 | color: carbon-theme.get('support-error-inverse'); 9 | } 10 | -------------------------------------------------------------------------------- /apps/client/auth-mfe/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'nx-mfe-root', 5 | template: ` `, 6 | }) 7 | export class AppComponent {} 8 | -------------------------------------------------------------------------------- /libs/client/styles/src/lib/_theme.scss: -------------------------------------------------------------------------------- 1 | @use './carbon-theme' as *; 2 | 3 | $carbon--theme: $theme; 4 | @import '~carbon-components/scss/globals/scss/styles'; 5 | 6 | @import './override/carbon'; 7 | @import './override/browser'; 8 | -------------------------------------------------------------------------------- /libs/server/common/README.md: -------------------------------------------------------------------------------- 1 | # server-common 2 | 3 | This library was generated with [Nx](https://nx.dev). 4 | 5 | ## Running unit tests 6 | 7 | Run `nx test server-common` to execute the unit tests via [Jest](https://jestjs.io). 8 | -------------------------------------------------------------------------------- /libs/shared/data-access/src/lib/requests/auth/index.ts: -------------------------------------------------------------------------------- 1 | export * from './credentials.request'; 2 | export * from './login.request'; 3 | export * from './registration.request'; 4 | export * from './resend-register-confirmation.request'; 5 | -------------------------------------------------------------------------------- /libs/client/common/src/lib/coercion/boolean.ts: -------------------------------------------------------------------------------- 1 | export type BooleanInput = string | boolean | null | undefined; 2 | 3 | export function coerceBoolean(value: unknown): boolean { 4 | return value != null && `${value}` !== 'false'; 5 | } 6 | -------------------------------------------------------------------------------- /libs/client/injector-container/README.md: -------------------------------------------------------------------------------- 1 | # client-injector-container 2 | 3 | This library was generated with [Nx](https://nx.dev). 4 | 5 | ## Running unit tests 6 | 7 | Run `nx test client-injector-container` to execute the unit tests. 8 | -------------------------------------------------------------------------------- /libs/client/mfe/src/lib/tokens/options.token.ts: -------------------------------------------------------------------------------- 1 | import { InjectionToken } from '@angular/core'; 2 | 3 | /** 4 | * InjectionToken of options. 5 | */ 6 | export const OPTIONS = new InjectionToken('@nx-mfe/client/mfe/OPTIONS'); 7 | -------------------------------------------------------------------------------- /libs/server/domains/README.md: -------------------------------------------------------------------------------- 1 | # server-domains 2 | 3 | This library was generated with [Nx](https://nx.dev). 4 | 5 | ## Running unit tests 6 | 7 | Run `nx test server-domains` to execute the unit tests via [Jest](https://jestjs.io). 8 | -------------------------------------------------------------------------------- /libs/shared/data-access/README.md: -------------------------------------------------------------------------------- 1 | # shared-data-access 2 | 3 | This library was generated with [Nx](https://nx.dev). 4 | 5 | ## Running unit tests 6 | 7 | Run `nx test shared-data-access` to execute the unit tests via [Jest](https://jestjs.io). 8 | -------------------------------------------------------------------------------- /apps/client/shell-app/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'nx-mfe-root', 5 | template: ` `, 6 | styles: [], 7 | }) 8 | export class AppComponent {} 9 | -------------------------------------------------------------------------------- /libs/client/styles/src/lib/utilities/_keyframes.scss: -------------------------------------------------------------------------------- 1 | @keyframes fadeInDown { 2 | from { 3 | opacity: 0; 4 | transform: translate3d(0, -100%, 0); 5 | } 6 | 7 | to { 8 | opacity: 1; 9 | transform: translate3d(0, 0, 0); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /apps/client/dashboard-mfe/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'nx-mfe-root', 5 | template: ``, 6 | styleUrls: [], 7 | }) 8 | export class AppComponent {} 9 | -------------------------------------------------------------------------------- /libs/client/environment/src/lib/environment.prod.ts: -------------------------------------------------------------------------------- 1 | import { environmentDev } from './environment'; 2 | import { IEnvironment } from './interfaces'; 3 | 4 | export const environmentProd: IEnvironment = { 5 | ...environmentDev, 6 | production: true, 7 | }; 8 | -------------------------------------------------------------------------------- /apps/server/api-gateway/src/app/modules/auth/auth.guard.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | import { AuthGuard as PassportAuthGuard } from '@nestjs/passport'; 3 | 4 | @Injectable() 5 | export class AuthGuard extends PassportAuthGuard('jwt') {} 6 | -------------------------------------------------------------------------------- /libs/shared/data-access/src/lib/requests/auth/resend-register-confirmation.request.ts: -------------------------------------------------------------------------------- 1 | import { IsEmail, IsNotEmpty } from 'class-validator'; 2 | 3 | export class ResendRegisterConfirmationRequest { 4 | @IsEmail() 5 | @IsNotEmpty() 6 | public email: string; 7 | } 8 | -------------------------------------------------------------------------------- /tools/generators/mfe/schema.d.ts: -------------------------------------------------------------------------------- 1 | import { Schema as AngularApplicationSchema } from '@nrwl/angular/src/generators/application/schema'; 2 | 3 | import { Type } from './types'; 4 | 5 | export interface Schema extends AngularApplicationSchema { 6 | type?: Type; 7 | } 8 | -------------------------------------------------------------------------------- /libs/client/ui/src/lib/password-strength/password-strength.component.html: -------------------------------------------------------------------------------- 1 |
    2 |
  • 3 |
  • 4 |
  • 5 |
  • 6 |
7 | -------------------------------------------------------------------------------- /libs/server/domains/src/lib/auth/index.ts: -------------------------------------------------------------------------------- 1 | export * from './access-token'; 2 | export * from './activation-token-payload'; 3 | export * from './auth-token-payload'; 4 | export * from './jwt-token'; 5 | export * from './refresh-token'; 6 | export * from './user-metadata'; 7 | -------------------------------------------------------------------------------- /libs/server/domains/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /libs/client/environment/src/lib/injection-tokens/environment.token.ts: -------------------------------------------------------------------------------- 1 | import { InjectionToken } from '@angular/core'; 2 | 3 | import { IEnvironment } from '../interfaces'; 4 | 5 | export const ENVIRONMENT = new InjectionToken('@nx-mfe/client/core/ENVIRONMENT'); 6 | -------------------------------------------------------------------------------- /libs/client/mfe/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/directives'; 2 | export * from './lib/helpers'; 3 | export * from './lib/interfaces'; 4 | export * from './lib/mfe.module'; 5 | export * from './lib/registry'; 6 | export * from './lib/services'; 7 | export * from './lib/tokens'; 8 | -------------------------------------------------------------------------------- /libs/client/ui/src/lib/card/card-title.directive.ts: -------------------------------------------------------------------------------- 1 | import { Directive, HostBinding } from '@angular/core'; 2 | 3 | @Directive({ 4 | selector: 'ui-card-title', 5 | }) 6 | export class CardTitleDirective { 7 | @HostBinding('class.ui-card__title') public baseClass = true; 8 | } 9 | -------------------------------------------------------------------------------- /apps/client/auth-mfe-e2e/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["plugin:cypress/recommended", "../../../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": {} 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /apps/client/auth-mfe/module-federation.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: 'client-auth-mfe', 3 | exposes: { 4 | LoginModule: 'apps/client/auth-mfe/src/app/login/login.module.ts', 5 | RegisterModule: 'apps/client/auth-mfe/src/app/register/register.module.ts', 6 | }, 7 | }; 8 | -------------------------------------------------------------------------------- /apps/client/loaders-mfe-e2e/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["plugin:cypress/recommended", "../../../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": {} 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /apps/client/shell-app-e2e/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["plugin:cypress/recommended", "../../../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": {} 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /apps/client/shell-app/src/assets/module-federation.manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "client-auth-mfe": "http://localhost:4201", 3 | "client-dashboard-mfe": "http://localhost:4202", 4 | "client-loaders-mfe": "http://localhost:4203", 5 | "client-fallbacks-mfe": "http://localhost:4204" 6 | } 7 | -------------------------------------------------------------------------------- /libs/client/mfe/src/lib/types/component-with-ng-module-ref.ts: -------------------------------------------------------------------------------- 1 | import { NgModuleRef, Type } from '@angular/core'; 2 | 3 | export type ComponentWithNgModuleRef = { 4 | component: Type; 5 | ngModuleRef: NgModuleRef; 6 | }; 7 | -------------------------------------------------------------------------------- /libs/client/ui/src/lib/card/card-footer.directive.ts: -------------------------------------------------------------------------------- 1 | import { Directive, HostBinding } from '@angular/core'; 2 | 3 | @Directive({ 4 | selector: 'ui-card-footer', 5 | }) 6 | export class CardFooterDirective { 7 | @HostBinding('class.ui-card__footer') public baseClass = true; 8 | } 9 | -------------------------------------------------------------------------------- /libs/client/ui/src/lib/card/card-header.directive.ts: -------------------------------------------------------------------------------- 1 | import { Directive, HostBinding } from '@angular/core'; 2 | 3 | @Directive({ 4 | selector: 'ui-card-header', 5 | }) 6 | export class CardHeaderDirective { 7 | @HostBinding('class.ui-card__header') public baseClass = true; 8 | } 9 | -------------------------------------------------------------------------------- /apps/client/dashboard-mfe-e2e/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["plugin:cypress/recommended", "../../../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": {} 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe-e2e/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["plugin:cypress/recommended", "../../../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": {} 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /libs/client/ui/src/lib/card/card-content.directive.ts: -------------------------------------------------------------------------------- 1 | import { Directive, HostBinding } from '@angular/core'; 2 | 3 | @Directive({ 4 | selector: 'ui-card-content', 5 | }) 6 | export class CardContentDirective { 7 | @HostBinding('class.ui-card__content') public baseClass = true; 8 | } 9 | -------------------------------------------------------------------------------- /libs/client/ui/src/lib/card/card.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /libs/server/grpc/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /apps/server/api-gateway/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.app.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /apps/server/auth-ms/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.app.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /apps/server/mail-ms/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.app.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /apps/server/users-ms/sql/create-tables.sql: -------------------------------------------------------------------------------- 1 | -- Creation of user table 2 | CREATE TABLE IF NOT EXISTS public."user" ( 3 | id SERIAL PRIMARY KEY, 4 | email VARCHAR(50) UNIQUE NOT NULL, 5 | password VARCHAR(200) NOT NULL, 6 | isConfirmed BOOLEAN DEFAULT false NOT NULL 7 | ); -------------------------------------------------------------------------------- /apps/server/users-ms/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.app.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /libs/client/assets/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "declaration": true, 6 | "types": [] 7 | }, 8 | "include": ["**/*.ts"], 9 | "exclude": ["jest.config.ts", "**/*.spec.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/client/styles/src/lib/override/carbon/_checkbox.scss: -------------------------------------------------------------------------------- 1 | @use '@carbon/layout'; 2 | @use './prefix' as *; 3 | 4 | .#{$prefix}--checkbox-label-text { 5 | display: flex; 6 | align-items: center; 7 | flex-direction: row; 8 | flex-wrap: nowrap; 9 | gap: layout.$spacing-03; 10 | } 11 | -------------------------------------------------------------------------------- /libs/client/styles/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "declaration": true, 6 | "types": [] 7 | }, 8 | "include": ["**/*.ts"], 9 | "exclude": ["jest.config.ts", "**/*.spec.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/client/ui/src/lib/card/card-subtitle.directive.ts: -------------------------------------------------------------------------------- 1 | import { Directive, HostBinding } from '@angular/core'; 2 | 3 | @Directive({ 4 | selector: 'ui-card-subtitle', 5 | }) 6 | export class CardSubtitleDirective { 7 | @HostBinding('class.ui-card__subtitle') public baseClass = true; 8 | } 9 | -------------------------------------------------------------------------------- /libs/shared/common/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "declaration": true, 6 | "types": [] 7 | }, 8 | "include": ["**/*.ts"], 9 | "exclude": ["jest.config.ts", "**/*.spec.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/client/mfe/src/lib/directives/mfe-outlet.directive.spec.ts: -------------------------------------------------------------------------------- 1 | import { MfeOutletDirective } from './'; 2 | 3 | describe(MfeOutletDirective, () => { 4 | it('should create an instance', () => { 5 | const directive = new MfeOutletDirective(); 6 | expect(directive).toBeTruthy(); 7 | }); 8 | }); 9 | -------------------------------------------------------------------------------- /apps/client/auth-mfe/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "types": [] 6 | }, 7 | "files": ["src/main.ts", "src/polyfills.ts"], 8 | "include": ["src/**/*.d.ts"], 9 | "exclude": ["jest.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /apps/client/loaders-mfe/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "types": [] 6 | }, 7 | "files": ["src/main.ts", "src/polyfills.ts"], 8 | "include": ["src/**/*.d.ts"], 9 | "exclude": ["jest.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /apps/client/shell-app/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "types": [] 6 | }, 7 | "files": ["src/main.ts", "src/polyfills.ts"], 8 | "include": ["src/**/*.d.ts"], 9 | "exclude": ["jest.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/shared/data-access/src/lib/responses/error/server-error.response.ts: -------------------------------------------------------------------------------- 1 | export class ServerErrorResponse { 2 | public readonly statusCode: number; 3 | public readonly message: string; 4 | public readonly error: string; 5 | public readonly timestamp: string; 6 | public readonly path: string; 7 | } 8 | -------------------------------------------------------------------------------- /apps/client/dashboard-mfe/module-federation.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: 'client-dashboard-mfe', 3 | exposes: { 4 | EntryModule: 'apps/client/dashboard-mfe/src/app/remote-entry/entry.module.ts', 5 | EntryComponent: 'apps/client/dashboard-mfe/src/app/remote-entry/entry.component.ts', 6 | }, 7 | }; 8 | -------------------------------------------------------------------------------- /apps/client/dashboard-mfe/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "types": [] 6 | }, 7 | "files": ["src/main.ts", "src/polyfills.ts"], 8 | "include": ["src/**/*.d.ts"], 9 | "exclude": ["jest.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "types": [] 6 | }, 7 | "files": ["src/main.ts", "src/polyfills.ts"], 8 | "include": ["src/**/*.d.ts"], 9 | "exclude": ["jest.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/server/domains/src/lib/mail/confirm-registration-job.ts: -------------------------------------------------------------------------------- 1 | export class ConfirmRegistrationJob { 2 | public readonly recipient: string; 3 | 4 | public readonly token: string; 5 | 6 | constructor(partial: Partial) { 7 | Object.assign(this, partial); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /tools/tsconfig.tools.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../dist/out-tsc/tools", 5 | "rootDir": ".", 6 | "module": "commonjs", 7 | "target": "es5", 8 | "types": ["node"], 9 | "importHelpers": false 10 | }, 11 | "include": ["**/*.ts"] 12 | } 13 | -------------------------------------------------------------------------------- /apps/client/shell-app/src/main.ts: -------------------------------------------------------------------------------- 1 | import { setRemoteDefinitions } from '@nrwl/angular/mf'; 2 | 3 | fetch('/assets/module-federation.manifest.json') 4 | .then((res) => res.json()) 5 | .then((definitions) => setRemoteDefinitions(definitions)) 6 | .then(() => import('./bootstrap').catch((err) => console.error(err))); 7 | -------------------------------------------------------------------------------- /apps/server/auth-ms/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /apps/server/mail-ms/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /apps/server/users-ms/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /libs/server/common/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /apps/server/api-gateway/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /libs/shared/data-access/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "declaration": true, 6 | "types": [] 7 | }, 8 | "include": ["**/*.ts"], 9 | "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/shared/data-access/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /libs/client/ui/src/lib/card/index.ts: -------------------------------------------------------------------------------- 1 | export * from './card.component'; 2 | export * from './card.module'; 3 | export * from './card-content.directive'; 4 | export * from './card-footer.directive'; 5 | export * from './card-header.directive'; 6 | export * from './card-subtitle.directive'; 7 | export * from './card-title.directive'; 8 | -------------------------------------------------------------------------------- /libs/client/ui/src/lib/password-input/password-input-wrapper.directive.ts: -------------------------------------------------------------------------------- 1 | import { Directive, HostBinding } from '@angular/core'; 2 | 3 | @Directive({ 4 | selector: '[uiPasswordInputWrapper]', 5 | }) 6 | export class PasswordInputWrapperDirective { 7 | @HostBinding('class.ui-password-input-wrapper') public baseClass = true; 8 | } 9 | -------------------------------------------------------------------------------- /libs/client/ui/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/shared/data-access/src/lib/requests/auth/login.request.ts: -------------------------------------------------------------------------------- 1 | import { IsBoolean, IsNotEmpty } from 'class-validator'; 2 | 3 | import { CredentialsRequest } from './credentials.request'; 4 | 5 | export class LoginRequest extends CredentialsRequest { 6 | @IsBoolean() 7 | @IsNotEmpty() 8 | public session: boolean; 9 | } 10 | -------------------------------------------------------------------------------- /libs/client/auth/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts", "jest.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/client/common/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts", "jest.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/client/core/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts", "jest.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/client/forms/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts", "jest.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/client/mfe/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts", "jest.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/server/common/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "declaration": true, 6 | "types": [], 7 | "target": "es6" 8 | }, 9 | "include": ["**/*.ts"], 10 | "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"] 11 | } 12 | -------------------------------------------------------------------------------- /apps/client/auth-mfe/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts", "jest.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /apps/client/loaders-mfe/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts", "jest.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /apps/client/shell-app/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts", "jest.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /apps/server/mail-ms/src/app/domains/queue-jobs/confirm-registration-job-payload.ts: -------------------------------------------------------------------------------- 1 | export class ConfirmRegistrationJobPayload { 2 | public readonly recipient: string; 3 | 4 | public readonly token: string; 5 | 6 | constructor(partial: Partial) { 7 | Object.assign(this, partial); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /libs/client/environment/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts", "jest.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/server/grpc/src/lib/proto/mail-ms.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | import "utils.proto"; 4 | 5 | package mail; 6 | 7 | service MailService { 8 | rpc ConfirmRegistration(ConfirmRegistrationRequest) returns (utils.Empty); 9 | } 10 | 11 | message ConfirmRegistrationRequest { 12 | string recipient = 1; 13 | string token = 2; 14 | } -------------------------------------------------------------------------------- /apps/client/dashboard-mfe/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts", "jest.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts", "jest.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/server/grpc/README.md: -------------------------------------------------------------------------------- 1 | # server-grpc 2 | 3 | This library was generated with [Nx](https://nx.dev). 4 | 5 | ## Running unit tests 6 | 7 | Run `nx test server-grpc` to execute the unit tests via [Jest](https://jestjs.io). 8 | 9 | ## Running lint 10 | 11 | Run `nx lint server-grpc` to execute the lint via [ESLint](https://eslint.org/). 12 | -------------------------------------------------------------------------------- /libs/server/grpc/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "module": "commonjs", 5 | "outDir": "../../../dist/out-tsc", 6 | "declaration": true, 7 | "types": ["node"] 8 | }, 9 | "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"], 10 | "include": ["**/*.ts"] 11 | } 12 | -------------------------------------------------------------------------------- /apps/client/shell-app/src/remotes.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'client-auth-mfe/Login'; 2 | declare module 'client-auth-mfe/Register'; 3 | 4 | declare module 'client-dashboard-mfe/Entry'; 5 | 6 | declare module 'client-loaders-mfe/Spinner'; 7 | 8 | declare module 'client-fallbacks-mfe/MfeFallback'; 9 | declare module 'client-fallbacks-mfe/NotFound'; 10 | -------------------------------------------------------------------------------- /apps/server/auth-ms/sql/create-tables.sql: -------------------------------------------------------------------------------- 1 | -- Creation of token table 2 | CREATE TABLE IF NOT EXISTS public."token" ( 3 | id SERIAL PRIMARY KEY, 4 | refreshToken VARCHAR(200) NOT NULL, 5 | expiresIn BIGINT NOT NULL, 6 | userId INT NOT NULL, 7 | ip VARCHAR(50) NOT NULL, 8 | userAgent VARCHAR(200) NOT NULL 9 | ); -------------------------------------------------------------------------------- /libs/client/injector-container/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts", "jest.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /libs/server/common/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "module": "commonjs" 5 | }, 6 | "files": [], 7 | "include": [], 8 | "references": [ 9 | { 10 | "path": "./tsconfig.lib.json" 11 | }, 12 | { 13 | "path": "./tsconfig.spec.json" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /tools/generators/mfe/patterns/remote-webpack.config.txt: -------------------------------------------------------------------------------- 1 | const createMfeWebpackConfig = require('{***}/tools/webpack/create-mfe-webpack-config'); 2 | 3 | module.exports = createMfeWebpackConfig('{***}', { 4 | RemoteEntryModule: '{***}/src/app/remote-entry/entry.module.ts', 5 | RemoteEntryComponent: '{***}/src/app/remote-entry/entry.component.ts', 6 | }); 7 | -------------------------------------------------------------------------------- /libs/client/assets/README.md: -------------------------------------------------------------------------------- 1 | # client-assets 2 | 3 | This library was generated with [Nx](https://nx.dev). 4 | 5 | ## Running unit tests 6 | 7 | Run `nx test client-assets` to execute the unit tests via [Jest](https://jestjs.io). 8 | 9 | ## Running lint 10 | 11 | Run `nx lint client-assets` to execute the lint via [ESLint](https://eslint.org/). 12 | -------------------------------------------------------------------------------- /libs/client/styles/README.md: -------------------------------------------------------------------------------- 1 | # client-styles 2 | 3 | This library was generated with [Nx](https://nx.dev). 4 | 5 | ## Running unit tests 6 | 7 | Run `nx test client-styles` to execute the unit tests via [Jest](https://jestjs.io). 8 | 9 | ## Running lint 10 | 11 | Run `nx lint client-styles` to execute the lint via [ESLint](https://eslint.org/). 12 | -------------------------------------------------------------------------------- /libs/client/styles/src/lib/override/carbon/_text-input.scss: -------------------------------------------------------------------------------- 1 | @use '../../utilities/convert' as *; 2 | @use './prefix' as *; 3 | @use '@carbon/layout'; 4 | 5 | .#{$prefix}--text-input__field-wrapper .#{$prefix}--text-input__invalid-icon { 6 | position: absolute; 7 | top: 50%; 8 | right: layout.$spacing-05; 9 | transform: translateY(-50%); 10 | } 11 | -------------------------------------------------------------------------------- /libs/shared/common/README.md: -------------------------------------------------------------------------------- 1 | # shared-common 2 | 3 | This library was generated with [Nx](https://nx.dev). 4 | 5 | ## Running unit tests 6 | 7 | Run `nx test shared-common` to execute the unit tests via [Jest](https://jestjs.io). 8 | 9 | ## Running lint 10 | 11 | Run `nx lint shared-common` to execute the lint via [ESLint](https://eslint.org/). 12 | -------------------------------------------------------------------------------- /apps/server/mail-ms/src/templates/registration.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Yo 👋 5 |
6 |
7 | Thank you for registering in our app.
8 | Click on the link to confirm your account.
9 |
10 | 11 | confirm email. 12 | 13 | -------------------------------------------------------------------------------- /libs/client/ui/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "inlineSources": true, 8 | "types": [] 9 | }, 10 | "exclude": ["src/test-setup.ts", "**/*.spec.ts", "**/*.test.ts"], 11 | "include": ["**/*.ts"] 12 | } 13 | -------------------------------------------------------------------------------- /libs/server/domains/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "module": "commonjs", 5 | "outDir": "../../../dist/out-tsc", 6 | "declaration": true, 7 | "types": ["node"], 8 | "target": "es6" 9 | }, 10 | "exclude": ["**/*.spec.ts", "**/*.test.ts", "jest.config.ts"], 11 | "include": ["**/*.ts"] 12 | } 13 | -------------------------------------------------------------------------------- /libs/shared/data-access/src/lib/requests/auth/credentials.request.ts: -------------------------------------------------------------------------------- 1 | import { IsEmail, IsNotEmpty, IsString, MinLength } from 'class-validator'; 2 | 3 | export class CredentialsRequest { 4 | @IsEmail() 5 | @IsNotEmpty() 6 | public email: string; 7 | 8 | @IsString() 9 | @MinLength(8) 10 | @IsNotEmpty() 11 | public password: string; 12 | } 13 | -------------------------------------------------------------------------------- /libs/client/ui/src/lib/divider/divider.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { DividerComponent } from './divider.component'; 4 | 5 | @NgModule({ 6 | imports: [CommonModule], 7 | declarations: [DividerComponent], 8 | exports: [DividerComponent], 9 | }) 10 | export class DividerModule {} 11 | -------------------------------------------------------------------------------- /apps/server/auth-ms/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["node"], 7 | "emitDecoratorMetadata": true, 8 | "target": "es2015" 9 | }, 10 | "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"], 11 | "include": ["**/*.ts"] 12 | } 13 | -------------------------------------------------------------------------------- /apps/server/mail-ms/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["node"], 7 | "emitDecoratorMetadata": true, 8 | "target": "es2015" 9 | }, 10 | "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"], 11 | "include": ["**/*.ts"] 12 | } 13 | -------------------------------------------------------------------------------- /apps/server/api-gateway/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["node"], 7 | "emitDecoratorMetadata": true, 8 | "target": "es2015" 9 | }, 10 | "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"], 11 | "include": ["**/*.ts"] 12 | } 13 | -------------------------------------------------------------------------------- /apps/server/users-ms/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["node"], 7 | "emitDecoratorMetadata": true, 8 | "target": "es2015" 9 | }, 10 | "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"], 11 | "include": ["**/*.ts"] 12 | } 13 | -------------------------------------------------------------------------------- /libs/client/assets/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["../../../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": {} 8 | }, 9 | { 10 | "files": ["*.ts", "*.tsx"], 11 | "rules": {} 12 | }, 13 | { 14 | "files": ["*.js", "*.jsx"], 15 | "rules": {} 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /libs/client/styles/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["../../../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": {} 8 | }, 9 | { 10 | "files": ["*.ts", "*.tsx"], 11 | "rules": {} 12 | }, 13 | { 14 | "files": ["*.js", "*.jsx"], 15 | "rules": {} 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /libs/server/domains/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["../../../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": {} 8 | }, 9 | { 10 | "files": ["*.ts", "*.tsx"], 11 | "rules": {} 12 | }, 13 | { 14 | "files": ["*.js", "*.jsx"], 15 | "rules": {} 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /libs/shared/common/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["../../../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": {} 8 | }, 9 | { 10 | "files": ["*.ts", "*.tsx"], 11 | "rules": {} 12 | }, 13 | { 14 | "files": ["*.js", "*.jsx"], 15 | "rules": {} 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /libs/client/injector-container/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "inlineSources": true, 8 | "types": [] 9 | }, 10 | "exclude": ["src/test-setup.ts", "**/*.spec.ts", "**/*.test.ts", "jest.config.ts"], 11 | "include": ["**/*.ts"] 12 | } 13 | -------------------------------------------------------------------------------- /libs/client/ui/src/lib/password-strength/password-strength-bar.directive.spec.ts: -------------------------------------------------------------------------------- 1 | import { PasswordStrengthBarDirective } from './password-strength-bar.directive'; 2 | 3 | // TODO tests 4 | describe('PasswordStrengthBarDirective', () => { 5 | it('should create an instance', () => { 6 | const directive = new PasswordStrengthBarDirective(); 7 | expect(directive).toBeTruthy(); 8 | }); 9 | }); 10 | -------------------------------------------------------------------------------- /apps/client/shell-app/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dashboard 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /apps/client/auth-mfe/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ClientAuthMfe 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /apps/client/dashboard-mfe/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ClientDashboardMfe 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ClientFallbacksMfe 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /apps/client/loaders-mfe/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ClientLoadersMfe 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /libs/client/core/src/lib/microfrontends.ts: -------------------------------------------------------------------------------- 1 | import { MfeConfig } from '@nx-mfe/client/mfe'; 2 | 3 | export const microfrontend: MfeConfig = { 4 | 'client-auth-mfe': 'http://localhost:4201/remoteEntry.mjs', 5 | 'client-dashboard-mfe': 'http://localhost:4202/remoteEntry.mjs', 6 | 'client-loaders-mfe': 'http://localhost:4203/remoteEntry.mjs', 7 | 'client-fallbacks-mfe': 'http://localhost:4204/remoteEntry.mjs', 8 | }; 9 | -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'nx-mfe-root', 5 | template: ` `, 6 | styles: [ 7 | ` 8 | :host { 9 | padding: 3rem; 10 | display: flex; 11 | justify-content: center; 12 | align-items: center; 13 | } 14 | `, 15 | ], 16 | }) 17 | export class AppComponent {} 18 | -------------------------------------------------------------------------------- /apps/client/loaders-mfe/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'nx-mfe-root', 5 | template: ` `, 6 | styles: [ 7 | ` 8 | :host { 9 | padding: 3rem; 10 | display: flex; 11 | justify-content: center; 12 | align-items: center; 13 | } 14 | `, 15 | ], 16 | }) 17 | export class AppComponent {} 18 | -------------------------------------------------------------------------------- /libs/server/common/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["../../../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": {} 8 | }, 9 | { 10 | "files": ["*.ts", "*.tsx"], 11 | "rules": {} 12 | }, 13 | { 14 | "files": ["*.js", "*.jsx"], 15 | "rules": {} 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /libs/server/grpc/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["../../../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": {} 8 | }, 9 | { 10 | "files": ["*.ts", "*.tsx"], 11 | "rules": {} 12 | }, 13 | { 14 | "files": ["*.js", "*.jsx"], 15 | "rules": {} 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /libs/shared/data-access/src/lib/responses/error/default-http-error.response.ts: -------------------------------------------------------------------------------- 1 | export class DefaultHttpErrorResponse { 2 | public readonly error: string; 3 | public readonly message: string; 4 | public readonly statusCode: number; 5 | 6 | constructor() { 7 | this.error = 'Unexpected error'; 8 | this.message = 'Something went wrong try again later'; 9 | this.statusCode = 1000; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /apps/server/api-gateway/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["../../../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": {} 8 | }, 9 | { 10 | "files": ["*.ts", "*.tsx"], 11 | "rules": {} 12 | }, 13 | { 14 | "files": ["*.js", "*.jsx"], 15 | "rules": {} 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /apps/server/auth-ms/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["../../../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": {} 8 | }, 9 | { 10 | "files": ["*.ts", "*.tsx"], 11 | "rules": {} 12 | }, 13 | { 14 | "files": ["*.js", "*.jsx"], 15 | "rules": {} 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /apps/server/mail-ms/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["../../../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": {} 8 | }, 9 | { 10 | "files": ["*.ts", "*.tsx"], 11 | "rules": {} 12 | }, 13 | { 14 | "files": ["*.js", "*.jsx"], 15 | "rules": {} 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /apps/server/users-ms/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["../../../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": {} 8 | }, 9 | { 10 | "files": ["*.ts", "*.tsx"], 11 | "rules": {} 12 | }, 13 | { 14 | "files": ["*.js", "*.jsx"], 15 | "rules": {} 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /libs/shared/data-access/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["../../../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": {} 8 | }, 9 | { 10 | "files": ["*.ts", "*.tsx"], 11 | "rules": {} 12 | }, 13 | { 14 | "files": ["*.js", "*.jsx"], 15 | "rules": {} 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /apps/client/loaders-mfe/module-federation.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: 'client-loaders-mfe', 3 | exposes: { 4 | SpinnerModule: 'apps/client/loaders-mfe/src/app/spinner/spinner.module.ts', 5 | SpinnerComponent: 'apps/client/loaders-mfe/src/app/spinner/spinner.component.ts', 6 | StandaloneSpinnerComponent: 7 | 'apps/client/loaders-mfe/src/app/standalone-spinner/standalone-spinner.component.ts', 8 | }, 9 | }; 10 | -------------------------------------------------------------------------------- /libs/client/auth/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "target": "es2015", 6 | "declaration": true, 7 | "declarationMap": true, 8 | "inlineSources": true, 9 | "types": [], 10 | "lib": ["dom", "es2018"] 11 | }, 12 | "exclude": ["src/test-setup.ts", "**/*.spec.ts", "**/*.test.ts", "jest.config.ts"], 13 | "include": ["**/*.ts"] 14 | } 15 | -------------------------------------------------------------------------------- /libs/client/common/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "target": "es2015", 6 | "declaration": true, 7 | "declarationMap": true, 8 | "inlineSources": true, 9 | "types": [], 10 | "lib": ["dom", "es2018"] 11 | }, 12 | "exclude": ["src/test-setup.ts", "**/*.spec.ts", "**/*.test.ts", "jest.config.ts"], 13 | "include": ["**/*.ts"] 14 | } 15 | -------------------------------------------------------------------------------- /libs/client/core/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "target": "es2015", 6 | "declaration": true, 7 | "declarationMap": true, 8 | "inlineSources": true, 9 | "types": [], 10 | "lib": ["dom", "es2018"] 11 | }, 12 | "exclude": ["src/test-setup.ts", "**/*.spec.ts", "**/*.test.ts", "jest.config.ts"], 13 | "include": ["**/*.ts"] 14 | } 15 | -------------------------------------------------------------------------------- /libs/client/forms/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "target": "es2015", 6 | "declaration": true, 7 | "declarationMap": true, 8 | "inlineSources": true, 9 | "types": [], 10 | "lib": ["dom", "es2018"] 11 | }, 12 | "exclude": ["src/test-setup.ts", "**/*.spec.ts", "**/*.test.ts", "jest.config.ts"], 13 | "include": ["**/*.ts"] 14 | } 15 | -------------------------------------------------------------------------------- /libs/client/assets/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'client-assets', 4 | preset: '../../../jest.preset.js', 5 | globals: { 6 | 'ts-jest': { 7 | tsconfig: '/tsconfig.spec.json', 8 | }, 9 | }, 10 | transform: { 11 | '^.+\\.[tj]sx?$': 'ts-jest', 12 | }, 13 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], 14 | coverageDirectory: '../../../coverage/libs/client/assets', 15 | }; 16 | -------------------------------------------------------------------------------- /libs/client/assets/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ], 13 | "compilerOptions": { 14 | "forceConsistentCasingInFileNames": true, 15 | "strict": true, 16 | "noImplicitReturns": true, 17 | "noFallthroughCasesInSwitch": true 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /libs/client/environment/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "target": "es2015", 6 | "declaration": true, 7 | "declarationMap": true, 8 | "inlineSources": true, 9 | "types": [], 10 | "lib": ["dom", "es2018"] 11 | }, 12 | "exclude": ["src/test-setup.ts", "**/*.spec.ts", "**/*.test.ts", "jest.config.ts"], 13 | "include": ["**/*.ts"] 14 | } 15 | -------------------------------------------------------------------------------- /libs/client/forms/src/lib/decorators/helpers/validate-form.ts: -------------------------------------------------------------------------------- 1 | import { UntypedFormGroup } from '@angular/forms'; 2 | 3 | export function validateForm(form: UntypedFormGroup): void { 4 | for (const i in form.controls) { 5 | if (Object.prototype.hasOwnProperty.call(form.controls, i)) { 6 | form.controls[i].markAllAsTouched(); 7 | form.controls[i].markAsDirty(); 8 | form.controls[i].updateValueAndValidity(); 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /libs/client/styles/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'client-styles', 4 | preset: '../../../jest.preset.js', 5 | globals: { 6 | 'ts-jest': { 7 | tsconfig: '/tsconfig.spec.json', 8 | }, 9 | }, 10 | transform: { 11 | '^.+\\.[tj]sx?$': 'ts-jest', 12 | }, 13 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], 14 | coverageDirectory: '../../../coverage/libs/client/styles', 15 | }; 16 | -------------------------------------------------------------------------------- /libs/client/styles/src/lib/override/carbon/_form.scss: -------------------------------------------------------------------------------- 1 | @use '@carbon/layout'; 2 | @use '../../utilities/keyframes' as *; 3 | @use './prefix' as *; 4 | 5 | .#{$prefix}--form-item:not(:where(ibm-checkbox *)) { 6 | padding-bottom: layout.$spacing-05 + layout.$spacing-02; 7 | position: relative; 8 | } 9 | 10 | .#{$prefix}--form-requirement { 11 | position: absolute; 12 | bottom: 0; 13 | animation: 200ms ease-out 0s 1 fadeInDown; 14 | } 15 | -------------------------------------------------------------------------------- /libs/client/styles/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ], 13 | "compilerOptions": { 14 | "forceConsistentCasingInFileNames": true, 15 | "strict": true, 16 | "noImplicitReturns": true, 17 | "noFallthroughCasesInSwitch": true 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /libs/server/common/src/lib/helpers/hash.ts: -------------------------------------------------------------------------------- 1 | import * as bcrypt from 'bcrypt'; 2 | 3 | export async function hashPassword(rawPassword: string): Promise { 4 | return bcrypt.hash(rawPassword, Number(process.env.SALT_ROUNDS)); 5 | } 6 | 7 | export async function compareHashedPassword( 8 | rawPassword: string, 9 | hashedPassword: string 10 | ): Promise { 11 | return bcrypt.compare(rawPassword, hashedPassword); 12 | } 13 | -------------------------------------------------------------------------------- /libs/shared/common/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'shared-common', 4 | preset: '../../../jest.preset.js', 5 | globals: { 6 | 'ts-jest': { 7 | tsconfig: '/tsconfig.spec.json', 8 | }, 9 | }, 10 | transform: { 11 | '^.+\\.[tj]sx?$': 'ts-jest', 12 | }, 13 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], 14 | coverageDirectory: '../../../coverage/libs/shared/common', 15 | }; 16 | -------------------------------------------------------------------------------- /libs/shared/common/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ], 13 | "compilerOptions": { 14 | "forceConsistentCasingInFileNames": true, 15 | "strict": true, 16 | "noImplicitReturns": true, 17 | "noFallthroughCasesInSwitch": true 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /libs/shared/data-access/src/lib/responses/auth/auth-tokens.response.ts: -------------------------------------------------------------------------------- 1 | import { IsJWT, IsNotEmpty } from 'class-validator'; 2 | 3 | export class AuthTokensResponse { 4 | @IsJWT() 5 | @IsNotEmpty() 6 | public readonly accessToken: string; 7 | 8 | @IsJWT() 9 | @IsNotEmpty() 10 | public readonly refreshToken: string; 11 | 12 | constructor(partial: Partial) { 13 | Object.assign(this, partial); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /libs/client/forms/src/lib/decorators/helpers/generate-metadata-key.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Generates metadata key. 3 | * 4 | * @param id Additional identificator, that added to metadata key 5 | */ 6 | export function generateMetadataKey(id?: string | symbol | number) { 7 | if (id === undefined) return '__form-metadata__'; 8 | 9 | if (typeof id === 'symbol') return `__metadata-${id.toString()}-form__`; 10 | 11 | return `__metadata-${id}-form__`; 12 | } 13 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | # Docker files 2 | **/Dockerfile* 3 | docker-compose*.yml 4 | 5 | # Versioning and metadata 6 | .git 7 | .gitignore 8 | **/.dockerignore 9 | 10 | # Build dependencies 11 | /node_modules 12 | /.angular 13 | 14 | # Environment (contains sensitive data) 15 | # **/.env 16 | 17 | # FE files 18 | # /apps/client 19 | # /dist/apps/client 20 | # /libs/client 21 | # /dist/libs/client 22 | 23 | # Misc 24 | /coverage 25 | npm-debug.log 26 | yarn-error.log -------------------------------------------------------------------------------- /apps/client/auth-mfe/src/bootstrap.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic() 12 | .bootstrapModule(AppModule) 13 | .catch((err) => console.error(err)); 14 | -------------------------------------------------------------------------------- /apps/client/shell-app/src/bootstrap.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic() 12 | .bootstrapModule(AppModule) 13 | .catch((err) => console.error(err)); 14 | -------------------------------------------------------------------------------- /apps/client/dashboard-mfe/src/bootstrap.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic() 12 | .bootstrapModule(AppModule) 13 | .catch((err) => console.error(err)); 14 | -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe/src/bootstrap.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic() 12 | .bootstrapModule(AppModule) 13 | .catch((err) => console.error(err)); 14 | -------------------------------------------------------------------------------- /apps/client/loaders-mfe/src/bootstrap.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic() 12 | .bootstrapModule(AppModule) 13 | .catch((err) => console.error(err)); 14 | -------------------------------------------------------------------------------- /libs/client/ui/src/lib/card/card.component.ts: -------------------------------------------------------------------------------- 1 | import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'ui-card', 5 | templateUrl: './card.component.html', 6 | styleUrls: ['./card.component.scss'], 7 | encapsulation: ViewEncapsulation.None, 8 | changeDetection: ChangeDetectionStrategy.OnPush, 9 | }) 10 | export class CardComponent { 11 | @Input() theme: 'light' | 'dark' = 'dark'; 12 | } 13 | -------------------------------------------------------------------------------- /libs/server/domains/src/lib/auth/access-token.ts: -------------------------------------------------------------------------------- 1 | import { JwtVerifyOptions } from '@nestjs/jwt'; 2 | 3 | import { AuthTokenPayload } from './auth-token-payload'; 4 | import { JwtToken } from './jwt-token'; 5 | 6 | export class AccessToken extends JwtToken { 7 | public override verify(options?: Omit): AuthTokenPayload { 8 | return super.verify({ ...options, secret: process.env.JWT_ACCESS_SECRET }); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /libs/server/domains/src/lib/auth/refresh-token.ts: -------------------------------------------------------------------------------- 1 | import { JwtVerifyOptions } from '@nestjs/jwt'; 2 | 3 | import { AuthTokenPayload } from './auth-token-payload'; 4 | import { JwtToken } from './jwt-token'; 5 | 6 | export class RefreshToken extends JwtToken { 7 | public override verify(options?: Omit): AuthTokenPayload { 8 | return super.verify({ ...options, secret: process.env.JWT_REFRESH_SECRET }); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /apps/server/mail-ms/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BullModule } from '@nestjs/bull'; 2 | import { Module } from '@nestjs/common'; 3 | 4 | import { MailModule } from './modules/mail/mail.module'; 5 | 6 | @Module({ 7 | imports: [ 8 | BullModule.forRoot({ 9 | redis: { 10 | host: process.env.REDIS_HOST, 11 | port: Number(process.env.REDIS_PORT), 12 | }, 13 | }), 14 | MailModule, 15 | ], 16 | }) 17 | export class AppModule {} 18 | -------------------------------------------------------------------------------- /libs/client/assets/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": [ 9 | "jest.config.ts", 10 | "**/*.test.ts", 11 | "**/*.spec.ts", 12 | "**/*.test.tsx", 13 | "**/*.spec.tsx", 14 | "**/*.test.js", 15 | "**/*.spec.js", 16 | "**/*.test.jsx", 17 | "**/*.spec.jsx", 18 | "**/*.d.ts" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /libs/client/mfe/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "target": "es2015", 6 | "declaration": true, 7 | "declarationMap": true, 8 | "inlineSources": true, 9 | "types": [], 10 | "lib": ["dom", "es2018"] 11 | }, 12 | "exclude": ["src/test-setup.ts", "**/*.spec.ts", "**/*.test.ts", "jest.config.ts"], 13 | "include": ["**/*.ts", "../core/src/lib/microfrontends.ts"] 14 | } 15 | -------------------------------------------------------------------------------- /libs/client/styles/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": [ 9 | "jest.config.ts", 10 | "**/*.test.ts", 11 | "**/*.spec.ts", 12 | "**/*.test.tsx", 13 | "**/*.spec.tsx", 14 | "**/*.test.js", 15 | "**/*.spec.js", 16 | "**/*.test.jsx", 17 | "**/*.spec.jsx", 18 | "**/*.d.ts" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /libs/server/domains/src/lib/auth/auth-token-payload.ts: -------------------------------------------------------------------------------- 1 | import { Exclude, Expose } from 'class-transformer'; 2 | 3 | @Exclude() 4 | export class AuthTokenPayload { 5 | @Expose() 6 | public readonly id: number; 7 | 8 | @Expose() 9 | public readonly email: string; 10 | 11 | public readonly iat: number; 12 | 13 | public readonly exp: number; 14 | 15 | constructor(partial: Partial) { 16 | Object.assign(this, partial); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /libs/server/domains/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": [ 9 | "**/*.spec.ts", 10 | "**/*.test.ts", 11 | "**/*.spec.tsx", 12 | "**/*.test.tsx", 13 | "**/*.spec.js", 14 | "**/*.test.js", 15 | "**/*.spec.jsx", 16 | "**/*.test.jsx", 17 | "**/*.d.ts", 18 | "jest.config.ts" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /libs/shared/common/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": [ 9 | "jest.config.ts", 10 | "**/*.test.ts", 11 | "**/*.spec.ts", 12 | "**/*.test.tsx", 13 | "**/*.spec.tsx", 14 | "**/*.test.js", 15 | "**/*.spec.js", 16 | "**/*.test.jsx", 17 | "**/*.spec.jsx", 18 | "**/*.d.ts" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /tools/generators/mfe/helpers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './add-global-assets'; 2 | export * from './add-ng-zorro-antd'; 3 | export * from './get-available-mfe-port'; 4 | export * from './link-remote-with-host'; 5 | export * from './replace-environment-files'; 6 | export * from './replace-host-mfe-webpack-config'; 7 | export * from './replace-remote-entry-module'; 8 | export * from './replace-remote-mfe-app-module'; 9 | export * from './replace-remote-mfe-webpack-config'; 10 | -------------------------------------------------------------------------------- /libs/client/auth/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | 3 | import { getTestBed } from '@angular/core/testing'; 4 | import { 5 | BrowserDynamicTestingModule, 6 | platformBrowserDynamicTesting, 7 | } from '@angular/platform-browser-dynamic/testing'; 8 | 9 | getTestBed().resetTestEnvironment(); 10 | getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { 11 | teardown: { destroyAfterEach: false }, 12 | }); 13 | -------------------------------------------------------------------------------- /libs/client/common/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | 3 | import { getTestBed } from '@angular/core/testing'; 4 | import { 5 | BrowserDynamicTestingModule, 6 | platformBrowserDynamicTesting, 7 | } from '@angular/platform-browser-dynamic/testing'; 8 | 9 | getTestBed().resetTestEnvironment(); 10 | getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { 11 | teardown: { destroyAfterEach: false }, 12 | }); 13 | -------------------------------------------------------------------------------- /libs/client/core/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | 3 | import { getTestBed } from '@angular/core/testing'; 4 | import { 5 | BrowserDynamicTestingModule, 6 | platformBrowserDynamicTesting, 7 | } from '@angular/platform-browser-dynamic/testing'; 8 | 9 | getTestBed().resetTestEnvironment(); 10 | getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { 11 | teardown: { destroyAfterEach: false }, 12 | }); 13 | -------------------------------------------------------------------------------- /libs/client/forms/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | 3 | import { getTestBed } from '@angular/core/testing'; 4 | import { 5 | BrowserDynamicTestingModule, 6 | platformBrowserDynamicTesting, 7 | } from '@angular/platform-browser-dynamic/testing'; 8 | 9 | getTestBed().resetTestEnvironment(); 10 | getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { 11 | teardown: { destroyAfterEach: false }, 12 | }); 13 | -------------------------------------------------------------------------------- /libs/client/mfe/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | 3 | import { getTestBed } from '@angular/core/testing'; 4 | import { 5 | BrowserDynamicTestingModule, 6 | platformBrowserDynamicTesting, 7 | } from '@angular/platform-browser-dynamic/testing'; 8 | 9 | getTestBed().resetTestEnvironment(); 10 | getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { 11 | teardown: { destroyAfterEach: false }, 12 | }); 13 | -------------------------------------------------------------------------------- /libs/server/domains/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'server-domains', 4 | preset: '../../../jest.preset.js', 5 | globals: { 6 | 'ts-jest': { 7 | tsconfig: '/tsconfig.spec.json', 8 | }, 9 | }, 10 | testEnvironment: 'node', 11 | transform: { 12 | '^.+\\.[tj]sx?$': 'ts-jest', 13 | }, 14 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], 15 | coverageDirectory: '../../../coverage/libs/server/domains', 16 | }; 17 | -------------------------------------------------------------------------------- /apps/client/auth-mfe/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | 3 | import { getTestBed } from '@angular/core/testing'; 4 | import { 5 | BrowserDynamicTestingModule, 6 | platformBrowserDynamicTesting, 7 | } from '@angular/platform-browser-dynamic/testing'; 8 | 9 | getTestBed().resetTestEnvironment(); 10 | getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { 11 | teardown: { destroyAfterEach: false }, 12 | }); 13 | -------------------------------------------------------------------------------- /apps/client/loaders-mfe/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | 3 | import { getTestBed } from '@angular/core/testing'; 4 | import { 5 | BrowserDynamicTestingModule, 6 | platformBrowserDynamicTesting, 7 | } from '@angular/platform-browser-dynamic/testing'; 8 | 9 | getTestBed().resetTestEnvironment(); 10 | getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { 11 | teardown: { destroyAfterEach: false }, 12 | }); 13 | -------------------------------------------------------------------------------- /apps/client/shell-app/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | 3 | import { getTestBed } from '@angular/core/testing'; 4 | import { 5 | BrowserDynamicTestingModule, 6 | platformBrowserDynamicTesting, 7 | } from '@angular/platform-browser-dynamic/testing'; 8 | 9 | getTestBed().resetTestEnvironment(); 10 | getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { 11 | teardown: { destroyAfterEach: false }, 12 | }); 13 | -------------------------------------------------------------------------------- /libs/client/environment/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | 3 | import { getTestBed } from '@angular/core/testing'; 4 | import { 5 | BrowserDynamicTestingModule, 6 | platformBrowserDynamicTesting, 7 | } from '@angular/platform-browser-dynamic/testing'; 8 | 9 | getTestBed().resetTestEnvironment(); 10 | getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { 11 | teardown: { destroyAfterEach: false }, 12 | }); 13 | -------------------------------------------------------------------------------- /apps/client/dashboard-mfe/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | 3 | import { getTestBed } from '@angular/core/testing'; 4 | import { 5 | BrowserDynamicTestingModule, 6 | platformBrowserDynamicTesting, 7 | } from '@angular/platform-browser-dynamic/testing'; 8 | 9 | getTestBed().resetTestEnvironment(); 10 | getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { 11 | teardown: { destroyAfterEach: false }, 12 | }); 13 | -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | 3 | import { getTestBed } from '@angular/core/testing'; 4 | import { 5 | BrowserDynamicTestingModule, 6 | platformBrowserDynamicTesting, 7 | } from '@angular/platform-browser-dynamic/testing'; 8 | 9 | getTestBed().resetTestEnvironment(); 10 | getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { 11 | teardown: { destroyAfterEach: false }, 12 | }); 13 | -------------------------------------------------------------------------------- /apps/server/auth-ms/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'server-auth-ms', 4 | preset: '../../../jest.preset.js', 5 | globals: { 6 | 'ts-jest': { 7 | tsconfig: '/tsconfig.spec.json', 8 | }, 9 | }, 10 | testEnvironment: 'node', 11 | transform: { 12 | '^.+\\.[tj]s$': 'ts-jest', 13 | }, 14 | moduleFileExtensions: ['ts', 'js', 'html'], 15 | coverageDirectory: '../../../coverage/apps/server/auth-ms', 16 | }; 17 | -------------------------------------------------------------------------------- /apps/server/mail-ms/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'server-mail-ms', 4 | preset: '../../../jest.preset.js', 5 | globals: { 6 | 'ts-jest': { 7 | tsconfig: '/tsconfig.spec.json', 8 | }, 9 | }, 10 | testEnvironment: 'node', 11 | transform: { 12 | '^.+\\.[tj]s$': 'ts-jest', 13 | }, 14 | moduleFileExtensions: ['ts', 'js', 'html'], 15 | coverageDirectory: '../../../coverage/apps/server/mail-ms', 16 | }; 17 | -------------------------------------------------------------------------------- /libs/client/styles/src/lib/override/carbon/_label.scss: -------------------------------------------------------------------------------- 1 | // TODO remove import carbon-typography lib from carbon-components lib 2 | // @use "~carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/type" as *; 3 | @use '@carbon/type'; 4 | 5 | @use '../../utilities/convert' as *; 6 | @use './prefix' as *; 7 | 8 | .#{$prefix}--label { 9 | display: flex; 10 | align-items: center; 11 | width: 100%; 12 | 13 | * { 14 | @include type.type-style('label-01'); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /libs/client/ui/src/lib/logo/logo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, ViewEncapsulation, ChangeDetectionStrategy, Input } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'ui-logo', 5 | templateUrl: './logo.component.html', 6 | styleUrls: ['./logo.component.scss'], 7 | encapsulation: ViewEncapsulation.None, 8 | changeDetection: ChangeDetectionStrategy.OnPush, 9 | }) 10 | export class LogoComponent { 11 | @Input() 12 | public size: '16' | '20' | '24' | '32' = '16'; 13 | } 14 | -------------------------------------------------------------------------------- /libs/server/common/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'server-common', 4 | preset: '../../../jest.preset.js', 5 | globals: { 6 | 'ts-jest': { 7 | tsconfig: '/tsconfig.spec.json', 8 | }, 9 | }, 10 | testEnvironment: 'node', 11 | transform: { 12 | '^.+\\.[tj]s$': 'ts-jest', 13 | }, 14 | moduleFileExtensions: ['ts', 'js', 'html'], 15 | coverageDirectory: '../../../coverage/libs/server/common', 16 | }; 17 | -------------------------------------------------------------------------------- /libs/server/grpc/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'server-grpc', 4 | preset: '../../../jest.preset.js', 5 | globals: { 6 | 'ts-jest': { 7 | tsconfig: '/tsconfig.spec.json', 8 | }, 9 | }, 10 | testEnvironment: 'node', 11 | transform: { 12 | '^.+\\.[tj]sx?$': 'ts-jest', 13 | }, 14 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], 15 | coverageDirectory: '../../../coverage/libs/server/grpc', 16 | }; 17 | -------------------------------------------------------------------------------- /apps/client/auth-mfe-e2e/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "fileServerFolder": ".", 3 | "fixturesFolder": "./src/fixtures", 4 | "integrationFolder": "./src/integration", 5 | "modifyObstructiveCode": false, 6 | "supportFile": "./src/support/index.ts", 7 | "pluginsFile": false, 8 | "video": true, 9 | "videosFolder": "../../../dist/cypress/apps/client/auth-mfe-e2e/videos", 10 | "screenshotsFolder": "../../../dist/cypress/apps/client/auth-mfe-e2e/screenshots", 11 | "chromeWebSecurity": false 12 | } 13 | -------------------------------------------------------------------------------- /apps/server/users-ms/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'server-users-ms', 4 | preset: '../../../jest.preset.js', 5 | globals: { 6 | 'ts-jest': { 7 | tsconfig: '/tsconfig.spec.json', 8 | }, 9 | }, 10 | testEnvironment: 'node', 11 | transform: { 12 | '^.+\\.[tj]s$': 'ts-jest', 13 | }, 14 | moduleFileExtensions: ['ts', 'js', 'html'], 15 | coverageDirectory: '../../../coverage/apps/server/users-ms', 16 | }; 17 | -------------------------------------------------------------------------------- /libs/client/injector-container/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | 3 | import { getTestBed } from '@angular/core/testing'; 4 | import { 5 | BrowserDynamicTestingModule, 6 | platformBrowserDynamicTesting, 7 | } from '@angular/platform-browser-dynamic/testing'; 8 | 9 | getTestBed().resetTestEnvironment(); 10 | getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { 11 | teardown: { destroyAfterEach: false }, 12 | }); 13 | -------------------------------------------------------------------------------- /libs/client/mfe/src/lib/services/remote-components-cache.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { RemoteComponentsCache } from '.'; 4 | 5 | describe(RemoteComponentsCache, () => { 6 | let service: RemoteComponentsCache; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(RemoteComponentsCache); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /apps/client/shell-app-e2e/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "fileServerFolder": ".", 3 | "fixturesFolder": "./src/fixtures", 4 | "integrationFolder": "./src/integration", 5 | "modifyObstructiveCode": false, 6 | "supportFile": "./src/support/index.ts", 7 | "pluginsFile": false, 8 | "video": true, 9 | "videosFolder": "../../../dist/cypress/apps/client/shell-app-e2e/videos", 10 | "screenshotsFolder": "../../../dist/cypress/apps/client/shell-app-e2e/screenshots", 11 | "chromeWebSecurity": false 12 | } 13 | -------------------------------------------------------------------------------- /apps/client/auth-mfe/src/app/login/login-facade.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { LoginFacadeService } from './login-facade.service'; 4 | 5 | describe('LoginFacadeService', () => { 6 | let service: LoginFacadeService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(LoginFacadeService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /apps/client/loaders-mfe-e2e/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "fileServerFolder": ".", 3 | "fixturesFolder": "./src/fixtures", 4 | "integrationFolder": "./src/integration", 5 | "modifyObstructiveCode": false, 6 | "supportFile": "./src/support/index.ts", 7 | "pluginsFile": false, 8 | "video": true, 9 | "videosFolder": "../../../dist/cypress/apps/client/loaders-mfe-e2e/videos", 10 | "screenshotsFolder": "../../../dist/cypress/apps/client/loaders-mfe-e2e/screenshots", 11 | "chromeWebSecurity": false 12 | } 13 | -------------------------------------------------------------------------------- /apps/server/api-gateway/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'server-api-gateway', 4 | preset: '../../../jest.preset.js', 5 | globals: { 6 | 'ts-jest': { 7 | tsconfig: '/tsconfig.spec.json', 8 | }, 9 | }, 10 | testEnvironment: 'node', 11 | transform: { 12 | '^.+\\.[tj]s$': 'ts-jest', 13 | }, 14 | moduleFileExtensions: ['ts', 'js', 'html'], 15 | coverageDirectory: '../../../coverage/apps/server/api-gateway', 16 | }; 17 | -------------------------------------------------------------------------------- /libs/server/grpc/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": [ 9 | "jest.config.ts", 10 | "**/*.test.ts", 11 | "**/*.spec.ts", 12 | "**/*.test.tsx", 13 | "**/*.spec.tsx", 14 | "**/*.test.js", 15 | "**/*.spec.js", 16 | "**/*.test.jsx", 17 | "**/*.spec.jsx", 18 | "**/*.d.ts" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /libs/shared/data-access/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'shared-data-access', 4 | preset: '../../../jest.preset.js', 5 | globals: { 6 | 'ts-jest': { 7 | tsconfig: '/tsconfig.spec.json', 8 | }, 9 | }, 10 | testEnvironment: 'node', 11 | transform: { 12 | '^.+\\.[tj]s$': 'ts-jest', 13 | }, 14 | moduleFileExtensions: ['ts', 'js', 'html'], 15 | coverageDirectory: '../../../coverage/libs/shared/data-access', 16 | }; 17 | -------------------------------------------------------------------------------- /apps/client/dashboard-mfe-e2e/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "fileServerFolder": ".", 3 | "fixturesFolder": "./src/fixtures", 4 | "integrationFolder": "./src/integration", 5 | "modifyObstructiveCode": false, 6 | "supportFile": "./src/support/index.ts", 7 | "pluginsFile": false, 8 | "video": true, 9 | "videosFolder": "../../../dist/cypress/apps/client/dashboard-mfe-e2e/videos", 10 | "screenshotsFolder": "../../../dist/cypress/apps/client/dashboard-mfe-e2e/screenshots", 11 | "chromeWebSecurity": false 12 | } 13 | -------------------------------------------------------------------------------- /apps/client/dashboard-mfe-e2e/src/integration/app.spec.ts: -------------------------------------------------------------------------------- 1 | import { getGreeting } from '../support/app.po'; 2 | 3 | describe('dashboard', () => { 4 | beforeEach(() => cy.visit('/')); 5 | 6 | it('should display welcome message', () => { 7 | // Custom command example, see `../support/commands.ts` file 8 | cy.login('my-email@something.com', 'myPassword'); 9 | 10 | // Function helper example, see `../support/app.po.ts` file 11 | getGreeting().contains('Welcome to dashboard!'); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe-e2e/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "fileServerFolder": ".", 3 | "fixturesFolder": "./src/fixtures", 4 | "integrationFolder": "./src/integration", 5 | "modifyObstructiveCode": false, 6 | "supportFile": "./src/support/index.ts", 7 | "pluginsFile": false, 8 | "video": true, 9 | "videosFolder": "../../../dist/cypress/apps/client/fallbacks-mfe-e2e/videos", 10 | "screenshotsFolder": "../../../dist/cypress/apps/client/fallbacks-mfe-e2e/screenshots", 11 | "chromeWebSecurity": false 12 | } 13 | -------------------------------------------------------------------------------- /apps/client/shell-app-e2e/src/integration/app.spec.ts: -------------------------------------------------------------------------------- 1 | import { getGreeting } from '../support/app.po'; 2 | 3 | describe('client-shell-app', () => { 4 | beforeEach(() => cy.visit('/')); 5 | 6 | it('should display welcome message', () => { 7 | // Custom command example, see `../support/commands.ts` file 8 | cy.login('my-email@something.com', 'myPassword'); 9 | 10 | // Function helper example, see `../support/app.po.ts` file 11 | getGreeting().contains('Welcome client-shell-app'); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /apps/client/auth-mfe-e2e/src/integration/app.spec.ts: -------------------------------------------------------------------------------- 1 | import { getGreeting } from '../support/app.po'; 2 | 3 | describe('client-auth-mfe', () => { 4 | beforeEach(() => cy.visit('/')); 5 | 6 | it('should display welcome message', () => { 7 | // Custom command example, see `../support/commands.ts` file 8 | cy.login('my-email@something.com', 'myPassword'); 9 | 10 | // Function helper example, see `../support/app.po.ts` file 11 | getGreeting().contains('Welcome to client-auth-mfe!'); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /libs/client/mfe/src/lib/services/remote-component-loader.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { RemoteComponentLoader } from './remote-component-loader'; 4 | 5 | describe(RemoteComponentLoader, () => { 6 | let service: RemoteComponentLoader; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(RemoteComponentLoader); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /apps/client/auth-mfe/src/app/register/register-facade.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { RegisterFacadeService } from './register-facade.service'; 4 | 5 | describe('RegisterFacadeService', () => { 6 | let service: RegisterFacadeService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(RegisterFacadeService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /apps/client/loaders-mfe-e2e/src/integration/app.spec.ts: -------------------------------------------------------------------------------- 1 | import { getGreeting } from '../support/app.po'; 2 | 3 | describe('client-loaders-mfe', () => { 4 | beforeEach(() => cy.visit('/')); 5 | 6 | it('should display welcome message', () => { 7 | // Custom command example, see `../support/commands.ts` file 8 | cy.login('my-email@something.com', 'myPassword'); 9 | 10 | // Function helper example, see `../support/app.po.ts` file 11 | getGreeting().contains('Welcome to client-loaders-mfe!'); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /libs/client/mfe/src/lib/services/dynamic-component-binding.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { DynamicComponentBinding } from './dynamic-component-binding'; 4 | 5 | describe(DynamicComponentBinding, () => { 6 | let service: DynamicComponentBinding; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(DynamicComponentBinding); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe-e2e/src/integration/app.spec.ts: -------------------------------------------------------------------------------- 1 | import { getGreeting } from '../support/app.po'; 2 | 3 | describe('client-fallbacks-mfe', () => { 4 | beforeEach(() => cy.visit('/')); 5 | 6 | it('should display welcome message', () => { 7 | // Custom command example, see `../support/commands.ts` file 8 | cy.login('my-email@something.com', 'myPassword'); 9 | 10 | // Function helper example, see `../support/app.po.ts` file 11 | getGreeting().contains('Welcome to client-fallbacks-mfe!'); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe/module-federation.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: 'client-fallbacks-mfe', 3 | exposes: { 4 | MfeFallbackModule: 'apps/client/fallbacks-mfe/src/app/mfe-fallback/mfe-fallback.module.ts', 5 | MfeFallbackComponent: 6 | 'apps/client/fallbacks-mfe/src/app/mfe-fallback/mfe-fallback.component.ts', 7 | NotFoundModule: 'apps/client/fallbacks-mfe/src/app/not-found/not-found.module.ts', 8 | NotFoundComponent: 'apps/client/fallbacks-mfe/src/app/not-found/not-found.component.ts', 9 | }, 10 | }; 11 | -------------------------------------------------------------------------------- /apps/server/api-gateway/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | 3 | import { AuthModule } from './modules/auth/auth.module'; 4 | import { UsersModule } from './modules/users/users.module'; 5 | 6 | @Module({ 7 | // providers: [AuthStrategy], 8 | imports: [ 9 | // PassportModule.register({ 10 | // defaultStrategy: 'jwt', 11 | // property: 'user', 12 | // session: false, 13 | // }), 14 | AuthModule, 15 | UsersModule, 16 | ], 17 | }) 18 | export class AppModule {} 19 | -------------------------------------------------------------------------------- /tools/generators/mfe/helpers/get-available-mfe-port.ts: -------------------------------------------------------------------------------- 1 | import { getProjects, Tree } from '@nrwl/devkit'; 2 | 3 | /** 4 | * Получить доступный порт для микрофронта 5 | */ 6 | export function getAvailableMfePort(tree: Tree): number { 7 | let availablePort = 4199; 8 | 9 | getProjects(tree).forEach((project) => { 10 | const port = project.targets?.serve?.options?.port; 11 | 12 | if (port) { 13 | availablePort = port > availablePort ? port : availablePort; 14 | } 15 | }); 16 | 17 | return availablePort + 1; 18 | } 19 | -------------------------------------------------------------------------------- /apps/client/auth-mfe/webpack.prod.config.js: -------------------------------------------------------------------------------- 1 | const { withModuleFederation } = require('@nrwl/angular/module-federation'); 2 | const config = require('./module-federation.config'); 3 | module.exports = withModuleFederation({ 4 | ...config, 5 | /* 6 | * Remote overrides for production. 7 | * Each entry is a pair of an unique name and the URL where it is deployed. 8 | * 9 | * e.g. 10 | * remotes: [ 11 | * ['app1', 'https://app1.example.com'], 12 | * ['app2', 'https://app2.example.com'], 13 | * ] 14 | */ 15 | }); 16 | -------------------------------------------------------------------------------- /apps/client/shell-app/webpack.prod.config.js: -------------------------------------------------------------------------------- 1 | const { withModuleFederation } = require('@nrwl/angular/module-federation'); 2 | const config = require('./module-federation.config'); 3 | module.exports = withModuleFederation({ 4 | ...config, 5 | /* 6 | * Remote overrides for production. 7 | * Each entry is a pair of an unique name and the URL where it is deployed. 8 | * 9 | * e.g. 10 | * remotes: [ 11 | * ['app1', 'https://app1.example.com'], 12 | * ['app2', 'https://app2.example.com'], 13 | * ] 14 | */ 15 | }); 16 | -------------------------------------------------------------------------------- /libs/client/common/src/lib/coercion/number.ts: -------------------------------------------------------------------------------- 1 | export type NumberInput = string | number | null | undefined; 2 | 3 | export function isNumberValue(value: unknown): boolean { 4 | return !isNaN(parseFloat(value as any)) && !isNaN(Number(value)); 5 | } 6 | 7 | export function coerceNumber(value: unknown): number; 8 | export function coerceNumber(value: unknown, fallback: T): number | T; 9 | export function coerceNumber(value: unknown, fallbackValue = 0) { 10 | return isNumberValue(value) ? Number(value) : fallbackValue; 11 | } 12 | -------------------------------------------------------------------------------- /apps/client/dashboard-mfe/webpack.prod.config.js: -------------------------------------------------------------------------------- 1 | const { withModuleFederation } = require('@nrwl/angular/module-federation'); 2 | const config = require('./module-federation.config'); 3 | module.exports = withModuleFederation({ 4 | ...config, 5 | /* 6 | * Remote overrides for production. 7 | * Each entry is a pair of an unique name and the URL where it is deployed. 8 | * 9 | * e.g. 10 | * remotes: [ 11 | * ['app1', 'https://app1.example.com'], 12 | * ['app2', 'https://app2.example.com'], 13 | * ] 14 | */ 15 | }); 16 | -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe/webpack.prod.config.js: -------------------------------------------------------------------------------- 1 | const { withModuleFederation } = require('@nrwl/angular/module-federation'); 2 | const config = require('./module-federation.config'); 3 | module.exports = withModuleFederation({ 4 | ...config, 5 | /* 6 | * Remote overrides for production. 7 | * Each entry is a pair of an unique name and the URL where it is deployed. 8 | * 9 | * e.g. 10 | * remotes: [ 11 | * ['app1', 'https://app1.example.com'], 12 | * ['app2', 'https://app2.example.com'], 13 | * ] 14 | */ 15 | }); 16 | -------------------------------------------------------------------------------- /apps/client/loaders-mfe/webpack.prod.config.js: -------------------------------------------------------------------------------- 1 | const { withModuleFederation } = require('@nrwl/angular/module-federation'); 2 | const config = require('./module-federation.config'); 3 | module.exports = withModuleFederation({ 4 | ...config, 5 | /* 6 | * Remote overrides for production. 7 | * Each entry is a pair of an unique name and the URL where it is deployed. 8 | * 9 | * e.g. 10 | * remotes: [ 11 | * ['app1', 'https://app1.example.com'], 12 | * ['app2', 'https://app2.example.com'], 13 | * ] 14 | */ 15 | }); 16 | -------------------------------------------------------------------------------- /libs/client/ui/src/lib/password-strength/password-strength.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { PasswordStrengthComponent } from './password-strength.component'; 4 | import { PasswordStrengthBarDirective } from './password-strength-bar.directive'; 5 | 6 | @NgModule({ 7 | declarations: [PasswordStrengthComponent, PasswordStrengthBarDirective], 8 | imports: [CommonModule], 9 | exports: [PasswordStrengthComponent], 10 | }) 11 | export class PasswordStrengthModule {} 12 | -------------------------------------------------------------------------------- /tools/generators/mfe/patterns/entry.module.txt: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { RouterModule } from '@angular/router'; 4 | 5 | import { RemoteEntryComponent } from './entry.component'; 6 | 7 | @NgModule({ 8 | declarations: [RemoteEntryComponent], 9 | imports: [ 10 | CommonModule, 11 | RouterModule.forChild([ 12 | { 13 | path: '', 14 | component: RemoteEntryComponent, 15 | }, 16 | ]), 17 | ], 18 | providers: [], 19 | }) 20 | export class RemoteEntryModule {} 21 | -------------------------------------------------------------------------------- /libs/server/grpc/src/lib/exceptions/grpc-exception.ts: -------------------------------------------------------------------------------- 1 | import { status } from '@grpc/grpc-js'; 2 | import { RpcException } from '@nestjs/microservices'; 3 | 4 | import { IGrpcException } from './grpc-exception.interface'; 5 | 6 | export class GrpcException extends RpcException implements IGrpcException { 7 | public readonly code: status; 8 | public override readonly message: string; 9 | 10 | constructor(exception: IGrpcException) { 11 | super(exception); 12 | this.code = exception.code; 13 | this.message = exception.message; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /libs/shared/common/src/lib/rxjs/operators/map-to-instance.ts: -------------------------------------------------------------------------------- 1 | import { plainToInstance } from 'class-transformer'; 2 | import { map, Observable, OperatorFunction } from 'rxjs'; 3 | 4 | interface Type extends Function { 5 | new (...args: any[]): T; 6 | } 7 | 8 | export function mapToInstance( 9 | destination: Type 10 | ): OperatorFunction { 11 | return (source: Observable): Observable => { 12 | return source.pipe(map((value) => plainToInstance(destination, value))); 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe/src/app/not-found/not-found.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { RouterModule } from '@angular/router'; 4 | 5 | import { NotFoundComponent } from './not-found.component'; 6 | 7 | @NgModule({ 8 | declarations: [NotFoundComponent], 9 | imports: [ 10 | CommonModule, 11 | RouterModule.forChild([ 12 | { 13 | path: '', 14 | component: NotFoundComponent, 15 | }, 16 | ]), 17 | ], 18 | exports: [NotFoundComponent], 19 | }) 20 | export class NotFoundModule {} 21 | -------------------------------------------------------------------------------- /libs/shared/data-access/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "module": "commonjs", 5 | "forceConsistentCasingInFileNames": true, 6 | "strict": true, 7 | "noImplicitOverride": true, 8 | "noPropertyAccessFromIndexSignature": true, 9 | "noImplicitReturns": true, 10 | "noFallthroughCasesInSwitch": true 11 | }, 12 | "files": [], 13 | "include": [], 14 | "references": [ 15 | { 16 | "path": "./tsconfig.lib.json" 17 | }, 18 | { 19 | "path": "./tsconfig.spec.json" 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /tools/pattern-engine/replace-patterns.ts: -------------------------------------------------------------------------------- 1 | import { PATTERN_REGEXP } from './pattern-regexp'; 2 | 3 | /** 4 | * Заменяет на указанные в аргументах строки в шаблоне, в порядки их обнаружения 5 | * и возвращает новую строку с заменами 6 | * @param pattern Шаблон 7 | * @param args Список замен, в порядке их обнаружения 8 | */ 9 | export function replacePatterns(pattern: string, args: string[]) { 10 | let argIndex = 0; 11 | 12 | while (pattern.match(PATTERN_REGEXP)) { 13 | pattern = pattern.replace(/{\*{3}}/, args[argIndex]); 14 | argIndex++; 15 | } 16 | 17 | return pattern; 18 | } 19 | -------------------------------------------------------------------------------- /apps/client/auth-mfe-e2e/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "sourceMap": false, 5 | "outDir": "../../../dist/out-tsc", 6 | "allowJs": true, 7 | "types": ["cypress", "node"], 8 | "forceConsistentCasingInFileNames": true, 9 | "strict": true, 10 | "noImplicitReturns": true, 11 | "noFallthroughCasesInSwitch": true 12 | }, 13 | "include": ["src/**/*.ts", "src/**/*.js"], 14 | "angularCompilerOptions": { 15 | "strictInjectionParameters": true, 16 | "strictInputAccessModifiers": true, 17 | "strictTemplates": true 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /apps/client/dashboard-mfe-e2e/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "sourceMap": false, 5 | "outDir": "../../../dist/out-tsc", 6 | "allowJs": true, 7 | "types": ["cypress", "node"], 8 | "forceConsistentCasingInFileNames": true, 9 | "strict": true, 10 | "noImplicitReturns": true, 11 | "noFallthroughCasesInSwitch": true 12 | }, 13 | "include": ["src/**/*.ts", "src/**/*.js"], 14 | "angularCompilerOptions": { 15 | "strictInjectionParameters": true, 16 | "strictInputAccessModifiers": true, 17 | "strictTemplates": true 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe-e2e/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "sourceMap": false, 5 | "outDir": "../../../dist/out-tsc", 6 | "allowJs": true, 7 | "types": ["cypress", "node"], 8 | "forceConsistentCasingInFileNames": true, 9 | "strict": true, 10 | "noImplicitReturns": true, 11 | "noFallthroughCasesInSwitch": true 12 | }, 13 | "include": ["src/**/*.ts", "src/**/*.js"], 14 | "angularCompilerOptions": { 15 | "strictInjectionParameters": true, 16 | "strictInputAccessModifiers": true, 17 | "strictTemplates": true 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe/src/app/mfe-fallback/mfe-fallback.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { RouterModule } from '@angular/router'; 4 | 5 | import { MfeFallbackComponent } from './mfe-fallback.component'; 6 | 7 | @NgModule({ 8 | declarations: [MfeFallbackComponent], 9 | imports: [ 10 | CommonModule, 11 | RouterModule.forChild([ 12 | { 13 | path: '', 14 | component: MfeFallbackComponent, 15 | }, 16 | ]), 17 | ], 18 | exports: [MfeFallbackComponent], 19 | }) 20 | export class MfeFallbackModule {} 21 | -------------------------------------------------------------------------------- /apps/client/loaders-mfe-e2e/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "sourceMap": false, 5 | "outDir": "../../../dist/out-tsc", 6 | "allowJs": true, 7 | "types": ["cypress", "node"], 8 | "forceConsistentCasingInFileNames": true, 9 | "strict": true, 10 | "noImplicitReturns": true, 11 | "noFallthroughCasesInSwitch": true 12 | }, 13 | "include": ["src/**/*.ts", "src/**/*.js"], 14 | "angularCompilerOptions": { 15 | "strictInjectionParameters": true, 16 | "strictInputAccessModifiers": true, 17 | "strictTemplates": true 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /libs/server/domains/src/lib/auth/jwt-token.ts: -------------------------------------------------------------------------------- 1 | import { JwtService, JwtVerifyOptions } from '@nestjs/jwt'; 2 | 3 | // eslint-disable-next-line @typescript-eslint/ban-types 4 | export class JwtToken { 5 | protected readonly _jwtService: JwtService; 6 | 7 | constructor(public readonly token: string) { 8 | this._jwtService = new JwtService({}); 9 | } 10 | 11 | public verify(options?: JwtVerifyOptions): T { 12 | return this._jwtService.verify(this.token, options); 13 | } 14 | 15 | public decode(): T { 16 | return this._jwtService.decode(this.token) as T; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /libs/client/auth/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ], 13 | "compilerOptions": { 14 | "forceConsistentCasingInFileNames": true, 15 | "strict": true, 16 | "noImplicitReturns": true, 17 | "noFallthroughCasesInSwitch": true, 18 | "target": "es2020" 19 | }, 20 | "angularCompilerOptions": { 21 | "strictInjectionParameters": true, 22 | "strictInputAccessModifiers": true, 23 | "strictTemplates": true 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /libs/client/core/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ], 13 | "compilerOptions": { 14 | "forceConsistentCasingInFileNames": true, 15 | "strict": true, 16 | "noImplicitReturns": true, 17 | "noFallthroughCasesInSwitch": true, 18 | "target": "es2020" 19 | }, 20 | "angularCompilerOptions": { 21 | "strictInjectionParameters": true, 22 | "strictInputAccessModifiers": true, 23 | "strictTemplates": true 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /libs/client/forms/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ], 13 | "compilerOptions": { 14 | "forceConsistentCasingInFileNames": true, 15 | "strict": true, 16 | "noImplicitReturns": true, 17 | "noFallthroughCasesInSwitch": true, 18 | "target": "es2020" 19 | }, 20 | "angularCompilerOptions": { 21 | "strictInjectionParameters": true, 22 | "strictInputAccessModifiers": true, 23 | "strictTemplates": true 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /libs/client/mfe/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ], 13 | "compilerOptions": { 14 | "forceConsistentCasingInFileNames": true, 15 | "strict": true, 16 | "noImplicitReturns": true, 17 | "noFallthroughCasesInSwitch": true, 18 | "target": "es2020" 19 | }, 20 | "angularCompilerOptions": { 21 | "strictInjectionParameters": true, 22 | "strictInputAccessModifiers": true, 23 | "strictTemplates": true 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /libs/client/common/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ], 13 | "compilerOptions": { 14 | "forceConsistentCasingInFileNames": true, 15 | "strict": true, 16 | "noImplicitReturns": true, 17 | "noFallthroughCasesInSwitch": true, 18 | "target": "es2020" 19 | }, 20 | "angularCompilerOptions": { 21 | "strictInjectionParameters": true, 22 | "strictInputAccessModifiers": true, 23 | "strictTemplates": true 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /libs/client/environment/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ], 13 | "compilerOptions": { 14 | "forceConsistentCasingInFileNames": true, 15 | "strict": true, 16 | "noImplicitReturns": true, 17 | "noFallthroughCasesInSwitch": true, 18 | "target": "es2020" 19 | }, 20 | "angularCompilerOptions": { 21 | "strictInjectionParameters": true, 22 | "strictInputAccessModifiers": true, 23 | "strictTemplates": true 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /libs/client/injector-container/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ], 13 | "compilerOptions": { 14 | "forceConsistentCasingInFileNames": true, 15 | "strict": true, 16 | "noImplicitReturns": true, 17 | "noFallthroughCasesInSwitch": true, 18 | "target": "es2020" 19 | }, 20 | "angularCompilerOptions": { 21 | "strictInjectionParameters": true, 22 | "strictInputAccessModifiers": true, 23 | "strictTemplates": true 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /apps/client/dashboard-mfe/src/app/remote-entry/entry.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { RouterModule } from '@angular/router'; 4 | 5 | import { EntryComponent } from './entry.component'; 6 | import { EntryService } from './entry.service'; 7 | 8 | @NgModule({ 9 | imports: [ 10 | CommonModule, 11 | RouterModule.forChild([ 12 | { 13 | path: '', 14 | component: EntryComponent, 15 | }, 16 | ]), 17 | ], 18 | providers: [EntryService], 19 | declarations: [EntryComponent], 20 | exports: [EntryComponent], 21 | }) 22 | export class EntryModule {} 23 | -------------------------------------------------------------------------------- /libs/shared/data-access/src/lib/responses/users/user.response.ts: -------------------------------------------------------------------------------- 1 | import { Exclude } from 'class-transformer'; 2 | import { IsBoolean, IsEmail, IsNotEmpty, IsNumber } from 'class-validator'; 3 | 4 | export class UserResponse { 5 | @IsNumber() 6 | @IsNotEmpty() 7 | public readonly id: string; 8 | 9 | @IsEmail() 10 | @IsNotEmpty() 11 | public readonly email: string; 12 | 13 | @IsBoolean() 14 | @IsNotEmpty() 15 | public readonly isConfirmed: boolean; 16 | 17 | @Exclude() 18 | public readonly password: string; 19 | 20 | constructor(partial: Partial) { 21 | Object.assign(this, partial); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /apps/client/loaders-mfe/src/app/spinner/spinner.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { RouterModule } from '@angular/router'; 4 | import { LoadingModule } from 'carbon-components-angular/loading'; 5 | 6 | import { SpinnerComponent } from './spinner.component'; 7 | 8 | @NgModule({ 9 | imports: [ 10 | CommonModule, 11 | RouterModule.forChild([ 12 | { 13 | path: '', 14 | component: SpinnerComponent, 15 | }, 16 | ]), 17 | LoadingModule, 18 | ], 19 | declarations: [SpinnerComponent], 20 | exports: [SpinnerComponent], 21 | }) 22 | export class SpinnerModule {} 23 | -------------------------------------------------------------------------------- /apps/server/users-ms/src/app/abstractions/users-service.interface.ts: -------------------------------------------------------------------------------- 1 | import { DeepPartial } from 'typeorm'; 2 | 3 | // TODO мне не нравиться эта зависимость от БД сущности 4 | import { UserEntity } from '../modules/users/user.entity'; 5 | 6 | // TODO Вынести Promise в DTO 7 | export interface IUsersService { 8 | findOne(criterias: DeepPartial): Promise; 9 | 10 | // TODO Вынести в DTO 11 | create(userData: Pick): Promise; 12 | 13 | // TODO Вынести в DTO 14 | update(id: number, userData: DeepPartial): Promise; 15 | 16 | delete(id: number): Promise; 17 | } 18 | -------------------------------------------------------------------------------- /libs/client/ui/src/lib/divider/divider.component.scss: -------------------------------------------------------------------------------- 1 | @use 'libs/client/styles/src/lib/carbon-theme'; 2 | @use 'utilities/convert' as *; 3 | @use 'utilities/bemify' as *; 4 | @use '@carbon/layout'; 5 | 6 | @include block(ui-divider) { 7 | display: block; 8 | border-bottom: 1px solid carbon-theme.get('border-strong'); 9 | margin: layout.$spacing-05 0; 10 | 11 | @include modifier(vertical) { 12 | border-bottom: none; 13 | border-left: 0.5px solid carbon-theme.get('border-strong'); 14 | border-right-width: 0.5px solid carbon-theme.get('border-strong'); 15 | margin: 0 layout.$spacing-05; 16 | width: 0; 17 | min-height: rem(16px); 18 | height: 100%; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /apps/client/shell-app-e2e/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "sourceMap": false, 5 | "outDir": "../../../dist/out-tsc", 6 | "allowJs": true, 7 | "types": ["cypress", "node"], 8 | "forceConsistentCasingInFileNames": true, 9 | "strict": true, 10 | "noImplicitOverride": true, 11 | "noPropertyAccessFromIndexSignature": true, 12 | "noImplicitReturns": true, 13 | "noFallthroughCasesInSwitch": true 14 | }, 15 | "include": ["src/**/*.ts", "src/**/*.js"], 16 | "angularCompilerOptions": { 17 | "strictInjectionParameters": true, 18 | "strictInputAccessModifiers": true, 19 | "strictTemplates": true 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /apps/client/auth-mfe/src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { RouterModule, Routes } from '@angular/router'; 3 | 4 | const routes: Routes = [ 5 | { 6 | path: 'login', 7 | loadChildren: () => import('./login/login.module').then((m) => m.LoginModule), 8 | }, 9 | { 10 | path: 'register', 11 | loadChildren: () => import('./register/register.module').then((m) => m.RegisterModule), 12 | }, 13 | { 14 | path: '**', 15 | redirectTo: 'login', 16 | }, 17 | ]; 18 | 19 | @NgModule({ 20 | imports: [RouterModule.forRoot(routes, { initialNavigation: 'enabledBlocking' })], 21 | exports: [RouterModule], 22 | }) 23 | export class AppRoutingModule {} 24 | -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe/.browserslistrc: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # For the full list of supported browsers by the Angular framework, please see: 6 | # https://angular.io/guide/browser-support 7 | 8 | # You can see what browsers were selected by your queries by running: 9 | # npx browserslist 10 | 11 | last 1 Chrome version 12 | last 1 Firefox version 13 | last 2 Edge major versions 14 | last 2 Safari major versions 15 | last 2 iOS major versions 16 | Firefox ESR 17 | -------------------------------------------------------------------------------- /apps/client/loaders-mfe/.browserslistrc: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # For the full list of supported browsers by the Angular framework, please see: 6 | # https://angular.io/guide/browser-support 7 | 8 | # You can see what browsers were selected by your queries by running: 9 | # npx browserslist 10 | 11 | last 1 Chrome version 12 | last 1 Firefox version 13 | last 2 Edge major versions 14 | last 2 Safari major versions 15 | last 2 iOS major versions 16 | Firefox ESR 17 | -------------------------------------------------------------------------------- /libs/client/injector-container/.browserslistrc: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # For the full list of supported browsers by the Angular framework, please see: 6 | # https://angular.io/guide/browser-support 7 | 8 | # You can see what browsers were selected by your queries by running: 9 | # npx browserslist 10 | 11 | last 1 Chrome version 12 | last 1 Firefox version 13 | last 2 Edge major versions 14 | last 2 Safari major versions 15 | last 2 iOS major versions 16 | Firefox ESR 17 | -------------------------------------------------------------------------------- /libs/client/ui/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ], 13 | "compilerOptions": { 14 | "forceConsistentCasingInFileNames": true, 15 | "strict": true, 16 | "noImplicitOverride": true, 17 | "noPropertyAccessFromIndexSignature": true, 18 | "noImplicitReturns": true, 19 | "noFallthroughCasesInSwitch": true, 20 | "target": "es2020" 21 | }, 22 | "angularCompilerOptions": { 23 | "strictInjectionParameters": true, 24 | "strictInputAccessModifiers": true, 25 | "strictTemplates": true 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /apps/client/auth-mfe-e2e/src/support/index.ts: -------------------------------------------------------------------------------- 1 | // *********************************************************** 2 | // This example support/index.js is processed and 3 | // loaded automatically before your test files. 4 | // 5 | // This is a great place to put global configuration and 6 | // behavior that modifies Cypress. 7 | // 8 | // You can change the location of this file or turn off 9 | // automatically serving support files with the 10 | // 'supportFile' configuration option. 11 | // 12 | // You can read more here: 13 | // https://on.cypress.io/configuration 14 | // *********************************************************** 15 | 16 | // Import commands.js using ES2015 syntax: 17 | import './commands'; 18 | -------------------------------------------------------------------------------- /apps/client/loaders-mfe-e2e/src/support/index.ts: -------------------------------------------------------------------------------- 1 | // *********************************************************** 2 | // This example support/index.js is processed and 3 | // loaded automatically before your test files. 4 | // 5 | // This is a great place to put global configuration and 6 | // behavior that modifies Cypress. 7 | // 8 | // You can change the location of this file or turn off 9 | // automatically serving support files with the 10 | // 'supportFile' configuration option. 11 | // 12 | // You can read more here: 13 | // https://on.cypress.io/configuration 14 | // *********************************************************** 15 | 16 | // Import commands.js using ES2015 syntax: 17 | import './commands'; 18 | -------------------------------------------------------------------------------- /apps/client/shell-app-e2e/src/support/index.ts: -------------------------------------------------------------------------------- 1 | // *********************************************************** 2 | // This example support/index.js is processed and 3 | // loaded automatically before your test files. 4 | // 5 | // This is a great place to put global configuration and 6 | // behavior that modifies Cypress. 7 | // 8 | // You can change the location of this file or turn off 9 | // automatically serving support files with the 10 | // 'supportFile' configuration option. 11 | // 12 | // You can read more here: 13 | // https://on.cypress.io/configuration 14 | // *********************************************************** 15 | 16 | // Import commands.js using ES2015 syntax: 17 | import './commands'; 18 | -------------------------------------------------------------------------------- /tools/generators/mfe/helpers/replace-remote-entry-module.ts: -------------------------------------------------------------------------------- 1 | import { NormalizedSchema } from '@nrwl/angular/src/generators/application/lib'; 2 | import * as fs from 'fs'; 3 | import * as path from 'path'; 4 | 5 | /** 6 | * Заменить контент файла entry.module.ts 7 | * @param options Normalized options 8 | */ 9 | export function replaceRemoteEntryModule(options: NormalizedSchema): void { 10 | const filePath = path.normalize( 11 | path.resolve(process.cwd(), options.appProjectRoot, 'src/app/remote-entry/entry.module.ts') 12 | ); 13 | const appModulePattern = fs.readFileSync( 14 | path.resolve(__dirname, '../patterns/entry.module.txt') 15 | ); 16 | fs.writeFileSync(filePath, appModulePattern); 17 | } 18 | -------------------------------------------------------------------------------- /apps/client/dashboard-mfe-e2e/src/support/index.ts: -------------------------------------------------------------------------------- 1 | // *********************************************************** 2 | // This example support/index.js is processed and 3 | // loaded automatically before your test files. 4 | // 5 | // This is a great place to put global configuration and 6 | // behavior that modifies Cypress. 7 | // 8 | // You can change the location of this file or turn off 9 | // automatically serving support files with the 10 | // 'supportFile' configuration option. 11 | // 12 | // You can read more here: 13 | // https://on.cypress.io/configuration 14 | // *********************************************************** 15 | 16 | // Import commands.js using ES2015 syntax: 17 | import './commands'; 18 | -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe-e2e/src/support/index.ts: -------------------------------------------------------------------------------- 1 | // *********************************************************** 2 | // This example support/index.js is processed and 3 | // loaded automatically before your test files. 4 | // 5 | // This is a great place to put global configuration and 6 | // behavior that modifies Cypress. 7 | // 8 | // You can change the location of this file or turn off 9 | // automatically serving support files with the 10 | // 'supportFile' configuration option. 11 | // 12 | // You can read more here: 13 | // https://on.cypress.io/configuration 14 | // *********************************************************** 15 | 16 | // Import commands.js using ES2015 syntax: 17 | import './commands'; 18 | -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe/src/app/not-found/not-found.component.ts: -------------------------------------------------------------------------------- 1 | import { ChangeDetectionStrategy, Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'nx-mfe-not-found', 5 | template: ` 6 |

Sorry, the page you visited does not exist.

7 | Go to Dashboard 8 | 17 | `, 18 | changeDetection: ChangeDetectionStrategy.OnPush, 19 | }) 20 | export class NotFoundComponent {} 21 | -------------------------------------------------------------------------------- /tools/generators/mfe/helpers/replace-remote-mfe-app-module.ts: -------------------------------------------------------------------------------- 1 | import { NormalizedSchema } from '@nrwl/angular/src/generators/application/lib'; 2 | import * as fs from 'fs'; 3 | import * as path from 'path'; 4 | 5 | /** 6 | * Заменить контент корневого модуля app.module.ts для микрофронта 7 | * @param options Normalized options 8 | */ 9 | export function replaceRemoteMfeAppModule(options: NormalizedSchema): void { 10 | const appModulePath = path.normalize( 11 | path.resolve(process.cwd(), options.appProjectRoot, 'src/app/app.module.ts') 12 | ); 13 | const appModulePattern = fs.readFileSync(path.resolve(__dirname, '../patterns/app.module.txt')); 14 | fs.writeFileSync(appModulePath, appModulePattern); 15 | } 16 | -------------------------------------------------------------------------------- /apps/client/loaders-mfe/src/app/spinner/spinner.component.ts: -------------------------------------------------------------------------------- 1 | import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'nx-mfe-spinner', 5 | template: ` 6 |
7 | 8 |
9 | `, 10 | styles: [ 11 | ` 12 | .container { 13 | width: 100%; 14 | display: flex; 15 | align-items: center; 16 | justify-content: center; 17 | } 18 | `, 19 | ], 20 | changeDetection: ChangeDetectionStrategy.OnPush, 21 | }) 22 | export class SpinnerComponent { 23 | @Input() 24 | public isActive = true; 25 | 26 | @Input() 27 | public size: 'normal' | 'sm' = 'normal'; 28 | } 29 | -------------------------------------------------------------------------------- /apps/server/users-ms/src/app/modules/users/users.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { TypeOrmModule } from '@nestjs/typeorm'; 3 | 4 | import { Services } from '../../constants/services'; 5 | import { UserEntity } from './user.entity'; 6 | import { UsersController } from './users.controller'; 7 | import { UsersService } from './users.service'; 8 | 9 | const USER_SERVICE_PROVIDER = { 10 | provide: Services.USER_SERVICE, 11 | useClass: UsersService, 12 | }; 13 | 14 | @Module({ 15 | imports: [TypeOrmModule.forFeature([UserEntity])], 16 | controllers: [UsersController], 17 | providers: [USER_SERVICE_PROVIDER], 18 | exports: [USER_SERVICE_PROVIDER], 19 | }) 20 | export class UsersModule {} 21 | -------------------------------------------------------------------------------- /libs/client/forms/src/lib/validators/custom-validators.ts: -------------------------------------------------------------------------------- 1 | import { AbstractControl, UntypedFormGroup, ValidationErrors, ValidatorFn } from '@angular/forms'; 2 | 3 | export class CustomValidators { 4 | public static confirm(compareWith: string): ValidatorFn { 5 | return confirmValidator(compareWith); 6 | } 7 | } 8 | 9 | export function confirmValidator(compareWith: string): ValidatorFn { 10 | return (control: AbstractControl): ValidationErrors | null => { 11 | if ( 12 | !!control.parent && 13 | control.parent instanceof UntypedFormGroup && 14 | control.parent.get(compareWith)?.value !== control.value 15 | ) { 16 | return { confirm: true, error: true }; 17 | } 18 | 19 | return {}; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /libs/server/common/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../../node_modules/nx/schemas/project-schema.json", 3 | "sourceRoot": "libs/server/common/src", 4 | "projectType": "library", 5 | "targets": { 6 | "lint": { 7 | "executor": "@nrwl/linter:eslint", 8 | "outputs": ["{options.outputFile}"], 9 | "options": { 10 | "lintFilePatterns": ["libs/server/common/**/*.ts"] 11 | } 12 | }, 13 | "test": { 14 | "executor": "@nrwl/jest:jest", 15 | "outputs": ["coverage/libs/server/common"], 16 | "options": { 17 | "jestConfig": "libs/server/common/jest.config.ts", 18 | "passWithNoTests": true 19 | } 20 | } 21 | }, 22 | "tags": ["scope:server"] 23 | } 24 | -------------------------------------------------------------------------------- /libs/shared/common/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../../node_modules/nx/schemas/project-schema.json", 3 | "sourceRoot": "libs/shared/common/src", 4 | "projectType": "library", 5 | "targets": { 6 | "lint": { 7 | "executor": "@nrwl/linter:eslint", 8 | "outputs": ["{options.outputFile}"], 9 | "options": { 10 | "lintFilePatterns": ["libs/shared/common/**/*.ts"] 11 | } 12 | }, 13 | "test": { 14 | "executor": "@nrwl/jest:jest", 15 | "outputs": ["coverage/libs/shared/common"], 16 | "options": { 17 | "jestConfig": "libs/shared/common/jest.config.ts", 18 | "passWithNoTests": true 19 | } 20 | } 21 | }, 22 | "tags": ["scope:shared"] 23 | } 24 | -------------------------------------------------------------------------------- /apps/client/auth-mfe/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { BrowserModule } from '@angular/platform-browser'; 3 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; 4 | import { CoreModule } from '@nx-mfe/client/core'; 5 | 6 | import { environment } from '../environments/environment'; 7 | import { AppComponent } from './app.component'; 8 | import { AppRoutingModule } from './app-routing.module'; 9 | 10 | @NgModule({ 11 | declarations: [AppComponent], 12 | imports: [ 13 | BrowserModule, 14 | BrowserAnimationsModule, 15 | AppRoutingModule, 16 | CoreModule.forRoot(environment), 17 | ], 18 | bootstrap: [AppComponent], 19 | }) 20 | export class AppModule {} 21 | -------------------------------------------------------------------------------- /apps/client/loaders-mfe/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { BrowserModule } from '@angular/platform-browser'; 3 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; 4 | import { CoreModule } from '@nx-mfe/client/core'; 5 | 6 | import { environment } from '../environments/environment'; 7 | import { AppComponent } from './app.component'; 8 | import { AppRoutingModule } from './app-routing.module'; 9 | 10 | @NgModule({ 11 | declarations: [AppComponent], 12 | imports: [ 13 | BrowserModule, 14 | BrowserAnimationsModule, 15 | AppRoutingModule, 16 | CoreModule.forRoot(environment), 17 | ], 18 | bootstrap: [AppComponent], 19 | }) 20 | export class AppModule {} 21 | -------------------------------------------------------------------------------- /libs/client/styles/src/lib/utilities/_convert.scss: -------------------------------------------------------------------------------- 1 | @use 'sass:meta'; 2 | @use 'sass:math'; 3 | 4 | /// Default font size 5 | /// @type Number 6 | /// @access public 7 | $base-font-size: 16px !default; 8 | 9 | /// Convert a given px unit to a rem unit 10 | /// @param {Number} $px - Number with px unit 11 | /// @return {Number} Number with rem unit 12 | /// @access public 13 | /// @group utilities 14 | @function rem($px) { 15 | @if unit($px) != 'px' { 16 | @error "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`"; 17 | } 18 | 19 | @if meta.function-exists('div', 'math') { 20 | @return math.div($px, $base-font-size) * 1rem; 21 | } @else { 22 | @return ($px / $base-font-size) * 1rem; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /libs/client/ui/src/lib/divider/divider.component.ts: -------------------------------------------------------------------------------- 1 | import { 2 | Component, 3 | ChangeDetectionStrategy, 4 | Input, 5 | HostBinding, 6 | ViewEncapsulation, 7 | } from '@angular/core'; 8 | import { BooleanInput, CoerceBoolean } from '@nx-mfe/client/common'; 9 | 10 | @Component({ 11 | selector: 'ui-divider', 12 | template: ``, 13 | styleUrls: ['./divider.component.scss'], 14 | encapsulation: ViewEncapsulation.None, 15 | changeDetection: ChangeDetectionStrategy.OnPush, 16 | }) 17 | export class DividerComponent { 18 | @Input() 19 | @CoerceBoolean() 20 | @HostBinding('class.ui-divider--vertical') 21 | public vertical: BooleanInput = false; 22 | 23 | @HostBinding('class.ui-divider') public baseClass = 'ui-divider'; 24 | } 25 | -------------------------------------------------------------------------------- /libs/client/ui/src/lib/logo/logo.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { LogoComponent } from './logo.component'; 4 | 5 | describe('LogoComponent', () => { 6 | let component: LogoComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [LogoComponent], 12 | }).compileComponents(); 13 | }); 14 | 15 | beforeEach(() => { 16 | fixture = TestBed.createComponent(LogoComponent); 17 | component = fixture.componentInstance; 18 | fixture.detectChanges(); 19 | }); 20 | 21 | it('should create', () => { 22 | expect(component).toBeTruthy(); 23 | }); 24 | }); 25 | -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { BrowserModule } from '@angular/platform-browser'; 3 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; 4 | import { CoreModule } from '@nx-mfe/client/core'; 5 | 6 | import { environment } from '../environments/environment'; 7 | import { AppComponent } from './app.component'; 8 | import { AppRoutingModule } from './app-routing.module'; 9 | 10 | @NgModule({ 11 | declarations: [AppComponent], 12 | imports: [ 13 | BrowserModule, 14 | BrowserAnimationsModule, 15 | AppRoutingModule, 16 | CoreModule.forRoot(environment), 17 | ], 18 | bootstrap: [AppComponent], 19 | }) 20 | export class AppModule {} 21 | -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe/src/app/mfe-fallback/mfe-fallback.component.ts: -------------------------------------------------------------------------------- 1 | import { ChangeDetectionStrategy, Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'nx-mfe-client-fallbacks-mfe-entry', 5 | template: ` 6 |

MFE Fallback

7 |

Something went wrong

8 | 18 | `, 19 | changeDetection: ChangeDetectionStrategy.OnPush, 20 | }) 21 | export class MfeFallbackComponent {} 22 | -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe/src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { RouterModule, Routes } from '@angular/router'; 3 | 4 | const routes: Routes = [ 5 | { 6 | path: 'mfe-fallback', 7 | loadChildren: () => 8 | import('./mfe-fallback/mfe-fallback.module').then((m) => m.MfeFallbackModule), 9 | }, 10 | { 11 | path: 'not-found', 12 | loadChildren: () => import('./not-found/not-found.module').then((m) => m.NotFoundModule), 13 | }, 14 | { 15 | path: '**', 16 | redirectTo: 'mfe-fallback', 17 | }, 18 | ]; 19 | 20 | @NgModule({ 21 | imports: [RouterModule.forRoot(routes, { initialNavigation: 'enabledBlocking' })], 22 | exports: [RouterModule], 23 | }) 24 | export class AppRoutingModule {} 25 | -------------------------------------------------------------------------------- /libs/client/injector-container/src/lib/client-injector-container.module.ts: -------------------------------------------------------------------------------- 1 | import { Injector, NgModule } from '@angular/core'; 2 | import { FormsModule } from '@angular/forms'; 3 | 4 | /** 5 | * Container of providers, that can get without constructor DI. 6 | * ------ 7 | * 8 | * Add new imports and providers careful, coz it increase bundle size. 9 | * 10 | * @example 11 | * // get FormBuilder without constructor DI. 12 | * const fb = InjectorContainerModule.injector.get(FormBuilder); 13 | */ 14 | @NgModule({ 15 | imports: [FormsModule], 16 | }) 17 | export class InjectorContainerModule { 18 | public static injector: Injector; 19 | 20 | constructor(injector: Injector) { 21 | InjectorContainerModule.injector = injector; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /libs/server/grpc/src/lib/proto/compile-proto.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | find . -type d -name 'build' -exec rm -r {} + 4 | 5 | mkdir -p build 6 | 7 | protoc \ 8 | --plugin=../../../../../../node_modules/.bin/protoc-gen-ts_proto \ 9 | -I=./ \ 10 | --ts_proto_out=./build *.proto \ 11 | --ts_proto_opt=nestJs=true \ 12 | --ts_proto_opt=addGrpcMetadata=true \ 13 | --ts_proto_opt=outputJsonMethods=true \ 14 | --ts_proto_opt=outputPartialMethods=true \ 15 | 16 | touch index.ts 17 | > index.ts 18 | 19 | for filename in ./build/*.ts 20 | do 21 | path=$(dirname "$file") 22 | file="$(basename $filename .ts)" 23 | namespace=$(perl -pe 's/(?:\b|-)(\p{Ll})/\u$1/g' <<< $file) 24 | 25 | echo "export * as $namespace from './build/$file';" >> index.ts 26 | done -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | 8 | # dependencies 9 | /node_modules 10 | 11 | .angular 12 | 13 | # IDEs and editors 14 | /.idea 15 | .project 16 | .classpath 17 | .c9/ 18 | *.launch 19 | .settings/ 20 | *.sublime-workspace 21 | 22 | # IDE - VSCode 23 | .vscode/* 24 | !.vscode/settings.json 25 | !.vscode/tasks.json 26 | !.vscode/launch.json 27 | !.vscode/extensions.json 28 | 29 | # misc 30 | /.sass-cache 31 | /connect.lock 32 | /coverage 33 | /libpeerconnection.log 34 | npm-debug.log 35 | yarn-error.log 36 | testem.log 37 | /typings 38 | 39 | # System Files 40 | .DS_Store 41 | Thumbs.db 42 | 43 | # Environment config files 44 | .env 45 | -------------------------------------------------------------------------------- /apps/server/auth-ms/src/app/abstractions/auth-service.interface.ts: -------------------------------------------------------------------------------- 1 | import { UserMetadata } from '@nx-mfe/server/domains'; 2 | import { 3 | AuthTokensResponse, 4 | CredentialsRequest, 5 | RegisterRequest, 6 | } from '@nx-mfe/shared/data-access'; 7 | 8 | export interface IAuthService { 9 | register(credentials: RegisterRequest): Promise; 10 | 11 | login(credentials: CredentialsRequest, userMetadata: UserMetadata): Promise; 12 | 13 | logout(refreshToken: string): Promise; 14 | 15 | refresh(refreshToken: string, userMetadata: UserMetadata): Promise; 16 | 17 | activateAccount(activationToken: string): Promise; 18 | 19 | resendActivationEmail(email: string): Promise; 20 | } 21 | -------------------------------------------------------------------------------- /libs/shared/data-access/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../../node_modules/nx/schemas/project-schema.json", 3 | "sourceRoot": "libs/shared/data-access/src", 4 | "projectType": "library", 5 | "targets": { 6 | "lint": { 7 | "executor": "@nrwl/linter:eslint", 8 | "outputs": ["{options.outputFile}"], 9 | "options": { 10 | "lintFilePatterns": ["libs/shared/data-access/**/*.ts"] 11 | } 12 | }, 13 | "test": { 14 | "executor": "@nrwl/jest:jest", 15 | "outputs": ["coverage/libs/shared/data-access"], 16 | "options": { 17 | "jestConfig": "libs/shared/data-access/jest.config.ts", 18 | "passWithNoTests": true 19 | } 20 | } 21 | }, 22 | "tags": ["scope:shared"] 23 | } 24 | -------------------------------------------------------------------------------- /apps/client/auth-mfe/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.app.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | }, 12 | { 13 | "path": "./tsconfig.editor.json" 14 | } 15 | ], 16 | "compilerOptions": { 17 | "forceConsistentCasingInFileNames": true, 18 | "strict": true, 19 | "noImplicitOverride": true, 20 | "noPropertyAccessFromIndexSignature": true, 21 | "noImplicitReturns": true, 22 | "noFallthroughCasesInSwitch": true, 23 | "target": "es2020" 24 | }, 25 | "angularCompilerOptions": { 26 | "strictInjectionParameters": true, 27 | "strictInputAccessModifiers": true, 28 | "strictTemplates": true 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /apps/client/shell-app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.app.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | }, 12 | { 13 | "path": "./tsconfig.editor.json" 14 | } 15 | ], 16 | "compilerOptions": { 17 | "forceConsistentCasingInFileNames": true, 18 | "strict": true, 19 | "noImplicitOverride": true, 20 | "noPropertyAccessFromIndexSignature": true, 21 | "noImplicitReturns": true, 22 | "noFallthroughCasesInSwitch": true, 23 | "target": "es2020" 24 | }, 25 | "angularCompilerOptions": { 26 | "strictInjectionParameters": true, 27 | "strictInputAccessModifiers": true, 28 | "strictTemplates": true 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /apps/client/dashboard-mfe/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.app.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | }, 12 | { 13 | "path": "./tsconfig.editor.json" 14 | } 15 | ], 16 | "compilerOptions": { 17 | "forceConsistentCasingInFileNames": true, 18 | "strict": true, 19 | "noImplicitOverride": true, 20 | "noPropertyAccessFromIndexSignature": true, 21 | "noImplicitReturns": true, 22 | "noFallthroughCasesInSwitch": true, 23 | "target": "es2020" 24 | }, 25 | "angularCompilerOptions": { 26 | "strictInjectionParameters": true, 27 | "strictInputAccessModifiers": true, 28 | "strictTemplates": true 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.app.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | }, 12 | { 13 | "path": "./tsconfig.editor.json" 14 | } 15 | ], 16 | "compilerOptions": { 17 | "forceConsistentCasingInFileNames": true, 18 | "strict": true, 19 | "noImplicitOverride": true, 20 | "noPropertyAccessFromIndexSignature": true, 21 | "noImplicitReturns": true, 22 | "noFallthroughCasesInSwitch": true, 23 | "target": "es2020" 24 | }, 25 | "angularCompilerOptions": { 26 | "strictInjectionParameters": true, 27 | "strictInputAccessModifiers": true, 28 | "strictTemplates": true 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /apps/client/loaders-mfe/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.app.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | }, 12 | { 13 | "path": "./tsconfig.editor.json" 14 | } 15 | ], 16 | "compilerOptions": { 17 | "forceConsistentCasingInFileNames": true, 18 | "strict": true, 19 | "noImplicitOverride": true, 20 | "noPropertyAccessFromIndexSignature": true, 21 | "noImplicitReturns": true, 22 | "noFallthroughCasesInSwitch": true, 23 | "target": "es2020" 24 | }, 25 | "angularCompilerOptions": { 26 | "strictInjectionParameters": true, 27 | "strictInputAccessModifiers": true, 28 | "strictTemplates": true 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /apps/client/loaders-mfe/src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { RouterModule, Routes } from '@angular/router'; 3 | 4 | import { StandaloneSpinnerComponent } from './standalone-spinner/standalone-spinner.component'; 5 | 6 | const routes: Routes = [ 7 | { 8 | path: 'spinner', 9 | loadChildren: () => import('./spinner/spinner.module').then((m) => m.SpinnerModule), 10 | }, 11 | { 12 | path: 'standalone-spinner', 13 | component: StandaloneSpinnerComponent, 14 | }, 15 | { 16 | path: '**', 17 | redirectTo: 'spinner', 18 | }, 19 | ]; 20 | 21 | @NgModule({ 22 | imports: [RouterModule.forRoot(routes, { initialNavigation: 'enabledBlocking' })], 23 | exports: [RouterModule], 24 | }) 25 | export class AppRoutingModule {} 26 | -------------------------------------------------------------------------------- /apps/server/users-ms/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { TypeOrmModule } from '@nestjs/typeorm'; 3 | 4 | import { UsersModule } from './modules/users/users.module'; 5 | 6 | @Module({ 7 | imports: [ 8 | TypeOrmModule.forRoot({ 9 | type: process.env.DB_TYPE as 'aurora-mysql', 10 | host: process.env.DB_HOST, 11 | port: Number(process.env.DB_PORT), 12 | username: process.env.DB_USER, 13 | password: process.env.DB_PASSWORD, 14 | database: process.env.DB_NAME, 15 | synchronize: !(process.env.NODE_ENV?.trim() === 'production'), 16 | autoLoadEntities: true, 17 | migrations: ['./migrations/*{.ts,.js}'], 18 | }), 19 | UsersModule, 20 | ], 21 | }) 22 | export class AppModule {} 23 | -------------------------------------------------------------------------------- /libs/client/auth/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'client-auth', 4 | preset: '../../../jest.preset.js', 5 | setupFilesAfterEnv: ['/src/test-setup.ts'], 6 | globals: { 7 | 'ts-jest': { 8 | tsconfig: '/tsconfig.spec.json', 9 | stringifyContentPathRegex: '\\.(html|svg)$', 10 | }, 11 | }, 12 | coverageDirectory: '../../../coverage/libs/client/auth', 13 | transform: { 14 | '^.+.(ts|mjs|js|html)$': 'jest-preset-angular', 15 | }, 16 | transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'], 17 | snapshotSerializers: [ 18 | 'jest-preset-angular/build/serializers/no-ng-attributes', 19 | 'jest-preset-angular/build/serializers/ng-snapshot', 20 | 'jest-preset-angular/build/serializers/html-comment', 21 | ], 22 | }; 23 | -------------------------------------------------------------------------------- /libs/client/core/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'client-core', 4 | preset: '../../../jest.preset.js', 5 | setupFilesAfterEnv: ['/src/test-setup.ts'], 6 | globals: { 7 | 'ts-jest': { 8 | tsconfig: '/tsconfig.spec.json', 9 | stringifyContentPathRegex: '\\.(html|svg)$', 10 | }, 11 | }, 12 | coverageDirectory: '../../../coverage/libs/client/core', 13 | transform: { 14 | '^.+.(ts|mjs|js|html)$': 'jest-preset-angular', 15 | }, 16 | transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'], 17 | snapshotSerializers: [ 18 | 'jest-preset-angular/build/serializers/no-ng-attributes', 19 | 'jest-preset-angular/build/serializers/ng-snapshot', 20 | 'jest-preset-angular/build/serializers/html-comment', 21 | ], 22 | }; 23 | -------------------------------------------------------------------------------- /libs/client/mfe/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'client-mfe', 4 | preset: '../../../jest.preset.js', 5 | setupFilesAfterEnv: ['/src/test-setup.ts'], 6 | globals: { 7 | 'ts-jest': { 8 | tsconfig: '/tsconfig.spec.json', 9 | stringifyContentPathRegex: '\\.(html|svg)$', 10 | }, 11 | }, 12 | coverageDirectory: '../../../coverage/libs/client/mfe', 13 | transform: { 14 | '^.+.(ts|mjs|js|html)$': 'jest-preset-angular', 15 | }, 16 | transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'], 17 | snapshotSerializers: [ 18 | 'jest-preset-angular/build/serializers/no-ng-attributes', 19 | 'jest-preset-angular/build/serializers/ng-snapshot', 20 | 'jest-preset-angular/build/serializers/html-comment', 21 | ], 22 | }; 23 | -------------------------------------------------------------------------------- /libs/server/common/src/lib/decorators/log-observable-error.decorator.ts: -------------------------------------------------------------------------------- 1 | import { Logger } from '@nestjs/common'; 2 | import { Observable, tap } from 'rxjs'; 3 | 4 | export function LogObservableError( 5 | logger: Logger = new Logger(), 6 | type: Exclude = 'log' 7 | ): MethodDecorator { 8 | return function ( 9 | _target: any, 10 | _propertyKey: string | symbol, 11 | descriptor: TypedPropertyDescriptor 12 | ): TypedPropertyDescriptor { 13 | const originalMethod = descriptor.value; 14 | 15 | descriptor.value = function (...args: any[]): Observable { 16 | return originalMethod.apply(this, args).pipe(tap({ error: (error) => logger[type](error) })); 17 | }; 18 | 19 | return descriptor; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /libs/client/common/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'client-common', 4 | preset: '../../../jest.preset.js', 5 | setupFilesAfterEnv: ['/src/test-setup.ts'], 6 | globals: { 7 | 'ts-jest': { 8 | tsconfig: '/tsconfig.spec.json', 9 | stringifyContentPathRegex: '\\.(html|svg)$', 10 | }, 11 | }, 12 | coverageDirectory: '../../../coverage/libs/client/common', 13 | transform: { 14 | '^.+.(ts|mjs|js|html)$': 'jest-preset-angular', 15 | }, 16 | transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'], 17 | snapshotSerializers: [ 18 | 'jest-preset-angular/build/serializers/no-ng-attributes', 19 | 'jest-preset-angular/build/serializers/ng-snapshot', 20 | 'jest-preset-angular/build/serializers/html-comment', 21 | ], 22 | }; 23 | -------------------------------------------------------------------------------- /libs/client/forms/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'client-forms', 4 | preset: '../../../jest.preset.js', 5 | setupFilesAfterEnv: ['/src/test-setup.ts'], 6 | globals: { 7 | 'ts-jest': { 8 | tsconfig: '/tsconfig.spec.json', 9 | stringifyContentPathRegex: '\\.(html|svg)$', 10 | }, 11 | }, 12 | coverageDirectory: '../../../coverage/libs/client/forms', 13 | transform: { 14 | '^.+.(ts|mjs|js|html)$': 'jest-preset-angular', 15 | }, 16 | transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'], 17 | snapshotSerializers: [ 18 | 'jest-preset-angular/build/serializers/no-ng-attributes', 19 | 'jest-preset-angular/build/serializers/ng-snapshot', 20 | 'jest-preset-angular/build/serializers/html-comment', 21 | ], 22 | }; 23 | -------------------------------------------------------------------------------- /apps/client/shell-app/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'client-shell', 4 | preset: '../../../jest.preset.js', 5 | setupFilesAfterEnv: ['/src/test-setup.ts'], 6 | globals: { 7 | 'ts-jest': { 8 | tsconfig: '/tsconfig.spec.json', 9 | stringifyContentPathRegex: '\\.(html|svg)$', 10 | }, 11 | }, 12 | coverageDirectory: '../../../coverage/apps/client/shell-app', 13 | transform: { 14 | '^.+.(ts|mjs|js|html)$': 'jest-preset-angular', 15 | }, 16 | transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'], 17 | snapshotSerializers: [ 18 | 'jest-preset-angular/build/serializers/no-ng-attributes', 19 | 'jest-preset-angular/build/serializers/ng-snapshot', 20 | 'jest-preset-angular/build/serializers/html-comment', 21 | ], 22 | }; 23 | -------------------------------------------------------------------------------- /apps/client/auth-mfe/.browserslistrc: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # For the full list of supported browsers by the Angular framework, please see: 6 | # https://angular.io/guide/browser-support 7 | 8 | # You can see what browsers were selected by your queries by running: 9 | # npx browserslist 10 | 11 | last 1 Chrome version 12 | last 1 Firefox version 13 | last 2 Edge major versions 14 | last 2 Safari major versions 15 | last 2 iOS major versions 16 | Firefox ESR 17 | not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line. 18 | -------------------------------------------------------------------------------- /apps/client/auth-mfe/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'client-auth-mfe', 4 | preset: '../../../jest.preset.js', 5 | setupFilesAfterEnv: ['/src/test-setup.ts'], 6 | globals: { 7 | 'ts-jest': { 8 | tsconfig: '/tsconfig.spec.json', 9 | stringifyContentPathRegex: '\\.(html|svg)$', 10 | }, 11 | }, 12 | coverageDirectory: '../../../coverage/apps/client/auth-mfe', 13 | transform: { 14 | '^.+.(ts|mjs|js|html)$': 'jest-preset-angular', 15 | }, 16 | transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'], 17 | snapshotSerializers: [ 18 | 'jest-preset-angular/build/serializers/no-ng-attributes', 19 | 'jest-preset-angular/build/serializers/ng-snapshot', 20 | 'jest-preset-angular/build/serializers/html-comment', 21 | ], 22 | }; 23 | -------------------------------------------------------------------------------- /apps/client/shell-app/.browserslistrc: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # For the full list of supported browsers by the Angular framework, please see: 6 | # https://angular.io/guide/browser-support 7 | 8 | # You can see what browsers were selected by your queries by running: 9 | # npx browserslist 10 | 11 | last 1 Chrome version 12 | last 1 Firefox version 13 | last 2 Edge major versions 14 | last 2 Safari major versions 15 | last 2 iOS major versions 16 | Firefox ESR 17 | not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line. 18 | -------------------------------------------------------------------------------- /apps/server/api-gateway/src/app/modules/auth/auth.strategy.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | import { PassportStrategy } from '@nestjs/passport'; 3 | import { AuthTokenPayload } from '@nx-mfe/server/domains'; 4 | import { ExtractJwt, Strategy } from 'passport-jwt'; 5 | 6 | @Injectable() 7 | export class AuthStrategy extends PassportStrategy(Strategy) { 8 | constructor() { 9 | super({ 10 | jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(), 11 | ignoreExpiration: false, 12 | secretOrKey: process.env.JWT_ACCESS_SECRET, 13 | }); 14 | } 15 | 16 | public async validate(payload: AuthTokenPayload): Promise { 17 | return new AuthTokenPayload({ 18 | id: payload.id, 19 | email: payload.email, 20 | }); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /libs/client/ui/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../../node_modules/nx/schemas/project-schema.json", 3 | "projectType": "library", 4 | "sourceRoot": "libs/client/ui/src", 5 | "prefix": "ui", 6 | "targets": { 7 | "test": { 8 | "executor": "@nrwl/jest:jest", 9 | "outputs": [ 10 | "coverage/libs/client/ui" 11 | ], 12 | "options": { 13 | "jestConfig": "libs/client/ui/jest.config.ts", 14 | "passWithNoTests": true 15 | } 16 | }, 17 | "lint": { 18 | "executor": "@nrwl/linter:eslint", 19 | "options": { 20 | "lintFilePatterns": [ 21 | "libs/client/ui/**/*.ts", 22 | "libs/client/ui/**/*.html" 23 | ] 24 | } 25 | } 26 | }, 27 | "tags": [ 28 | "scope:client" 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /apps/client/dashboard-mfe/.browserslistrc: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # For the full list of supported browsers by the Angular framework, please see: 6 | # https://angular.io/guide/browser-support 7 | 8 | # You can see what browsers were selected by your queries by running: 9 | # npx browserslist 10 | 11 | last 1 Chrome version 12 | last 1 Firefox version 13 | last 2 Edge major versions 14 | last 2 Safari major versions 15 | last 2 iOS major versions 16 | Firefox ESR 17 | not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line. 18 | -------------------------------------------------------------------------------- /apps/client/loaders-mfe/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'client-loaders-mfe', 4 | preset: '../../../jest.preset.js', 5 | setupFilesAfterEnv: ['/src/test-setup.ts'], 6 | globals: { 7 | 'ts-jest': { 8 | tsconfig: '/tsconfig.spec.json', 9 | stringifyContentPathRegex: '\\.(html|svg)$', 10 | }, 11 | }, 12 | coverageDirectory: '../../../coverage/apps/client/loaders-mfe', 13 | transform: { 14 | '^.+.(ts|mjs|js|html)$': 'jest-preset-angular', 15 | }, 16 | transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'], 17 | snapshotSerializers: [ 18 | 'jest-preset-angular/build/serializers/no-ng-attributes', 19 | 'jest-preset-angular/build/serializers/ng-snapshot', 20 | 'jest-preset-angular/build/serializers/html-comment', 21 | ], 22 | }; 23 | -------------------------------------------------------------------------------- /libs/client/environment/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'client-environment', 4 | preset: '../../../jest.preset.js', 5 | setupFilesAfterEnv: ['/src/test-setup.ts'], 6 | globals: { 7 | 'ts-jest': { 8 | tsconfig: '/tsconfig.spec.json', 9 | stringifyContentPathRegex: '\\.(html|svg)$', 10 | }, 11 | }, 12 | coverageDirectory: '../../../coverage/libs/client/environment', 13 | transform: { 14 | '^.+.(ts|mjs|js|html)$': 'jest-preset-angular', 15 | }, 16 | transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'], 17 | snapshotSerializers: [ 18 | 'jest-preset-angular/build/serializers/no-ng-attributes', 19 | 'jest-preset-angular/build/serializers/ng-snapshot', 20 | 'jest-preset-angular/build/serializers/html-comment', 21 | ], 22 | }; 23 | -------------------------------------------------------------------------------- /apps/client/dashboard-mfe/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'client-dashboard', 4 | preset: '../../../jest.preset.js', 5 | setupFilesAfterEnv: ['/src/test-setup.ts'], 6 | globals: { 7 | 'ts-jest': { 8 | tsconfig: '/tsconfig.spec.json', 9 | stringifyContentPathRegex: '\\.(html|svg)$', 10 | }, 11 | }, 12 | coverageDirectory: '../../../coverage/apps/client/dashboard-mfe', 13 | transform: { 14 | '^.+.(ts|mjs|js|html)$': 'jest-preset-angular', 15 | }, 16 | transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'], 17 | snapshotSerializers: [ 18 | 'jest-preset-angular/build/serializers/no-ng-attributes', 19 | 'jest-preset-angular/build/serializers/ng-snapshot', 20 | 'jest-preset-angular/build/serializers/html-comment', 21 | ], 22 | }; 23 | -------------------------------------------------------------------------------- /apps/client/fallbacks-mfe/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'client-fallbacks-mfe', 4 | preset: '../../../jest.preset.js', 5 | setupFilesAfterEnv: ['/src/test-setup.ts'], 6 | globals: { 7 | 'ts-jest': { 8 | tsconfig: '/tsconfig.spec.json', 9 | stringifyContentPathRegex: '\\.(html|svg)$', 10 | }, 11 | }, 12 | coverageDirectory: '../../../coverage/apps/client/fallbacks-mfe', 13 | transform: { 14 | '^.+.(ts|mjs|js|html)$': 'jest-preset-angular', 15 | }, 16 | transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'], 17 | snapshotSerializers: [ 18 | 'jest-preset-angular/build/serializers/no-ng-attributes', 19 | 'jest-preset-angular/build/serializers/ng-snapshot', 20 | 'jest-preset-angular/build/serializers/html-comment', 21 | ], 22 | }; 23 | -------------------------------------------------------------------------------- /apps/client/shell-app/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { HttpClientModule } from '@angular/common/http'; 2 | import { NgModule } from '@angular/core'; 3 | import { BrowserModule } from '@angular/platform-browser'; 4 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; 5 | import { CoreModule } from '@nx-mfe/client/core'; 6 | 7 | import { environment } from '../environments/environment'; 8 | import { AppComponent } from './app.component'; 9 | import { AppRoutingModule } from './app-routing.module'; 10 | 11 | @NgModule({ 12 | declarations: [AppComponent], 13 | imports: [ 14 | BrowserModule, 15 | BrowserAnimationsModule, 16 | HttpClientModule, 17 | AppRoutingModule, 18 | CoreModule.forRoot(environment), 19 | ], 20 | bootstrap: [AppComponent], 21 | }) 22 | export class AppModule {} 23 | --------------------------------------------------------------------------------