├── .devcontainer ├── Dockerfile └── devcontainer.json ├── .editorconfig ├── .gitattributes ├── .gitignore ├── .husky └── pre-commit ├── .jhipster ├── BankAccount.json ├── Label.json └── Operation.json ├── .lintstagedrc.cjs ├── .mvn ├── jvm.config └── wrapper │ ├── maven-wrapper.jar │ └── maven-wrapper.properties ├── .prettierignore ├── .prettierrc ├── .yo-rc.json ├── LICENSE.txt ├── README.md ├── checkstyle.xml ├── cypress-audits.config.ts ├── cypress.config.ts ├── eslint.config.mjs ├── jest.conf.js ├── mvnw ├── mvnw.cmd ├── npmw ├── npmw.cmd ├── package.json ├── pom.xml ├── postcss.config.js ├── sonar-project.properties ├── src ├── main │ ├── docker │ │ ├── app.yml │ │ ├── config │ │ │ └── mysql │ │ │ │ └── my.cnf │ │ ├── grafana │ │ │ └── provisioning │ │ │ │ ├── dashboards │ │ │ │ ├── JVM.json │ │ │ │ └── dashboard.yml │ │ │ │ └── datasources │ │ │ │ └── datasource.yml │ │ ├── jhipster-control-center.yml │ │ ├── jib │ │ │ └── entrypoint.sh │ │ ├── monitoring.yml │ │ ├── mysql.yml │ │ ├── prometheus │ │ │ └── prometheus.yml │ │ ├── services.yml │ │ └── sonar.yml │ ├── java │ │ └── io │ │ │ └── github │ │ │ └── jhipster │ │ │ └── sample │ │ │ ├── ApplicationWebXml.java │ │ │ ├── GeneratedByJHipster.java │ │ │ ├── JhipsterSampleApplicationReactApp.java │ │ │ ├── aop │ │ │ └── logging │ │ │ │ ├── LoggingAspect.java │ │ │ │ └── package-info.java │ │ │ ├── config │ │ │ ├── ApplicationProperties.java │ │ │ ├── AsyncConfiguration.java │ │ │ ├── CRLFLogConverter.java │ │ │ ├── CacheConfiguration.java │ │ │ ├── Constants.java │ │ │ ├── DatabaseConfiguration.java │ │ │ ├── DateTimeFormatConfiguration.java │ │ │ ├── JacksonConfiguration.java │ │ │ ├── LiquibaseConfiguration.java │ │ │ ├── LoggingAspectConfiguration.java │ │ │ ├── LoggingConfiguration.java │ │ │ ├── SecurityConfiguration.java │ │ │ ├── SecurityJwtConfiguration.java │ │ │ ├── StaticResourcesWebConfiguration.java │ │ │ ├── WebConfigurer.java │ │ │ └── package-info.java │ │ │ ├── domain │ │ │ ├── AbstractAuditingEntity.java │ │ │ ├── Authority.java │ │ │ ├── BankAccount.java │ │ │ ├── Label.java │ │ │ ├── Operation.java │ │ │ ├── User.java │ │ │ └── package-info.java │ │ │ ├── management │ │ │ ├── SecurityMetersService.java │ │ │ └── package-info.java │ │ │ ├── package-info.java │ │ │ ├── repository │ │ │ ├── AuthorityRepository.java │ │ │ ├── BankAccountRepository.java │ │ │ ├── LabelRepository.java │ │ │ ├── OperationRepository.java │ │ │ ├── OperationRepositoryWithBagRelationships.java │ │ │ ├── OperationRepositoryWithBagRelationshipsImpl.java │ │ │ ├── UserRepository.java │ │ │ └── package-info.java │ │ │ ├── security │ │ │ ├── AuthoritiesConstants.java │ │ │ ├── DomainUserDetailsService.java │ │ │ ├── SecurityUtils.java │ │ │ ├── SpringSecurityAuditorAware.java │ │ │ ├── UserNotActivatedException.java │ │ │ └── package-info.java │ │ │ ├── service │ │ │ ├── EmailAlreadyUsedException.java │ │ │ ├── InvalidPasswordException.java │ │ │ ├── MailService.java │ │ │ ├── UserService.java │ │ │ ├── UsernameAlreadyUsedException.java │ │ │ ├── dto │ │ │ │ ├── AdminUserDTO.java │ │ │ │ ├── BankAccountDTO.java │ │ │ │ ├── LabelDTO.java │ │ │ │ ├── OperationDTO.java │ │ │ │ ├── PasswordChangeDTO.java │ │ │ │ ├── UserDTO.java │ │ │ │ └── package-info.java │ │ │ ├── mapper │ │ │ │ ├── BankAccountMapper.java │ │ │ │ ├── EntityMapper.java │ │ │ │ ├── LabelMapper.java │ │ │ │ ├── OperationMapper.java │ │ │ │ ├── UserMapper.java │ │ │ │ └── package-info.java │ │ │ └── package-info.java │ │ │ └── web │ │ │ ├── filter │ │ │ ├── SpaWebFilter.java │ │ │ └── package-info.java │ │ │ └── rest │ │ │ ├── AccountResource.java │ │ │ ├── AuthenticateController.java │ │ │ ├── AuthorityResource.java │ │ │ ├── BankAccountResource.java │ │ │ ├── LabelResource.java │ │ │ ├── OperationResource.java │ │ │ ├── PublicUserResource.java │ │ │ ├── UserResource.java │ │ │ ├── errors │ │ │ ├── BadRequestAlertException.java │ │ │ ├── EmailAlreadyUsedException.java │ │ │ ├── ErrorConstants.java │ │ │ ├── ExceptionTranslator.java │ │ │ ├── FieldErrorVM.java │ │ │ ├── InvalidPasswordException.java │ │ │ ├── LoginAlreadyUsedException.java │ │ │ └── package-info.java │ │ │ ├── package-info.java │ │ │ └── vm │ │ │ ├── KeyAndPasswordVM.java │ │ │ ├── LoginVM.java │ │ │ ├── ManagedUserVM.java │ │ │ └── package-info.java │ ├── resources │ │ ├── .h2.server.properties │ │ ├── banner.txt │ │ ├── config │ │ │ ├── application-dev.yml │ │ │ ├── application-prod.yml │ │ │ ├── application-tls.yml │ │ │ ├── application.yml │ │ │ ├── liquibase │ │ │ │ ├── changelog │ │ │ │ │ ├── 00000000000000_initial_schema.xml │ │ │ │ │ ├── 20150805124838_added_entity_BankAccount.xml │ │ │ │ │ ├── 20150805124838_added_entity_constraints_BankAccount.xml │ │ │ │ │ ├── 20150805124936_added_entity_Label.xml │ │ │ │ │ ├── 20150805125054_added_entity_Operation.xml │ │ │ │ │ └── 20150805125054_added_entity_constraints_Operation.xml │ │ │ │ ├── data │ │ │ │ │ ├── authority.csv │ │ │ │ │ ├── user.csv │ │ │ │ │ └── user_authority.csv │ │ │ │ ├── fake-data │ │ │ │ │ ├── bank_account.csv │ │ │ │ │ ├── label.csv │ │ │ │ │ └── operation.csv │ │ │ │ └── master.xml │ │ │ └── tls │ │ │ │ └── keystore.p12 │ │ ├── i18n │ │ │ ├── messages.properties │ │ │ └── messages_en.properties │ │ ├── logback-spring.xml │ │ └── templates │ │ │ ├── error.html │ │ │ └── mail │ │ │ ├── activationEmail.html │ │ │ ├── creationEmail.html │ │ │ └── passwordResetEmail.html │ └── webapp │ │ ├── 404.html │ │ ├── WEB-INF │ │ └── web.xml │ │ ├── app │ │ ├── _bootstrap-variables.scss │ │ ├── app.scss │ │ ├── app.tsx │ │ ├── config │ │ │ ├── axios-interceptor.spec.ts │ │ │ ├── axios-interceptor.ts │ │ │ ├── constants.ts │ │ │ ├── dayjs.ts │ │ │ ├── error-middleware.ts │ │ │ ├── icon-loader.ts │ │ │ ├── logger-middleware.ts │ │ │ ├── notification-middleware.spec.ts │ │ │ ├── notification-middleware.ts │ │ │ ├── store.ts │ │ │ └── translation.ts │ │ ├── entities │ │ │ ├── bank-account │ │ │ │ ├── bank-account-delete-dialog.tsx │ │ │ │ ├── bank-account-detail.tsx │ │ │ │ ├── bank-account-reducer.spec.ts │ │ │ │ ├── bank-account-update.tsx │ │ │ │ ├── bank-account.reducer.ts │ │ │ │ ├── bank-account.tsx │ │ │ │ └── index.tsx │ │ │ ├── label │ │ │ │ ├── index.tsx │ │ │ │ ├── label-delete-dialog.tsx │ │ │ │ ├── label-detail.tsx │ │ │ │ ├── label-reducer.spec.ts │ │ │ │ ├── label-update.tsx │ │ │ │ ├── label.reducer.ts │ │ │ │ └── label.tsx │ │ │ ├── menu.tsx │ │ │ ├── operation │ │ │ │ ├── index.tsx │ │ │ │ ├── operation-delete-dialog.tsx │ │ │ │ ├── operation-detail.tsx │ │ │ │ ├── operation-reducer.spec.ts │ │ │ │ ├── operation-update.tsx │ │ │ │ ├── operation.reducer.ts │ │ │ │ └── operation.tsx │ │ │ ├── reducers.ts │ │ │ └── routes.tsx │ │ ├── index.tsx │ │ ├── modules │ │ │ ├── account │ │ │ │ ├── activate │ │ │ │ │ ├── activate.reducer.spec.ts │ │ │ │ │ ├── activate.reducer.ts │ │ │ │ │ └── activate.tsx │ │ │ │ ├── index.tsx │ │ │ │ ├── password-reset │ │ │ │ │ ├── finish │ │ │ │ │ │ └── password-reset-finish.tsx │ │ │ │ │ ├── init │ │ │ │ │ │ └── password-reset-init.tsx │ │ │ │ │ └── password-reset.reducer.ts │ │ │ │ ├── password │ │ │ │ │ ├── password.reducer.spec.ts │ │ │ │ │ ├── password.reducer.ts │ │ │ │ │ └── password.tsx │ │ │ │ ├── register │ │ │ │ │ ├── register.reducer.spec.ts │ │ │ │ │ ├── register.reducer.ts │ │ │ │ │ └── register.tsx │ │ │ │ └── settings │ │ │ │ │ ├── settings.reducer.spec.ts │ │ │ │ │ ├── settings.reducer.ts │ │ │ │ │ └── settings.tsx │ │ │ ├── administration │ │ │ │ ├── administration.reducer.spec.ts │ │ │ │ ├── administration.reducer.ts │ │ │ │ ├── configuration │ │ │ │ │ └── configuration.tsx │ │ │ │ ├── docs │ │ │ │ │ ├── docs.scss │ │ │ │ │ └── docs.tsx │ │ │ │ ├── health │ │ │ │ │ ├── health-modal.tsx │ │ │ │ │ └── health.tsx │ │ │ │ ├── index.tsx │ │ │ │ ├── logs │ │ │ │ │ └── logs.tsx │ │ │ │ ├── metrics │ │ │ │ │ └── metrics.tsx │ │ │ │ └── user-management │ │ │ │ │ ├── index.tsx │ │ │ │ │ ├── user-management-delete-dialog.tsx │ │ │ │ │ ├── user-management-detail.tsx │ │ │ │ │ ├── user-management-update.tsx │ │ │ │ │ ├── user-management.reducer.spec.ts │ │ │ │ │ ├── user-management.reducer.ts │ │ │ │ │ └── user-management.tsx │ │ │ ├── home │ │ │ │ ├── home.scss │ │ │ │ └── home.tsx │ │ │ └── login │ │ │ │ ├── login-modal.tsx │ │ │ │ ├── login.tsx │ │ │ │ └── logout.tsx │ │ ├── routes.tsx │ │ ├── setup-tests.ts │ │ ├── shared │ │ │ ├── DurationFormat.tsx │ │ │ ├── auth │ │ │ │ ├── private-route.spec.tsx │ │ │ │ └── private-route.tsx │ │ │ ├── error │ │ │ │ ├── error-boundary-routes.spec.tsx │ │ │ │ ├── error-boundary-routes.tsx │ │ │ │ ├── error-boundary.spec.tsx │ │ │ │ ├── error-boundary.tsx │ │ │ │ └── page-not-found.tsx │ │ │ ├── jhipster │ │ │ │ ├── headers.ts │ │ │ │ └── problem-details.ts │ │ │ ├── layout │ │ │ │ ├── footer │ │ │ │ │ ├── footer.scss │ │ │ │ │ └── footer.tsx │ │ │ │ ├── header │ │ │ │ │ ├── header-components.tsx │ │ │ │ │ ├── header.scss │ │ │ │ │ ├── header.spec.tsx │ │ │ │ │ └── header.tsx │ │ │ │ ├── menus │ │ │ │ │ ├── account.spec.tsx │ │ │ │ │ ├── account.tsx │ │ │ │ │ ├── admin.tsx │ │ │ │ │ ├── entities.tsx │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── locale.tsx │ │ │ │ │ ├── menu-components.tsx │ │ │ │ │ └── menu-item.tsx │ │ │ │ └── password │ │ │ │ │ ├── password-strength-bar.scss │ │ │ │ │ └── password-strength-bar.tsx │ │ │ ├── model │ │ │ │ ├── bank-account.model.ts │ │ │ │ ├── label.model.ts │ │ │ │ ├── operation.model.ts │ │ │ │ └── user.model.ts │ │ │ ├── reducers │ │ │ │ ├── application-profile.spec.ts │ │ │ │ ├── application-profile.ts │ │ │ │ ├── authentication.spec.ts │ │ │ │ ├── authentication.ts │ │ │ │ ├── index.ts │ │ │ │ ├── locale.spec.ts │ │ │ │ ├── locale.ts │ │ │ │ └── reducer.utils.ts │ │ │ └── util │ │ │ │ ├── date-utils.ts │ │ │ │ ├── entity-utils.spec.ts │ │ │ │ ├── entity-utils.ts │ │ │ │ └── pagination.constants.ts │ │ └── typings.d.ts │ │ ├── content │ │ ├── css │ │ │ └── loading.css │ │ └── images │ │ │ ├── jhipster_family_member_0.svg │ │ │ ├── jhipster_family_member_0_head-192.png │ │ │ ├── jhipster_family_member_0_head-256.png │ │ │ ├── jhipster_family_member_0_head-384.png │ │ │ ├── jhipster_family_member_0_head-512.png │ │ │ ├── jhipster_family_member_1.svg │ │ │ ├── jhipster_family_member_1_head-192.png │ │ │ ├── jhipster_family_member_1_head-256.png │ │ │ ├── jhipster_family_member_1_head-384.png │ │ │ ├── jhipster_family_member_1_head-512.png │ │ │ ├── jhipster_family_member_2.svg │ │ │ ├── jhipster_family_member_2_head-192.png │ │ │ ├── jhipster_family_member_2_head-256.png │ │ │ ├── jhipster_family_member_2_head-384.png │ │ │ ├── jhipster_family_member_2_head-512.png │ │ │ ├── jhipster_family_member_3.svg │ │ │ ├── jhipster_family_member_3_head-192.png │ │ │ ├── jhipster_family_member_3_head-256.png │ │ │ ├── jhipster_family_member_3_head-384.png │ │ │ ├── jhipster_family_member_3_head-512.png │ │ │ └── logo-jhipster.png │ │ ├── favicon.ico │ │ ├── i18n │ │ └── en │ │ │ ├── activate.json │ │ │ ├── bankAccount.json │ │ │ ├── configuration.json │ │ │ ├── error.json │ │ │ ├── global.json │ │ │ ├── health.json │ │ │ ├── home.json │ │ │ ├── label.json │ │ │ ├── login.json │ │ │ ├── logs.json │ │ │ ├── metrics.json │ │ │ ├── operation.json │ │ │ ├── password.json │ │ │ ├── register.json │ │ │ ├── reset.json │ │ │ ├── sessions.json │ │ │ ├── settings.json │ │ │ └── user-management.json │ │ ├── index.html │ │ ├── manifest.webapp │ │ ├── robots.txt │ │ └── swagger-ui │ │ └── index.html └── test │ ├── gatling │ └── conf │ │ ├── gatling.conf │ │ └── logback.xml │ ├── java │ ├── gatling │ │ └── simulations │ │ │ ├── BankAccountGatlingTest.java │ │ │ ├── LabelGatlingTest.java │ │ │ └── OperationGatlingTest.java │ └── io │ │ └── github │ │ └── jhipster │ │ └── sample │ │ ├── IntegrationTest.java │ │ ├── TechnicalStructureTest.java │ │ ├── config │ │ ├── AsyncSyncConfiguration.java │ │ ├── CRLFLogConverterTest.java │ │ ├── EmbeddedSQL.java │ │ ├── MysqlTestContainer.java │ │ ├── SpringBootTestClassOrderer.java │ │ ├── SqlTestContainer.java │ │ ├── SqlTestContainersSpringContextCustomizerFactory.java │ │ ├── StaticResourcesWebConfigurerTest.java │ │ ├── WebConfigurerTest.java │ │ ├── WebConfigurerTestController.java │ │ └── timezone │ │ │ └── HibernateTimeZoneIT.java │ │ ├── domain │ │ ├── AssertUtils.java │ │ ├── AuthorityAsserts.java │ │ ├── AuthorityTest.java │ │ ├── AuthorityTestSamples.java │ │ ├── BankAccountAsserts.java │ │ ├── BankAccountTest.java │ │ ├── BankAccountTestSamples.java │ │ ├── LabelAsserts.java │ │ ├── LabelTest.java │ │ ├── LabelTestSamples.java │ │ ├── OperationAsserts.java │ │ ├── OperationTest.java │ │ └── OperationTestSamples.java │ │ ├── management │ │ └── SecurityMetersServiceTests.java │ │ ├── repository │ │ └── timezone │ │ │ ├── DateTimeWrapper.java │ │ │ └── DateTimeWrapperRepository.java │ │ ├── security │ │ ├── DomainUserDetailsServiceIT.java │ │ ├── SecurityUtilsUnitTest.java │ │ └── jwt │ │ │ ├── AuthenticationIntegrationTest.java │ │ │ ├── JwtAuthenticationTestUtils.java │ │ │ ├── TokenAuthenticationIT.java │ │ │ └── TokenAuthenticationSecurityMetersIT.java │ │ ├── service │ │ ├── MailServiceIT.java │ │ ├── UserServiceIT.java │ │ ├── dto │ │ │ ├── BankAccountDTOTest.java │ │ │ ├── LabelDTOTest.java │ │ │ └── OperationDTOTest.java │ │ └── mapper │ │ │ ├── BankAccountMapperTest.java │ │ │ ├── LabelMapperTest.java │ │ │ ├── OperationMapperTest.java │ │ │ └── UserMapperTest.java │ │ └── web │ │ ├── filter │ │ └── SpaWebFilterIT.java │ │ └── rest │ │ ├── AccountResourceIT.java │ │ ├── AuthenticateControllerIT.java │ │ ├── AuthorityResourceIT.java │ │ ├── BankAccountResourceIT.java │ │ ├── LabelResourceIT.java │ │ ├── OperationResourceIT.java │ │ ├── PublicUserResourceIT.java │ │ ├── TestUtil.java │ │ ├── UserResourceIT.java │ │ ├── WithUnauthenticatedMockUser.java │ │ └── errors │ │ ├── ExceptionTranslatorIT.java │ │ └── ExceptionTranslatorTestController.java │ ├── javascript │ └── cypress │ │ ├── e2e │ │ ├── account │ │ │ ├── login-page.cy.ts │ │ │ ├── logout.cy.ts │ │ │ ├── password-page.cy.ts │ │ │ ├── register-page.cy.ts │ │ │ ├── reset-password-page.cy.ts │ │ │ └── settings-page.cy.ts │ │ ├── administration │ │ │ └── administration.cy.ts │ │ ├── entity │ │ │ ├── bank-account.cy.ts │ │ │ ├── label.cy.ts │ │ │ └── operation.cy.ts │ │ └── lighthouse.audits.ts │ │ ├── fixtures │ │ └── integration-test.png │ │ ├── plugins │ │ └── index.ts │ │ ├── support │ │ ├── account.ts │ │ ├── commands.ts │ │ ├── entity.ts │ │ ├── index.ts │ │ ├── management.ts │ │ └── navbar.ts │ │ └── tsconfig.json │ └── resources │ ├── META-INF │ └── spring.factories │ ├── config │ ├── application-testdev.yml │ ├── application-testprod.yml │ └── application.yml │ ├── i18n │ └── messages_en.properties │ ├── junit-platform.properties │ ├── logback.xml │ └── templates │ └── mail │ ├── activationEmail.html │ ├── creationEmail.html │ ├── passwordResetEmail.html │ └── testEmail.html ├── tsconfig.json ├── tsconfig.test.json └── webpack ├── environment.js ├── logo-jhipster.png ├── utils.js ├── webpack.common.js ├── webpack.dev.js └── webpack.prod.js /.devcontainer/Dockerfile: -------------------------------------------------------------------------------- 1 | # See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.209.6/containers/java/.devcontainer/base.Dockerfile 2 | 3 | # [Choice] Java version (use -bullseye variants on local arm64/Apple Silicon): 17, 17-bullseye, 17-buster 4 | ARG VARIANT="17" 5 | FROM mcr.microsoft.com/vscode/devcontainers/java:0-${VARIANT} 6 | 7 | # [Option] Install Maven 8 | ARG INSTALL_MAVEN="false" 9 | ARG MAVEN_VERSION="" 10 | # [Option] Install Gradle 11 | ARG INSTALL_GRADLE="false" 12 | ARG GRADLE_VERSION="" 13 | RUN if [ "${INSTALL_MAVEN}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/sdkman/bin/sdkman-init.sh && sdk install maven \"${MAVEN_VERSION}\""; fi \ 14 | && if [ "${INSTALL_GRADLE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/sdkman/bin/sdkman-init.sh && sdk install gradle \"${GRADLE_VERSION}\""; fi 15 | 16 | # [Choice] Node.js version: none, lts/*, 16, 14, 12, 10 17 | ARG NODE_VERSION="none" 18 | RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi 19 | 20 | # [Optional] Uncomment this section to install additional OS packages. 21 | # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ 22 | # && apt-get -y install --no-install-recommends 23 | 24 | # [Optional] Uncomment this line to install global node packages. 25 | # RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g " 2>&1 26 | -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | // For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: 2 | // https://github.com/microsoft/vscode-dev-containers/tree/v0.209.6/containers/java 3 | { 4 | "name": "JhipsterSampleApplicationReact", 5 | "build": { 6 | "dockerfile": "Dockerfile", 7 | "args": { 8 | // Update the VARIANT arg to pick a Java version: 17, 19 9 | // Append -bullseye or -buster to pin to an OS version. 10 | // Use the -bullseye variants on local arm64/Apple Silicon. 11 | "VARIANT": "17-bullseye", 12 | // Options 13 | // maven and gradle wrappers are used by default, we don't need them installed globally 14 | // "INSTALL_MAVEN": "true", 15 | // "INSTALL_GRADLE": "false", 16 | "NODE_VERSION": "22.15.0" 17 | } 18 | }, 19 | 20 | "customizations": { 21 | "vscode": { 22 | // Set *default* container specific settings.json values on container create. 23 | "settings": { 24 | "java.jdt.ls.java.home": "/docker-java-home" 25 | }, 26 | 27 | // Add the IDs of extensions you want installed when the container is created. 28 | "extensions": [ 29 | "christian-kohler.npm-intellisense", 30 | "firsttris.vscode-jest-runner", 31 | "ms-vscode.vscode-typescript-tslint-plugin", 32 | "dbaeumer.vscode-eslint", 33 | "vscjava.vscode-java-pack", 34 | "pivotal.vscode-boot-dev-pack", 35 | "esbenp.prettier-vscode" 36 | ] 37 | } 38 | }, 39 | 40 | // Use 'forwardPorts' to make a list of ports inside the container available locally. 41 | "forwardPorts": [9060, 3001, 9000, 8080], 42 | 43 | // Use 'postCreateCommand' to run commands after the container is created. 44 | // "postCreateCommand": "java -version", 45 | 46 | // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. 47 | "remoteUser": "vscode", 48 | "features": { 49 | "docker-in-docker": "latest", 50 | "docker-from-docker": "latest" 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | [*] 8 | 9 | # We recommend you to keep these unchanged 10 | end_of_line = lf 11 | charset = utf-8 12 | trim_trailing_whitespace = true 13 | insert_final_newline = true 14 | 15 | # Change these settings to your own preference 16 | indent_style = space 17 | indent_size = 2 18 | 19 | [*.md] 20 | trim_trailing_whitespace = false 21 | 22 | # Generated by jhipster:java:bootstrap generator 23 | [*.java] 24 | indent_size = 4 25 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | lint-staged 2 | -------------------------------------------------------------------------------- /.jhipster/BankAccount.json: -------------------------------------------------------------------------------- 1 | { 2 | "annotations": { 3 | "changelogDate": "20150805124838" 4 | }, 5 | "changelogDate": "20150805124838", 6 | "dto": "mapstruct", 7 | "entityTableName": "bank_account", 8 | "fields": [ 9 | { 10 | "fieldId": 1, 11 | "fieldName": "name", 12 | "fieldType": "String", 13 | "fieldValidateRules": ["required"] 14 | }, 15 | { 16 | "fieldId": 2, 17 | "fieldName": "balance", 18 | "fieldType": "BigDecimal", 19 | "fieldValidateRules": ["required"] 20 | } 21 | ], 22 | "name": "BankAccount", 23 | "pagination": "no", 24 | "relationships": [ 25 | { 26 | "otherEntityField": "login", 27 | "otherEntityName": "user", 28 | "relationshipId": 1, 29 | "relationshipName": "user", 30 | "relationshipSide": "left", 31 | "relationshipType": "many-to-one" 32 | }, 33 | { 34 | "otherEntityName": "operation", 35 | "otherEntityRelationshipName": "bankAccount", 36 | "relationshipId": 2, 37 | "relationshipName": "operation", 38 | "relationshipSide": "left", 39 | "relationshipType": "one-to-many" 40 | } 41 | ], 42 | "searchEngine": "no" 43 | } 44 | -------------------------------------------------------------------------------- /.jhipster/Label.json: -------------------------------------------------------------------------------- 1 | { 2 | "annotations": { 3 | "changelogDate": "20150805124936" 4 | }, 5 | "changelogDate": "20150805124936", 6 | "dto": "mapstruct", 7 | "entityTableName": "label", 8 | "fields": [ 9 | { 10 | "fieldId": 1, 11 | "fieldName": "label", 12 | "fieldType": "String", 13 | "fieldValidateRules": ["required", "minlength"], 14 | "fieldValidateRulesMinlength": "3" 15 | } 16 | ], 17 | "name": "Label", 18 | "pagination": "no", 19 | "relationships": [ 20 | { 21 | "otherEntityName": "operation", 22 | "otherEntityRelationshipName": "label", 23 | "ownerSide": false, 24 | "relationshipId": 1, 25 | "relationshipName": "operation", 26 | "relationshipSide": "right", 27 | "relationshipType": "many-to-many" 28 | } 29 | ], 30 | "searchEngine": "no" 31 | } 32 | -------------------------------------------------------------------------------- /.jhipster/Operation.json: -------------------------------------------------------------------------------- 1 | { 2 | "annotations": { 3 | "changelogDate": "20150805125054" 4 | }, 5 | "changelogDate": "20150805125054", 6 | "dto": "mapstruct", 7 | "entityTableName": "operation", 8 | "fields": [ 9 | { 10 | "fieldId": 1, 11 | "fieldName": "date", 12 | "fieldType": "Instant", 13 | "fieldValidateRules": ["required"] 14 | }, 15 | { 16 | "fieldId": 2, 17 | "fieldName": "description", 18 | "fieldType": "String" 19 | }, 20 | { 21 | "fieldId": 3, 22 | "fieldName": "amount", 23 | "fieldType": "BigDecimal", 24 | "fieldValidateRules": ["required"] 25 | } 26 | ], 27 | "name": "Operation", 28 | "pagination": "infinite-scroll", 29 | "relationships": [ 30 | { 31 | "otherEntityField": "name", 32 | "otherEntityName": "bankAccount", 33 | "relationshipId": 1, 34 | "relationshipName": "bankAccount", 35 | "relationshipSide": "left", 36 | "relationshipType": "many-to-one" 37 | }, 38 | { 39 | "otherEntityField": "label", 40 | "otherEntityName": "label", 41 | "ownerSide": true, 42 | "relationshipId": 2, 43 | "relationshipName": "label", 44 | "relationshipSide": "left", 45 | "relationshipType": "many-to-many" 46 | } 47 | ], 48 | "searchEngine": "no" 49 | } 50 | -------------------------------------------------------------------------------- /.lintstagedrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | '{,**/}*.{md,json,yml,js,cjs,mjs,ts,cts,mts,java,html,tsx,css,scss}': ['prettier --write'], 3 | }; 4 | -------------------------------------------------------------------------------- /.mvn/jvm.config: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhipster/jhipster-sample-app-react/d17fb1b9feec439c1ac66a0ed1c7c8b40b7cfe1f/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | wrapperVersion=3.3.2 18 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip 19 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | package-lock.json 3 | .git 4 | 5 | # Generated by jhipster:maven 6 | target 7 | .mvn 8 | 9 | # Generated by jhipster:client 10 | target/classes/static/ 11 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | printWidth: 140 2 | singleQuote: true 3 | tabWidth: 2 4 | useTabs: false 5 | arrowParens: avoid 6 | bracketSameLine: false 7 | plugins: 8 | - prettier-plugin-packagejson 9 | - prettier-plugin-java 10 | overrides: 11 | - files: "*.java" 12 | options: 13 | tabWidth: 4 14 | -------------------------------------------------------------------------------- /.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "authenticationType": "jwt", 5 | "baseName": "jhipsterSampleApplicationReact", 6 | "blueprints": [], 7 | "buildTool": "maven", 8 | "cacheProvider": "ehcache", 9 | "clientFramework": "react", 10 | "clientPackageManager": "npm", 11 | "clientTheme": "none", 12 | "clientThemeVariant": "", 13 | "clusteredHttpSession": false, 14 | "creationTimestamp": 1577000884780, 15 | "databaseType": "sql", 16 | "devDatabaseType": "h2Memory", 17 | "devServerPort": 9060, 18 | "dtoSuffix": "DTO", 19 | "embeddableLaunchScript": false, 20 | "enableGradleEnterprise": false, 21 | "enableHibernateCache": true, 22 | "enableSocialSignIn": false, 23 | "enableSwaggerCodegen": false, 24 | "enableTranslation": true, 25 | "entities": ["BankAccount", "Label", "Operation"], 26 | "entitySuffix": "", 27 | "hibernateCache": "ehcache", 28 | "jhiPrefix": "jhi", 29 | "jhipsterVersion": "8.11.0", 30 | "jwtSecretKey": "bXktc2VjcmV0LWtleS13aGljaC1zaG91bGQtYmUtY2hhbmdlZC1pbi1wcm9kdWN0aW9uLWFuZC1iZS1iYXNlNjQtZW5jb2RlZAo=", 31 | "languages": ["en"], 32 | "messageBroker": false, 33 | "nativeLanguage": "en", 34 | "otherModules": [], 35 | "packageFolder": "io/github/jhipster/sample", 36 | "packageName": "io.github.jhipster.sample", 37 | "pages": [], 38 | "prodDatabaseType": "mysql", 39 | "reactive": false, 40 | "searchEngine": false, 41 | "serverPort": 8080, 42 | "serviceDiscoveryType": false, 43 | "skipCheckLengthOfIdentifier": false, 44 | "skipClient": false, 45 | "skipFakeData": false, 46 | "skipServer": false, 47 | "skipUserManagement": false, 48 | "testFrameworks": ["gatling", "cypress"], 49 | "useCompass": false, 50 | "useSass": true, 51 | "websocket": false, 52 | "withAdminUi": true 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /checkstyle.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /cypress-audits.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'cypress'; 2 | import defaultConfig from './cypress.config'; 3 | 4 | export default defineConfig({ 5 | ...defaultConfig, 6 | e2e: { 7 | ...defaultConfig.e2e, 8 | specPattern: 'src/test/javascript/cypress/e2e/**/*.audits.ts', 9 | }, 10 | }); 11 | -------------------------------------------------------------------------------- /cypress.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'cypress'; 2 | 3 | export default defineConfig({ 4 | video: false, 5 | fixturesFolder: 'src/test/javascript/cypress/fixtures', 6 | screenshotsFolder: 'target/cypress/screenshots', 7 | downloadsFolder: 'target/cypress/downloads', 8 | videosFolder: 'target/cypress/videos', 9 | chromeWebSecurity: true, 10 | viewportWidth: 1200, 11 | viewportHeight: 720, 12 | retries: 2, 13 | scrollBehavior: 'center', 14 | env: { 15 | authenticationUrl: '/api/authenticate', 16 | jwtStorageName: 'jhi-authenticationToken', 17 | }, 18 | e2e: { 19 | // We've imported your old cypress plugins here. 20 | // You may want to clean this up later by importing these. 21 | async setupNodeEvents(on, config) { 22 | // eslint-disable-next-line @typescript-eslint/no-unsafe-return 23 | return (await import('./src/test/javascript/cypress/plugins/index')).default(on, config); 24 | }, 25 | baseUrl: 'http://localhost:8080/', 26 | specPattern: 'src/test/javascript/cypress/e2e/**/*.cy.ts', 27 | supportFile: 'src/test/javascript/cypress/support/index.ts', 28 | experimentalRunAllSpecs: true, 29 | }, 30 | }); 31 | -------------------------------------------------------------------------------- /npmw: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | basedir=$(dirname "$0") 4 | 5 | if [ -f "$basedir/mvnw" ]; then 6 | bindir="$basedir/target/node" 7 | repodir="$basedir/target/node/node_modules" 8 | installCommand="$basedir/mvnw --batch-mode -ntp -Pwebapp frontend:install-node-and-npm@install-node-and-npm" 9 | else 10 | echo "Using npm installed globally" 11 | exec npm "$@" 12 | fi 13 | 14 | NPM_EXE="$repodir/npm/bin/npm-cli.js" 15 | NODE_EXE="$bindir/node" 16 | 17 | if [ ! -x "$NPM_EXE" ] || [ ! -x "$NODE_EXE" ]; then 18 | $installCommand || true 19 | fi 20 | 21 | if [ -x "$NODE_EXE" ]; then 22 | echo "Using node installed locally $($NODE_EXE --version)" 23 | PATH="$bindir:$PATH" 24 | else 25 | NODE_EXE='node' 26 | fi 27 | 28 | if [ ! -x "$NPM_EXE" ]; then 29 | echo "Local npm not found, using npm installed globally" 30 | npm "$@" 31 | else 32 | echo "Using npm installed locally $($NODE_EXE $NPM_EXE --version)" 33 | $NODE_EXE $NPM_EXE "$@" 34 | fi 35 | -------------------------------------------------------------------------------- /npmw.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | setlocal 4 | 5 | set NPMW_DIR=%~dp0 6 | 7 | set NODE_EXE=^"^" 8 | set NODE_PATH=%NPMW_DIR%target\node\ 9 | set NPM_EXE=^"%NPMW_DIR%target\node\npm.cmd^" 10 | set INSTALL_NPM_COMMAND=^"%NPMW_DIR%mvnw.cmd^" -Pwebapp frontend:install-node-and-npm@install-node-and-npm 11 | 12 | if not exist %NPM_EXE% ( 13 | call %INSTALL_NPM_COMMAND% 14 | ) 15 | 16 | if exist %NODE_EXE% ( 17 | Rem execute local npm with local node, whilst adding local node location to the PATH for this CMD session 18 | endlocal & echo "%PATH%"|find /i "%NODE_PATH%;">nul || set "PATH=%NODE_PATH%;%PATH%" & call %NODE_EXE% %NPM_EXE% %* 19 | ) else if exist %NPM_EXE% ( 20 | Rem execute local npm, whilst adding local npm location to the PATH for this CMD session 21 | endlocal & echo "%PATH%"|find /i "%NODE_PATH%;">nul || set "PATH=%NODE_PATH%;%PATH%" & call %NPM_EXE% %* 22 | ) else ( 23 | call npm %* 24 | ) 25 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [require('autoprefixer')], 3 | }; 4 | -------------------------------------------------------------------------------- /src/main/docker/app.yml: -------------------------------------------------------------------------------- 1 | # This configuration is intended for development purpose, it's **your** responsibility to harden it for production 2 | name: jhipstersampleapplicationreact 3 | services: 4 | app: 5 | image: jhipstersampleapplicationreact 6 | environment: 7 | - _JAVA_OPTIONS=-Xmx512m -Xms256m 8 | - SPRING_PROFILES_ACTIVE=prod,api-docs 9 | - MANAGEMENT_PROMETHEUS_METRICS_EXPORT_ENABLED=true 10 | - SPRING_DATASOURCE_URL=jdbc:mysql://mysql:3306/jhipstersampleapplicationreact?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true 11 | - SPRING_LIQUIBASE_URL=jdbc:mysql://mysql:3306/jhipstersampleapplicationreact?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true 12 | ports: 13 | - 127.0.0.1:8080:8080 14 | healthcheck: 15 | test: 16 | - CMD 17 | - curl 18 | - -f 19 | - http://localhost:8080/management/health 20 | interval: 5s 21 | timeout: 5s 22 | retries: 40 23 | depends_on: 24 | mysql: 25 | condition: service_healthy 26 | mysql: 27 | extends: 28 | file: ./mysql.yml 29 | service: mysql 30 | -------------------------------------------------------------------------------- /src/main/docker/grafana/provisioning/dashboards/dashboard.yml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | 3 | providers: 4 | - name: 'Prometheus' 5 | orgId: 1 6 | folder: '' 7 | type: file 8 | disableDeletion: false 9 | editable: true 10 | options: 11 | path: /etc/grafana/provisioning/dashboards 12 | -------------------------------------------------------------------------------- /src/main/docker/grafana/provisioning/datasources/datasource.yml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | 3 | # list of datasources that should be deleted from the database 4 | deleteDatasources: 5 | - name: Prometheus 6 | orgId: 1 7 | 8 | # list of datasources to insert/update depending 9 | # whats available in the database 10 | datasources: 11 | # name of the datasource. Required 12 | - name: Prometheus 13 | # datasource type. Required 14 | type: prometheus 15 | # access mode. direct or proxy. Required 16 | access: proxy 17 | # org id. will default to orgId 1 if not specified 18 | orgId: 1 19 | # url 20 | # On MacOS, replace localhost by host.docker.internal 21 | url: http://localhost:9090 22 | # database password, if used 23 | password: 24 | # database user, if used 25 | user: 26 | # database name, if used 27 | database: 28 | # enable/disable basic auth 29 | basicAuth: false 30 | # basic auth username 31 | basicAuthUser: admin 32 | # basic auth password 33 | basicAuthPassword: admin 34 | # enable/disable with credentials headers 35 | withCredentials: 36 | # mark as default datasource. Max one per org 37 | isDefault: true 38 | # fields that will be converted to json and stored in json_data 39 | jsonData: 40 | graphiteVersion: '1.1' 41 | tlsAuth: false 42 | tlsAuthWithCACert: false 43 | # json object of data that will be encrypted. 44 | secureJsonData: 45 | tlsCACert: '...' 46 | tlsClientCert: '...' 47 | tlsClientKey: '...' 48 | version: 1 49 | # allow users to edit datasources from the UI. 50 | editable: true 51 | -------------------------------------------------------------------------------- /src/main/docker/jib/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "The application will start in ${JHIPSTER_SLEEP}s..." && sleep ${JHIPSTER_SLEEP} 4 | 5 | # usage: file_env VAR [DEFAULT] 6 | # ie: file_env 'XYZ_DB_PASSWORD' 'example' 7 | # (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of 8 | # "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature) 9 | file_env() { 10 | local var="$1" 11 | local fileVar="${var}_FILE" 12 | local def="${2:-}" 13 | if [[ ${!var:-} && ${!fileVar:-} ]]; then 14 | echo >&2 "error: both $var and $fileVar are set (but are exclusive)" 15 | exit 1 16 | fi 17 | local val="$def" 18 | if [[ ${!var:-} ]]; then 19 | val="${!var}" 20 | elif [[ ${!fileVar:-} ]]; then 21 | val="$(< "${!fileVar}")" 22 | fi 23 | 24 | if [[ -n $val ]]; then 25 | export "$var"="$val" 26 | fi 27 | 28 | unset "$fileVar" 29 | } 30 | 31 | file_env 'SPRING_DATASOURCE_URL' 32 | file_env 'SPRING_DATASOURCE_USERNAME' 33 | file_env 'SPRING_DATASOURCE_PASSWORD' 34 | file_env 'SPRING_LIQUIBASE_URL' 35 | file_env 'SPRING_LIQUIBASE_USER' 36 | file_env 'SPRING_LIQUIBASE_PASSWORD' 37 | file_env 'JHIPSTER_REGISTRY_PASSWORD' 38 | 39 | exec java ${JAVA_OPTS} -noverify -XX:+AlwaysPreTouch -Djava.security.egd=file:/dev/./urandom -cp /app/resources/:/app/classes/:/app/libs/* "io.github.jhipster.sample.JhipsterSampleApplicationReactApp" "$@" 40 | -------------------------------------------------------------------------------- /src/main/docker/monitoring.yml: -------------------------------------------------------------------------------- 1 | # This configuration is intended for development purpose, it's **your** responsibility to harden it for production 2 | name: jhipstersampleapplicationreact 3 | services: 4 | prometheus: 5 | image: prom/prometheus:v3.3.1 6 | volumes: 7 | - ./prometheus/:/etc/prometheus/ 8 | command: 9 | - '--config.file=/etc/prometheus/prometheus.yml' 10 | # If you want to expose these ports outside your dev PC, 11 | # remove the "127.0.0.1:" prefix 12 | ports: 13 | - 127.0.0.1:9090:9090 14 | # On MacOS, remove next line and replace localhost by host.docker.internal in prometheus/prometheus.yml and 15 | # grafana/provisioning/datasources/datasource.yml 16 | network_mode: 'host' # to test locally running service 17 | grafana: 18 | image: grafana/grafana:12.0.0 19 | volumes: 20 | - ./grafana/provisioning/:/etc/grafana/provisioning/ 21 | environment: 22 | - GF_SECURITY_ADMIN_PASSWORD=admin 23 | - GF_USERS_ALLOW_SIGN_UP=false 24 | - GF_INSTALL_PLUGINS=grafana-piechart-panel 25 | # If you want to expose these ports outside your dev PC, 26 | # remove the "127.0.0.1:" prefix 27 | ports: 28 | - 127.0.0.1:3000:3000 29 | # On MacOS, remove next line and replace localhost by host.docker.internal in prometheus/prometheus.yml and 30 | # grafana/provisioning/datasources/datasource.yml 31 | network_mode: 'host' # to test locally running service 32 | -------------------------------------------------------------------------------- /src/main/docker/mysql.yml: -------------------------------------------------------------------------------- 1 | # This configuration is intended for development purpose, it's **your** responsibility to harden it for production 2 | name: jhipstersampleapplicationreact 3 | services: 4 | mysql: 5 | image: mysql:9.2.0 6 | volumes: 7 | - ./config/mysql:/etc/mysql/conf.d 8 | environment: 9 | - MYSQL_ALLOW_EMPTY_PASSWORD=yes 10 | - MYSQL_DATABASE=jhipstersampleapplicationreact 11 | # If you want to expose these ports outside your dev PC, 12 | # remove the "127.0.0.1:" prefix 13 | ports: 14 | - 127.0.0.1:3306:3306 15 | command: mysqld --lower_case_table_names=1 --skip-mysqlx --character_set_server=utf8mb4 --explicit_defaults_for_timestamp 16 | healthcheck: 17 | test: ['CMD-SHELL', 'mysql -e "SHOW DATABASES;" && sleep 5'] 18 | interval: 5s 19 | timeout: 10s 20 | retries: 10 21 | -------------------------------------------------------------------------------- /src/main/docker/prometheus/prometheus.yml: -------------------------------------------------------------------------------- 1 | # Sample global config for monitoring JHipster applications 2 | global: 3 | scrape_interval: 15s # By default, scrape targets every 15 seconds. 4 | evaluation_interval: 15s # By default, scrape targets every 15 seconds. 5 | # scrape_timeout is set to the global default (10s). 6 | 7 | # Attach these labels to any time series or alerts when communicating with 8 | # external systems (federation, remote storage, Alertmanager). 9 | external_labels: 10 | monitor: 'jhipster' 11 | 12 | # A scrape configuration containing exactly one endpoint to scrape: 13 | # Here it's Prometheus itself. 14 | scrape_configs: 15 | # The job name is added as a label `job=` to any timeseries scraped from this config. 16 | - job_name: 'prometheus' 17 | 18 | # Override the global default and scrape targets from this job every 5 seconds. 19 | scrape_interval: 5s 20 | 21 | # scheme defaults to 'http' enable https in case your application is server via https 22 | #scheme: https 23 | # basic auth is not needed by default. See https://www.jhipster.tech/monitoring/#configuring-metrics-forwarding for details 24 | #basic_auth: 25 | # username: admin 26 | # password: admin 27 | metrics_path: /management/prometheus 28 | static_configs: 29 | - targets: 30 | # On MacOS, replace localhost by host.docker.internal 31 | - localhost:8080 32 | -------------------------------------------------------------------------------- /src/main/docker/services.yml: -------------------------------------------------------------------------------- 1 | # This configuration is intended for development purpose, it's **your** responsibility to harden it for production 2 | name: jhipstersampleapplicationreact 3 | services: 4 | mysql: 5 | extends: 6 | file: ./mysql.yml 7 | service: mysql 8 | profiles: 9 | - '' 10 | - prod 11 | -------------------------------------------------------------------------------- /src/main/docker/sonar.yml: -------------------------------------------------------------------------------- 1 | # This configuration is intended for development purpose, it's **your** responsibility to harden it for production 2 | name: jhipstersampleapplicationreact 3 | services: 4 | sonar: 5 | container_name: sonarqube 6 | image: sonarqube:25.5.0.107428-community 7 | # Forced authentication redirect for UI is turned off for out of the box experience while trying out SonarQube 8 | # For real use cases delete SONAR_FORCEAUTHENTICATION variable or set SONAR_FORCEAUTHENTICATION=true 9 | environment: 10 | - SONAR_FORCEAUTHENTICATION=false 11 | # If you want to expose these ports outside your dev PC, 12 | # remove the "127.0.0.1:" prefix 13 | ports: 14 | - 127.0.0.1:9001:9000 15 | - 127.0.0.1:9000:9000 16 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/ApplicationWebXml.java: -------------------------------------------------------------------------------- 1 | package io.github.jhipster.sample; 2 | 3 | import org.springframework.boot.builder.SpringApplicationBuilder; 4 | import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; 5 | import tech.jhipster.config.DefaultProfileUtil; 6 | 7 | /** 8 | * This is a helper Java class that provides an alternative to creating a {@code web.xml}. 9 | * This will be invoked only when the application is deployed to a Servlet container like Tomcat, JBoss etc. 10 | */ 11 | public class ApplicationWebXml extends SpringBootServletInitializer { 12 | 13 | @Override 14 | protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { 15 | // set a default to use when no profile is configured. 16 | DefaultProfileUtil.addDefaultProfile(application.application()); 17 | return application.sources(JhipsterSampleApplicationReactApp.class); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/GeneratedByJHipster.java: -------------------------------------------------------------------------------- 1 | package io.github.jhipster.sample; 2 | 3 | import jakarta.annotation.Generated; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | @Generated(value = "JHipster", comments = "Generated by JHipster 8.11.0") 10 | @Retention(RetentionPolicy.SOURCE) 11 | @Target({ ElementType.TYPE }) 12 | public @interface GeneratedByJHipster { 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/aop/logging/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Logging aspect. 3 | */ 4 | package io.github.jhipster.sample.aop.logging; 5 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/config/ApplicationProperties.java: -------------------------------------------------------------------------------- 1 | package io.github.jhipster.sample.config; 2 | 3 | import org.springframework.boot.context.properties.ConfigurationProperties; 4 | 5 | /** 6 | * Properties specific to Jhipster Sample Application React. 7 | *

8 | * Properties are configured in the {@code application.yml} file. 9 | * See {@link tech.jhipster.config.JHipsterProperties} for a good example. 10 | */ 11 | @ConfigurationProperties(prefix = "application", ignoreUnknownFields = false) 12 | public class ApplicationProperties { 13 | 14 | private final Liquibase liquibase = new Liquibase(); 15 | 16 | // jhipster-needle-application-properties-property 17 | 18 | public Liquibase getLiquibase() { 19 | return liquibase; 20 | } 21 | 22 | // jhipster-needle-application-properties-property-getter 23 | 24 | public static class Liquibase { 25 | 26 | private Boolean asyncStart = true; 27 | 28 | public Boolean getAsyncStart() { 29 | return asyncStart; 30 | } 31 | 32 | public void setAsyncStart(Boolean asyncStart) { 33 | this.asyncStart = asyncStart; 34 | } 35 | } 36 | // jhipster-needle-application-properties-property-class 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/config/Constants.java: -------------------------------------------------------------------------------- 1 | package io.github.jhipster.sample.config; 2 | 3 | /** 4 | * Application constants. 5 | */ 6 | public final class Constants { 7 | 8 | // Regex for acceptable logins 9 | public static final String LOGIN_REGEX = "^(?>[a-zA-Z0-9!$&*+=?^_`{|}~.-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*)|(?>[_.@A-Za-z0-9-]+)$"; 10 | 11 | public static final String SYSTEM = "system"; 12 | public static final String DEFAULT_LANGUAGE = "en"; 13 | 14 | private Constants() {} 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/config/DateTimeFormatConfiguration.java: -------------------------------------------------------------------------------- 1 | package io.github.jhipster.sample.config; 2 | 3 | import org.springframework.context.annotation.Configuration; 4 | import org.springframework.format.FormatterRegistry; 5 | import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar; 6 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 7 | 8 | /** 9 | * Configure the converters to use the ISO format for dates by default. 10 | */ 11 | @Configuration 12 | public class DateTimeFormatConfiguration implements WebMvcConfigurer { 13 | 14 | @Override 15 | public void addFormatters(FormatterRegistry registry) { 16 | DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar(); 17 | registrar.setUseIsoFormat(true); 18 | registrar.registerFormatters(registry); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/config/JacksonConfiguration.java: -------------------------------------------------------------------------------- 1 | package io.github.jhipster.sample.config; 2 | 3 | import com.fasterxml.jackson.core.JsonGenerator; 4 | import com.fasterxml.jackson.databind.JsonSerializer; 5 | import com.fasterxml.jackson.databind.SerializerProvider; 6 | import com.fasterxml.jackson.datatype.hibernate6.Hibernate6Module; 7 | import com.fasterxml.jackson.datatype.hibernate6.Hibernate6Module.Feature; 8 | import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; 9 | import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; 10 | import java.io.IOException; 11 | import java.time.LocalTime; 12 | import org.springframework.context.annotation.Bean; 13 | import org.springframework.context.annotation.Configuration; 14 | 15 | @Configuration 16 | public class JacksonConfiguration { 17 | 18 | /** 19 | * Support for Java date and time API. 20 | * @return the corresponding Jackson module. 21 | */ 22 | @Bean 23 | public JavaTimeModule javaTimeModule() { 24 | final JavaTimeModule javaTime = new JavaTimeModule(); 25 | javaTime.addSerializer( 26 | LocalTime.class, 27 | new JsonSerializer() { 28 | @Override 29 | public void serialize(LocalTime value, JsonGenerator gen, SerializerProvider serializers) throws IOException { 30 | gen.writeString(value.toString()); 31 | } 32 | } 33 | ); 34 | return javaTime; 35 | } 36 | 37 | @Bean 38 | public Jdk8Module jdk8TimeModule() { 39 | return new Jdk8Module(); 40 | } 41 | 42 | /* 43 | * Support for Hibernate types in Jackson. 44 | */ 45 | @Bean 46 | public Hibernate6Module hibernate6Module() { 47 | return new Hibernate6Module().configure(Feature.SERIALIZE_IDENTIFIER_FOR_LAZY_NOT_LOADED_OBJECTS, true); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/config/LoggingAspectConfiguration.java: -------------------------------------------------------------------------------- 1 | package io.github.jhipster.sample.config; 2 | 3 | import io.github.jhipster.sample.aop.logging.LoggingAspect; 4 | import org.springframework.context.annotation.*; 5 | import org.springframework.core.env.Environment; 6 | import tech.jhipster.config.JHipsterConstants; 7 | 8 | @Configuration 9 | @EnableAspectJAutoProxy 10 | public class LoggingAspectConfiguration { 11 | 12 | @Bean 13 | @Profile(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) 14 | public LoggingAspect loggingAspect(Environment env) { 15 | return new LoggingAspect(env); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/config/LoggingConfiguration.java: -------------------------------------------------------------------------------- 1 | package io.github.jhipster.sample.config; 2 | 3 | import static tech.jhipster.config.logging.LoggingUtils.*; 4 | 5 | import ch.qos.logback.classic.LoggerContext; 6 | import com.fasterxml.jackson.core.JsonProcessingException; 7 | import com.fasterxml.jackson.databind.ObjectMapper; 8 | import java.util.HashMap; 9 | import java.util.Map; 10 | import org.slf4j.LoggerFactory; 11 | import org.springframework.beans.factory.annotation.Value; 12 | import org.springframework.context.annotation.Configuration; 13 | import tech.jhipster.config.JHipsterProperties; 14 | 15 | /* 16 | * Configures the console and Logstash log appenders from the app properties 17 | */ 18 | @Configuration 19 | public class LoggingConfiguration { 20 | 21 | public LoggingConfiguration( 22 | @Value("${spring.application.name}") String appName, 23 | @Value("${server.port}") String serverPort, 24 | JHipsterProperties jHipsterProperties, 25 | ObjectMapper mapper 26 | ) throws JsonProcessingException { 27 | LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); 28 | 29 | Map map = new HashMap<>(); 30 | map.put("app_name", appName); 31 | map.put("app_port", serverPort); 32 | String customFields = mapper.writeValueAsString(map); 33 | 34 | JHipsterProperties.Logging loggingProperties = jHipsterProperties.getLogging(); 35 | JHipsterProperties.Logging.Logstash logstashProperties = loggingProperties.getLogstash(); 36 | 37 | if (loggingProperties.isUseJsonFormat()) { 38 | addJsonConsoleAppender(context, customFields); 39 | } 40 | if (logstashProperties.isEnabled()) { 41 | addLogstashTcpSocketAppender(context, customFields, logstashProperties); 42 | } 43 | if (loggingProperties.isUseJsonFormat() || logstashProperties.isEnabled()) { 44 | addContextListener(context, customFields, loggingProperties); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/config/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Application configuration. 3 | */ 4 | package io.github.jhipster.sample.config; 5 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/domain/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Domain objects. 3 | */ 4 | package io.github.jhipster.sample.domain; 5 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/management/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Application management. 3 | */ 4 | package io.github.jhipster.sample.management; 5 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Application root. 3 | */ 4 | package io.github.jhipster.sample; 5 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/repository/AuthorityRepository.java: -------------------------------------------------------------------------------- 1 | package io.github.jhipster.sample.repository; 2 | 3 | import io.github.jhipster.sample.domain.Authority; 4 | import org.springframework.data.jpa.repository.*; 5 | import org.springframework.stereotype.Repository; 6 | 7 | /** 8 | * Spring Data JPA repository for the Authority entity. 9 | */ 10 | @SuppressWarnings("unused") 11 | @Repository 12 | public interface AuthorityRepository extends JpaRepository {} 13 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/repository/BankAccountRepository.java: -------------------------------------------------------------------------------- 1 | package io.github.jhipster.sample.repository; 2 | 3 | import io.github.jhipster.sample.domain.BankAccount; 4 | import java.util.List; 5 | import java.util.Optional; 6 | import org.springframework.data.domain.Page; 7 | import org.springframework.data.domain.Pageable; 8 | import org.springframework.data.jpa.repository.*; 9 | import org.springframework.data.repository.query.Param; 10 | import org.springframework.stereotype.Repository; 11 | 12 | /** 13 | * Spring Data JPA repository for the BankAccount entity. 14 | */ 15 | @Repository 16 | public interface BankAccountRepository extends JpaRepository { 17 | @Query("select bankAccount from BankAccount bankAccount where bankAccount.user.login = ?#{authentication.name}") 18 | List findByUserIsCurrentUser(); 19 | 20 | default Optional findOneWithEagerRelationships(Long id) { 21 | return this.findOneWithToOneRelationships(id); 22 | } 23 | 24 | default List findAllWithEagerRelationships() { 25 | return this.findAllWithToOneRelationships(); 26 | } 27 | 28 | default Page findAllWithEagerRelationships(Pageable pageable) { 29 | return this.findAllWithToOneRelationships(pageable); 30 | } 31 | 32 | @Query( 33 | value = "select bankAccount from BankAccount bankAccount left join fetch bankAccount.user", 34 | countQuery = "select count(bankAccount) from BankAccount bankAccount" 35 | ) 36 | Page findAllWithToOneRelationships(Pageable pageable); 37 | 38 | @Query("select bankAccount from BankAccount bankAccount left join fetch bankAccount.user") 39 | List findAllWithToOneRelationships(); 40 | 41 | @Query("select bankAccount from BankAccount bankAccount left join fetch bankAccount.user where bankAccount.id =:id") 42 | Optional findOneWithToOneRelationships(@Param("id") Long id); 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/repository/LabelRepository.java: -------------------------------------------------------------------------------- 1 | package io.github.jhipster.sample.repository; 2 | 3 | import io.github.jhipster.sample.domain.Label; 4 | import org.springframework.data.jpa.repository.*; 5 | import org.springframework.stereotype.Repository; 6 | 7 | /** 8 | * Spring Data JPA repository for the Label entity. 9 | */ 10 | @SuppressWarnings("unused") 11 | @Repository 12 | public interface LabelRepository extends JpaRepository {} 13 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/repository/OperationRepository.java: -------------------------------------------------------------------------------- 1 | package io.github.jhipster.sample.repository; 2 | 3 | import io.github.jhipster.sample.domain.Operation; 4 | import java.util.List; 5 | import java.util.Optional; 6 | import org.springframework.data.domain.Page; 7 | import org.springframework.data.domain.Pageable; 8 | import org.springframework.data.jpa.repository.*; 9 | import org.springframework.data.repository.query.Param; 10 | import org.springframework.stereotype.Repository; 11 | 12 | /** 13 | * Spring Data JPA repository for the Operation entity. 14 | * 15 | * When extending this class, extend OperationRepositoryWithBagRelationships too. 16 | * For more information refer to https://github.com/jhipster/generator-jhipster/issues/17990. 17 | */ 18 | @Repository 19 | public interface OperationRepository extends OperationRepositoryWithBagRelationships, JpaRepository { 20 | default Optional findOneWithEagerRelationships(Long id) { 21 | return this.fetchBagRelationships(this.findOneWithToOneRelationships(id)); 22 | } 23 | 24 | default List findAllWithEagerRelationships() { 25 | return this.fetchBagRelationships(this.findAllWithToOneRelationships()); 26 | } 27 | 28 | default Page findAllWithEagerRelationships(Pageable pageable) { 29 | return this.fetchBagRelationships(this.findAllWithToOneRelationships(pageable)); 30 | } 31 | 32 | @Query( 33 | value = "select operation from Operation operation left join fetch operation.bankAccount", 34 | countQuery = "select count(operation) from Operation operation" 35 | ) 36 | Page findAllWithToOneRelationships(Pageable pageable); 37 | 38 | @Query("select operation from Operation operation left join fetch operation.bankAccount") 39 | List findAllWithToOneRelationships(); 40 | 41 | @Query("select operation from Operation operation left join fetch operation.bankAccount where operation.id =:id") 42 | Optional findOneWithToOneRelationships(@Param("id") Long id); 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/repository/OperationRepositoryWithBagRelationships.java: -------------------------------------------------------------------------------- 1 | package io.github.jhipster.sample.repository; 2 | 3 | import io.github.jhipster.sample.domain.Operation; 4 | import java.util.List; 5 | import java.util.Optional; 6 | import org.springframework.data.domain.Page; 7 | 8 | public interface OperationRepositoryWithBagRelationships { 9 | Optional fetchBagRelationships(Optional operation); 10 | 11 | List fetchBagRelationships(List operations); 12 | 13 | Page fetchBagRelationships(Page operations); 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/repository/UserRepository.java: -------------------------------------------------------------------------------- 1 | package io.github.jhipster.sample.repository; 2 | 3 | import io.github.jhipster.sample.domain.User; 4 | import java.time.Instant; 5 | import java.util.List; 6 | import java.util.Optional; 7 | import org.springframework.cache.annotation.Cacheable; 8 | import org.springframework.data.domain.*; 9 | import org.springframework.data.jpa.repository.EntityGraph; 10 | import org.springframework.data.jpa.repository.JpaRepository; 11 | import org.springframework.stereotype.Repository; 12 | 13 | /** 14 | * Spring Data JPA repository for the {@link User} entity. 15 | */ 16 | @Repository 17 | public interface UserRepository extends JpaRepository { 18 | String USERS_BY_LOGIN_CACHE = "usersByLogin"; 19 | 20 | String USERS_BY_EMAIL_CACHE = "usersByEmail"; 21 | Optional findOneByActivationKey(String activationKey); 22 | List findAllByActivatedIsFalseAndActivationKeyIsNotNullAndCreatedDateBefore(Instant dateTime); 23 | Optional findOneByResetKey(String resetKey); 24 | Optional findOneByEmailIgnoreCase(String email); 25 | Optional findOneByLogin(String login); 26 | 27 | @EntityGraph(attributePaths = "authorities") 28 | @Cacheable(cacheNames = USERS_BY_LOGIN_CACHE, unless = "#result == null") 29 | Optional findOneWithAuthoritiesByLogin(String login); 30 | 31 | @EntityGraph(attributePaths = "authorities") 32 | @Cacheable(cacheNames = USERS_BY_EMAIL_CACHE, unless = "#result == null") 33 | Optional findOneWithAuthoritiesByEmailIgnoreCase(String email); 34 | 35 | Page findAllByIdNotNullAndActivatedIsTrue(Pageable pageable); 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/repository/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Repository layer. 3 | */ 4 | package io.github.jhipster.sample.repository; 5 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/security/AuthoritiesConstants.java: -------------------------------------------------------------------------------- 1 | package io.github.jhipster.sample.security; 2 | 3 | /** 4 | * Constants for Spring Security authorities. 5 | */ 6 | public final class AuthoritiesConstants { 7 | 8 | public static final String ADMIN = "ROLE_ADMIN"; 9 | 10 | public static final String USER = "ROLE_USER"; 11 | 12 | public static final String ANONYMOUS = "ROLE_ANONYMOUS"; 13 | 14 | private AuthoritiesConstants() {} 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/security/SpringSecurityAuditorAware.java: -------------------------------------------------------------------------------- 1 | package io.github.jhipster.sample.security; 2 | 3 | import io.github.jhipster.sample.config.Constants; 4 | import java.util.Optional; 5 | import org.springframework.data.domain.AuditorAware; 6 | import org.springframework.stereotype.Component; 7 | 8 | /** 9 | * Implementation of {@link AuditorAware} based on Spring Security. 10 | */ 11 | @Component 12 | public class SpringSecurityAuditorAware implements AuditorAware { 13 | 14 | @Override 15 | public Optional getCurrentAuditor() { 16 | return Optional.of(SecurityUtils.getCurrentUserLogin().orElse(Constants.SYSTEM)); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/security/UserNotActivatedException.java: -------------------------------------------------------------------------------- 1 | package io.github.jhipster.sample.security; 2 | 3 | import org.springframework.security.core.AuthenticationException; 4 | 5 | /** 6 | * This exception is thrown in case of a not activated user trying to authenticate. 7 | */ 8 | public class UserNotActivatedException extends AuthenticationException { 9 | 10 | private static final long serialVersionUID = 1L; 11 | 12 | public UserNotActivatedException(String message) { 13 | super(message); 14 | } 15 | 16 | public UserNotActivatedException(String message, Throwable t) { 17 | super(message, t); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/security/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Application security utilities. 3 | */ 4 | package io.github.jhipster.sample.security; 5 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/service/EmailAlreadyUsedException.java: -------------------------------------------------------------------------------- 1 | package io.github.jhipster.sample.service; 2 | 3 | public class EmailAlreadyUsedException extends RuntimeException { 4 | 5 | private static final long serialVersionUID = 1L; 6 | 7 | public EmailAlreadyUsedException() { 8 | super("Email is already in use!"); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/service/InvalidPasswordException.java: -------------------------------------------------------------------------------- 1 | package io.github.jhipster.sample.service; 2 | 3 | public class InvalidPasswordException extends RuntimeException { 4 | 5 | private static final long serialVersionUID = 1L; 6 | 7 | public InvalidPasswordException() { 8 | super("Incorrect password"); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/service/UsernameAlreadyUsedException.java: -------------------------------------------------------------------------------- 1 | package io.github.jhipster.sample.service; 2 | 3 | public class UsernameAlreadyUsedException extends RuntimeException { 4 | 5 | private static final long serialVersionUID = 1L; 6 | 7 | public UsernameAlreadyUsedException() { 8 | super("Login name already used!"); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/service/dto/LabelDTO.java: -------------------------------------------------------------------------------- 1 | package io.github.jhipster.sample.service.dto; 2 | 3 | import jakarta.validation.constraints.*; 4 | import java.io.Serializable; 5 | import java.util.HashSet; 6 | import java.util.Objects; 7 | import java.util.Set; 8 | 9 | /** 10 | * A DTO for the {@link io.github.jhipster.sample.domain.Label} entity. 11 | */ 12 | @SuppressWarnings("common-java:DuplicatedBlocks") 13 | public class LabelDTO implements Serializable { 14 | 15 | private Long id; 16 | 17 | @NotNull 18 | @Size(min = 3) 19 | private String label; 20 | 21 | private Set operations = new HashSet<>(); 22 | 23 | public Long getId() { 24 | return id; 25 | } 26 | 27 | public void setId(Long id) { 28 | this.id = id; 29 | } 30 | 31 | public String getLabel() { 32 | return label; 33 | } 34 | 35 | public void setLabel(String label) { 36 | this.label = label; 37 | } 38 | 39 | public Set getOperations() { 40 | return operations; 41 | } 42 | 43 | public void setOperations(Set operations) { 44 | this.operations = operations; 45 | } 46 | 47 | @Override 48 | public boolean equals(Object o) { 49 | if (this == o) { 50 | return true; 51 | } 52 | if (!(o instanceof LabelDTO)) { 53 | return false; 54 | } 55 | 56 | LabelDTO labelDTO = (LabelDTO) o; 57 | if (this.id == null) { 58 | return false; 59 | } 60 | return Objects.equals(this.id, labelDTO.id); 61 | } 62 | 63 | @Override 64 | public int hashCode() { 65 | return Objects.hash(this.id); 66 | } 67 | 68 | // prettier-ignore 69 | @Override 70 | public String toString() { 71 | return "LabelDTO{" + 72 | "id=" + getId() + 73 | ", label='" + getLabel() + "'" + 74 | ", operations=" + getOperations() + 75 | "}"; 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/service/dto/PasswordChangeDTO.java: -------------------------------------------------------------------------------- 1 | package io.github.jhipster.sample.service.dto; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * A DTO representing a password change required data - current and new password. 7 | */ 8 | public class PasswordChangeDTO implements Serializable { 9 | 10 | private static final long serialVersionUID = 1L; 11 | 12 | private String currentPassword; 13 | private String newPassword; 14 | 15 | public PasswordChangeDTO() { 16 | // Empty constructor needed for Jackson. 17 | } 18 | 19 | public PasswordChangeDTO(String currentPassword, String newPassword) { 20 | this.currentPassword = currentPassword; 21 | this.newPassword = newPassword; 22 | } 23 | 24 | public String getCurrentPassword() { 25 | return currentPassword; 26 | } 27 | 28 | public void setCurrentPassword(String currentPassword) { 29 | this.currentPassword = currentPassword; 30 | } 31 | 32 | public String getNewPassword() { 33 | return newPassword; 34 | } 35 | 36 | public void setNewPassword(String newPassword) { 37 | this.newPassword = newPassword; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/service/dto/UserDTO.java: -------------------------------------------------------------------------------- 1 | package io.github.jhipster.sample.service.dto; 2 | 3 | import io.github.jhipster.sample.domain.User; 4 | import java.io.Serializable; 5 | import java.util.Objects; 6 | 7 | /** 8 | * A DTO representing a user, with only the public attributes. 9 | */ 10 | public class UserDTO implements Serializable { 11 | 12 | private static final long serialVersionUID = 1L; 13 | 14 | private Long id; 15 | 16 | private String login; 17 | 18 | public UserDTO() { 19 | // Empty constructor needed for Jackson. 20 | } 21 | 22 | public UserDTO(User user) { 23 | this.id = user.getId(); 24 | // Customize it here if you need, or not, firstName/lastName/etc 25 | this.login = user.getLogin(); 26 | } 27 | 28 | public Long getId() { 29 | return id; 30 | } 31 | 32 | public void setId(Long id) { 33 | this.id = id; 34 | } 35 | 36 | public String getLogin() { 37 | return login; 38 | } 39 | 40 | public void setLogin(String login) { 41 | this.login = login; 42 | } 43 | 44 | @Override 45 | public boolean equals(Object o) { 46 | if (this == o) { 47 | return true; 48 | } 49 | if (o == null || getClass() != o.getClass()) { 50 | return false; 51 | } 52 | 53 | UserDTO userDTO = (UserDTO) o; 54 | if (userDTO.getId() == null || getId() == null) { 55 | return false; 56 | } 57 | 58 | return Objects.equals(getId(), userDTO.getId()) && Objects.equals(getLogin(), userDTO.getLogin()); 59 | } 60 | 61 | @Override 62 | public int hashCode() { 63 | return Objects.hash(getId(), getLogin()); 64 | } 65 | 66 | // prettier-ignore 67 | @Override 68 | public String toString() { 69 | return "UserDTO{" + 70 | "id='" + id + '\'' + 71 | ", login='" + login + '\'' + 72 | "}"; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/service/dto/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Data transfer objects for rest mapping. 3 | */ 4 | package io.github.jhipster.sample.service.dto; 5 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/service/mapper/BankAccountMapper.java: -------------------------------------------------------------------------------- 1 | package io.github.jhipster.sample.service.mapper; 2 | 3 | import io.github.jhipster.sample.domain.BankAccount; 4 | import io.github.jhipster.sample.domain.User; 5 | import io.github.jhipster.sample.service.dto.BankAccountDTO; 6 | import io.github.jhipster.sample.service.dto.UserDTO; 7 | import org.mapstruct.*; 8 | 9 | /** 10 | * Mapper for the entity {@link BankAccount} and its DTO {@link BankAccountDTO}. 11 | */ 12 | @Mapper(componentModel = "spring") 13 | public interface BankAccountMapper extends EntityMapper { 14 | @Mapping(target = "user", source = "user", qualifiedByName = "userLogin") 15 | BankAccountDTO toDto(BankAccount s); 16 | 17 | @Named("userLogin") 18 | @BeanMapping(ignoreByDefault = true) 19 | @Mapping(target = "id", source = "id") 20 | @Mapping(target = "login", source = "login") 21 | UserDTO toDtoUserLogin(User user); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/service/mapper/EntityMapper.java: -------------------------------------------------------------------------------- 1 | package io.github.jhipster.sample.service.mapper; 2 | 3 | import java.util.List; 4 | import org.mapstruct.BeanMapping; 5 | import org.mapstruct.MappingTarget; 6 | import org.mapstruct.Named; 7 | import org.mapstruct.NullValuePropertyMappingStrategy; 8 | 9 | /** 10 | * Contract for a generic dto to entity mapper. 11 | * 12 | * @param - DTO type parameter. 13 | * @param - Entity type parameter. 14 | */ 15 | 16 | public interface EntityMapper { 17 | E toEntity(D dto); 18 | 19 | D toDto(E entity); 20 | 21 | List toEntity(List dtoList); 22 | 23 | List toDto(List entityList); 24 | 25 | @Named("partialUpdate") 26 | @BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE) 27 | void partialUpdate(@MappingTarget E entity, D dto); 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/service/mapper/LabelMapper.java: -------------------------------------------------------------------------------- 1 | package io.github.jhipster.sample.service.mapper; 2 | 3 | import io.github.jhipster.sample.domain.Label; 4 | import io.github.jhipster.sample.domain.Operation; 5 | import io.github.jhipster.sample.service.dto.LabelDTO; 6 | import io.github.jhipster.sample.service.dto.OperationDTO; 7 | import java.util.Set; 8 | import java.util.stream.Collectors; 9 | import org.mapstruct.*; 10 | 11 | /** 12 | * Mapper for the entity {@link Label} and its DTO {@link LabelDTO}. 13 | */ 14 | @Mapper(componentModel = "spring") 15 | public interface LabelMapper extends EntityMapper { 16 | @Mapping(target = "operations", source = "operations", qualifiedByName = "operationIdSet") 17 | LabelDTO toDto(Label s); 18 | 19 | @Mapping(target = "operations", ignore = true) 20 | @Mapping(target = "removeOperation", ignore = true) 21 | Label toEntity(LabelDTO labelDTO); 22 | 23 | @Named("operationId") 24 | @BeanMapping(ignoreByDefault = true) 25 | @Mapping(target = "id", source = "id") 26 | OperationDTO toDtoOperationId(Operation operation); 27 | 28 | @Named("operationIdSet") 29 | default Set toDtoOperationIdSet(Set operation) { 30 | return operation.stream().map(this::toDtoOperationId).collect(Collectors.toSet()); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/io/github/jhipster/sample/service/mapper/OperationMapper.java: -------------------------------------------------------------------------------- 1 | package io.github.jhipster.sample.service.mapper; 2 | 3 | import io.github.jhipster.sample.domain.BankAccount; 4 | import io.github.jhipster.sample.domain.Label; 5 | import io.github.jhipster.sample.domain.Operation; 6 | import io.github.jhipster.sample.service.dto.BankAccountDTO; 7 | import io.github.jhipster.sample.service.dto.LabelDTO; 8 | import io.github.jhipster.sample.service.dto.OperationDTO; 9 | import java.util.Set; 10 | import java.util.stream.Collectors; 11 | import org.mapstruct.*; 12 | 13 | /** 14 | * Mapper for the entity {@link Operation} and its DTO {@link OperationDTO}. 15 | */ 16 | @Mapper(componentModel = "spring") 17 | public interface OperationMapper extends EntityMapper { 18 | @Mapping(target = "bankAccount", source = "bankAccount", qualifiedByName = "bankAccountName") 19 | @Mapping(target = "labels", source = "labels", qualifiedByName = "labelLabelSet") 20 | OperationDTO toDto(Operation s); 21 | 22 | @Mapping(target = "removeLabel", ignore = true) 23 | Operation toEntity(OperationDTO operationDTO); 24 | 25 | @Named("bankAccountName") 26 | @BeanMapping(ignoreByDefault = true) 27 | @Mapping(target = "id", source = "id") 28 | @Mapping(target = "name", source = "name") 29 | BankAccountDTO toDtoBankAccountName(BankAccount bankAccount); 30 | 31 | @Named("labelLabel") 32 | @BeanMapping(ignoreByDefault = true) 33 | @Mapping(target = "id", source = "id") 34 | @Mapping(target = "label", source = "label") 35 | LabelDTO toDtoLabelLabel(Label label); 36 | 37 | @Named("labelLabelSet") 38 | default Set toDtoLabelLabelSet(Set

Dear

10 |

Your JHipster account has been created, please click on the URL below to activate it:

11 |

12 | Activation link 13 |

14 |

15 | Regards, 16 |
17 | JHipster. 18 |

19 | 20 | 21 | -------------------------------------------------------------------------------- /src/main/resources/templates/mail/creationEmail.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | JHipster creation 5 | 6 | 7 | 8 | 9 |

Dear

10 |

Your JHipster account has been created, please click on the URL below to access it:

11 |

12 | Login link 13 |

14 |

15 | Regards, 16 |
17 | JHipster. 18 |

19 | 20 | 21 | -------------------------------------------------------------------------------- /src/main/resources/templates/mail/passwordResetEmail.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | JHipster password reset 5 | 6 | 7 | 8 | 9 |

Dear

10 |

11 | For your JHipster account a password reset was requested, please click on the URL below to reset it: 12 |

13 |

14 | Login link 15 |

16 |

17 | Regards, 18 |
19 | JHipster. 20 |

21 | 22 | 23 | -------------------------------------------------------------------------------- /src/main/webapp/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Page Not Found 6 | 7 | 8 | 52 | 53 | 54 |

Page Not Found

55 |

Sorry, but the page you were trying to view does not exist.

56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | html 10 | text/html;charset=utf-8 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/main/webapp/app/_bootstrap-variables.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * Bootstrap overrides https://v4-alpha.getbootstrap.com/getting-started/options/ 3 | * All values defined in bootstrap source 4 | * https://github.com/twbs/bootstrap/blob/v4-dev/scss/_variables.scss can be overwritten here 5 | * Make sure not to add !default to values here 6 | */ 7 | 8 | // Options: 9 | // Quickly modify global styling by enabling or disabling optional features. 10 | $enable-rounded: true; 11 | $enable-shadows: false; 12 | $enable-gradients: false; 13 | $enable-transitions: true; 14 | $enable-hover-media-query: false; 15 | $enable-grid-classes: true; 16 | $enable-print-styles: true; 17 | 18 | // Components: 19 | // Define common padding and border radius sizes and more. 20 | 21 | $border-radius: 0.15rem; 22 | $border-radius-lg: 0.125rem; 23 | $border-radius-sm: 0.1rem; 24 | 25 | // Body: 26 | // Settings for the `` element. 27 | 28 | $body-bg: #ffffff; 29 | -------------------------------------------------------------------------------- /src/main/webapp/app/config/axios-interceptor.spec.ts: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | import sinon from 'sinon'; 3 | 4 | import setupAxiosInterceptors from './axios-interceptor'; 5 | 6 | describe('Axios Interceptor', () => { 7 | describe('setupAxiosInterceptors', () => { 8 | const client = axios; 9 | const onUnauthenticated = sinon.spy(); 10 | setupAxiosInterceptors(onUnauthenticated); 11 | 12 | it('onRequestSuccess is called on fulfilled request', () => { 13 | expect((client.interceptors.request as any).handlers[0].fulfilled({ data: 'foo', url: '/test' })).toMatchObject({ 14 | data: 'foo', 15 | }); 16 | }); 17 | it('onResponseSuccess is called on fulfilled response', () => { 18 | expect((client.interceptors.response as any).handlers[0].fulfilled({ data: 'foo' })).toEqual({ data: 'foo' }); 19 | }); 20 | it('onResponseError is called on rejected response', () => { 21 | const rejectError = { 22 | response: { 23 | statusText: 'NotFound', 24 | status: 401, 25 | data: { message: 'Page not found' }, 26 | }, 27 | }; 28 | expect((client.interceptors.response as any).handlers[0].rejected(rejectError)).rejects.toEqual(rejectError); 29 | expect(onUnauthenticated.calledOnce).toBe(true); 30 | }); 31 | }); 32 | }); 33 | -------------------------------------------------------------------------------- /src/main/webapp/app/config/axios-interceptor.ts: -------------------------------------------------------------------------------- 1 | import axios, { type AxiosError } from 'axios'; 2 | import { Storage } from 'react-jhipster'; 3 | 4 | const TIMEOUT = 1 * 60 * 1000; 5 | axios.defaults.timeout = TIMEOUT; 6 | axios.defaults.baseURL = SERVER_API_URL; 7 | 8 | const setupAxiosInterceptors = onUnauthenticated => { 9 | const onRequestSuccess = config => { 10 | const token = Storage.local.get('jhi-authenticationToken') || Storage.session.get('jhi-authenticationToken'); 11 | if (token) { 12 | config.headers.Authorization = `Bearer ${token}`; 13 | } 14 | return config; 15 | }; 16 | const onResponseSuccess = response => response; 17 | const onResponseError = (err: AxiosError) => { 18 | const status = err.status || (err.response ? err.response.status : 0); 19 | if (status === 401) { 20 | onUnauthenticated(); 21 | } 22 | return Promise.reject(err); 23 | }; 24 | axios.interceptors.request.use(onRequestSuccess); 25 | axios.interceptors.response.use(onResponseSuccess, onResponseError); 26 | }; 27 | 28 | export default setupAxiosInterceptors; 29 | -------------------------------------------------------------------------------- /src/main/webapp/app/config/constants.ts: -------------------------------------------------------------------------------- 1 | export const AUTHORITIES = { 2 | ADMIN: 'ROLE_ADMIN', 3 | USER: 'ROLE_USER', 4 | }; 5 | 6 | export const messages = { 7 | DATA_ERROR_ALERT: 'Internal Error', 8 | }; 9 | 10 | export const APP_DATE_FORMAT = 'DD/MM/YY HH:mm'; 11 | export const APP_TIMESTAMP_FORMAT = 'DD/MM/YY HH:mm:ss'; 12 | export const APP_LOCAL_DATE_FORMAT = 'DD/MM/YYYY'; 13 | export const APP_LOCAL_DATETIME_FORMAT = 'YYYY-MM-DDTHH:mm'; 14 | export const APP_WHOLE_NUMBER_FORMAT = '0,0'; 15 | export const APP_TWO_DIGITS_AFTER_POINT_NUMBER_FORMAT = '0,0.[00]'; 16 | -------------------------------------------------------------------------------- /src/main/webapp/app/config/dayjs.ts: -------------------------------------------------------------------------------- 1 | import dayjs from 'dayjs'; 2 | import customParseFormat from 'dayjs/plugin/customParseFormat'; 3 | import duration from 'dayjs/plugin/duration'; 4 | import relativeTime from 'dayjs/plugin/relativeTime'; 5 | 6 | // jhipster-needle-i18n-language-dayjs-imports - JHipster will import languages from dayjs here 7 | import 'dayjs/locale/en'; 8 | 9 | // DAYJS CONFIGURATION 10 | dayjs.extend(customParseFormat); 11 | dayjs.extend(duration); 12 | dayjs.extend(relativeTime); 13 | -------------------------------------------------------------------------------- /src/main/webapp/app/config/error-middleware.ts: -------------------------------------------------------------------------------- 1 | const getErrorMessage = errorData => { 2 | let { message } = errorData; 3 | if (errorData.fieldErrors) { 4 | errorData.fieldErrors.forEach(fErr => { 5 | message += `\nfield: ${fErr.field}, Object: ${fErr.objectName}, message: ${fErr.message}\n`; 6 | }); 7 | } 8 | return message; 9 | }; 10 | 11 | export default () => next => action => { 12 | /** 13 | * 14 | * The error middleware serves to log error messages from dispatch 15 | * It need not run in production 16 | */ 17 | if (DEVELOPMENT) { 18 | const { error } = action; 19 | if (error) { 20 | console.error(`${action.type} caught at middleware with reason: ${JSON.stringify(error.message)}.`); 21 | if (error.response && error.response.data) { 22 | const message = getErrorMessage(error.response.data); 23 | console.error(`Actual cause: ${message}`); 24 | } 25 | } 26 | } 27 | // Dispatch initial action 28 | return next(action); 29 | }; 30 | -------------------------------------------------------------------------------- /src/main/webapp/app/config/icon-loader.ts: -------------------------------------------------------------------------------- 1 | import { 2 | faArrowLeft, 3 | faAsterisk, 4 | faBan, 5 | faBell, 6 | faBook, 7 | faCloud, 8 | faCogs, 9 | faDatabase, 10 | faEye, 11 | faFlag, 12 | faHeart, 13 | faHome, 14 | faList, 15 | faLock, 16 | faPencilAlt, 17 | faPlus, 18 | faRoad, 19 | faSave, 20 | faSearch, 21 | faSignInAlt, 22 | faSignOutAlt, 23 | faSort, 24 | faSync, 25 | faTachometerAlt, 26 | faTasks, 27 | faThList, 28 | faTimesCircle, 29 | faTrash, 30 | faUser, 31 | faUserPlus, 32 | faUsers, 33 | faUsersCog, 34 | faWrench, 35 | } from '@fortawesome/free-solid-svg-icons'; 36 | 37 | import { library } from '@fortawesome/fontawesome-svg-core'; 38 | 39 | export const loadIcons = () => { 40 | library.add( 41 | faArrowLeft, 42 | faAsterisk, 43 | faBan, 44 | faBell, 45 | faBook, 46 | faCloud, 47 | faCogs, 48 | faDatabase, 49 | faEye, 50 | faFlag, 51 | faHeart, 52 | faHome, 53 | faList, 54 | faLock, 55 | faPencilAlt, 56 | faPlus, 57 | faRoad, 58 | faSave, 59 | faSignInAlt, 60 | faSignOutAlt, 61 | faSearch, 62 | faSort, 63 | faSync, 64 | faTachometerAlt, 65 | faTasks, 66 | faThList, 67 | faTimesCircle, 68 | faTrash, 69 | faUser, 70 | faUserPlus, 71 | faUsers, 72 | faUsersCog, 73 | faWrench, 74 | ); 75 | }; 76 | -------------------------------------------------------------------------------- /src/main/webapp/app/config/logger-middleware.ts: -------------------------------------------------------------------------------- 1 | /* eslint no-console: off */ 2 | export default () => next => action => { 3 | if (DEVELOPMENT) { 4 | const { type, payload, meta, error } = action; 5 | 6 | console.groupCollapsed(type); 7 | console.log('Payload:', payload); 8 | if (error) { 9 | console.log('Error:', error); 10 | } 11 | console.log('Meta:', meta); 12 | console.groupEnd(); 13 | } 14 | 15 | return next(action); 16 | }; 17 | -------------------------------------------------------------------------------- /src/main/webapp/app/config/store.ts: -------------------------------------------------------------------------------- 1 | import { ThunkAction, UnknownAction, configureStore } from '@reduxjs/toolkit'; 2 | import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux'; 3 | import { loadingBarMiddleware } from 'react-redux-loading-bar'; 4 | 5 | import sharedReducers from 'app/shared/reducers'; 6 | import errorMiddleware from './error-middleware'; 7 | import notificationMiddleware from './notification-middleware'; 8 | import loggerMiddleware from './logger-middleware'; 9 | 10 | const store = configureStore({ 11 | reducer: sharedReducers, 12 | middleware: getDefaultMiddleware => 13 | getDefaultMiddleware({ 14 | serializableCheck: { 15 | // Ignore these field paths in all actions 16 | ignoredActionPaths: ['meta.arg', 'meta.baseQueryMeta', 'payload.config', 'payload.request', 'payload.headers', 'error'], 17 | }, 18 | }).concat(errorMiddleware, notificationMiddleware, loadingBarMiddleware(), loggerMiddleware), 19 | }); 20 | 21 | const getStore = () => store; 22 | 23 | export type IRootState = ReturnType; 24 | export type AppDispatch = typeof store.dispatch; 25 | 26 | export const useAppSelector: TypedUseSelectorHook = useSelector; 27 | export const useAppDispatch = () => useDispatch(); 28 | export type AppThunk = ThunkAction; 29 | 30 | export default getStore; 31 | -------------------------------------------------------------------------------- /src/main/webapp/app/config/translation.ts: -------------------------------------------------------------------------------- 1 | import { Storage, TranslatorContext } from 'react-jhipster'; 2 | 3 | import { setLocale } from 'app/shared/reducers/locale'; 4 | 5 | TranslatorContext.setDefaultLocale('en'); 6 | TranslatorContext.setRenderInnerTextForMissingKeys(false); 7 | 8 | export const languages: any = { 9 | en: { name: 'English' }, 10 | // jhipster-needle-i18n-language-key-pipe - JHipster will add/remove languages in this object 11 | }; 12 | 13 | export const locales = Object.keys(languages).sort(); 14 | 15 | export const registerLocale = store => { 16 | store.dispatch(setLocale(Storage.session.get('locale', 'en'))); 17 | }; 18 | -------------------------------------------------------------------------------- /src/main/webapp/app/entities/bank-account/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Route } from 'react-router'; 3 | 4 | import ErrorBoundaryRoutes from 'app/shared/error/error-boundary-routes'; 5 | 6 | import BankAccount from './bank-account'; 7 | import BankAccountDetail from './bank-account-detail'; 8 | import BankAccountUpdate from './bank-account-update'; 9 | import BankAccountDeleteDialog from './bank-account-delete-dialog'; 10 | 11 | const BankAccountRoutes = () => ( 12 | 13 | } /> 14 | } /> 15 | 16 | } /> 17 | } /> 18 | } /> 19 | 20 | 21 | ); 22 | 23 | export default BankAccountRoutes; 24 | -------------------------------------------------------------------------------- /src/main/webapp/app/entities/label/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Route } from 'react-router'; 3 | 4 | import ErrorBoundaryRoutes from 'app/shared/error/error-boundary-routes'; 5 | 6 | import Label from './label'; 7 | import LabelDetail from './label-detail'; 8 | import LabelUpdate from './label-update'; 9 | import LabelDeleteDialog from './label-delete-dialog'; 10 | 11 | const LabelRoutes = () => ( 12 | 13 | } /> 14 | } /> 15 | 16 | } /> 17 | } /> 18 | } /> 19 | 20 | 21 | ); 22 | 23 | export default LabelRoutes; 24 | -------------------------------------------------------------------------------- /src/main/webapp/app/entities/menu.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Translate } from 'react-jhipster'; 3 | 4 | import MenuItem from 'app/shared/layout/menus/menu-item'; 5 | 6 | const EntitiesMenu = () => { 7 | return ( 8 | <> 9 | {/* prettier-ignore */} 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | {/* jhipster-needle-add-entity-to-menu - JHipster will add entities to the menu here */} 20 | 21 | ); 22 | }; 23 | 24 | export default EntitiesMenu; 25 | -------------------------------------------------------------------------------- /src/main/webapp/app/entities/operation/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Route } from 'react-router'; 3 | 4 | import ErrorBoundaryRoutes from 'app/shared/error/error-boundary-routes'; 5 | 6 | import Operation from './operation'; 7 | import OperationDetail from './operation-detail'; 8 | import OperationUpdate from './operation-update'; 9 | import OperationDeleteDialog from './operation-delete-dialog'; 10 | 11 | const OperationRoutes = () => ( 12 | 13 | } /> 14 | } /> 15 | 16 | } /> 17 | } /> 18 | } /> 19 | 20 | 21 | ); 22 | 23 | export default OperationRoutes; 24 | -------------------------------------------------------------------------------- /src/main/webapp/app/entities/reducers.ts: -------------------------------------------------------------------------------- 1 | import bankAccount from 'app/entities/bank-account/bank-account.reducer'; 2 | import label from 'app/entities/label/label.reducer'; 3 | import operation from 'app/entities/operation/operation.reducer'; 4 | /* jhipster-needle-add-reducer-import - JHipster will add reducer here */ 5 | 6 | const entitiesReducers = { 7 | bankAccount, 8 | label, 9 | operation, 10 | /* jhipster-needle-add-reducer-combine - JHipster will add reducer here */ 11 | }; 12 | 13 | export default entitiesReducers; 14 | -------------------------------------------------------------------------------- /src/main/webapp/app/entities/routes.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Route } from 'react-router'; 3 | 4 | import ErrorBoundaryRoutes from 'app/shared/error/error-boundary-routes'; 5 | 6 | import BankAccount from './bank-account'; 7 | import Label from './label'; 8 | import Operation from './operation'; 9 | /* jhipster-needle-add-route-import - JHipster will add routes here */ 10 | 11 | export default () => { 12 | return ( 13 |
14 | 15 | {/* prettier-ignore */} 16 | } /> 17 | } /> 18 | } /> 19 | {/* jhipster-needle-add-route-path - JHipster will add routes here */} 20 | 21 |
22 | ); 23 | }; 24 | -------------------------------------------------------------------------------- /src/main/webapp/app/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { createRoot } from 'react-dom/client'; 3 | import { Provider } from 'react-redux'; 4 | import { bindActionCreators } from 'redux'; 5 | 6 | import getStore from 'app/config/store'; 7 | import { registerLocale } from 'app/config/translation'; 8 | import setupAxiosInterceptors from 'app/config/axios-interceptor'; 9 | import { clearAuthentication } from 'app/shared/reducers/authentication'; 10 | import ErrorBoundary from 'app/shared/error/error-boundary'; 11 | import AppComponent from 'app/app'; 12 | import { loadIcons } from 'app/config/icon-loader'; 13 | 14 | const store = getStore(); 15 | registerLocale(store); 16 | 17 | const actions = bindActionCreators({ clearAuthentication }, store.dispatch); 18 | setupAxiosInterceptors(() => actions.clearAuthentication('login.error.unauthorized')); 19 | 20 | loadIcons(); 21 | 22 | const rootEl = document.getElementById('root'); 23 | const root = createRoot(rootEl); 24 | 25 | const render = Component => 26 | root.render( 27 | 28 | 29 |
30 | 31 |
32 |
33 |
, 34 | ); 35 | 36 | render(AppComponent); 37 | -------------------------------------------------------------------------------- /src/main/webapp/app/modules/account/activate/activate.reducer.ts: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | import { createAsyncThunk, createSlice } from '@reduxjs/toolkit'; 3 | 4 | import { serializeAxiosError } from 'app/shared/reducers/reducer.utils'; 5 | 6 | const initialState = { 7 | activationSuccess: false, 8 | activationFailure: false, 9 | }; 10 | 11 | export type ActivateState = Readonly; 12 | 13 | // Actions 14 | 15 | export const activateAction = createAsyncThunk('activate/activate_account', async (key: string) => axios.get(`api/activate?key=${key}`), { 16 | serializeError: serializeAxiosError, 17 | }); 18 | 19 | export const ActivateSlice = createSlice({ 20 | name: 'activate', 21 | initialState: initialState as ActivateState, 22 | reducers: { 23 | reset() { 24 | return initialState; 25 | }, 26 | }, 27 | extraReducers(builder) { 28 | builder 29 | .addCase(activateAction.pending, () => initialState) 30 | .addCase(activateAction.rejected, state => { 31 | state.activationFailure = true; 32 | }) 33 | .addCase(activateAction.fulfilled, state => { 34 | state.activationSuccess = true; 35 | }); 36 | }, 37 | }); 38 | 39 | export const { reset } = ActivateSlice.actions; 40 | 41 | // Reducer 42 | export default ActivateSlice.reducer; 43 | -------------------------------------------------------------------------------- /src/main/webapp/app/modules/account/activate/activate.tsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect } from 'react'; 2 | import { Link, useSearchParams } from 'react-router-dom'; 3 | import { Alert, Col, Row } from 'reactstrap'; 4 | import { Translate } from 'react-jhipster'; 5 | 6 | import { useAppDispatch, useAppSelector } from 'app/config/store'; 7 | import { activateAction, reset } from './activate.reducer'; 8 | 9 | const successAlert = ( 10 | 11 | 12 | Your user account has been activated. Please 13 | 14 | 15 | sign in 16 | 17 | . 18 | 19 | ); 20 | 21 | const failureAlert = ( 22 | 23 | 24 | Your user could not be activated. Please use the registration form to sign up. 25 | 26 | 27 | ); 28 | 29 | export const ActivatePage = () => { 30 | const dispatch = useAppDispatch(); 31 | 32 | const [searchParams] = useSearchParams(); 33 | 34 | useEffect(() => { 35 | const key = searchParams.get('key'); 36 | 37 | dispatch(activateAction(key)); 38 | return () => { 39 | dispatch(reset()); 40 | }; 41 | }, []); 42 | 43 | const { activationSuccess, activationFailure } = useAppSelector(state => state.activate); 44 | 45 | return ( 46 |
47 | 48 | 49 |

50 | Activation 51 |

52 | {activationSuccess ? successAlert : undefined} 53 | {activationFailure ? failureAlert : undefined} 54 | 55 |
56 |
57 | ); 58 | }; 59 | 60 | export default ActivatePage; 61 | -------------------------------------------------------------------------------- /src/main/webapp/app/modules/account/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Route } from 'react-router'; 3 | 4 | import ErrorBoundaryRoutes from 'app/shared/error/error-boundary-routes'; 5 | 6 | import Settings from './settings/settings'; 7 | import Password from './password/password'; 8 | 9 | const AccountRoutes = () => ( 10 |
11 | 12 | } /> 13 | } /> 14 | 15 |
16 | ); 17 | 18 | export default AccountRoutes; 19 | -------------------------------------------------------------------------------- /src/main/webapp/app/modules/account/password/password.reducer.ts: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | import { createAsyncThunk, createSlice } from '@reduxjs/toolkit'; 3 | 4 | import { serializeAxiosError } from 'app/shared/reducers/reducer.utils'; 5 | 6 | const initialState = { 7 | loading: false, 8 | errorMessage: null, 9 | successMessage: null, 10 | updateSuccess: false, 11 | updateFailure: false, 12 | }; 13 | 14 | export type PasswordState = Readonly; 15 | 16 | const apiUrl = 'api/account'; 17 | 18 | interface IPassword { 19 | currentPassword: string; 20 | newPassword: string; 21 | } 22 | 23 | // Actions 24 | 25 | export const savePassword = createAsyncThunk( 26 | 'password/update_password', 27 | async (password: IPassword) => axios.post(`${apiUrl}/change-password`, password), 28 | { serializeError: serializeAxiosError }, 29 | ); 30 | 31 | export const PasswordSlice = createSlice({ 32 | name: 'password', 33 | initialState: initialState as PasswordState, 34 | reducers: { 35 | reset() { 36 | return initialState; 37 | }, 38 | }, 39 | extraReducers(builder) { 40 | builder 41 | .addCase(savePassword.pending, state => { 42 | state.errorMessage = null; 43 | state.updateSuccess = false; 44 | state.loading = true; 45 | }) 46 | .addCase(savePassword.rejected, state => { 47 | state.loading = false; 48 | state.updateSuccess = false; 49 | state.updateFailure = true; 50 | state.errorMessage = 'password.messages.error'; 51 | }) 52 | .addCase(savePassword.fulfilled, state => { 53 | state.loading = false; 54 | state.updateSuccess = true; 55 | state.updateFailure = false; 56 | state.successMessage = 'password.messages.success'; 57 | }); 58 | }, 59 | }); 60 | 61 | export const { reset } = PasswordSlice.actions; 62 | 63 | // Reducer 64 | export default PasswordSlice.reducer; 65 | -------------------------------------------------------------------------------- /src/main/webapp/app/modules/account/register/register.reducer.ts: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | import { createAsyncThunk, createSlice } from '@reduxjs/toolkit'; 3 | 4 | import { serializeAxiosError } from 'app/shared/reducers/reducer.utils'; 5 | 6 | const initialState = { 7 | loading: false, 8 | registrationSuccess: false, 9 | registrationFailure: false, 10 | errorMessage: null, 11 | successMessage: null, 12 | }; 13 | 14 | export type RegisterState = Readonly; 15 | 16 | // Actions 17 | 18 | export const handleRegister = createAsyncThunk( 19 | 'register/create_account', 20 | async (data: { login: string; email: string; password: string; langKey?: string }) => axios.post('api/register', data), 21 | { serializeError: serializeAxiosError }, 22 | ); 23 | 24 | export const RegisterSlice = createSlice({ 25 | name: 'register', 26 | initialState: initialState as RegisterState, 27 | reducers: { 28 | reset() { 29 | return initialState; 30 | }, 31 | }, 32 | extraReducers(builder) { 33 | builder 34 | .addCase(handleRegister.pending, state => { 35 | state.loading = true; 36 | }) 37 | .addCase(handleRegister.rejected, (state, action) => ({ 38 | ...initialState, 39 | registrationFailure: true, 40 | errorMessage: action.error.message, 41 | })) 42 | .addCase(handleRegister.fulfilled, () => ({ 43 | ...initialState, 44 | registrationSuccess: true, 45 | successMessage: 'register.messages.success', 46 | })); 47 | }, 48 | }); 49 | 50 | export const { reset } = RegisterSlice.actions; 51 | 52 | // Reducer 53 | export default RegisterSlice.reducer; 54 | -------------------------------------------------------------------------------- /src/main/webapp/app/modules/administration/docs/docs.scss: -------------------------------------------------------------------------------- 1 | iframe { 2 | background: white; 3 | } 4 | -------------------------------------------------------------------------------- /src/main/webapp/app/modules/administration/docs/docs.tsx: -------------------------------------------------------------------------------- 1 | import './docs.scss'; 2 | 3 | import React from 'react'; 4 | 5 | const DocsPage = () => ( 6 |
7 |