├── charts
├── cert-manager
│ ├── values.yaml
│ └── templates
│ │ └── cluster-issuer.yaml
├── admin-user
│ ├── templates
│ │ ├── secret.yaml
│ │ ├── service-account-github.yaml
│ │ └── cluster-role-binding.yaml
│ └── values.yaml
├── ingress
│ ├── templates
│ │ └── ingress.yaml
│ ├── values-default.yaml
│ ├── values-vault.yaml
│ └── values-argo-cd.yaml
├── kafka
│ ├── templates
│ │ ├── kafka-service.yaml
│ │ ├── kafka-deployment.yaml
│ │ └── kafka-pvc.yaml
│ └── values-qa.yaml
├── frontend
│ ├── templates
│ │ ├── frontend-service.yaml
│ │ └── frontend-deployment.yaml
│ ├── values-qa.yaml
│ └── values.yaml
├── grafana
│ ├── templates
│ │ ├── grafana-service.yaml
│ │ ├── grafana-config-map.yaml
│ │ └── grafana-deployment.yaml
│ └── files
│ │ ├── grafana-datasources.yml
│ │ ├── grafana-notifiers.yml
│ │ └── grafana-notification-templates.yml
├── kafka-ui
│ ├── templates
│ │ ├── kafka-ui-service.yaml
│ │ └── kafka-ui-deployment.yaml
│ └── values-qa.yaml
├── payment
│ └── templates
│ │ ├── payment-service.yaml
│ │ └── payment-deployment.yaml
├── prometheus
│ ├── templates
│ │ ├── prometheus-service.yaml
│ │ ├── prometheus-config-map.yaml
│ │ ├── prometheus-deployment.yaml
│ │ ├── prometheus-cluster-role.yaml
│ │ ├── prometheus-service-account.yaml
│ │ └── prometheus-cluster-role-binding.yaml
│ └── values.yaml
├── recognizer
│ ├── templates
│ │ └── recognizer-service.yaml
│ ├── values-qa.yaml
│ └── values.yaml
├── zookeeper
│ ├── templates
│ │ ├── zookeeper-service.yaml
│ │ └── zookeeper-deployment.yaml
│ ├── values-qa.yaml
│ └── values.yaml
├── orchestrator
│ └── templates
│ │ ├── orchestrator-service.yaml
│ │ └── orchestrator-deployment.yaml
├── priority-class
│ ├── templates
│ │ └── priority-class.yaml
│ ├── values-qa.yaml
│ └── values.yaml
├── telegram-bot
│ └── templates
│ │ ├── telegram-bot-service.yaml
│ │ └── telegram-bot-deployment.yaml
├── vault
│ ├── templates
│ │ ├── vault-service-account.yaml
│ │ └── vault-secret-provider-class.yaml
│ └── values-default.yaml
├── frontend-landing
│ ├── templates
│ │ ├── frontend-landing-service.yaml
│ │ └── frontend-landing-deployment.yaml
│ ├── values-qa.yaml
│ └── values.yaml
├── wit-ai-go-proxy
│ ├── templates
│ │ ├── wit-ai-go-proxy-service.yaml
│ │ └── wit-ai-go-proxy-deployment.yaml
│ └── values.yaml
├── postgres-exporter-telegram
│ ├── templates
│ │ ├── postgres-exporter-telegram-bot-service.yaml
│ │ └── postgres-exporter-telegram-bot-deployment.yaml
│ ├── values-qa.yaml
│ └── values.yaml
├── postgres-exporter-orchestrator
│ ├── templates
│ │ ├── postgres-exporter-orchestrator-service.yaml
│ │ └── postgres-exporter-orchestrator-deployment.yaml
│ ├── values-qa.yaml
│ └── values.yaml
└── shared
│ ├── templates
│ ├── _priorityclass.yaml
│ ├── _serviceaccount.yaml
│ ├── _clusterrole.yaml
│ ├── _persistentvolumeclaim.yaml
│ ├── _configmap.yaml
│ ├── _secret.yaml
│ ├── _service.yaml
│ └── _clusterrolebinding.yaml
│ └── values.yaml
├── frontend
├── app
│ ├── src
│ │ ├── assets
│ │ │ └── main.css
│ │ ├── views
│ │ │ ├── LoginView.vue
│ │ │ └── OperationsView.vue
│ │ ├── App.vue
│ │ └── main.ts
│ ├── .gitattributes
│ ├── env.d.ts
│ ├── public
│ │ └── favicon.ico
│ ├── .prettierrc.json
│ ├── tsconfig.json
│ ├── .editorconfig
│ ├── tsconfig.app.json
│ ├── README.md
│ ├── index.html
│ ├── .gitignore
│ ├── tsconfig.node.json
│ └── vite.config.ts
└── landing
│ ├── .env
│ ├── public
│ ├── robots.txt
│ └── favicon.ico
│ ├── src
│ └── styles
│ │ ├── global
│ │ ├── buttons.css
│ │ ├── links.css
│ │ └── root.css
│ │ ├── app
│ │ └── components
│ │ │ ├── header.css
│ │ │ ├── footer.css
│ │ │ ├── button.css
│ │ │ ├── link-button.css
│ │ │ └── feature-card.css
│ │ └── main.css
│ ├── .env.local.example
│ ├── .env.production
│ ├── .env.staging
│ ├── docker
│ └── nginx
│ │ └── conf.d
│ │ └── default.conf
│ ├── vite.config.js
│ ├── .gitignore
│ ├── package.json
│ ├── Dockerfile
│ └── README.md
├── dto
├── .mvn
│ └── wrapper
│ │ └── maven-wrapper.jar
├── src
│ └── main
│ │ └── java
│ │ └── com
│ │ └── override
│ │ └── dto
│ │ ├── constants
│ │ ├── Period.java
│ │ ├── Type.java
│ │ ├── StatusMailing.java
│ │ ├── SuggestionAlgorithm.java
│ │ ├── Currency.java
│ │ └── PaymentStatus.java
│ │ ├── AuthorizationTokenDTO.java
│ │ ├── AnalyticsDataPerMonthDTO.java
│ │ ├── AccountDataDTO.java
│ │ ├── UserInfoResponseDTO.java
│ │ ├── OnboardingStepDTO.java
│ │ ├── TransactionAmountAndCommentDTO.java
│ │ ├── AnnounceDTO.java
│ │ ├── VoiceMessageDTO.java
│ │ ├── tinkoff
│ │ ├── TinkoffAccountDTO.java
│ │ ├── TinkoffInfoDTO.java
│ │ ├── TinkoffActiveDTO.java
│ │ └── TinkoffActiveMOEXDTO.java
│ │ ├── AnalyticsMainDataPerYearsDTO.java
│ │ ├── AudioRecognizerGoResponseDTO.java
│ │ ├── MailDTO.java
│ │ ├── AnalyticsDataMonthDTO.java
│ │ ├── AudioRecognizerGoRequestDTO.java
│ │ ├── SumTransactionsDataPerMonthForAccountDTO.java
│ │ ├── AnalyticsDataDTO.java
│ │ ├── MonthSumTransactionByTypeCategoryDTO.java
│ │ ├── SumTransactionPerYearForAccountDTO.java
│ │ ├── TransactionSummaryDTO.java
│ │ ├── UserRegistrationInfoDto.java
│ │ ├── CommonErrorDTO.java
│ │ ├── SubscriptionDTO.java
│ │ ├── AnalyticsMonthlyIncomeForCategoryDTO.java
│ │ ├── BackupUserDataDTO.java
│ │ ├── SummaryUsersDataPerYearDTO.java
│ │ ├── ChatMemberDTO.java
│ │ ├── OnboardingMessageDTO.java
│ │ ├── AnalyticsMonthlyReportForYearDTO.java
│ │ ├── AnalyticsAnnualAndMonthlyExpenseForCategoryDTO.java
│ │ ├── BugReportDTO.java
│ │ ├── PaymentResponseDTO.java
│ │ ├── StatisticDTO.java
│ │ ├── YooKassaWebhookDTO.java
│ │ ├── UserIncomeExpenseCategoriesPerYearDTO.java
│ │ ├── AnalyticsAnnualAndMonthlyReportDTO.java
│ │ ├── PaymentRequestDTO.java
│ │ ├── TransactionDefineDTO.java
│ │ ├── KeywordIdDTO.java
│ │ ├── YooKassaResponseDTO.java
│ │ ├── AmountRangeDTO.java
│ │ ├── DateRangeDTO.java
│ │ └── SumTransactionPerCategoryPerPeriodDTO.java
└── .gitignore
├── actuator_git_info_starter
├── .gitattributes
├── src
│ └── main
│ │ ├── resources
│ │ ├── META-INF
│ │ │ └── spring.factories
│ │ ├── git.properties
│ │ └── application.yaml
│ │ └── java
│ │ └── com
│ │ └── overmoney
│ │ └── actuator_git_info
│ │ ├── ActuatorGitInfoDTO.java
│ │ ├── ApplicationStartUpListener.java
│ │ └── config
│ │ └── InfoGitProperties.java
└── .gitignore
├── .mvn
└── wrapper
│ └── maven-wrapper.jar
├── mask_log_starter
├── src
│ └── main
│ │ ├── application.yml
│ │ ├── resources
│ │ └── META-INF
│ │ │ └── spring.factories
│ │ └── java
│ │ └── com
│ │ └── override
│ │ └── mask_log
│ │ ├── App.java
│ │ └── config
│ │ └── MaskLogProperties.java
└── .gitignore
├── wit_ai_go_proxy
├── go.mod
├── go.sum
└── Dockerfile
├── recognizer_service
├── .mvn
│ └── wrapper
│ │ └── maven-wrapper.jar
├── src
│ ├── main
│ │ ├── resources
│ │ │ └── application-dev.yml
│ │ └── java
│ │ │ └── com
│ │ │ └── override
│ │ │ └── recognizer_service
│ │ │ ├── service
│ │ │ ├── voice
│ │ │ │ ├── VoiceDTORecognitionService.java
│ │ │ │ └── VoiceDTORecognitionServiceImplMock.java
│ │ │ ├── category
│ │ │ │ ├── CategoryRecognizer.java
│ │ │ │ └── RecognizerResult.java
│ │ │ └── DeepSeekBalanceService.java
│ │ │ ├── llm
│ │ │ ├── Message.java
│ │ │ ├── DeepSeekResponseWrapperDTO.java
│ │ │ └── LLMResponseDTO.java
│ │ │ ├── RecognizerServiceApplication.java
│ │ │ ├── config
│ │ │ ├── ExecutorServiceConfig.java
│ │ │ ├── FeignConfiguration.java
│ │ │ ├── WitAIProperties.java
│ │ │ ├── DeepSeekOptionsProperties.java
│ │ │ └── LlmOptionsProperties.java
│ │ │ ├── feign
│ │ │ └── OrchestratorFeign.java
│ │ │ └── controller
│ │ │ └── rest
│ │ │ ├── DeepSeekMetaInfoController.java
│ │ │ └── VoiceMessageController.java
│ └── test
│ │ ├── java
│ │ └── com
│ │ │ └── override
│ │ │ └── recognizer_service
│ │ │ └── RecognizerServiceApplicationTests.java
│ │ └── resources
│ │ └── application-test.yml
├── .dockerignore
└── .gitignore
├── orchestrator_service
├── .mvn
│ └── wrapper
│ │ └── maven-wrapper.jar
├── src
│ ├── main
│ │ ├── resources
│ │ │ ├── static
│ │ │ │ ├── images
│ │ │ │ │ └── favicon.ico
│ │ │ │ └── css
│ │ │ │ │ ├── history.css
│ │ │ │ │ └── micromanagement.css
│ │ │ ├── application-dev.yml
│ │ │ ├── db
│ │ │ │ └── changelog
│ │ │ │ │ └── v1.0.0
│ │ │ │ │ ├── 015-db.changelog-add_usage_count_column.xml
│ │ │ │ │ ├── 018-db.changelog-add-accuracy_default_value.xml
│ │ │ │ │ ├── 016-db.changelog-usage_count_column_new_parameter.xml
│ │ │ │ │ ├── 010-db.changelog-updateAmountType.xml
│ │ │ │ │ ├── 006-db.changelog-updateUserTelegramPhotoUrlType.xml
│ │ │ │ │ ├── 014-db.changelog-set_last_used_column.xml
│ │ │ │ │ ├── 011-db.changelog-add_investAmount_column.xml
│ │ │ │ │ ├── 012-db.changelog-add_lastUsed_column.xml
│ │ │ │ │ ├── 005-db.changelog-addUniqueConstraintForCategories.xml
│ │ │ │ │ ├── 017-db.changelog-add-accuracy_column.xml
│ │ │ │ │ ├── 009-db.changelog-addCheckConstraintForTransactions.xml
│ │ │ │ │ ├── 004-db.changelog-dropNotNullConstraintUsernameColumnUsersTable.xml
│ │ │ │ │ ├── 002-db.changelog-setTelegramUserIdInTransaction.xml
│ │ │ │ │ ├── 001-db.changelog-setSuggestedCategoryIdInTransaction.xml
│ │ │ │ │ ├── 022-db.changelog-deleteColumnPhotoUrlFromUsers.xml
│ │ │ │ │ └── 023-db.changelog-add-user-colum.xml
│ │ │ └── templates
│ │ │ │ └── login.html
│ │ └── java
│ │ │ └── com
│ │ │ └── override
│ │ │ └── orchestrator_service
│ │ │ ├── model
│ │ │ ├── RefreshJwtRequest.java
│ │ │ ├── JwtResponse.java
│ │ │ ├── KeywordId.java
│ │ │ ├── TelegramAuthRequest.java
│ │ │ ├── BugReport.java
│ │ │ ├── TinkoffInfo.java
│ │ │ └── ProfilePhoto.java
│ │ │ ├── service
│ │ │ └── calc
│ │ │ │ ├── TransactionHandler.java
│ │ │ │ └── TransactionHandlerImplInvalidTransaction.java
│ │ │ ├── feign
│ │ │ └── PaymentFeign.java
│ │ │ ├── repository
│ │ │ ├── ProfilePhotoRepository.java
│ │ │ ├── BugReportRepository.java
│ │ │ └── SuggestionRepository.java
│ │ │ ├── config
│ │ │ ├── RecentActivityProperties.java
│ │ │ ├── LongPollingOvermoneyProperties.java
│ │ │ ├── jwt
│ │ │ │ └── JwtUtils.java
│ │ │ ├── CorsProperties.java
│ │ │ ├── DefaultCategoryProperties.java
│ │ │ ├── ExecutorServiceConfig.java
│ │ │ ├── WebConfig.java
│ │ │ └── SwaggerConfig.java
│ │ │ ├── mapper
│ │ │ └── AccountMapper.java
│ │ │ ├── exception
│ │ │ ├── BaseException.java
│ │ │ ├── OrchestraInvalidTokenException.java
│ │ │ ├── InvalidDataException.java
│ │ │ ├── UserNotFoundException.java
│ │ │ ├── TelegramAuthException.java
│ │ │ ├── XLSXProcessingException.java
│ │ │ ├── CategoryNotFoundException.java
│ │ │ ├── InternalKeyNotFoundException.java
│ │ │ ├── RequestSizeException.java
│ │ │ ├── TransactionNotFoundException.java
│ │ │ ├── TransactionProcessingException.java
│ │ │ └── CategoryNameIsNotUniqueException.java
│ │ │ ├── OrchestratorServiceApplication.java
│ │ │ ├── util
│ │ │ └── TelegramUtils.java
│ │ │ ├── controller
│ │ │ ├── PaymentTestController.java
│ │ │ └── AdminViewController.java
│ │ │ └── kafka
│ │ │ └── consumerproducer
│ │ │ └── SseTransactionListener.java
│ └── test
│ │ ├── java
│ │ └── com
│ │ │ └── override
│ │ │ └── orchestrator_service
│ │ │ ├── OrchestratorServiceApplicationTests.java
│ │ │ └── util
│ │ │ └── TelegramUtilsTest.java
│ │ └── resources
│ │ └── application-test.yml
├── .dockerignore
└── .gitignore
├── telegram_bot_service
├── .mvn
│ └── wrapper
│ │ └── maven-wrapper.jar
├── src
│ ├── main
│ │ ├── resources
│ │ │ ├── images
│ │ │ │ └── voice_message_example.jpg
│ │ │ ├── application-dev.yml
│ │ │ └── db
│ │ │ │ └── changelog
│ │ │ │ └── v1.0.0
│ │ │ │ ├── 005-db.changelog-createUserTable.xml
│ │ │ │ └── 004-db.changelog-deleteColumnPhotoUrlFromUsers.xml
│ │ └── java
│ │ │ └── com
│ │ │ └── overmoney
│ │ │ └── telegram_bot_service
│ │ │ ├── exception
│ │ │ ├── InvalidPaymentUrlException.java
│ │ │ └── VoiceProcessingException.java
│ │ │ ├── util
│ │ │ └── ValidationUtils.java
│ │ │ ├── model
│ │ │ ├── User.java
│ │ │ ├── Mail.java
│ │ │ ├── Announce.java
│ │ │ ├── TelegramMessage.java
│ │ │ └── OnboardingMessage.java
│ │ │ ├── repository
│ │ │ ├── AnnounceRepository.java
│ │ │ ├── UserRepository.java
│ │ │ ├── OnboardingMessageRepository.java
│ │ │ ├── UserOnboardingMessageRepository.java
│ │ │ └── MergeRequestRepository.java
│ │ │ ├── config
│ │ │ ├── MaxMessagesInSecondProperties.java
│ │ │ ├── OnboardingProperties.java
│ │ │ ├── ExecutorServiceConfig.java
│ │ │ └── FeignConfiguration.java
│ │ │ ├── constants
│ │ │ ├── KafkaConstants.java
│ │ │ ├── Command.java
│ │ │ └── InlineKeyboardCallback.java
│ │ │ ├── feign
│ │ │ └── RecognizerFeign.java
│ │ │ ├── TelegramBotServiceApplication.java
│ │ │ ├── controller
│ │ │ └── rest
│ │ │ │ ├── MailController.java
│ │ │ │ └── TelegramFileController.java
│ │ │ └── mapper
│ │ │ ├── ChatMemberMapper.java
│ │ │ └── TransactionMapper.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── overmoney
│ │ └── telegram_bot_service
│ │ ├── TgBotServiceApplicationTests.java
│ │ └── utils
│ │ └── TestFieldsUtil.java
├── .dockerignore
└── .gitignore
├── payment_service
├── src
│ ├── test
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── override
│ │ │ │ └── payment_service
│ │ │ │ └── PaymentServiceApplicationTest.java
│ │ └── resources
│ │ │ └── application-test.yml
│ └── main
│ │ ├── resources
│ │ ├── application-dev.yml
│ │ └── db
│ │ │ └── changelog
│ │ │ └── db.changelog-master.xml
│ │ └── java
│ │ └── com
│ │ └── override
│ │ └── payment_service
│ │ ├── PaymentServiceApplication.java
│ │ ├── constants
│ │ └── KafkaConstants.java
│ │ └── repository
│ │ └── SubscriptionRepository.java
├── .dockerignore
└── .gitignore
├── .dockerignore
├── .gitignore
├── .github
└── workflows
│ └── test_and_verify_codestyle.yml
└── argocd
└── overmoney-cluster
├── applications-prod
├── kafka.yaml
├── vault.yaml
├── ingress.yaml
├── kafka-ui.yaml
├── zookeeper.yaml
├── prod-priority-class.yaml
├── postgres-exporter-telegram.yaml
└── postgres-exporter-orchestrator.yaml
├── default
├── grafana.yaml
├── admin-user.yaml
├── vault-default.yaml
├── ingress-default.yaml
└── prometheus.yaml
├── root.yaml
├── cert-manager
└── cert-manager.yaml
├── environments
├── root-argo-cd.yaml
├── root-default.yaml
├── root-qa.yaml
├── root-prod.yaml
├── root-vault.yaml
└── root-cert-manager.yaml
├── applications-qa
├── kafka-qa.yaml
├── vault-qa.yaml
├── ingress-qa.yaml
├── kafka-ui-qa.yaml
├── zookeeper-qa.yaml
├── qa-priority-class.yaml
├── postgres-exporter-telegram.yaml
└── postgres-exporter-orchestrator.yaml
├── argo-cd
└── ingress-argo-cd.yaml
└── vault
└── ingress-vault.yaml
/charts/cert-manager/values.yaml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/frontend/app/src/assets/main.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dto/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/frontend/app/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto eol=lf
2 |
--------------------------------------------------------------------------------
/frontend/app/env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/charts/admin-user/templates/secret.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.secret" . -}}
--------------------------------------------------------------------------------
/charts/ingress/templates/ingress.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.ingress" . -}}
--------------------------------------------------------------------------------
/charts/kafka/templates/kafka-service.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.service" . -}}
--------------------------------------------------------------------------------
/charts/frontend/templates/frontend-service.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.service" . -}}
--------------------------------------------------------------------------------
/charts/grafana/templates/grafana-service.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.service" . -}}
--------------------------------------------------------------------------------
/charts/kafka-ui/templates/kafka-ui-service.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.service" . -}}
--------------------------------------------------------------------------------
/charts/kafka/templates/kafka-deployment.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.deployment" . -}}
--------------------------------------------------------------------------------
/charts/payment/templates/payment-service.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.service" . -}}
--------------------------------------------------------------------------------
/actuator_git_info_starter/.gitattributes:
--------------------------------------------------------------------------------
1 | /mvnw text eol=lf
2 | *.cmd text eol=crlf
3 |
--------------------------------------------------------------------------------
/charts/frontend/templates/frontend-deployment.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.deployment" . -}}
--------------------------------------------------------------------------------
/charts/grafana/templates/grafana-config-map.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.configmap" . -}}
--------------------------------------------------------------------------------
/charts/grafana/templates/grafana-deployment.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.deployment" . -}}
--------------------------------------------------------------------------------
/charts/kafka-ui/templates/kafka-ui-deployment.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.deployment" . -}}
--------------------------------------------------------------------------------
/charts/kafka/templates/kafka-pvc.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.persistentVolumeClaim" . -}}
--------------------------------------------------------------------------------
/charts/payment/templates/payment-deployment.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.deployment" . -}}
--------------------------------------------------------------------------------
/charts/prometheus/templates/prometheus-service.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.service" . -}}
--------------------------------------------------------------------------------
/charts/recognizer/templates/recognizer-service.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.service" . -}}
--------------------------------------------------------------------------------
/charts/zookeeper/templates/zookeeper-service.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.service" . -}}
--------------------------------------------------------------------------------
/charts/orchestrator/templates/orchestrator-service.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.service" . -}}
--------------------------------------------------------------------------------
/charts/priority-class/templates/priority-class.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.priorityclass" . -}}
--------------------------------------------------------------------------------
/charts/prometheus/templates/prometheus-config-map.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.configmap" . -}}
--------------------------------------------------------------------------------
/charts/prometheus/templates/prometheus-deployment.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.deployment" . -}}
--------------------------------------------------------------------------------
/charts/telegram-bot/templates/telegram-bot-service.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.service" . -}}
--------------------------------------------------------------------------------
/charts/vault/templates/vault-service-account.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.serviceaccount" . -}}
--------------------------------------------------------------------------------
/charts/zookeeper/templates/zookeeper-deployment.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.deployment" . -}}
--------------------------------------------------------------------------------
/frontend/landing/.env:
--------------------------------------------------------------------------------
1 | # Used always
2 |
3 | VITE_SUPPORT_EMAIL=anatolii.marandyuk@gmail.com
--------------------------------------------------------------------------------
/charts/admin-user/templates/service-account-github.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.serviceaccount" . -}}
--------------------------------------------------------------------------------
/charts/frontend-landing/templates/frontend-landing-service.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.service" . -}}
--------------------------------------------------------------------------------
/charts/orchestrator/templates/orchestrator-deployment.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.deployment" . -}}
--------------------------------------------------------------------------------
/charts/prometheus/templates/prometheus-cluster-role.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.clusterrole" . -}}
--------------------------------------------------------------------------------
/charts/telegram-bot/templates/telegram-bot-deployment.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.deployment" . -}}
--------------------------------------------------------------------------------
/charts/wit-ai-go-proxy/templates/wit-ai-go-proxy-service.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.service" . -}}
--------------------------------------------------------------------------------
/charts/admin-user/templates/cluster-role-binding.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.clusterrolebinding" . -}}
--------------------------------------------------------------------------------
/charts/prometheus/templates/prometheus-service-account.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.serviceaccount" . -}}
--------------------------------------------------------------------------------
/charts/vault/templates/vault-secret-provider-class.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.secretproviderclass" . -}}
--------------------------------------------------------------------------------
/charts/wit-ai-go-proxy/templates/wit-ai-go-proxy-deployment.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.deployment" . -}}
--------------------------------------------------------------------------------
/charts/frontend-landing/templates/frontend-landing-deployment.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.deployment" . -}}
--------------------------------------------------------------------------------
/charts/prometheus/templates/prometheus-cluster-role-binding.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.clusterrolebinding" . -}}
--------------------------------------------------------------------------------
/frontend/landing/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow: /
--------------------------------------------------------------------------------
/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nekromant322/OverMoney/HEAD/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/charts/admin-user/values.yaml:
--------------------------------------------------------------------------------
1 | serviceAccountName: admin-user
2 | serviceAccountNamespace: kube-system
3 | roleRefName: admin
--------------------------------------------------------------------------------
/charts/postgres-exporter-telegram/templates/postgres-exporter-telegram-bot-service.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.service" . -}}
--------------------------------------------------------------------------------
/frontend/app/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nekromant322/OverMoney/HEAD/frontend/app/public/favicon.ico
--------------------------------------------------------------------------------
/charts/postgres-exporter-orchestrator/templates/postgres-exporter-orchestrator-service.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.service" . -}}
--------------------------------------------------------------------------------
/charts/postgres-exporter-telegram/templates/postgres-exporter-telegram-bot-deployment.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.deployment" . -}}
--------------------------------------------------------------------------------
/frontend/landing/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nekromant322/OverMoney/HEAD/frontend/landing/public/favicon.ico
--------------------------------------------------------------------------------
/charts/postgres-exporter-orchestrator/templates/postgres-exporter-orchestrator-deployment.yaml:
--------------------------------------------------------------------------------
1 | {{- template "shared.deployment" . -}}
--------------------------------------------------------------------------------
/frontend/landing/src/styles/global/buttons.css:
--------------------------------------------------------------------------------
1 | button {
2 | user-select: none;
3 | }
4 |
5 | button:hover {
6 | cursor: pointer;
7 | }
--------------------------------------------------------------------------------
/charts/priority-class/values-qa.yaml:
--------------------------------------------------------------------------------
1 | name: qa-priority-class
2 | priority: -1
3 | description: "This priority class should be used for qa pods."
--------------------------------------------------------------------------------
/charts/priority-class/values.yaml:
--------------------------------------------------------------------------------
1 | name: prod-priority-class
2 | priority: 0
3 | description: "This priority class should be used for prod pods."
--------------------------------------------------------------------------------
/frontend/app/src/views/LoginView.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | Login view
4 |
5 |
6 |
7 |
9 |
--------------------------------------------------------------------------------
/frontend/landing/.env.local.example:
--------------------------------------------------------------------------------
1 | # Only for development
2 |
3 | VITE_BASE_URL=https://localhost:5173
4 | VITE_APP_URL=https://localhost:5174
--------------------------------------------------------------------------------
/mask_log_starter/src/main/application.yml:
--------------------------------------------------------------------------------
1 | mask-log-spring-boot-starter:
2 | secretFields:
3 | - x-internal-key
4 | - id
5 | - token
--------------------------------------------------------------------------------
/wit_ai_go_proxy/go.mod:
--------------------------------------------------------------------------------
1 | module go_audio_recognizer
2 |
3 | go 1.20
4 |
5 | require gopkg.in/hraban/opus.v2 v2.0.0-20230706205704-edec55a8f5da
6 |
7 |
--------------------------------------------------------------------------------
/frontend/landing/src/styles/global/links.css:
--------------------------------------------------------------------------------
1 | a {
2 | text-decoration: none;
3 | user-select: none;
4 | }
5 |
6 | a:hover {
7 | cursor: pointer;
8 | }
--------------------------------------------------------------------------------
/recognizer_service/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nekromant322/OverMoney/HEAD/recognizer_service/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/orchestrator_service/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nekromant322/OverMoney/HEAD/orchestrator_service/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/telegram_bot_service/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nekromant322/OverMoney/HEAD/telegram_bot_service/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/frontend/app/.prettierrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/prettierrc",
3 | "semi": false,
4 | "singleQuote": true,
5 | "printWidth": 100
6 | }
7 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/constants/Period.java:
--------------------------------------------------------------------------------
1 | package com.override.dto.constants;
2 |
3 | public enum Period {
4 |
5 | DAY,
6 | MONTH,
7 | YEAR
8 | }
9 |
--------------------------------------------------------------------------------
/frontend/landing/.env.production:
--------------------------------------------------------------------------------
1 | # Used when `npm build-production` is running
2 |
3 | VITE_BASE_URL=https://overmoney.tech/landing
4 | VITE_APP_URL=https://overmoney.tech/app
--------------------------------------------------------------------------------
/frontend/landing/.env.staging:
--------------------------------------------------------------------------------
1 | # Used when `npm build-staging` is running
2 |
3 | VITE_BASE_URL=https://overmoneytest.online/landing
4 | VITE_APP_URL=https://overmoneytest.online/app
--------------------------------------------------------------------------------
/mask_log_starter/src/main/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
2 | com.override.mask_log.config.MaskLogConfiguration
--------------------------------------------------------------------------------
/charts/frontend/values-qa.yaml:
--------------------------------------------------------------------------------
1 | deployment:
2 | registry: overregistry.ru
3 | containers:
4 | image: nekromant322/overmoney-frontend-qa
5 | priorityClassName: qa-priority-class
--------------------------------------------------------------------------------
/orchestrator_service/src/main/resources/static/images/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nekromant322/OverMoney/HEAD/orchestrator_service/src/main/resources/static/images/favicon.ico
--------------------------------------------------------------------------------
/actuator_git_info_starter/src/main/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=com.overmoney.actuator_git_info.config.GitInfoAutoConfiguration
--------------------------------------------------------------------------------
/charts/frontend-landing/values-qa.yaml:
--------------------------------------------------------------------------------
1 | deployment:
2 | registry: overregistry.ru
3 | containers:
4 | image: nekromant322/overmoney-frontend-landing-qa
5 | priorityClassName: qa-priority-class
--------------------------------------------------------------------------------
/telegram_bot_service/src/main/resources/images/voice_message_example.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nekromant322/OverMoney/HEAD/telegram_bot_service/src/main/resources/images/voice_message_example.jpg
--------------------------------------------------------------------------------
/frontend/app/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "files": [],
3 | "references": [
4 | {
5 | "path": "./tsconfig.node.json"
6 | },
7 | {
8 | "path": "./tsconfig.app.json"
9 | }
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/frontend/app/src/App.vue:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
11 |
--------------------------------------------------------------------------------
/charts/frontend/values.yaml:
--------------------------------------------------------------------------------
1 | serviceTargetPort: 80
2 |
3 | deployment:
4 | registry: overregistry.ru
5 | containers:
6 | image: overregistry.ru/overmoney-frontend
7 | containerPort: 80
8 | priorityClassName: prod-priority-class
--------------------------------------------------------------------------------
/wit_ai_go_proxy/go.sum:
--------------------------------------------------------------------------------
1 | gopkg.in/hraban/opus.v2 v2.0.0-20230706205704-edec55a8f5da h1:IsdNemWRwTNdQ5aZopt7FMfyZO7N41Z3KRPk0Zlz1PY=
2 | gopkg.in/hraban/opus.v2 v2.0.0-20230706205704-edec55a8f5da/go.mod h1:/L5E7a21VWl8DeuCPKxQBdVG5cy+L0MRZ08B1wnqt7g=
3 |
--------------------------------------------------------------------------------
/charts/frontend-landing/values.yaml:
--------------------------------------------------------------------------------
1 | serviceTargetPort: 80
2 |
3 | deployment:
4 | registry: overregistry.ru
5 | containers:
6 | image: overregistry.ru/overmoney-frontend-landing
7 | containerPort: 80
8 | priorityClassName: prod-priority-class
--------------------------------------------------------------------------------
/frontend/app/src/main.ts:
--------------------------------------------------------------------------------
1 | import './assets/main.css'
2 |
3 | import { createApp } from 'vue'
4 | import App from './App.vue'
5 | import router from './router'
6 |
7 | const app = createApp(App)
8 |
9 | app.use(router)
10 |
11 | app.mount('#app')
12 |
--------------------------------------------------------------------------------
/frontend/landing/src/styles/app/components/header.css:
--------------------------------------------------------------------------------
1 | .header {
2 | display: flex;
3 | justify-content: space-between;
4 | padding: 16px 32px;
5 | }
6 | @media screen and (max-width: 1024px) {
7 | .header {
8 | padding: 16px;
9 | }
10 | }
--------------------------------------------------------------------------------
/frontend/landing/docker/nginx/conf.d/default.conf:
--------------------------------------------------------------------------------
1 | server {
2 | listen 80;
3 |
4 | location /landing {
5 | root /usr/share/nginx/html;
6 | try_files $uri $uri/ /landing/index.html;
7 | index index.html;
8 | }
9 | }
10 |
11 |
--------------------------------------------------------------------------------
/frontend/landing/src/styles/global/root.css:
--------------------------------------------------------------------------------
1 | html {
2 | scroll-behavior: smooth;
3 | font-family: Inter, Arial, Helvetica, sans-serif;
4 | }
5 |
6 | html, body {
7 | min-height: 100vh;
8 | min-width: 320px;
9 | width: 100%;
10 | height: 100%;
11 | }
--------------------------------------------------------------------------------
/actuator_git_info_starter/src/main/resources/git.properties:
--------------------------------------------------------------------------------
1 | app.git.branch=${git.branch}
2 | app.git.commit.id=${git.commit.id}
3 | app.git.commit.time=${git.commit.time}
4 | app.git.commit.user.email=${git.commit.user.email}
5 | app.git.commit.user.name=${git.commit.user.name}
--------------------------------------------------------------------------------
/payment_service/src/test/java/com/override/payment_service/PaymentServiceApplicationTest.java:
--------------------------------------------------------------------------------
1 | package com.override.payment_service;
2 |
3 | import org.springframework.boot.test.context.SpringBootTest;
4 |
5 |
6 | @SpringBootTest
7 | class PaymentServiceApplicationTest {
8 |
9 | }
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/AuthorizationTokenDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 |
4 | import lombok.*;
5 |
6 | @Getter
7 | @Setter
8 | @AllArgsConstructor
9 | @NoArgsConstructor
10 | public class AuthorizationTokenDTO {
11 |
12 | String AccessToken;
13 | }
14 |
--------------------------------------------------------------------------------
/frontend/app/.editorconfig:
--------------------------------------------------------------------------------
1 | [*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue,css,scss,sass,less,styl}]
2 | charset = utf-8
3 | indent_size = 2
4 | indent_style = space
5 | insert_final_newline = true
6 | trim_trailing_whitespace = true
7 |
8 | end_of_line = lf
9 | max_line_length = 100
10 |
--------------------------------------------------------------------------------
/actuator_git_info_starter/src/main/resources/application.yaml:
--------------------------------------------------------------------------------
1 | spring:
2 | application:
3 | name: actuator_git_info
4 |
5 | config:
6 | import: classpath:git.properties
7 |
8 | management:
9 | endpoints:
10 | web:
11 | exposure:
12 | include: gitInfo
13 |
14 |
--------------------------------------------------------------------------------
/charts/grafana/files/grafana-datasources.yml:
--------------------------------------------------------------------------------
1 | apiVersion: 1
2 | datasources:
3 | - name: Prometheus
4 | type: prometheus
5 | url: http://prometheus-service:9090
6 | access: proxy
7 | isDefault: true
8 | jsonData:
9 | timeInterval: "5s"
10 | httpMethod: "POST"
--------------------------------------------------------------------------------
/charts/zookeeper/values-qa.yaml:
--------------------------------------------------------------------------------
1 | deployment:
2 | containers:
3 | env:
4 | - name: ZOOKEEPER_CLIENT_PORT
5 | value: "2181"
6 | - name: ZOOKEEPER_TICK_TIME
7 | value: "2000"
8 | priorityClassName: qa-priority-class
9 | secretProviderClass:
10 | name: vault-qa
--------------------------------------------------------------------------------
/charts/shared/templates/_priorityclass.yaml:
--------------------------------------------------------------------------------
1 | {{- define "shared.priorityclass" -}}
2 | apiVersion: scheduling.k8s.io/v1
3 | kind: PriorityClass
4 | metadata:
5 | name: {{ .Values.name }}
6 | value: {{ .Values.priority }}
7 | globalDefault: false
8 | description: {{ .Values.description }}
9 | {{- end -}}
--------------------------------------------------------------------------------
/charts/ingress/values-default.yaml:
--------------------------------------------------------------------------------
1 | environment: default
2 | rules:
3 | - host: overmoney.tech
4 | paths:
5 | - path: /grafana
6 | pathType: Prefix
7 | backend:
8 | service:
9 | name: grafana-service
10 | port:
11 | number: 3000
--------------------------------------------------------------------------------
/charts/grafana/files/grafana-notifiers.yml:
--------------------------------------------------------------------------------
1 | apiVersion: 1
2 | contactPoints:
3 | - name: Telegram
4 | receivers:
5 | - type: telegram
6 | settings:
7 | bottoken: "$__env{telegram-bot-token-grafana}"
8 | chatid: "-4795149880"
9 | message: '{{ template "telegram.message" . }}'
--------------------------------------------------------------------------------
/charts/shared/templates/_serviceaccount.yaml:
--------------------------------------------------------------------------------
1 | {{- define "shared.serviceaccount" -}}
2 | apiVersion: v1
3 | kind: ServiceAccount
4 | metadata:
5 | name: {{ .Values.serviceAccountName }}
6 | {{- if .Values.serviceAccountNamespace }}
7 | namespace: {{ .Values.serviceAccountNamespace }}
8 | {{- end }}
9 | {{- end -}}
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/model/RefreshJwtRequest.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.model;
2 |
3 | import lombok.Getter;
4 | import lombok.Setter;
5 |
6 | @Getter
7 | @Setter
8 | public class RefreshJwtRequest {
9 |
10 | public String refreshToken;
11 | }
12 |
--------------------------------------------------------------------------------
/telegram_bot_service/src/main/java/com/overmoney/telegram_bot_service/exception/InvalidPaymentUrlException.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.telegram_bot_service.exception;
2 |
3 | public class InvalidPaymentUrlException extends Exception {
4 | public InvalidPaymentUrlException(String message) {
5 | super(message);
6 | }
7 | }
--------------------------------------------------------------------------------
/recognizer_service/src/main/resources/application-dev.yml:
--------------------------------------------------------------------------------
1 | server:
2 | port: 8080
3 |
4 |
5 |
6 | integration:
7 | internal:
8 | host:
9 | orchestrator: http://localhost:8081
10 | # локальный запуск этого сервиса не удобен, в коде есть мок, который отвечает пиво двести
11 | wit-ai-proxy: http://vnimanie-zalupa
--------------------------------------------------------------------------------
/telegram_bot_service/src/test/java/com/overmoney/telegram_bot_service/TgBotServiceApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.telegram_bot_service;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class TgBotServiceApplicationTests {
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/charts/shared/templates/_clusterrole.yaml:
--------------------------------------------------------------------------------
1 | {{- define "shared.clusterrole" -}}
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: ClusterRole
4 | metadata:
5 | name: {{ .Chart.Name }}-cluster-role
6 | rules:
7 | - apiGroups: [""]
8 | resources: ["pods", "pods/log", "services"]
9 | verbs: ["get", "watch", "list"]
10 | {{- end -}}
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/constants/Type.java:
--------------------------------------------------------------------------------
1 | package com.override.dto.constants;
2 |
3 | import lombok.Getter;
4 |
5 | @Getter
6 | public enum Type {
7 | INCOME("Доходы"),
8 | EXPENSE("Расходы");
9 |
10 | private final String value;
11 |
12 | Type(String value) {
13 | this.value = value;
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/service/calc/TransactionHandler.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.service.calc;
2 |
3 | public interface TransactionHandler {
4 | double calculateAmount(String transaction);
5 |
6 | String getTransactionComment(String transaction);
7 |
8 | String getRegExp();
9 | }
--------------------------------------------------------------------------------
/recognizer_service/src/main/java/com/override/recognizer_service/service/voice/VoiceDTORecognitionService.java:
--------------------------------------------------------------------------------
1 | package com.override.recognizer_service.service.voice;
2 |
3 | import com.override.dto.AudioRecognizerGoRequestDTO;
4 |
5 | public interface VoiceDTORecognitionService {
6 | String voiceToText(AudioRecognizerGoRequestDTO requestDTO);
7 | }
8 |
--------------------------------------------------------------------------------
/telegram_bot_service/src/main/java/com/overmoney/telegram_bot_service/exception/VoiceProcessingException.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.telegram_bot_service.exception;
2 |
3 | public class VoiceProcessingException extends RuntimeException {
4 | public VoiceProcessingException(String message, Throwable cause) {
5 | super(message, cause);
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/payment_service/src/main/resources/application-dev.yml:
--------------------------------------------------------------------------------
1 | server:
2 | port: 8084
3 |
4 |
5 | orchestrator:
6 | host: overridetech.ru
7 |
8 | integration:
9 | internal:
10 | host:
11 | orchestrator: http://localhost:8081
12 | recognizer: http://localhost:8080
13 |
14 | spring:
15 | kafka:
16 | bootstrap-servers: http://localhost:9092
--------------------------------------------------------------------------------
/recognizer_service/src/test/java/com/override/recognizer_service/RecognizerServiceApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.override.recognizer_service;
2 |
3 | import org.springframework.boot.test.context.SpringBootTest;
4 |
5 | @SpringBootTest
6 | class RecognizerServiceApplicationTests {
7 |
8 | // @Test
9 | // void contextLoads() {
10 | // }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/frontend/landing/vite.config.js:
--------------------------------------------------------------------------------
1 | import { ViteImageOptimizer } from 'vite-plugin-image-optimizer';
2 | import { defineConfig } from 'vite';
3 |
4 | export default defineConfig(() => {
5 | return {
6 | plugins: [
7 | ViteImageOptimizer(),
8 | ],
9 | server: {
10 | allowedHosts: true
11 | },
12 | base: '/landing/',
13 | };
14 | });
--------------------------------------------------------------------------------
/charts/shared/templates/_persistentvolumeclaim.yaml:
--------------------------------------------------------------------------------
1 | {{- define "shared.persistentVolumeClaim" -}}
2 | apiVersion: v1
3 | kind: PersistentVolumeClaim
4 | metadata:
5 | name: {{ .Chart.Name }}-pvc
6 | spec:
7 | accessModes:
8 | - ReadWriteOnce
9 | resources:
10 | requests:
11 | storage: {{ .Values.persistentVolumeClaim.requestsStorage }}
12 | {{- end -}}
--------------------------------------------------------------------------------
/frontend/app/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@vue/tsconfig/tsconfig.dom.json",
3 | "include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
4 | "exclude": ["src/**/__tests__/*"],
5 | "compilerOptions": {
6 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
7 |
8 | "paths": {
9 | "@/*": ["./src/*"]
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/charts/shared/templates/_configmap.yaml:
--------------------------------------------------------------------------------
1 | {{- define "shared.configmap" -}}
2 | apiVersion: v1
3 | kind: ConfigMap
4 | metadata:
5 | name: {{ .Chart.Name }}-config
6 | labels:
7 | app: {{ .Chart.Name }}
8 | data:
9 | {{- range $path, $_ := .Files.Glob "**.yml" }}
10 | {{ $path | base }}: |
11 | {{- $.Files.Get $path | nindent 4 }}
12 | {{- end }}
13 | {{- end }}
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/AnalyticsDataPerMonthDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Getter;
5 | import lombok.Setter;
6 |
7 | @Getter
8 | @Setter
9 | @AllArgsConstructor
10 | public class AnalyticsDataPerMonthDTO {
11 | private double[] monthsIncome;
12 | private double[] monthsExpense;
13 | }
14 |
--------------------------------------------------------------------------------
/charts/shared/templates/_secret.yaml:
--------------------------------------------------------------------------------
1 | {{- define "shared.secret" -}}
2 | apiVersion: v1
3 | kind: Secret
4 | type: kubernetes.io/service-account-token
5 | metadata:
6 | name: {{ .Values.serviceAccountName }}-token
7 | namespace: {{ .Values.serviceAccountNamespace }}
8 | annotations:
9 | kubernetes.io/service-account.name: {{ .Values.serviceAccountName | quote }}
10 | {{- end -}}
--------------------------------------------------------------------------------
/frontend/landing/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | pnpm-debug.log*
8 | lerna-debug.log*
9 |
10 | node_modules
11 | dist
12 | dist-ssr
13 | *.local
14 |
15 | # Editor directories and files
16 | .vscode/*
17 | !.vscode/extensions.json
18 | .idea
19 | .DS_Store
20 | *.suo
21 | *.ntvs*
22 | *.njsproj
23 | *.sln
24 | *.sw?
25 |
--------------------------------------------------------------------------------
/wit_ai_go_proxy/Dockerfile:
--------------------------------------------------------------------------------
1 | # syntax=docker/dockerfile:1
2 |
3 | FROM golang:1.20
4 |
5 | RUN mkdir -p /app
6 | WORKDIR /app
7 |
8 |
9 | COPY /wit_ai_go_proxy /app
10 |
11 | RUN apt-get update && apt-get -y install libopus-dev libopusfile-dev
12 | RUN go mod download
13 | # COPY *.go ./
14 |
15 | RUN go build -o /wit_ai_go_proxy
16 |
17 | EXPOSE 8080
18 |
19 | CMD ["/wit_ai_go_proxy"]
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/AccountDataDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | @Data
9 | @AllArgsConstructor
10 | @NoArgsConstructor
11 | @Builder
12 | public class AccountDataDTO {
13 | private Long chatId;
14 | private Long userId;
15 | }
16 |
--------------------------------------------------------------------------------
/frontend/app/README.md:
--------------------------------------------------------------------------------
1 | # OverMoney
2 |
3 | ## Требования
4 | - [NodeJS 20+](https://nodejs.org)
5 |
6 | ## Рекомендации
7 | - [VSCode](https://code.visualstudio.com/)
8 | - [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar)
9 |
10 | ## Запуск
11 | 1. `npm install`
12 | 2. `npm run dev`
13 |
14 | ## Сборка
15 | 1. `npm install`
16 | 2. `npm run lint`
17 | 3. `npm run build`
18 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/constants/StatusMailing.java:
--------------------------------------------------------------------------------
1 | package com.override.dto.constants;
2 |
3 | import lombok.Getter;
4 |
5 | @Getter
6 | public enum StatusMailing {
7 | SUCCESS("Успешно"),
8 | ERROR("Ошибка"),
9 | PENDING("В ожидании");
10 |
11 | private final String value;
12 |
13 | StatusMailing(String value) {
14 | this.value = value;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/frontend/app/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Vite App
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/telegram_bot_service/src/main/resources/application-dev.yml:
--------------------------------------------------------------------------------
1 | server:
2 | port: 8082
3 |
4 |
5 | orchestrator:
6 | host: overridetech.ru
7 |
8 | integration:
9 | internal:
10 | host:
11 | orchestrator: http://localhost:8081
12 | recognizer: http://localhost:8080
13 | payment: http://localhost:8084
14 |
15 | spring:
16 | kafka:
17 | bootstrap-servers: http://localhost:9092
--------------------------------------------------------------------------------
/mask_log_starter/src/main/java/com/override/mask_log/App.java:
--------------------------------------------------------------------------------
1 | package com.override.mask_log;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class App {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(App.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/constants/SuggestionAlgorithm.java:
--------------------------------------------------------------------------------
1 | package com.override.dto.constants;
2 |
3 | import lombok.Getter;
4 |
5 | @Getter
6 | public enum SuggestionAlgorithm {
7 | LEVENSHTEIN("LEVENSHTEIN"),
8 | LLM("LLM"),
9 | DEEPSEEK("DEEPSEEK");
10 |
11 | private final String name;
12 |
13 | SuggestionAlgorithm(String value) {
14 | this.name = value;
15 | }
16 | }
--------------------------------------------------------------------------------
/orchestrator_service/src/test/java/com/override/orchestrator_service/OrchestratorServiceApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class OrchestratorServiceApplicationTests {
8 |
9 | // @Test
10 | // void contextLoads() {
11 | // }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/charts/vault/values-default.yaml:
--------------------------------------------------------------------------------
1 | secretProviderClass:
2 | name: vault-default
3 | roleName: default
4 | secretName: default
5 | objects:
6 | - objectName: "default-grafana-password"
7 | secretPath: "secret/default"
8 | secretKey: "default-grafana-password"
9 | - objectName: "telegram-bot-token-grafana"
10 | secretPath: "secret/grafana"
11 | secretKey: "telegram-bot-token-grafana"
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/model/JwtResponse.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.model;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Getter;
5 |
6 | @Getter
7 | @AllArgsConstructor
8 | public class JwtResponse {
9 |
10 | private final String type = "Bearer";
11 | private String accessToken;
12 | private String refreshToken;
13 | }
14 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/UserInfoResponseDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | @Data
9 | @AllArgsConstructor
10 | @NoArgsConstructor
11 | @Builder
12 | public class UserInfoResponseDTO {
13 | private String username;
14 | private String photoBase64Format;
15 | }
16 |
17 |
--------------------------------------------------------------------------------
/charts/zookeeper/values.yaml:
--------------------------------------------------------------------------------
1 | servicePort: 2181
2 | serviceTargetPort: 2181
3 |
4 | deployment:
5 | containers:
6 | image: confluentinc/cp-zookeeper
7 | imageTag: 7.0.1
8 | pullPolicy: IfNotPresent
9 | containerPort: 2181
10 | env:
11 | - name: ZOOKEEPER_CLIENT_PORT
12 | value: "2181"
13 | - name: ZOOKEEPER_TICK_TIME
14 | value: "2000"
15 | priorityClassName: prod-priority-class
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/OnboardingStepDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | @Data
9 | @AllArgsConstructor
10 | @NoArgsConstructor
11 | @Builder
12 | public class OnboardingStepDTO {
13 | private int dayOffset;
14 | private String text;
15 | private String image;
16 | }
17 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/TransactionAmountAndCommentDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Getter;
5 | import lombok.NoArgsConstructor;
6 | import lombok.Setter;
7 |
8 | @AllArgsConstructor
9 | @NoArgsConstructor
10 | @Getter
11 | @Setter
12 | public class TransactionAmountAndCommentDTO {
13 | private double amount;
14 | private String comment;
15 | }
16 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/AnnounceDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | import java.util.Set;
9 |
10 | @Data
11 | @AllArgsConstructor
12 | @NoArgsConstructor
13 | @Builder
14 | public class AnnounceDTO {
15 | private String announceText;
16 | private Set userIds;
17 | }
18 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/VoiceMessageDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | @Data
9 | @AllArgsConstructor
10 | @NoArgsConstructor
11 | @Builder
12 | public class VoiceMessageDTO {
13 | private byte[] voiceMessageBytes;
14 | private Long userId;
15 | private Long chatId;
16 | }
17 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/tinkoff/TinkoffAccountDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto.tinkoff;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | @Data
9 | @NoArgsConstructor
10 | @AllArgsConstructor
11 | @Builder
12 | public class TinkoffAccountDTO {
13 | private String investAccountName;
14 | private String investAccountId;
15 | }
16 |
--------------------------------------------------------------------------------
/.dockerignore:
--------------------------------------------------------------------------------
1 | #Root files
2 | charts/
3 | argocd/
4 | grafana_on_Boris_VM/
5 | README.md
6 | LICENSE
7 | infra.svg
8 | checkstyle.xml
9 | docker-compose.yaml
10 | docker-compose.dev.yaml
11 |
12 | #Git
13 | .gitignore
14 | .idea
15 |
16 | #Maven
17 | .mvn/
18 | mvnw
19 | mvnw.cmd
20 | target/
21 |
22 | #Microservices files
23 | **/target/
24 | **/.mvn/
25 | **/mvnw
26 | **/mvnw.cmd
27 | **/.gitignore
28 | frontend/app
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/AnalyticsMainDataPerYearsDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | import java.util.List;
9 |
10 | @Data
11 | @NoArgsConstructor
12 | @AllArgsConstructor
13 | @Builder
14 | public class AnalyticsMainDataPerYearsDTO {
15 | private List data;
16 | }
17 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/AudioRecognizerGoResponseDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | import java.util.UUID;
9 |
10 | @Data
11 | @AllArgsConstructor
12 | @NoArgsConstructor
13 | @Builder
14 | public class AudioRecognizerGoResponseDTO {
15 | private UUID id;
16 | private String text;
17 | }
18 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/MailDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import com.override.dto.constants.StatusMailing;
4 | import lombok.AllArgsConstructor;
5 | import lombok.Builder;
6 | import lombok.Data;
7 | import lombok.NoArgsConstructor;
8 |
9 | @Data
10 | @AllArgsConstructor
11 | @NoArgsConstructor
12 | @Builder
13 | public class MailDTO {
14 | private StatusMailing statusMail;
15 | private Long countOfMails;
16 | }
17 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/AnalyticsDataMonthDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | @Data
9 | @AllArgsConstructor
10 | @NoArgsConstructor
11 | @Builder
12 | public class AnalyticsDataMonthDTO {
13 | private String month;
14 | private Double totalIncome;
15 | private Double totalExpense;
16 | }
17 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/AudioRecognizerGoRequestDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | import java.util.UUID;
9 |
10 | @Data
11 | @AllArgsConstructor
12 | @NoArgsConstructor
13 | @Builder
14 | public class AudioRecognizerGoRequestDTO {
15 | private UUID id;
16 | private byte[] voiceMessage;
17 | }
18 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/SumTransactionsDataPerMonthForAccountDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import com.override.dto.constants.Type;
4 | import lombok.AllArgsConstructor;
5 | import lombok.Getter;
6 | import lombok.Setter;
7 |
8 | @Getter
9 | @Setter
10 | @AllArgsConstructor
11 | public class SumTransactionsDataPerMonthForAccountDTO {
12 | private Type type;
13 | private int month;
14 | private Double sum;
15 | }
16 |
--------------------------------------------------------------------------------
/frontend/landing/src/styles/app/components/footer.css:
--------------------------------------------------------------------------------
1 | .footer {
2 | display: flex;
3 | align-items: center;
4 | justify-content: center;
5 | width: 100%;
6 | padding: 0 32px 48px 32px;
7 | }
8 |
9 | @media screen and (max-width: 1024px) {
10 | .footer {
11 | padding: 0 16px 48px 16px;
12 | }
13 | }
14 |
15 | .footer__copyright {
16 | color: #8B949E;
17 | font-size: 12px;
18 | white-space: nowrap;
19 | margin-left: 8px;
20 | }
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/AnalyticsDataDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | @Data
9 | @AllArgsConstructor
10 | @NoArgsConstructor
11 | @Builder
12 | public class AnalyticsDataDTO {
13 | private Long categoryId;
14 | private String categoryName;
15 | private Number mediumAmountOfTransactions;
16 | }
17 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/MonthSumTransactionByTypeCategoryDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | @Data
9 | @AllArgsConstructor
10 | @NoArgsConstructor
11 | @Builder
12 | public class MonthSumTransactionByTypeCategoryDTO {
13 | private Long id;
14 | private String name;
15 | private Double sum;
16 | }
17 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/SumTransactionPerYearForAccountDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | @Data
9 | @NoArgsConstructor
10 | @AllArgsConstructor
11 | @Builder
12 | public class SumTransactionPerYearForAccountDTO {
13 | private Long id;
14 | private String name;
15 | private Double sum;
16 | }
17 |
--------------------------------------------------------------------------------
/payment_service/.dockerignore:
--------------------------------------------------------------------------------
1 | #Root files
2 | charts/
3 | argocd/
4 | grafana_on_Boris_VM/
5 | README.md
6 | LICENSE
7 | infra.svg
8 | checkstyle.xml
9 | docker-compose.yaml
10 | docker-compose.dev.yaml
11 |
12 | #Git
13 | .gitignore
14 | .idea
15 |
16 | #Maven
17 | .mvn/
18 | mvnw
19 | mvnw.cmd
20 | target/
21 |
22 | #Microservices files
23 | **/target/
24 | **/.mvn/
25 | **/mvnw
26 | **/mvnw.cmd
27 | **/.gitignore
28 | frontend/app
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/telegram_bot_service/src/main/java/com/overmoney/telegram_bot_service/util/ValidationUtils.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.telegram_bot_service.util;
2 |
3 | import java.security.InvalidParameterException;
4 |
5 | public class ValidationUtils {
6 |
7 | public static void validateArguments(String[] strings) {
8 | if (strings == null || strings.length == 0) {
9 | throw new InvalidParameterException();
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/TransactionSummaryDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Getter;
5 | import lombok.Setter;
6 |
7 | import java.util.List;
8 |
9 | @Getter
10 | @Setter
11 | @AllArgsConstructor
12 | public class TransactionSummaryDTO {
13 | private List sumIncome;
14 | private List sumExpense;
15 | }
16 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/UserRegistrationInfoDto.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | import java.time.LocalDateTime;
9 |
10 | @Data
11 | @AllArgsConstructor
12 | @NoArgsConstructor
13 | @Builder
14 | public class UserRegistrationInfoDto {
15 | private Long id;
16 | private LocalDateTime registerDate;
17 | }
18 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/constants/Currency.java:
--------------------------------------------------------------------------------
1 | package com.override.dto.constants;
2 |
3 | import com.fasterxml.jackson.annotation.JsonValue;
4 | import lombok.Getter;
5 | import lombok.RequiredArgsConstructor;
6 |
7 | @Getter
8 | @RequiredArgsConstructor
9 | public enum Currency {
10 | RUB("RUB"),
11 | USD("USD"),
12 | EUR("EUR"),
13 | CNY("CNY"),
14 | KZT("KZT");
15 |
16 | @JsonValue
17 | private final String code;
18 | }
--------------------------------------------------------------------------------
/orchestrator_service/.dockerignore:
--------------------------------------------------------------------------------
1 | #Root files
2 | charts/
3 | argocd/
4 | grafana_on_Boris_VM/
5 | README.md
6 | LICENSE
7 | infra.svg
8 | checkstyle.xml
9 | docker-compose.yaml
10 | docker-compose.dev.yaml
11 |
12 | #Git
13 | .gitignore
14 | .idea
15 |
16 | #Maven
17 | .mvn/
18 | mvnw
19 | mvnw.cmd
20 | target/
21 |
22 | #Microservices files
23 | **/target/
24 | **/.mvn/
25 | **/mvnw
26 | **/mvnw.cmd
27 | **/.gitignore
28 | frontend/app
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/recognizer_service/.dockerignore:
--------------------------------------------------------------------------------
1 | #Root files
2 | charts/
3 | argocd/
4 | grafana_on_Boris_VM/
5 | README.md
6 | LICENSE
7 | infra.svg
8 | checkstyle.xml
9 | docker-compose.yaml
10 | docker-compose.dev.yaml
11 |
12 | #Git
13 | .gitignore
14 | .idea
15 |
16 | #Maven
17 | .mvn/
18 | mvnw
19 | mvnw.cmd
20 | target/
21 |
22 | #Microservices files
23 | **/target/
24 | **/.mvn/
25 | **/mvnw
26 | **/mvnw.cmd
27 | **/.gitignore
28 | frontend/app
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/telegram_bot_service/.dockerignore:
--------------------------------------------------------------------------------
1 | #Root files
2 | charts/
3 | argocd/
4 | grafana_on_Boris_VM/
5 | README.md
6 | LICENSE
7 | infra.svg
8 | checkstyle.xml
9 | docker-compose.yaml
10 | docker-compose.dev.yaml
11 |
12 | #Git
13 | .gitignore
14 | .idea
15 |
16 | #Maven
17 | .mvn/
18 | mvnw
19 | mvnw.cmd
20 | target/
21 |
22 | #Microservices files
23 | **/target/
24 | **/.mvn/
25 | **/mvnw
26 | **/mvnw.cmd
27 | **/.gitignore
28 | frontend/app
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/CommonErrorDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | import java.time.Instant;
9 |
10 | @Data
11 | @AllArgsConstructor
12 | @NoArgsConstructor
13 | @Builder
14 | public class CommonErrorDTO {
15 | private String code;
16 | private String message;
17 | private Instant timestamp;
18 | }
19 |
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/feign/PaymentFeign.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.feign;
2 |
3 | import org.springframework.cloud.openfeign.FeignClient;
4 | import org.springframework.web.bind.annotation.GetMapping;
5 |
6 | @FeignClient(value = "payment", url = "${integration.internal.host.payment}")
7 | public interface PaymentFeign {
8 |
9 | @GetMapping("/api/payment/test")
10 | String getTest();
11 | }
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/repository/ProfilePhotoRepository.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.repository;
2 |
3 | import com.override.orchestrator_service.model.ProfilePhoto;
4 | import org.springframework.data.jpa.repository.JpaRepository;
5 | import org.springframework.stereotype.Repository;
6 |
7 | @Repository
8 | public interface ProfilePhotoRepository extends JpaRepository {
9 |
10 | }
--------------------------------------------------------------------------------
/charts/shared/templates/_service.yaml:
--------------------------------------------------------------------------------
1 | {{- define "shared.service" -}}
2 | apiVersion: v1
3 | kind: Service
4 | metadata:
5 | name: {{ .Chart.Name }}-service
6 | {{- if .Values.serviceNamespace }}
7 | namespace: {{ .Values.serviceNamespace }}
8 | {{- end }}
9 | spec:
10 | ports:
11 | - port: {{ .Values.servicePort }}
12 | protocol: TCP
13 | targetPort: {{ .Values.serviceTargetPort }}
14 | selector:
15 | app: {{ .Chart.Name }}
16 | {{- end -}}
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/SubscriptionDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | import java.time.LocalDateTime;
9 |
10 | @Data
11 | @Builder
12 | @NoArgsConstructor
13 | @AllArgsConstructor
14 | public class SubscriptionDTO {
15 | private Long chatId;
16 | private LocalDateTime endDate;
17 | private boolean isActive;
18 | }
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/AnalyticsMonthlyIncomeForCategoryDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | @Data
9 | @AllArgsConstructor
10 | @NoArgsConstructor
11 | @Builder
12 | public class AnalyticsMonthlyIncomeForCategoryDTO {
13 | private Double amount;
14 | private String categoryName;
15 | private Integer month;
16 | }
17 |
--------------------------------------------------------------------------------
/frontend/app/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | pnpm-debug.log*
8 | lerna-debug.log*
9 |
10 | node_modules
11 | .DS_Store
12 | dist
13 | dist-ssr
14 | coverage
15 | *.local
16 |
17 | /cypress/videos/
18 | /cypress/screenshots/
19 |
20 | # Editor directories and files
21 | .vscode/*
22 | !.vscode/extensions.json
23 | .idea
24 | *.suo
25 | *.ntvs*
26 | *.njsproj
27 | *.sln
28 | *.sw?
29 |
30 | *.tsbuildinfo
31 |
--------------------------------------------------------------------------------
/frontend/landing/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "landing",
3 | "private": true,
4 | "version": "0.0.0",
5 | "type": "module",
6 | "scripts": {
7 | "dev": "vite",
8 | "build-production": "vite build --mode production",
9 | "build-staging": "vite build --mode staging",
10 | "preview": "vite preview"
11 | },
12 | "devDependencies": {
13 | "svgo": "^3.3.2",
14 | "vite": "^6.2.0",
15 | "vite-plugin-image-optimizer": "^1.1.8"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/charts/ingress/values-vault.yaml:
--------------------------------------------------------------------------------
1 | environment: vault
2 | tls:
3 | - hosts:
4 | - vault.overmoneytest.online
5 | secretName: vault-tls-secret
6 | rules:
7 | - host: vault.overmoneytest.online
8 | paths:
9 | - path: /
10 | pathType: Prefix
11 | backend:
12 | service:
13 | name: 'hashicorp-vault'
14 | port:
15 | number: 8200
16 | annotations:
17 | cert-manager.io/cluster-issuer: letsencrypt-staging
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/BackupUserDataDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | import java.util.List;
9 |
10 | @Data
11 | @AllArgsConstructor
12 | @NoArgsConstructor
13 | @Builder
14 | public class BackupUserDataDTO {
15 | private List transactionDTOList;
16 | private List categoryDTOList;
17 | }
18 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/SummaryUsersDataPerYearDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | import java.util.List;
9 |
10 | @Data
11 | @NoArgsConstructor
12 | @AllArgsConstructor
13 | @Builder
14 | public class SummaryUsersDataPerYearDTO {
15 | private int year;
16 | private List users;
17 | }
18 |
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/model/KeywordId.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.model;
2 |
3 | import lombok.*;
4 |
5 | import javax.persistence.Embeddable;
6 | import java.io.Serializable;
7 |
8 | @Embeddable
9 | @NoArgsConstructor
10 | @AllArgsConstructor
11 | @Getter
12 | @Setter
13 | @EqualsAndHashCode
14 | public class KeywordId implements Serializable {
15 | private String name;
16 | private Long accountId;
17 | }
18 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/ChatMemberDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | @Data
9 | @AllArgsConstructor
10 | @NoArgsConstructor
11 | @Builder
12 | public class ChatMemberDTO {
13 | private Long chatId;
14 | private Long userId;
15 | private String username;
16 | private String firstName;
17 | private String lastName;
18 | }
19 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/OnboardingMessageDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import lombok.*;
4 |
5 | import java.util.UUID;
6 |
7 | @Data
8 | @NoArgsConstructor
9 | @AllArgsConstructor
10 | @Builder
11 | public class OnboardingMessageDTO {
12 | private Long chatId;
13 | private UUID messageId;
14 | private String username;
15 | private String type;
16 | private String message;
17 | private int dayOffset;
18 | private byte[] image;
19 | }
20 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/AnalyticsMonthlyReportForYearDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 |
4 | import lombok.AllArgsConstructor;
5 | import lombok.Builder;
6 | import lombok.Data;
7 | import lombok.NoArgsConstructor;
8 |
9 | import java.util.Map;
10 |
11 | @Data
12 | @AllArgsConstructor
13 | @NoArgsConstructor
14 | @Builder
15 | public class AnalyticsMonthlyReportForYearDTO {
16 | private String categoryName;
17 | private Map monthlyAnalytics;
18 | }
19 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/constants/PaymentStatus.java:
--------------------------------------------------------------------------------
1 | package com.override.dto.constants;
2 |
3 | import com.fasterxml.jackson.annotation.JsonValue;
4 | import lombok.Getter;
5 | import lombok.RequiredArgsConstructor;
6 |
7 | @Getter
8 | @RequiredArgsConstructor
9 | public enum PaymentStatus {
10 | SUCCESS("succeeded"),
11 | CANCELED("canceled"),
12 | PENDING("pending"),
13 | WAITING("waiting_for_capture");
14 |
15 | @JsonValue
16 | private final String status;
17 | }
--------------------------------------------------------------------------------
/recognizer_service/src/main/java/com/override/recognizer_service/llm/Message.java:
--------------------------------------------------------------------------------
1 | package com.override.recognizer_service.llm;
2 |
3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4 | import lombok.AllArgsConstructor;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | @Data
9 | @AllArgsConstructor
10 | @NoArgsConstructor
11 | @JsonIgnoreProperties(ignoreUnknown = true)
12 | public class Message {
13 | private String role;
14 | private String content;
15 | }
--------------------------------------------------------------------------------
/frontend/landing/src/styles/app/components/button.css:
--------------------------------------------------------------------------------
1 | .button {
2 | background-image: linear-gradient(to right, #D16C77, #C9833C);
3 | font-size: 16px;
4 | line-height: 16px;
5 | color: #fff;
6 | font-weight: 700;
7 | padding: 16px;
8 | border: none;
9 | border-radius: 6px;
10 | transition: filter 250ms ease-in-out;
11 | }
12 |
13 | @media (hover: hover) {
14 | .button:hover {
15 | filter:brightness(1.1);
16 | }
17 | }
18 |
19 | .button:active {
20 | filter:brightness(1.2);
21 | }
--------------------------------------------------------------------------------
/recognizer_service/src/main/java/com/override/recognizer_service/service/category/CategoryRecognizer.java:
--------------------------------------------------------------------------------
1 | package com.override.recognizer_service.service.category;
2 |
3 | import com.override.dto.CategoryDTO;
4 | import com.override.dto.constants.SuggestionAlgorithm;
5 |
6 | import java.util.List;
7 |
8 | public interface CategoryRecognizer {
9 | RecognizerResult recognizeCategoryAndAccuracy(String message, List categories);
10 |
11 | SuggestionAlgorithm getAlgorithm();
12 | }
13 |
--------------------------------------------------------------------------------
/charts/wit-ai-go-proxy/values.yaml:
--------------------------------------------------------------------------------
1 | deployment:
2 | containers:
3 | image: nekromant322/overmoney-wit-ai-go-proxy
4 | envFrom:
5 | - name: WIT_AI_TOKEN
6 | valueFrom:
7 | secretKeyRef:
8 | name: prod
9 | key: wit-ai-token
10 | volumes:
11 | - name: secrets-store-inline
12 | volumeMountPath: "/mnt/secrets-store"
13 | readOnly: true
14 | priorityClassName: prod-priority-class
15 |
16 | secretProviderClass:
17 | name: vault-prod
--------------------------------------------------------------------------------
/telegram_bot_service/src/main/java/com/overmoney/telegram_bot_service/model/User.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.telegram_bot_service.model;
2 |
3 | import lombok.*;
4 |
5 | import javax.persistence.*;
6 | import java.time.LocalDateTime;
7 |
8 | @Entity
9 | @Table(name = "users")
10 | @Getter
11 | @Setter
12 | @Builder
13 | @AllArgsConstructor
14 | @NoArgsConstructor
15 | public class User {
16 | @Id
17 | private Long id;
18 |
19 | @Column
20 | private LocalDateTime registrationDate;
21 | }
22 |
--------------------------------------------------------------------------------
/actuator_git_info_starter/src/main/java/com/overmoney/actuator_git_info/ActuatorGitInfoDTO.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.actuator_git_info;
2 |
3 | import lombok.*;
4 |
5 | import java.time.LocalDateTime;
6 |
7 | @Getter
8 | @Setter
9 | @AllArgsConstructor
10 | @NoArgsConstructor
11 | @Builder
12 | public class ActuatorGitInfoDTO {
13 |
14 | public String username;
15 | public String branch;
16 | public String commit;
17 | public String commitTime;
18 | public LocalDateTime applicationStartUpTime;
19 | }
--------------------------------------------------------------------------------
/frontend/app/tsconfig.node.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@tsconfig/node22/tsconfig.json",
3 | "include": [
4 | "vite.config.*",
5 | "vitest.config.*",
6 | "cypress.config.*",
7 | "nightwatch.conf.*",
8 | "playwright.config.*",
9 | "eslint.config.*"
10 | ],
11 | "compilerOptions": {
12 | "noEmit": true,
13 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
14 |
15 | "module": "ESNext",
16 | "moduleResolution": "Bundler",
17 | "types": ["node"]
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/AnalyticsAnnualAndMonthlyExpenseForCategoryDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | @Data
9 | @NoArgsConstructor
10 | @AllArgsConstructor
11 | @Builder
12 | public class AnalyticsAnnualAndMonthlyExpenseForCategoryDTO {
13 | private Double amount;
14 | private String categoryName;
15 | private Integer categoryId;
16 | private Integer month;
17 | }
18 |
--------------------------------------------------------------------------------
/charts/shared/templates/_clusterrolebinding.yaml:
--------------------------------------------------------------------------------
1 | {{- define "shared.clusterrolebinding" -}}
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: ClusterRoleBinding
4 | metadata:
5 | name: {{ .Values.serviceAccountName }}-cluster-role-binding
6 | roleRef:
7 | apiGroup: rbac.authorization.k8s.io
8 | kind: ClusterRole
9 | name: {{ .Values.roleRefName }}-cluster-role
10 | subjects:
11 | - kind: ServiceAccount
12 | name: {{ .Values.serviceAccountName }}
13 | namespace: {{ .Values.serviceAccountNamespace }}
14 | {{- end -}}
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/BugReportDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | import java.time.LocalDateTime;
9 |
10 | @Data
11 | @AllArgsConstructor
12 | @NoArgsConstructor
13 | @Builder
14 | public class BugReportDTO {
15 | private Long id;
16 | private String report;
17 | private Long userId;
18 | private LocalDateTime localDateTime;
19 | private String username;
20 | }
21 |
--------------------------------------------------------------------------------
/frontend/landing/src/styles/app/components/link-button.css:
--------------------------------------------------------------------------------
1 | .link-button {
2 | background-image: linear-gradient(to right, #D16C77, #C9833C);
3 | font-size: 16px;
4 | line-height: 16px;
5 | color: #fff;
6 | font-weight: 700;
7 | padding: 16px;
8 | border-radius: 6px;
9 | display: inline-block;
10 | transition: filter 250ms ease-in-out;
11 | }
12 |
13 | @media (hover: hover) {
14 | .link-button:hover {
15 | filter:brightness(1.1);
16 | }
17 | }
18 |
19 | .link-button:active {
20 | filter:brightness(1.2);
21 | }
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/config/RecentActivityProperties.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.config;
2 |
3 |
4 | import lombok.Getter;
5 | import lombok.Setter;
6 | import org.springframework.boot.context.properties.ConfigurationProperties;
7 | import org.springframework.stereotype.Component;
8 |
9 | @Component
10 | @ConfigurationProperties(prefix = "recent-activity")
11 | @Getter
12 | @Setter
13 | public class RecentActivityProperties {
14 | private long activityDays;
15 | }
16 |
--------------------------------------------------------------------------------
/payment_service/src/main/resources/db/changelog/db.changelog-master.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/telegram_bot_service/src/main/java/com/overmoney/telegram_bot_service/repository/AnnounceRepository.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.telegram_bot_service.repository;
2 |
3 | import com.overmoney.telegram_bot_service.model.Announce;
4 | import org.springframework.data.jpa.repository.JpaRepository;
5 | import org.springframework.stereotype.Repository;
6 |
7 | import java.util.Optional;
8 |
9 | @Repository
10 | public interface AnnounceRepository extends JpaRepository {
11 | Optional findTopByOrderByIdDesc();
12 | }
13 |
--------------------------------------------------------------------------------
/recognizer_service/src/main/java/com/override/recognizer_service/llm/DeepSeekResponseWrapperDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.recognizer_service.llm;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Data;
5 | import lombok.NoArgsConstructor;
6 |
7 | import java.util.List;
8 |
9 | @Data
10 | @NoArgsConstructor
11 | @AllArgsConstructor
12 | public class DeepSeekResponseWrapperDTO {
13 |
14 | private List choices;
15 |
16 | @Data
17 | public static class Choice {
18 | private Message message;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | HELP.md
2 | target/
3 | !.mvn/wrapper/maven-wrapper.jar
4 | !**/src/main/**/target/
5 | !**/src/test/**/target/
6 |
7 | ### STS ###
8 | .apt_generated
9 | .classpath
10 | .factorypath
11 | .project
12 | .settings
13 | .springBeans
14 | .sts4-cache
15 |
16 | ### IntelliJ IDEA ###
17 | .idea
18 | *.iws
19 | *.iml
20 | *.ipr
21 |
22 | ### NetBeans ###
23 | /nbproject/private/
24 | /nbbuild/
25 | /dist/
26 | /nbdist/
27 | /.nb-gradle/
28 | build/
29 | !**/src/main/**/build/
30 | !**/src/test/**/build/
31 |
32 | ### VS Code ###
33 | .vscode/
34 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/PaymentResponseDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import com.override.dto.constants.PaymentStatus;
4 | import lombok.AllArgsConstructor;
5 | import lombok.Builder;
6 | import lombok.Data;
7 | import lombok.NoArgsConstructor;
8 |
9 | @Data
10 | @AllArgsConstructor
11 | @NoArgsConstructor
12 | @Builder
13 | public class PaymentResponseDTO {
14 | private Long chatId;
15 | private String orderId;
16 | private String paymentUrl;
17 | private PaymentStatus status;
18 | private String paymentId;
19 | }
--------------------------------------------------------------------------------
/recognizer_service/src/main/java/com/override/recognizer_service/service/category/RecognizerResult.java:
--------------------------------------------------------------------------------
1 | package com.override.recognizer_service.service.category;
2 |
3 | import com.override.dto.CategoryDTO;
4 | import lombok.Getter;
5 |
6 | @Getter
7 | public class RecognizerResult {
8 |
9 | private final CategoryDTO category;
10 | private final float accuracy;
11 |
12 | public RecognizerResult(CategoryDTO category, float accuracy) {
13 | this.category = category;
14 | this.accuracy = accuracy;
15 | }
16 | }
17 |
18 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/StatisticDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | import java.util.Map;
9 |
10 | @Data
11 | @AllArgsConstructor
12 | @NoArgsConstructor
13 | @Builder
14 | public class StatisticDTO {
15 | private int quantitySuggestion;
16 | private int quantityCorrectSuggestion;
17 | private Map suggestionGroupsByAccuracy;
18 | private double overallPredictionAccuracy;
19 | }
20 |
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/config/LongPollingOvermoneyProperties.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.config;
2 |
3 | import lombok.Getter;
4 | import lombok.Setter;
5 | import org.springframework.boot.context.properties.ConfigurationProperties;
6 | import org.springframework.stereotype.Component;
7 |
8 | @Component
9 | @ConfigurationProperties(prefix = "long-polling.overmoney")
10 | @Getter
11 | @Setter
12 | public class LongPollingOvermoneyProperties {
13 | private Integer periodOfInactivity;
14 | }
15 |
--------------------------------------------------------------------------------
/payment_service/src/main/java/com/override/payment_service/PaymentServiceApplication.java:
--------------------------------------------------------------------------------
1 | package com.override.payment_service;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 | import org.springframework.cloud.openfeign.EnableFeignClients;
6 |
7 | @SpringBootApplication
8 | @EnableFeignClients
9 | public class PaymentServiceApplication {
10 | public static void main(String[] args) {
11 | SpringApplication.run(PaymentServiceApplication.class, args);
12 | }
13 | }
--------------------------------------------------------------------------------
/payment_service/.gitignore:
--------------------------------------------------------------------------------
1 | HELP.md
2 | target/
3 | !.mvn/wrapper/maven-wrapper.jar
4 | !**/src/main/**/target/
5 | !**/src/test/**/target/
6 |
7 | ### STS ###
8 | .apt_generated
9 | .classpath
10 | .factorypath
11 | .project
12 | .settings
13 | .springBeans
14 | .sts4-cache
15 |
16 | ### IntelliJ IDEA ###
17 | .idea
18 | *.iws
19 | *.iml
20 | *.ipr
21 |
22 | ### NetBeans ###
23 | /nbproject/private/
24 | /nbbuild/
25 | /dist/
26 | /nbdist/
27 | /.nb-gradle/
28 | build/
29 | !**/src/main/**/build/
30 | !**/src/test/**/build/
31 |
32 | ### VS Code ###
33 | .vscode/
34 |
--------------------------------------------------------------------------------
/telegram_bot_service/src/main/java/com/overmoney/telegram_bot_service/config/MaxMessagesInSecondProperties.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.telegram_bot_service.config;
2 |
3 | import lombok.Getter;
4 | import lombok.Setter;
5 | import org.springframework.boot.context.properties.ConfigurationProperties;
6 | import org.springframework.stereotype.Component;
7 |
8 | @Component
9 | @ConfigurationProperties(prefix = "max-mailing-messages")
10 | @Getter
11 | @Setter
12 | public class MaxMessagesInSecondProperties {
13 | private long maxMessagesOfAnnouncePerSecond;
14 | }
15 |
--------------------------------------------------------------------------------
/orchestrator_service/.gitignore:
--------------------------------------------------------------------------------
1 | HELP.md
2 | target/
3 | !.mvn/wrapper/maven-wrapper.jar
4 | !**/src/main/**/target/
5 | !**/src/test/**/target/
6 |
7 | ### STS ###
8 | .apt_generated
9 | .classpath
10 | .factorypath
11 | .project
12 | .settings
13 | .springBeans
14 | .sts4-cache
15 |
16 | ### IntelliJ IDEA ###
17 | .idea
18 | *.iws
19 | *.iml
20 | *.ipr
21 |
22 | ### NetBeans ###
23 | /nbproject/private/
24 | /nbbuild/
25 | /dist/
26 | /nbdist/
27 | /.nb-gradle/
28 | build/
29 | !**/src/main/**/build/
30 | !**/src/test/**/build/
31 |
32 | ### VS Code ###
33 | .vscode/
34 |
--------------------------------------------------------------------------------
/recognizer_service/.gitignore:
--------------------------------------------------------------------------------
1 | HELP.md
2 | target/
3 | !.mvn/wrapper/maven-wrapper.jar
4 | !**/src/main/**/target/
5 | !**/src/test/**/target/
6 |
7 | ### STS ###
8 | .apt_generated
9 | .classpath
10 | .factorypath
11 | .project
12 | .settings
13 | .springBeans
14 | .sts4-cache
15 |
16 | ### IntelliJ IDEA ###
17 | .idea
18 | *.iws
19 | *.iml
20 | *.ipr
21 |
22 | ### NetBeans ###
23 | /nbproject/private/
24 | /nbbuild/
25 | /dist/
26 | /nbdist/
27 | /.nb-gradle/
28 | build/
29 | !**/src/main/**/build/
30 | !**/src/test/**/build/
31 |
32 | ### VS Code ###
33 | .vscode/
34 |
--------------------------------------------------------------------------------
/telegram_bot_service/.gitignore:
--------------------------------------------------------------------------------
1 | HELP.md
2 | target/
3 | !.mvn/wrapper/maven-wrapper.jar
4 | !**/src/main/**/target/
5 | !**/src/test/**/target/
6 |
7 | ### STS ###
8 | .apt_generated
9 | .classpath
10 | .factorypath
11 | .project
12 | .settings
13 | .springBeans
14 | .sts4-cache
15 |
16 | ### IntelliJ IDEA ###
17 | .idea
18 | *.iws
19 | *.iml
20 | *.ipr
21 |
22 | ### NetBeans ###
23 | /nbproject/private/
24 | /nbbuild/
25 | /dist/
26 | /nbdist/
27 | /.nb-gradle/
28 | build/
29 | !**/src/main/**/build/
30 | !**/src/test/**/build/
31 |
32 | ### VS Code ###
33 | .vscode/
34 |
--------------------------------------------------------------------------------
/telegram_bot_service/src/main/java/com/overmoney/telegram_bot_service/config/OnboardingProperties.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.telegram_bot_service.config;
2 |
3 | import com.override.dto.OnboardingStepDTO;
4 | import lombok.Data;
5 | import org.springframework.boot.context.properties.ConfigurationProperties;
6 | import org.springframework.stereotype.Component;
7 |
8 | import java.util.List;
9 |
10 | @Component
11 | @ConfigurationProperties(prefix = "onboarding")
12 | @Data
13 | public class OnboardingProperties {
14 | private List steps;
15 | }
16 |
--------------------------------------------------------------------------------
/actuator_git_info_starter/.gitignore:
--------------------------------------------------------------------------------
1 | HELP.md
2 | target/
3 | !.mvn/wrapper/maven-wrapper.jar
4 | !**/src/main/**/target/
5 | !**/src/test/**/target/
6 |
7 | ### STS ###
8 | .apt_generated
9 | .classpath
10 | .factorypath
11 | .project
12 | .settings
13 | .springBeans
14 | .sts4-cache
15 |
16 | ### IntelliJ IDEA ###
17 | .idea
18 | *.iws
19 | *.iml
20 | *.ipr
21 |
22 | ### NetBeans ###
23 | /nbproject/private/
24 | /nbbuild/
25 | /dist/
26 | /nbdist/
27 | /.nb-gradle/
28 | build/
29 | !**/src/main/**/build/
30 | !**/src/test/**/build/
31 |
32 | ### VS Code ###
33 | .vscode/
34 |
--------------------------------------------------------------------------------
/charts/prometheus/values.yaml:
--------------------------------------------------------------------------------
1 | serviceAccountName: prometheus
2 |
3 | roleRefName: prometheus
4 |
5 | servicePort: 9090
6 | serviceTargetPort: 9090
7 |
8 | deployment:
9 | containers:
10 | image: prom/prometheus
11 | imageTag: v2.33.5
12 | pullPolicy: IfNotPresent
13 | containerPort: 9090
14 | args:
15 | - "--config.file=/etc/prometheus/prometheus.yml"
16 | - "--storage.tsdb.retention.time=14d"
17 | volumes:
18 | - name: prometheus-config-volume
19 | volumeMountPath: /etc/prometheus
20 | configMapName: prometheus-config
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/YooKassaWebhookDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import lombok.Data;
4 |
5 | import java.util.Map;
6 |
7 | @Data
8 | public class YooKassaWebhookDTO {
9 | private String event;
10 | private YooKassaPaymentObjectDTO object;
11 |
12 | @Data
13 | public static class YooKassaPaymentObjectDTO {
14 | private String id;
15 | private String status;
16 | private YooKassaRequestDTO.Amount amount;
17 | private String description;
18 | private Map metadata;
19 | }
20 | }
--------------------------------------------------------------------------------
/frontend/landing/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:18.20.1-alpine3.18 as build
2 |
3 | ARG BUILD_CMD=build
4 | WORKDIR /app
5 |
6 | COPY /frontend/landing/package.json /frontend/landing/package-lock.json ./
7 | RUN npm install
8 |
9 | COPY /frontend/landing/. .
10 |
11 | RUN npm run ${BUILD_CMD}
12 |
13 | FROM nginx:1.23.1-alpine
14 | RUN rm -rf /usr/share/nginx/html/*
15 | COPY --from=build /app/dist /usr/share/nginx/html/landing
16 | COPY /frontend/landing/docker/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
17 | EXPOSE 80
18 | ENTRYPOINT ["nginx", "-g", "daemon off;"]
19 |
--------------------------------------------------------------------------------
/recognizer_service/src/main/java/com/override/recognizer_service/RecognizerServiceApplication.java:
--------------------------------------------------------------------------------
1 | package com.override.recognizer_service;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 | import org.springframework.cloud.openfeign.EnableFeignClients;
6 |
7 | @SpringBootApplication
8 | @EnableFeignClients
9 | public class RecognizerServiceApplication {
10 | public static void main(String[] args) {
11 | SpringApplication.run(RecognizerServiceApplication.class, args);
12 | }
13 | }
--------------------------------------------------------------------------------
/recognizer_service/src/main/java/com/override/recognizer_service/config/ExecutorServiceConfig.java:
--------------------------------------------------------------------------------
1 | package com.override.recognizer_service.config;
2 |
3 | import org.springframework.context.annotation.Bean;
4 | import org.springframework.context.annotation.Configuration;
5 |
6 | import java.util.concurrent.ExecutorService;
7 | import java.util.concurrent.Executors;
8 |
9 | @Configuration
10 | public class ExecutorServiceConfig {
11 |
12 | @Bean
13 | public ExecutorService diffExecutorService() {
14 | return Executors.newFixedThreadPool(3);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/UserIncomeExpenseCategoriesPerYearDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | import java.util.List;
9 |
10 | @Data
11 | @NoArgsConstructor
12 | @AllArgsConstructor
13 | @Builder
14 | public class UserIncomeExpenseCategoriesPerYearDTO {
15 | private Long id;
16 | private List categoryIncome;
17 | private List categoryExpense;
18 | }
19 |
--------------------------------------------------------------------------------
/telegram_bot_service/src/main/java/com/overmoney/telegram_bot_service/config/ExecutorServiceConfig.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.telegram_bot_service.config;
2 |
3 | import org.springframework.context.annotation.Bean;
4 | import org.springframework.context.annotation.Configuration;
5 |
6 | import java.util.concurrent.ExecutorService;
7 | import java.util.concurrent.Executors;
8 |
9 | @Configuration
10 | public class ExecutorServiceConfig {
11 |
12 | @Bean
13 | public ExecutorService getNewSingleThread() {
14 | return Executors.newSingleThreadExecutor();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/AnalyticsAnnualAndMonthlyReportDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | import java.util.Map;
9 |
10 | @Data
11 | @NoArgsConstructor
12 | @AllArgsConstructor
13 | @Builder
14 | public class AnalyticsAnnualAndMonthlyReportDTO {
15 | private String categoryName;
16 | private Integer categoryId;
17 | private Map monthlyAnalytics;
18 | private Map shareOfMonthlyExpenses;
19 | }
20 |
--------------------------------------------------------------------------------
/charts/cert-manager/templates/cluster-issuer.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: cert-manager.io/v1
2 | kind: ClusterIssuer
3 | metadata:
4 | name: letsencrypt-staging # change to letsencrypt-prod-key when ready
5 | spec:
6 | acme:
7 | email: devops@overmoneytest.online
8 | server: https://acme-staging-v02.api.letsencrypt.org/directory # change to https://acme-v02.api.letsencrypt.org/directory when ready
9 | privateKeySecretRef:
10 | name: letsencrypt-staging-key # change to letsencrypt-prod-key when ready
11 | solvers:
12 | - http01:
13 | ingress:
14 | class: nginx
--------------------------------------------------------------------------------
/payment_service/src/main/java/com/override/payment_service/constants/KafkaConstants.java:
--------------------------------------------------------------------------------
1 | package com.override.payment_service.constants;
2 |
3 | public class KafkaConstants {
4 | public static final String PAYMENT_REQUESTS_TOPIC = "payment-requests";
5 | public static final String PAYMENT_RESPONSES_TOPIC = "payment-responses";
6 | public static final String SUBSCRIPTION_UPDATE_TOPIC = "subscription-status-updates";
7 | public static final String SUBSCRIPTION_NOTIFICATION_TOPIC = "subscription-notification";
8 | public static final String PAYMENT_SERVICE_GROUP = "payment-service-group";
9 | }
--------------------------------------------------------------------------------
/charts/ingress/values-argo-cd.yaml:
--------------------------------------------------------------------------------
1 | environment: argo-cd
2 | tls:
3 | - hosts:
4 | - argo-cd.overmoneytest.online
5 | secretName: argo-cd-tls-secret
6 | rules:
7 | - host: overmoneytest.online
8 | paths:
9 | - path: /argo-cd
10 | pathType: Prefix
11 | backend:
12 | service:
13 | name: 'argo-cd-argocd-server'
14 | port:
15 | number: 80
16 | annotations:
17 | nginx.ingress.kubernetes.io/ssl-redirect: false
18 | nginx.ingress.kubernetes.io/backend-protocol: HTTP
19 | cert-manager.io/cluster-issuer: letsencrypt-staging
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/tinkoff/TinkoffInfoDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto.tinkoff;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | @Data
9 | @NoArgsConstructor
10 | @AllArgsConstructor
11 | @Builder
12 | public class TinkoffInfoDTO {
13 | private Long tinkoffAccountId;
14 | private String token;
15 | private Long favoriteAccountId;
16 |
17 | /**
18 | * Целевая сумма для закупки акций заданная пользователем
19 | */
20 | private Double userTargetInvestAmount;
21 | }
22 |
--------------------------------------------------------------------------------
/.github/workflows/test_and_verify_codestyle.yml:
--------------------------------------------------------------------------------
1 | name: Run tests and verify checkstyle
2 |
3 | on:
4 | pull_request:
5 | branches: [ master, qa ]
6 |
7 | jobs:
8 | build:
9 |
10 | runs-on: ubuntu-latest
11 |
12 | steps:
13 | - uses: actions/checkout@v2
14 | - name: Set up JDK 11
15 | uses: actions/setup-java@v2
16 | with:
17 | java-version: '11'
18 | distribution: 'temurin'
19 |
20 | - name: Build with Maven
21 | run: mvn -B package --file pom.xml
22 |
23 | - name: Test and verify checkstyle
24 | run: mvn verify
25 |
--------------------------------------------------------------------------------
/orchestrator_service/src/main/resources/application-dev.yml:
--------------------------------------------------------------------------------
1 | server:
2 | port: 8081
3 |
4 | integration:
5 | internal:
6 | host:
7 | orchestrator: http://localhost:8081
8 | telegram-bot: http://localhost:8082
9 | recognizer: http://localhost:8080
10 | payment: http://localhost:8084
11 |
12 | spring:
13 | kafka:
14 | bootstrap-servers: http://localhost:9092
15 |
16 | app:
17 | cors:
18 | allowed-origins:
19 | - "https://ez4x60-109-68-119-186.ru.tuna.am"
20 | - "http://localhost:8080"
21 | - "http://localhost:8081"
--------------------------------------------------------------------------------
/telegram_bot_service/src/main/java/com/overmoney/telegram_bot_service/constants/KafkaConstants.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.telegram_bot_service.constants;
2 |
3 | public class KafkaConstants {
4 | public static final String PAYMENT_REQUESTS_TOPIC = "payment-requests";
5 | public static final String PAYMENT_RESPONSES_TOPIC = "payment-responses";
6 | public static final String SUBSCRIPTION_UPDATE_TOPIC = "subscription-status-updates";
7 | public static final String SUBSCRIPTION_NOTIFICATION_TOPIC = "subscription-notification";
8 | public static final String TELEGRAM_BOT_GROUP = "telegram-bot-group";
9 | }
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/mapper/AccountMapper.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.mapper;
2 |
3 | import com.override.orchestrator_service.model.Category;
4 | import com.override.orchestrator_service.model.OverMoneyAccount;
5 | import org.springframework.stereotype.Component;
6 |
7 | import java.util.ArrayList;
8 | import java.util.List;
9 |
10 | @Component
11 | public class AccountMapper {
12 |
13 | public List mapAccountToCategoryList(OverMoneyAccount account) {
14 | return new ArrayList<>(account.getCategories());
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/PaymentRequestDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import com.override.dto.constants.Currency;
4 | import lombok.AllArgsConstructor;
5 | import lombok.Builder;
6 | import lombok.Data;
7 | import lombok.NoArgsConstructor;
8 |
9 | import java.math.BigDecimal;
10 |
11 | @Data
12 | @AllArgsConstructor
13 | @NoArgsConstructor
14 | @Builder
15 | public class PaymentRequestDTO {
16 | private Long chatId;
17 | private String orderId;
18 | private BigDecimal amount;
19 | private Currency currency;
20 | private String returnUrl;
21 | private String description;
22 | }
--------------------------------------------------------------------------------
/orchestrator_service/src/main/resources/static/css/history.css:
--------------------------------------------------------------------------------
1 | .text-modal {
2 | display: flex;
3 | flex-direction: row;
4 | white-space: nowrap;
5 | justify-content: center;
6 | align-items: center;
7 | }
8 |
9 | .modal-dialog {
10 | width: auto;
11 | }
12 |
13 | .custom-button {
14 | background-color: white;
15 | color: gray;
16 | border: none;
17 | outline: none;
18 | font-size: 25px;
19 | font-weight: bold;
20 | }
21 |
22 | .custom-button:hover {
23 | background-color: white;
24 | color: darkgrey;
25 | }
26 |
27 | .custom-button:focus {
28 | outline: none;
29 | }
--------------------------------------------------------------------------------
/recognizer_service/src/main/java/com/override/recognizer_service/llm/LLMResponseDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.recognizer_service.llm;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Data;
5 | import lombok.NoArgsConstructor;
6 |
7 | @Data
8 | @AllArgsConstructor
9 | @NoArgsConstructor
10 | public class LLMResponseDTO {
11 |
12 | private Message message;
13 |
14 | public String getCategoryName() {
15 | return message.getContent().split(",")[0].trim();
16 | }
17 |
18 | public float getAccuracy() {
19 | return Float.parseFloat(message.getContent().split(",")[1].trim());
20 | }
21 | }
--------------------------------------------------------------------------------
/frontend/landing/src/styles/main.css:
--------------------------------------------------------------------------------
1 | /* Utils */
2 | @import url('utils/normalize.css');
3 |
4 | /* Global */
5 | @import url('global/root');
6 | @import url('global/headings');
7 | @import url('global/buttons');
8 | @import url('global/links');
9 |
10 | /* Components */
11 | @import url('app/components/header.css');
12 | @import url('app/components/feature-card.css');
13 | @import url('app/components/button.css');
14 | @import url('app/components/feature-details.css');
15 | @import url('app/components/link-button.css');
16 | @import url('app/components/footer.css');
17 |
18 | /* Pages */
19 | @import url('app/pages/landing.css');
--------------------------------------------------------------------------------
/telegram_bot_service/src/main/java/com/overmoney/telegram_bot_service/feign/RecognizerFeign.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.telegram_bot_service.feign;
2 |
3 | import com.override.dto.VoiceMessageDTO;
4 | import org.springframework.cloud.openfeign.FeignClient;
5 | import org.springframework.web.bind.annotation.PostMapping;
6 | import org.springframework.web.bind.annotation.RequestBody;
7 |
8 | @FeignClient(value = "recognizer", url = "${integration.internal.host.recognizer}")
9 | public interface RecognizerFeign {
10 |
11 | @PostMapping("/voice")
12 | String sendVoiceMessage(@RequestBody VoiceMessageDTO voiceMessageDTO);
13 | }
14 |
--------------------------------------------------------------------------------
/frontend/landing/README.md:
--------------------------------------------------------------------------------
1 | # OverMoney Landing
2 |
3 | ## Требования
4 | - [NodeJS 20+](https://nodejs.org)
5 |
6 | ## Запуск
7 | 1. Скопировать файл `.env.local.example` и переименовать в `.env.local`
8 | 2. Установить переменные окружения: VITE_BASE_URL - (ngrok)[https://ngrok.com/] домен (Telegram Login Widget не работает на localhost), VITE_APP_URL - localhost где будет запущен OverMoney, VITE_TELEGRAM_BOT_NAME - название Telegram бота (своего, в случае локально запущенного backend или тестового, в случае обращений к тестовому серверу).
9 | 3. `npm install`
10 | 4. `npm run dev`
11 |
12 | ## Сборка
13 | 1. `npm install`
14 | 2. `npm run build`
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/config/jwt/JwtUtils.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.config.jwt;
2 |
3 | import io.jsonwebtoken.Claims;
4 |
5 | public class JwtUtils {
6 |
7 | public static JwtAuthentication generate(Claims claims) {
8 | final JwtAuthentication jwtInfoToken = new JwtAuthentication();
9 | jwtInfoToken.setTelegramId(Long.parseLong(claims.getSubject()));
10 | jwtInfoToken.setFirstName(claims.get("firstName", String.class));
11 | jwtInfoToken.setUsername(claims.get("username", String.class));
12 | return jwtInfoToken;
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/exception/BaseException.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.exception;
2 |
3 | import org.springframework.http.HttpStatus;
4 |
5 | public class BaseException extends RuntimeException {
6 |
7 | public BaseException() {
8 | super();
9 | }
10 |
11 | public BaseException(String message) {
12 | super(message);
13 | }
14 |
15 | public int getStatusCode() {
16 | return HttpStatus.INTERNAL_SERVER_ERROR.value();
17 | }
18 |
19 | public String getErrorCode() {
20 | return "ORCHESTRA_SERVICE_UNEXPECTED";
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/actuator_git_info_starter/src/main/java/com/overmoney/actuator_git_info/ApplicationStartUpListener.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.actuator_git_info;
2 |
3 | import lombok.Getter;
4 | import org.springframework.boot.context.event.ApplicationReadyEvent;
5 | import org.springframework.context.ApplicationListener;
6 |
7 | import java.time.LocalDateTime;
8 |
9 | @Getter
10 | public class ApplicationStartUpListener implements ApplicationListener {
11 |
12 | LocalDateTime startUpTime;
13 |
14 | @Override
15 | public void onApplicationEvent(ApplicationReadyEvent event) {
16 | startUpTime = LocalDateTime.now();
17 | }
18 | }
--------------------------------------------------------------------------------
/charts/shared/values.yaml:
--------------------------------------------------------------------------------
1 | exports:
2 | data:
3 | servicePort: 80
4 | serviceTargetPort: 8080
5 | deployment:
6 | revisionHistoryLimit: 2
7 | replicas: 1
8 | minReadySeconds: 15
9 | strategy:
10 | type: RollingUpdate
11 | rollingUpdate:
12 | maxUnavailable: 1
13 | maxSurge: 1
14 | containers:
15 | imageTag: latest
16 | pullPolicy: Always
17 | requestsMemory: "256Mi"
18 | limitsMemory: "512Mi"
19 | containerPort: 8080
20 | serviceAccountName: vault-kms
21 | secretProviderClass:
22 | vaultAddress: http://hashicorp-vault.vault.svc:8200/
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/exception/OrchestraInvalidTokenException.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.exception;
2 |
3 | import org.springframework.http.HttpStatus;
4 |
5 | public class OrchestraInvalidTokenException extends BaseException {
6 |
7 | public OrchestraInvalidTokenException(String message) {
8 | super(message);
9 | }
10 |
11 | @Override
12 | public int getStatusCode() {
13 | return HttpStatus.UNAUTHORIZED.value();
14 | }
15 |
16 | @Override
17 | public String getErrorCode() {
18 | return "ORCHESTRA_INVALID_TOKEN";
19 | }
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/orchestrator_service/src/main/resources/db/changelog/v1.0.0/015-db.changelog-add_usage_count_column.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/dto/.gitignore:
--------------------------------------------------------------------------------
1 | target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 | !**/src/main/**/target/
4 | !**/src/test/**/target/
5 |
6 | ### IntelliJ IDEA ###
7 | .idea/modules.xml
8 | .idea/jarRepositories.xml
9 | .idea/compiler.xml
10 | .idea/libraries/
11 | *.iws
12 | *.iml
13 | *.ipr
14 |
15 | ### Eclipse ###
16 | .apt_generated
17 | .classpath
18 | .factorypath
19 | .project
20 | .settings
21 | .springBeans
22 | .sts4-cache
23 |
24 | ### NetBeans ###
25 | /nbproject/private/
26 | /nbbuild/
27 | /dist/
28 | /nbdist/
29 | /.nb-gradle/
30 | build/
31 | !**/src/main/**/build/
32 | !**/src/test/**/build/
33 |
34 | ### VS Code ###
35 | .vscode/
36 |
37 | ### Mac OS ###
38 | .DS_Store
--------------------------------------------------------------------------------
/payment_service/src/main/java/com/override/payment_service/repository/SubscriptionRepository.java:
--------------------------------------------------------------------------------
1 | package com.override.payment_service.repository;
2 |
3 | import com.override.payment_service.model.Subscription;
4 | import org.springframework.data.jpa.repository.JpaRepository;
5 | import org.springframework.stereotype.Repository;
6 |
7 | import java.util.Optional;
8 |
9 | @Repository
10 | public interface SubscriptionRepository extends JpaRepository {
11 | Optional findByChatId(Long chatId);
12 |
13 | Optional findByOrderId(String orderId);
14 |
15 | Optional findByPaymentId(String paymentId);
16 | }
--------------------------------------------------------------------------------
/recognizer_service/src/main/java/com/override/recognizer_service/service/voice/VoiceDTORecognitionServiceImplMock.java:
--------------------------------------------------------------------------------
1 | package com.override.recognizer_service.service.voice;
2 |
3 | import com.override.dto.AudioRecognizerGoRequestDTO;
4 | import lombok.extern.slf4j.Slf4j;
5 | import org.springframework.context.annotation.Profile;
6 | import org.springframework.stereotype.Service;
7 |
8 | @Service
9 | @Profile("dev")
10 | @Slf4j
11 | public class VoiceDTORecognitionServiceImplMock implements VoiceDTORecognitionService {
12 | @Override
13 | public String voiceToText(AudioRecognizerGoRequestDTO requestDTO) {
14 | return "Пиво двести";
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/telegram_bot_service/src/main/java/com/overmoney/telegram_bot_service/repository/UserRepository.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.telegram_bot_service.repository;
2 |
3 | import com.overmoney.telegram_bot_service.model.User;
4 | import org.springframework.data.jpa.repository.JpaRepository;
5 | import org.springframework.data.jpa.repository.Query;
6 |
7 | import java.time.LocalDateTime;
8 | import java.util.List;
9 | import java.util.Set;
10 |
11 | public interface UserRepository extends JpaRepository {
12 | List findByRegistrationDateBefore(LocalDateTime date);
13 |
14 | @Query("SELECT u.id FROM User u")
15 | Set findAllIdsBy();
16 | }
17 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/TransactionDefineDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import io.swagger.v3.oas.annotations.media.Schema;
4 | import lombok.AllArgsConstructor;
5 | import lombok.Builder;
6 | import lombok.Data;
7 | import lombok.NoArgsConstructor;
8 |
9 | import java.util.UUID;
10 |
11 | @Data
12 | @AllArgsConstructor
13 | @NoArgsConstructor
14 | @Builder
15 | @Schema(description = "Данные для определения категории транзакции")
16 | public class TransactionDefineDTO {
17 |
18 | @Schema(description = "ID транзакции")
19 | private UUID transactionId;
20 |
21 | @Schema(description = "ID категории транзакции")
22 | private Long categoryId;
23 | }
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/tinkoff/TinkoffActiveDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto.tinkoff;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | import java.math.BigDecimal;
9 |
10 | @Data
11 | @NoArgsConstructor
12 | @AllArgsConstructor
13 | @Builder
14 | public class TinkoffActiveDTO {
15 | private String name;
16 | private String ticker;
17 | private String figi;
18 | private Integer quantity;
19 | private Integer quantityLots;
20 | private BigDecimal currentPrice;
21 | private BigDecimal averagePositionPrice;
22 | private BigDecimal expectedYield;
23 | }
--------------------------------------------------------------------------------
/mask_log_starter/.gitignore:
--------------------------------------------------------------------------------
1 | target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 | !**/src/main/**/target/
4 | !**/src/test/**/target/
5 |
6 | ### IntelliJ IDEA ###
7 | .idea/modules.xml
8 | .idea/jarRepositories.xml
9 | .idea/compiler.xml
10 | .idea/libraries/
11 | *.iws
12 | *.iml
13 | *.ipr
14 |
15 | ### Eclipse ###
16 | .apt_generated
17 | .classpath
18 | .factorypath
19 | .project
20 | .settings
21 | .springBeans
22 | .sts4-cache
23 |
24 | ### NetBeans ###
25 | /nbproject/private/
26 | /nbbuild/
27 | /dist/
28 | /nbdist/
29 | /.nb-gradle/
30 | build/
31 | !**/src/main/**/build/
32 | !**/src/test/**/build/
33 |
34 | ### VS Code ###
35 | .vscode/
36 |
37 | ### Mac OS ###
38 | .DS_Store
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/OrchestratorServiceApplication.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 | import org.springframework.cloud.openfeign.EnableFeignClients;
6 | import org.springframework.scheduling.annotation.EnableAsync;
7 |
8 | @SpringBootApplication
9 | @EnableFeignClients
10 | @EnableAsync
11 | public class OrchestratorServiceApplication {
12 |
13 | public static void main(String[] args) {
14 | SpringApplication.run(OrchestratorServiceApplication.class, args);
15 | }
16 | }
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/model/TelegramAuthRequest.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.model;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.RequiredArgsConstructor;
7 |
8 | @Data
9 | @Builder
10 | @RequiredArgsConstructor
11 | @AllArgsConstructor
12 | public class TelegramAuthRequest {
13 |
14 | private Long id;
15 |
16 | private String first_name;
17 |
18 | private String last_name;
19 |
20 | private String username;
21 |
22 | private String photo_url;
23 |
24 | private String auth_date;
25 |
26 | private String hash;
27 | }
28 |
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/repository/BugReportRepository.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.repository;
2 |
3 | import com.override.orchestrator_service.model.BugReport;
4 | import org.springframework.data.jpa.repository.JpaRepository;
5 | import org.springframework.data.jpa.repository.Query;
6 | import org.springframework.stereotype.Repository;
7 |
8 | import java.util.List;
9 |
10 | @Repository
11 | public interface BugReportRepository extends JpaRepository {
12 |
13 | @Query(value = "SELECT * FROM bug_reports ORDER BY id DESC", nativeQuery = true)
14 | List findAllOrderedByIdDesc();
15 | }
--------------------------------------------------------------------------------
/orchestrator_service/src/main/resources/db/changelog/v1.0.0/018-db.changelog-add-accuracy_default_value.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 | ALTER TABLE transactions ALTER COLUMN accuracy SET DEFAULT 0
8 | UPDATE transactions SET accuracy = 0 WHERE accuracy IS NULL
9 |
10 |
--------------------------------------------------------------------------------
/telegram_bot_service/src/main/java/com/overmoney/telegram_bot_service/TelegramBotServiceApplication.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.telegram_bot_service;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 | import org.springframework.cloud.openfeign.EnableFeignClients;
6 | import org.springframework.scheduling.annotation.EnableScheduling;
7 |
8 | @SpringBootApplication
9 | @EnableFeignClients
10 | @EnableScheduling
11 | public class TelegramBotServiceApplication {
12 | public static void main(String[] args) {
13 | SpringApplication.run(TelegramBotServiceApplication.class, args);
14 | }
15 | }
--------------------------------------------------------------------------------
/frontend/app/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { fileURLToPath, URL } from 'node:url'
2 |
3 | import { defineConfig } from 'vite'
4 | import vue from '@vitejs/plugin-vue'
5 | import vueDevTools from 'vite-plugin-vue-devtools'
6 |
7 | // https://vite.dev/config/
8 | export default defineConfig({
9 | plugins: [
10 | vue(),
11 | vueDevTools(),
12 | ],
13 | resolve: {
14 | alias: {
15 | '@': fileURLToPath(new URL('./src', import.meta.url))
16 | },
17 | },
18 | server: {
19 | proxy: {
20 | '/transactions': {
21 | target: 'https://overmoneytest.online',
22 | changeOrigin: true,
23 | secure: false,
24 | }
25 | }
26 | }
27 | })
28 |
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/exception/InvalidDataException.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.exception;
2 |
3 | import org.springframework.http.HttpStatus;
4 |
5 | public class InvalidDataException extends BaseException {
6 |
7 | public InvalidDataException() {
8 | super();
9 | }
10 |
11 | public InvalidDataException(String message) {
12 | super(message);
13 | }
14 |
15 | @Override
16 | public int getStatusCode() {
17 | return HttpStatus.BAD_REQUEST.value();
18 | }
19 |
20 | @Override
21 | public String getErrorCode() {
22 | return "INVALID_DATA";
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/orchestrator_service/src/main/resources/db/changelog/v1.0.0/016-db.changelog-usage_count_column_new_parameter.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 | ALTER TABLE keywords ALTER COLUMN usage_count SET DEFAULT 1
8 | UPDATE keywords SET usage_count = 1 WHERE usage_count IS NULL
9 |
10 |
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/exception/UserNotFoundException.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.exception;
2 |
3 | import org.springframework.http.HttpStatus;
4 |
5 | public class UserNotFoundException extends BaseException {
6 |
7 | public UserNotFoundException() {
8 | super();
9 | }
10 |
11 | public UserNotFoundException(String message) {
12 | super(message);
13 | }
14 |
15 | @Override
16 | public int getStatusCode() {
17 | return HttpStatus.NOT_FOUND.value();
18 | }
19 |
20 | @Override
21 | public String getErrorCode() {
22 | return "USER_NOT_FOUND";
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/util/TelegramUtils.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.util;
2 |
3 | import com.override.orchestrator_service.config.jwt.JwtAuthentication;
4 | import lombok.Getter;
5 | import org.springframework.beans.factory.annotation.Value;
6 | import org.springframework.stereotype.Component;
7 |
8 | import java.security.Principal;
9 |
10 | @Component
11 | @Getter
12 | public class TelegramUtils {
13 |
14 | @Value("${telegram.bot.name}")
15 | private String telegramBotName;
16 |
17 | public Long getTelegramId(Principal principal) {
18 | return ((JwtAuthentication) principal).getTelegramId();
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/telegram_bot_service/src/main/java/com/overmoney/telegram_bot_service/repository/OnboardingMessageRepository.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.telegram_bot_service.repository;
2 |
3 | import com.overmoney.telegram_bot_service.model.OnboardingMessage;
4 | import org.springframework.data.jpa.repository.JpaRepository;
5 | import org.springframework.data.jpa.repository.Query;
6 | import org.springframework.stereotype.Repository;
7 |
8 | import java.util.Set;
9 | import java.util.UUID;
10 |
11 | @Repository
12 | public interface OnboardingMessageRepository extends JpaRepository {
13 | @Query("select om.id from OnboardingMessage om")
14 | Set findAllIds();
15 | }
16 |
17 |
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/KeywordIdDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import io.swagger.v3.oas.annotations.media.Schema;
4 | import lombok.AllArgsConstructor;
5 | import lombok.Builder;
6 | import lombok.Data;
7 | import lombok.NoArgsConstructor;
8 |
9 | @Data
10 | @AllArgsConstructor
11 | @NoArgsConstructor
12 | @Builder
13 | @Schema(description = "Данные ключевого слова")
14 | public class KeywordIdDTO {
15 |
16 | @Schema(description = "ID аккаунта пользователя")
17 | private Long accountId;
18 |
19 | @Schema(description = "Ключевое слово")
20 | private String name;
21 |
22 | @Schema(description = "Частота использования")
23 | private Integer frequency;
24 | }
25 |
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/exception/TelegramAuthException.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.exception;
2 |
3 | import org.springframework.http.HttpStatus;
4 |
5 | public class TelegramAuthException extends BaseException {
6 | public TelegramAuthException(String message) {
7 | super(message);
8 | }
9 |
10 | public TelegramAuthException() {
11 | super();
12 | }
13 |
14 | @Override
15 | public int getStatusCode() {
16 | return HttpStatus.BAD_REQUEST.value();
17 | }
18 |
19 | @Override
20 | public String getErrorCode() {
21 | return "ORCHESTRA_TELEGRAM_VERIFY_FAILED";
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/exception/XLSXProcessingException.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.exception;
2 |
3 | import org.springframework.http.HttpStatus;
4 |
5 | public class XLSXProcessingException extends BaseException {
6 | public XLSXProcessingException() {
7 | super();
8 | }
9 |
10 | public XLSXProcessingException(String message) {
11 | super(message);
12 | }
13 |
14 | @Override
15 | public int getStatusCode() {
16 | return HttpStatus.BAD_REQUEST.value();
17 | }
18 |
19 | @Override
20 | public String getErrorCode() {
21 | return "ORCHESTRA_PARSING_XLSX_FAILED";
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/telegram_bot_service/src/main/java/com/overmoney/telegram_bot_service/constants/Command.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.telegram_bot_service.constants;
2 |
3 | import lombok.Getter;
4 |
5 | @Getter
6 | public enum Command {
7 |
8 | START("start", "OverMoney - бот для учета финансов!\n"),
9 | ANNOUNCE("announce", "Отправить аннонс о новых возможностях пользователям"),
10 | WEB("web", "Получить хост"),
11 | SUB("sub", "Получить данные о сроках действия подписки");
12 |
13 | private final String alias;
14 | private final String description;
15 |
16 | Command(String alias, String description) {
17 | this.alias = alias;
18 | this.description = description;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/exception/CategoryNotFoundException.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.exception;
2 |
3 | import org.springframework.http.HttpStatus;
4 |
5 | public class CategoryNotFoundException extends BaseException {
6 | public CategoryNotFoundException() {
7 | super();
8 | }
9 |
10 | public CategoryNotFoundException(String message) {
11 | super(message);
12 | }
13 |
14 | @Override
15 | public int getStatusCode() {
16 | return HttpStatus.NOT_FOUND.value();
17 | }
18 |
19 | @Override
20 | public String getErrorCode() {
21 | return "ORCHESTRA_CATEGORY_NOT_FOUND";
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/telegram_bot_service/src/main/java/com/overmoney/telegram_bot_service/constants/InlineKeyboardCallback.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.telegram_bot_service.constants;
2 |
3 | import lombok.Getter;
4 |
5 | @Getter
6 | public enum InlineKeyboardCallback {
7 | DEFAULT("Нет", "default"),
8 | MERGE_CATEGORIES("Перенести категории", "mergeWithCategories"),
9 | MERGE_CATEGORIES_AND_TRANSACTIONS("Перенести категории и транзакции", "mergeWithCategoriesAndTransactions"),
10 | PAY_FOR_SUB("Оплатить", "pay");
11 |
12 | private final String text;
13 | private final String data;
14 |
15 | InlineKeyboardCallback(String text, String data) {
16 | this.text = text;
17 | this.data = data;
18 | }
19 | }
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/applications-prod/kafka.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: kafka
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: prod
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: HEAD
14 | path: charts/kafka
15 | syncPolicy:
16 | automated:
17 | selfHeal: true
18 | prune: true
19 | retry:
20 | limit: -1
21 | backoff:
22 | duration: 1m
23 | factor: 2
24 | maxDuration: 23h
25 | syncOptions:
26 | - CreateNamespace=true
27 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/applications-prod/vault.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: vault
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: prod
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: HEAD
14 | path: charts/vault
15 | syncPolicy:
16 | automated:
17 | selfHeal: true
18 | prune: true
19 | retry:
20 | limit: -1
21 | backoff:
22 | duration: 1m
23 | factor: 2
24 | maxDuration: 23h
25 | syncOptions:
26 | - CreateNamespace=true
27 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/default/grafana.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: grafana
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: default
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: HEAD
14 | path: charts/grafana
15 | syncPolicy:
16 | automated:
17 | selfHeal: true
18 | prune: true
19 | retry:
20 | limit: -1
21 | backoff:
22 | duration: 1m
23 | factor: 2
24 | maxDuration: 23h
25 | syncOptions:
26 | - CreateNamespace=true
27 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/exception/InternalKeyNotFoundException.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.exception;
2 |
3 | import org.springframework.http.HttpStatus;
4 |
5 | public class InternalKeyNotFoundException extends BaseException {
6 |
7 | public InternalKeyNotFoundException() {
8 | super();
9 | }
10 |
11 | public InternalKeyNotFoundException(String message) {
12 | super(message);
13 | }
14 |
15 | @Override
16 | public int getStatusCode() {
17 | return HttpStatus.FORBIDDEN.value();
18 | }
19 |
20 | @Override
21 | public String getErrorCode() {
22 | return "ORCHESTRA_ACCESS_ERROR";
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/exception/RequestSizeException.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.exception;
2 |
3 | import org.springframework.http.HttpStatus;
4 |
5 | public class RequestSizeException extends BaseException {
6 |
7 | public RequestSizeException() {
8 | super();
9 | }
10 |
11 | public RequestSizeException(String message) {
12 | super(message);
13 | }
14 |
15 | @Override
16 | public int getStatusCode() {
17 | return HttpStatus.PAYLOAD_TOO_LARGE.value();
18 | }
19 |
20 | @Override
21 | public String getErrorCode() {
22 | return HttpStatus.PAYLOAD_TOO_LARGE.getReasonPhrase();
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/exception/TransactionNotFoundException.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.exception;
2 |
3 | import org.springframework.http.HttpStatus;
4 |
5 | public class TransactionNotFoundException extends BaseException {
6 | public TransactionNotFoundException() {
7 | super();
8 | }
9 |
10 | public TransactionNotFoundException(String message) {
11 | super(message);
12 | }
13 |
14 | @Override
15 | public int getStatusCode() {
16 | return HttpStatus.NOT_FOUND.value();
17 | }
18 |
19 | @Override
20 | public String getErrorCode() {
21 | return "ORCHESTRA_TRANSACTION_NOT_FOUND";
22 | }
23 | }
--------------------------------------------------------------------------------
/orchestrator_service/src/main/resources/db/changelog/v1.0.0/010-db.changelog-updateAmountType.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/default/admin-user.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: admin-user
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: prod
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: HEAD
14 | path: charts/admin-user
15 | syncPolicy:
16 | automated:
17 | selfHeal: true
18 | prune: true
19 | retry:
20 | limit: -1
21 | backoff:
22 | duration: 1m
23 | factor: 2
24 | maxDuration: 23h
25 | syncOptions:
26 | - CreateNamespace=true
27 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/applications-prod/ingress.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: ingress-prod
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: prod
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: HEAD
14 | path: charts/ingress
15 | syncPolicy:
16 | automated:
17 | selfHeal: true
18 | prune: true
19 | retry:
20 | limit: -1
21 | backoff:
22 | duration: 1m
23 | factor: 2
24 | maxDuration: 23h
25 | syncOptions:
26 | - CreateNamespace=true
27 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/applications-prod/kafka-ui.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: kafka-ui
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: prod
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: HEAD
14 | path: charts/kafka-ui
15 | syncPolicy:
16 | automated:
17 | selfHeal: true
18 | prune: true
19 | retry:
20 | limit: -1
21 | backoff:
22 | duration: 1m
23 | factor: 2
24 | maxDuration: 23h
25 | syncOptions:
26 | - CreateNamespace=true
27 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/applications-prod/zookeeper.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: zookeeper
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: prod
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: HEAD
14 | path: charts/zookeeper
15 | syncPolicy:
16 | automated:
17 | selfHeal: true
18 | prune: true
19 | retry:
20 | limit: -1
21 | backoff:
22 | duration: 1m
23 | factor: 2
24 | maxDuration: 23h
25 | syncOptions:
26 | - CreateNamespace=true
27 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/root.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: root
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: argo-cd
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: HEAD
14 | path: argocd/overmoney-cluster/environments
15 | syncPolicy:
16 | automated:
17 | selfHeal: true
18 | prune: true
19 | retry:
20 | limit: -1
21 | backoff:
22 | duration: 1m
23 | factor: 2
24 | maxDuration: 23h
25 | syncOptions:
26 | - CreateNamespace=true
27 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/frontend/app/src/views/OperationsView.vue:
--------------------------------------------------------------------------------
1 |
23 |
24 |
25 |
26 | Operations view
27 |
28 |
29 |
--------------------------------------------------------------------------------
/telegram_bot_service/src/main/java/com/overmoney/telegram_bot_service/model/Mail.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.telegram_bot_service.model;
2 |
3 | import com.override.dto.constants.StatusMailing;
4 | import lombok.*;
5 |
6 | import javax.persistence.*;
7 |
8 | @Entity
9 | @Table(name = "mails")
10 | @Getter
11 | @Setter
12 | @AllArgsConstructor
13 | @Builder
14 | @NoArgsConstructor
15 | public class Mail {
16 |
17 | @Id
18 | @GeneratedValue(strategy = GenerationType.IDENTITY)
19 | private Long id;
20 |
21 | @Column(name = "user_tg_id")
22 | private Long userTgId;
23 |
24 | @Column(name = "status_mailing")
25 | private StatusMailing statusMailing;
26 |
27 | @ManyToOne
28 | private Announce announce;
29 | }
30 |
--------------------------------------------------------------------------------
/telegram_bot_service/src/main/java/com/overmoney/telegram_bot_service/repository/UserOnboardingMessageRepository.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.telegram_bot_service.repository;
2 |
3 | import com.overmoney.telegram_bot_service.model.UserOnboardingMessage;
4 | import org.springframework.data.jpa.repository.JpaRepository;
5 | import org.springframework.stereotype.Repository;
6 |
7 | import java.util.Set;
8 | import java.util.UUID;
9 |
10 | @Repository
11 | public interface UserOnboardingMessageRepository extends JpaRepository {
12 | boolean existsByUserIdAndOnboardingMessageId(Long userId, UUID onboardingMessageId);
13 |
14 | void deleteAllByOnboardingMessageIdIn(Set onboardingMessageIds);
15 | }
16 |
17 |
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/cert-manager/cert-manager.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: cert-manager
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: cert-manager
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: qa
14 | path: charts/cert-manager
15 | syncPolicy:
16 | automated:
17 | selfHeal: true
18 | prune: true
19 | retry:
20 | limit: -1
21 | backoff:
22 | duration: 1m
23 | factor: 2
24 | maxDuration: 23h
25 | syncOptions:
26 | - CreateNamespace=true
27 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/exception/TransactionProcessingException.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.exception;
2 |
3 | import org.springframework.http.HttpStatus;
4 |
5 | public class TransactionProcessingException extends BaseException {
6 | public TransactionProcessingException() {
7 | super();
8 | }
9 |
10 | public TransactionProcessingException(String message) {
11 | super(message);
12 | }
13 |
14 | @Override
15 | public int getStatusCode() {
16 | return HttpStatus.BAD_REQUEST.value();
17 | }
18 |
19 | @Override
20 | public String getErrorCode() {
21 | return "ORCHESTRA_TRANSACTION_PROCESSING_FAILED";
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/environments/root-argo-cd.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: root-argo-cd
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: argo-cd
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: HEAD
14 | path: argocd/overmoney-cluster/argo-cd
15 | syncPolicy:
16 | automated:
17 | selfHeal: true
18 | prune: true
19 | retry:
20 | limit: -1
21 | backoff:
22 | duration: 1m
23 | factor: 2
24 | maxDuration: 23h
25 | syncOptions:
26 | - CreateNamespace=true
27 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/environments/root-default.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: root-default
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: argo-cd
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: HEAD
14 | path: argocd/overmoney-cluster/default
15 | syncPolicy:
16 | automated:
17 | selfHeal: true
18 | prune: true
19 | retry:
20 | limit: -1
21 | backoff:
22 | duration: 1m
23 | factor: 2
24 | maxDuration: 23h
25 | syncOptions:
26 | - CreateNamespace=true
27 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/environments/root-qa.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: root-qa
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: argo-cd
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: qa
14 | path: argocd/overmoney-cluster/applications-qa
15 | syncPolicy:
16 | automated:
17 | selfHeal: true
18 | prune: true
19 | retry:
20 | limit: -1
21 | backoff:
22 | duration: 1m
23 | factor: 2
24 | maxDuration: 23h
25 | syncOptions:
26 | - CreateNamespace=true
27 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/charts/grafana/files/grafana-notification-templates.yml:
--------------------------------------------------------------------------------
1 | {{ define "alert_list" }}
2 | {{ range . }}
3 | {{ if eq .Status "firing" }}🔴{{ else }}🟢{{ end }} {{ .Labels.alertname }}
4 | {{ if .Labels.instance }}• Инстанс: {{ .Labels.instance }}{{ end }}
5 | {{ if .Labels.job }}• Сервис: {{ .Labels.job }}{{ end }}
6 | {{ range .Annotations.SortedPairs }}• {{ .Name }}: {{ .Value }}
7 | {{ end }}{{ end }}{{ end }}
8 |
9 | {{ define "telegram.message" }}
10 | {{ if gt (len .Alerts.Firing) 0 }}🚨 КРИТИЧЕСКИЕ АЛЕРТЫ
11 | {{ template "alert_list" .Alerts.Firing }}{{ end }}
12 | {{ if gt (len .Alerts.Resolved) 0 }}✅ РЕШЕННЫЕ АЛЕРТЫ
13 | {{ template "alert_list" .Alerts.Resolved }}{{ end }}
14 | {{ end }}
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/config/CorsProperties.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.config;
2 |
3 | import org.springframework.boot.context.properties.ConfigurationProperties;
4 | import org.springframework.stereotype.Component;
5 |
6 | import java.util.ArrayList;
7 | import java.util.List;
8 |
9 | @Component
10 | @ConfigurationProperties(prefix = "app.cors")
11 | public class CorsProperties {
12 | private List allowedOrigins = new ArrayList<>();
13 |
14 | public List getAllowedOrigins() {
15 | return allowedOrigins;
16 | }
17 |
18 | public void setAllowedOrigins(List allowedOrigins) {
19 | this.allowedOrigins = allowedOrigins;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/orchestrator_service/src/main/resources/db/changelog/v1.0.0/006-db.changelog-updateUserTelegramPhotoUrlType.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/telegram_bot_service/src/main/java/com/overmoney/telegram_bot_service/controller/rest/MailController.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.telegram_bot_service.controller.rest;
2 |
3 | import com.overmoney.telegram_bot_service.service.MailService;
4 | import com.override.dto.MailDTO;
5 | import org.springframework.beans.factory.annotation.Autowired;
6 | import org.springframework.web.bind.annotation.*;
7 |
8 | import java.util.List;
9 |
10 | @RestController
11 | @RequestMapping("/mail")
12 | public class MailController {
13 |
14 | @Autowired
15 | private MailService mailService;
16 |
17 | @GetMapping("/status")
18 | public List getStatusOfMails() {
19 | return mailService.getCountOfMailsStatusByAnnounceId();
20 | }
21 | }
22 |
23 |
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/applications-prod/prod-priority-class.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: prod-priority-class
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: prod
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: HEAD
14 | path: charts/priority-class
15 | syncPolicy:
16 | automated:
17 | selfHeal: true
18 | prune: true
19 | retry:
20 | limit: -1
21 | backoff:
22 | duration: 1m
23 | factor: 2
24 | maxDuration: 23h
25 | syncOptions:
26 | - CreateNamespace=true
27 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/environments/root-prod.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: root-prod
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: argo-cd
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: HEAD
14 | path: argocd/overmoney-cluster/applications-prod
15 | syncPolicy:
16 | automated:
17 | selfHeal: true
18 | prune: true
19 | retry:
20 | limit: -1
21 | backoff:
22 | duration: 1m
23 | factor: 2
24 | maxDuration: 23h
25 | syncOptions:
26 | - CreateNamespace=true
27 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/charts/postgres-exporter-orchestrator/values-qa.yaml:
--------------------------------------------------------------------------------
1 | deployment:
2 | containers:
3 | env:
4 | - name: DATA_SOURCE_URI
5 | value: "194.87.237.197:5433/orchestrator-db?sslmode=disable"
6 | envFrom:
7 | - name: DATA_SOURCE_USER
8 | valueFrom:
9 | secretKeyRef:
10 | name: qa
11 | key: qa-orchestrator-db-user
12 | - name: DATA_SOURCE_PASS
13 | valueFrom:
14 | secretKeyRef:
15 | name: qa
16 | key: qa-orchestrator-db-password
17 | volumes:
18 | - name: secrets-store-inline
19 | volumeMountPath: "/mnt/secrets-store"
20 | readOnly: true
21 | priorityClassName: qa-priority-class
22 |
23 | secretProviderClass:
24 | name: vault-qa
--------------------------------------------------------------------------------
/charts/postgres-exporter-telegram/values-qa.yaml:
--------------------------------------------------------------------------------
1 | deployment:
2 | containers:
3 | env:
4 | - name: DATA_SOURCE_URI
5 | value: "194.87.237.197:5435/telegram-bot-db?sslmode=disable"
6 | envFrom:
7 | - name: QA_DATA_SOURCE_USER
8 | valueFrom:
9 | secretKeyRef:
10 | name: qa
11 | key: qa-orchestrator-db-user
12 | - name: QA_DATA_SOURCE_PASS
13 | valueFrom:
14 | secretKeyRef:
15 | name: qa
16 | key: qa-orchestrator-db-password
17 | volumes:
18 | - name: secrets-store-inline
19 | volumeMountPath: "/mnt/secrets-store"
20 | readOnly: true
21 | priorityClassName: qa-priority-class
22 |
23 | secretProviderClass:
24 | name: vault-qa
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/exception/CategoryNameIsNotUniqueException.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.exception;
2 |
3 | import org.springframework.http.HttpStatus;
4 |
5 | public class CategoryNameIsNotUniqueException extends BaseException {
6 | public CategoryNameIsNotUniqueException() {
7 | super();
8 | }
9 |
10 | public CategoryNameIsNotUniqueException(String message) {
11 | super(message);
12 | }
13 |
14 | @Override
15 | public int getStatusCode() {
16 | return HttpStatus.BAD_REQUEST.value();
17 | }
18 |
19 | @Override
20 | public String getErrorCode() {
21 | return "ORCHESTRA_CATEGORY_NAME_NOT_UNIQUE_EXCEPTION";
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/telegram_bot_service/src/main/java/com/overmoney/telegram_bot_service/mapper/ChatMemberMapper.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.telegram_bot_service.mapper;
2 |
3 |
4 | import com.override.dto.ChatMemberDTO;
5 | import org.springframework.stereotype.Component;
6 | import org.telegram.telegrambots.meta.api.objects.User;
7 |
8 | @Component
9 | public class ChatMemberMapper {
10 | public ChatMemberDTO mapUserToChatMemberDTO(Long chatId, User user) {
11 | return ChatMemberDTO.builder()
12 | .chatId(chatId)
13 | .userId(user.getId())
14 | .username(user.getUserName())
15 | .lastName(user.getLastName())
16 | .firstName(user.getFirstName())
17 | .build();
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/environments/root-vault.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: root-vault
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: vault
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: qa # TODO change to HEAD
14 | path: argocd/overmoney-cluster/vault
15 | syncPolicy:
16 | automated:
17 | selfHeal: true
18 | prune: true
19 | retry:
20 | limit: -1
21 | backoff:
22 | duration: 1m
23 | factor: 2
24 | maxDuration: 23h
25 | syncOptions:
26 | - CreateNamespace=true
27 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/environments/root-cert-manager.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: root-cert-manager
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: cert-manager
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: qa
14 | path: argocd/overmoney-cluster/cert-manager
15 | syncPolicy:
16 | automated:
17 | selfHeal: true
18 | prune: true
19 | retry:
20 | limit: -1
21 | backoff:
22 | duration: 1m
23 | factor: 2
24 | maxDuration: 23h
25 | syncOptions:
26 | - CreateNamespace=true
27 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/tinkoff/TinkoffActiveMOEXDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto.tinkoff;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | @Data
9 | @NoArgsConstructor
10 | @AllArgsConstructor
11 | @Builder
12 | public class TinkoffActiveMOEXDTO {
13 | private TinkoffActiveDTO tinkoffActiveDTO;
14 | private Double currentTotalPrice;
15 | private Double moexWeight;
16 | private Double currentWeight;
17 | /**
18 | * Насколько выполнена цель по акции для следования индексу мосбиржи
19 | */
20 | private Double percentFollowage;
21 | private Integer correctQuantity;
22 | private Integer quantityToBuy;
23 | private Integer lot;
24 | }
25 |
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/controller/PaymentTestController.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.controller;
2 |
3 | import com.override.orchestrator_service.feign.PaymentFeign;
4 | import lombok.RequiredArgsConstructor;
5 | import org.springframework.web.bind.annotation.GetMapping;
6 | import org.springframework.web.bind.annotation.RequestMapping;
7 | import org.springframework.web.bind.annotation.RestController;
8 |
9 | @RestController
10 | @RequestMapping("/payment")
11 | @RequiredArgsConstructor
12 | public class PaymentTestController {
13 |
14 | private final PaymentFeign paymentFeign;
15 |
16 | @GetMapping("/test")
17 | public String test() {
18 | return paymentFeign.getTest();
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/mask_log_starter/src/main/java/com/override/mask_log/config/MaskLogProperties.java:
--------------------------------------------------------------------------------
1 | package com.override.mask_log.config;
2 |
3 | import lombok.Getter;
4 | import lombok.Setter;
5 | import org.springframework.boot.context.properties.ConfigurationProperties;
6 | import org.springframework.stereotype.Component;
7 |
8 | import java.util.List;
9 |
10 | @Component
11 | @ConfigurationProperties(prefix = "mask-log-spring-boot-starter")
12 | @Getter
13 | @Setter
14 | public class MaskLogProperties {
15 |
16 | public static final Integer DEFAULT_MASK_PERCENTAGE = 75;
17 | public static final String DEFAULT_MASK = "*****";
18 |
19 | private Integer maskPercentage = DEFAULT_MASK_PERCENTAGE;
20 | private String mask = DEFAULT_MASK;
21 | private List maskedFields;
22 | }
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/config/DefaultCategoryProperties.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.config;
2 |
3 | import com.override.dto.constants.Type;
4 | import lombok.Getter;
5 | import lombok.Setter;
6 | import org.springframework.boot.context.properties.ConfigurationProperties;
7 | import org.springframework.stereotype.Component;
8 |
9 | import java.util.List;
10 |
11 | @Component
12 | @ConfigurationProperties(prefix = "default-category")
13 | @Getter
14 | @Setter
15 | public class DefaultCategoryProperties {
16 | private List categories;
17 |
18 | @Getter
19 | @Setter
20 | public static class DefaultCategory {
21 | private String name;
22 | private Type type;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/applications-prod/postgres-exporter-telegram.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: postgres-exporter-telegram
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: prod
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: HEAD
14 | path: charts/postgres-exporter-telegram
15 | syncPolicy:
16 | automated:
17 | selfHeal: true
18 | prune: true
19 | retry:
20 | limit: -1
21 | backoff:
22 | duration: 1m
23 | factor: 2
24 | maxDuration: 23h
25 | syncOptions:
26 | - CreateNamespace=true
27 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/YooKassaResponseDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import com.fasterxml.jackson.annotation.JsonProperty;
4 | import com.override.dto.constants.PaymentStatus;
5 | import lombok.AllArgsConstructor;
6 | import lombok.Builder;
7 | import lombok.Data;
8 | import lombok.NoArgsConstructor;
9 |
10 | @Data
11 | @AllArgsConstructor
12 | @NoArgsConstructor
13 | @Builder
14 | public class YooKassaResponseDTO {
15 | private String id;
16 | private PaymentStatus status;
17 | private Confirmation confirmation;
18 |
19 | @Data
20 | @AllArgsConstructor
21 | @NoArgsConstructor
22 | @Builder
23 | public static class Confirmation {
24 | @JsonProperty("confirmation_url")
25 | private String confirmationUrl;
26 | }
27 | }
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/model/BugReport.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.model;
2 |
3 | import lombok.*;
4 |
5 | import javax.persistence.*;
6 | import java.time.LocalDateTime;
7 |
8 | @Entity
9 | @Table(name = "bug_reports")
10 | @Getter
11 | @Setter
12 | @Builder
13 | @AllArgsConstructor
14 | @NoArgsConstructor
15 | public class BugReport {
16 |
17 | @Id
18 | @GeneratedValue(strategy = GenerationType.IDENTITY)
19 | private Long id;
20 |
21 | @Column(name = "report", nullable = false)
22 | private String report;
23 |
24 | @Column(name = "user_id", nullable = false)
25 | private Long userId;
26 |
27 | @Column(name = "date", nullable = false)
28 | private LocalDateTime localDateTime;
29 | }
30 |
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/model/TinkoffInfo.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.model;
2 |
3 | import lombok.*;
4 |
5 | import javax.annotation.Nullable;
6 | import javax.persistence.*;
7 |
8 | @Entity
9 | @Table(name = "tinkoff_info")
10 | @Getter
11 | @Setter
12 | @NoArgsConstructor
13 | @AllArgsConstructor
14 | @Builder
15 | public class TinkoffInfo {
16 |
17 | @Id
18 | private Long id;
19 |
20 | @Column
21 | private String token;
22 |
23 | @Column
24 | @Nullable
25 | private Long favoriteAccountId;
26 |
27 | @Column
28 | @Nullable
29 | private Double userTargetInvestAmount;
30 |
31 | @OneToOne
32 | @MapsId
33 | @JoinColumn
34 | private OverMoneyAccount account;
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/orchestrator_service/src/main/resources/db/changelog/v1.0.0/014-db.changelog-set_last_used_column.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 | last_used IS NULL
11 |
12 |
13 |
--------------------------------------------------------------------------------
/recognizer_service/src/test/resources/application-test.yml:
--------------------------------------------------------------------------------
1 | server:
2 | port: 8081
3 | address: localhost
4 |
5 | integration:
6 | internal:
7 | host:
8 | orchestrator: http://localhost:8081
9 | ---
10 | spring:
11 | datasource:
12 | password: postgres
13 | username: postgres
14 | url: jdbc:postgresql://localhost:8123/postgres
15 | driver-class-name: org.postgresql.Driver
16 | jpa:
17 | database: postgresql
18 | database-platform: org.hibernate.dialect.PostgreSQLDialect
19 | generate-ddl: true
20 | hibernate:
21 | ddl-auto: validate
22 | properties:
23 | hibernate:
24 | dialect: org.hibernate.dialect.PostgreSQLDialect
25 | current_session_context_class: org.springframework.orm.hibernate5.SpringSessionContext
26 |
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/applications-qa/kafka-qa.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: kafka-qa
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: qa
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: qa
14 | path: charts/kafka
15 | helm:
16 | valueFiles:
17 | - values-qa.yaml
18 | syncPolicy:
19 | automated:
20 | selfHeal: true
21 | prune: true
22 | retry:
23 | limit: -1
24 | backoff:
25 | duration: 1m
26 | factor: 2
27 | maxDuration: 23h
28 | syncOptions:
29 | - CreateNamespace=true
30 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/applications-qa/vault-qa.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: vault-qa
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: qa
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: qa
14 | path: charts/vault
15 | helm:
16 | valueFiles:
17 | - values-qa.yaml
18 | syncPolicy:
19 | automated:
20 | selfHeal: true
21 | prune: true
22 | retry:
23 | limit: -1
24 | backoff:
25 | duration: 1m
26 | factor: 2
27 | maxDuration: 23h
28 | syncOptions:
29 | - CreateNamespace=true
30 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/orchestrator_service/src/main/resources/db/changelog/v1.0.0/011-db.changelog-add_investAmount_column.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/orchestrator_service/src/main/resources/db/changelog/v1.0.0/012-db.changelog-add_lastUsed_column.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/applications-prod/postgres-exporter-orchestrator.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: postgres-exporter-orchestrator
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: prod
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: HEAD
14 | path: charts/postgres-exporter-orchestrator
15 | syncPolicy:
16 | automated:
17 | selfHeal: true
18 | prune: true
19 | retry:
20 | limit: -1
21 | backoff:
22 | duration: 1m
23 | factor: 2
24 | maxDuration: 23h
25 | syncOptions:
26 | - CreateNamespace=true
27 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/applications-qa/ingress-qa.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: ingress-qa
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: qa
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: qa
14 | path: charts/ingress
15 | helm:
16 | valueFiles:
17 | - values-qa.yaml
18 | syncPolicy:
19 | automated:
20 | selfHeal: true
21 | prune: true
22 | retry:
23 | limit: -1
24 | backoff:
25 | duration: 1m
26 | factor: 2
27 | maxDuration: 23h
28 | syncOptions:
29 | - CreateNamespace=true
30 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/applications-qa/kafka-ui-qa.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: kafka-ui-qa
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: qa
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: qa
14 | path: charts/kafka-ui
15 | helm:
16 | valueFiles:
17 | - values-qa.yaml
18 | syncPolicy:
19 | automated:
20 | selfHeal: true
21 | prune: true
22 | retry:
23 | limit: -1
24 | backoff:
25 | duration: 1m
26 | factor: 2
27 | maxDuration: 23h
28 | syncOptions:
29 | - CreateNamespace=true
30 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/config/ExecutorServiceConfig.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.config;
2 |
3 | import org.springframework.context.annotation.Bean;
4 | import org.springframework.context.annotation.Configuration;
5 | import org.springframework.context.annotation.Primary;
6 |
7 | import java.util.concurrent.ExecutorService;
8 | import java.util.concurrent.Executors;
9 |
10 | @Configuration
11 | public class ExecutorServiceConfig {
12 |
13 | @Bean
14 | @Primary
15 | public ExecutorService getNewSingleThread() {
16 | return Executors.newSingleThreadExecutor();
17 | }
18 |
19 | @Bean
20 | public ExecutorService diffWidgetExecutor() {
21 | return Executors.newFixedThreadPool(3);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/orchestrator_service/src/main/resources/db/changelog/v1.0.0/005-db.changelog-addUniqueConstraintForCategories.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/recognizer_service/src/main/java/com/override/recognizer_service/config/FeignConfiguration.java:
--------------------------------------------------------------------------------
1 | package com.override.recognizer_service.config;
2 |
3 | import feign.RequestInterceptor;
4 | import org.springframework.beans.factory.annotation.Value;
5 | import org.springframework.context.annotation.Bean;
6 | import org.springframework.context.annotation.Configuration;
7 |
8 | @Configuration
9 | public class FeignConfiguration {
10 |
11 | private final String HEADER_NAME = "X-INTERNAL-KEY";
12 |
13 | @Value("${authorization-header.header-value}")
14 | private String headerValue;
15 |
16 | @Bean
17 | public RequestInterceptor requestInterceptor() {
18 | return requestTemplate -> {
19 | requestTemplate.header(HEADER_NAME, headerValue);
20 | };
21 | }
22 | }
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/applications-qa/zookeeper-qa.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: zookeeper-qa
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: qa
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: qa
14 | path: charts/zookeeper
15 | helm:
16 | valueFiles:
17 | - values-qa.yaml
18 | syncPolicy:
19 | automated:
20 | selfHeal: true
21 | prune: true
22 | retry:
23 | limit: -1
24 | backoff:
25 | duration: 1m
26 | factor: 2
27 | maxDuration: 23h
28 | syncOptions:
29 | - CreateNamespace=true
30 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/default/vault-default.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: vault-default
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: default
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: HEAD
14 | path: charts/vault
15 | helm:
16 | valueFiles:
17 | - values-default.yaml
18 | syncPolicy:
19 | automated:
20 | selfHeal: true
21 | prune: true
22 | retry:
23 | limit: -1
24 | backoff:
25 | duration: 1m
26 | factor: 2
27 | maxDuration: 23h
28 | syncOptions:
29 | - CreateNamespace=true
30 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/orchestrator_service/src/main/resources/db/changelog/v1.0.0/017-db.changelog-add-accuracy_column.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/argo-cd/ingress-argo-cd.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: ingress-argo-cd
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: argo-cd
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: qa
14 | path: charts/ingress
15 | helm:
16 | valueFiles:
17 | - values-argo-cd.yaml
18 | syncPolicy:
19 | automated:
20 | selfHeal: true
21 | prune: true
22 | retry:
23 | limit: -1
24 | backoff:
25 | duration: 1m
26 | factor: 2
27 | maxDuration: 23h
28 | syncOptions:
29 | - CreateNamespace=true
30 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/default/ingress-default.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: ingress-default
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: default
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: HEAD
14 | path: charts/ingress
15 | helm:
16 | valueFiles:
17 | - values-default.yaml
18 | syncPolicy:
19 | automated:
20 | selfHeal: true
21 | prune: true
22 | retry:
23 | limit: -1
24 | backoff:
25 | duration: 1m
26 | factor: 2
27 | maxDuration: 23h
28 | syncOptions:
29 | - CreateNamespace=true
30 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/charts/kafka/values-qa.yaml:
--------------------------------------------------------------------------------
1 | persistentVolumeClaim:
2 | requestsStorage: 1Gi
3 |
4 | deployment:
5 | containers:
6 | env:
7 | - name: KAFKA_BROKER_ID
8 | value: "1"
9 | - name: KAFKA_ZOOKEEPER_CONNECT
10 | value: 'zookeeper-service.qa.svc:2181'
11 | - name: KAFKA_LISTENER_SECURITY_PROTOCOL_MAP
12 | value: PLAINTEXT:PLAINTEXT,PLAINTEXT_INTERNAL:PLAINTEXT
13 | - name: KAFKA_ADVERTISED_LISTENERS
14 | value: PLAINTEXT://:29092,PLAINTEXT_INTERNAL://kafka-service.qa.svc:9092
15 | - name: KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR
16 | value: "1"
17 | - name: KAFKA_TRANSACTION_STATE_LOG_MIN_ISR
18 | value: "1"
19 | - name: KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR
20 | value: "1"
21 | priorityClassName: qa-priority-class
--------------------------------------------------------------------------------
/orchestrator_service/src/main/resources/db/changelog/v1.0.0/009-db.changelog-addCheckConstraintForTransactions.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 | ALTER TABLE transactions ADD CONSTRAINT only_positive_amount_constraint CHECK (amount > 0);
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/recognizer_service/src/main/java/com/override/recognizer_service/config/WitAIProperties.java:
--------------------------------------------------------------------------------
1 | package com.override.recognizer_service.config;
2 |
3 | import lombok.Getter;
4 | import lombok.Setter;
5 | import org.springframework.boot.context.properties.ConfigurationProperties;
6 | import org.springframework.stereotype.Component;
7 |
8 | @Component
9 | @ConfigurationProperties(prefix = "wit-ai")
10 | @Getter
11 | @Setter
12 | public class WitAIProperties {
13 | private String url;
14 | private String token;
15 | private String version;
16 | private String charset;
17 | private String method;
18 | private String authProperty;
19 | private String contentTypeProperty;
20 | private String contentTypeValue;
21 | private String paramSeparator;
22 | private String versionParam;
23 | }
24 |
--------------------------------------------------------------------------------
/telegram_bot_service/src/main/java/com/overmoney/telegram_bot_service/model/Announce.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.telegram_bot_service.model;
2 |
3 | import lombok.*;
4 |
5 | import javax.persistence.*;
6 | import java.time.LocalDateTime;
7 | import java.util.Set;
8 |
9 | @Entity
10 | @Table(name = "announcements")
11 | @Getter
12 | @Setter
13 | @AllArgsConstructor
14 | @Builder
15 | @NoArgsConstructor
16 | public class Announce {
17 |
18 | @Id
19 | @GeneratedValue(strategy = GenerationType.IDENTITY)
20 | private Long id;
21 |
22 | @Column(name = "text_announce")
23 | private String textAnnounce;
24 |
25 | @Column
26 | @OneToMany(mappedBy = "announce")
27 | private Set mails;
28 |
29 | @Column(columnDefinition = "TIMESTAMP")
30 | private LocalDateTime date;
31 | }
32 |
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/applications-qa/qa-priority-class.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: qa-priority-class
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: qa
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: HEAD
14 | path: charts/priority-class
15 | helm:
16 | valueFiles:
17 | - values-qa.yaml
18 | syncPolicy:
19 | automated:
20 | selfHeal: true
21 | prune: true
22 | retry:
23 | limit: -1
24 | backoff:
25 | duration: 1m
26 | factor: 2
27 | maxDuration: 23h
28 | syncOptions:
29 | - CreateNamespace=true
30 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/vault/ingress-vault.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: ingress-vault
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: vault
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: qa # TODO change to HEAD
14 | path: charts/ingress
15 | helm:
16 | valueFiles:
17 | - values-vault.yaml
18 | syncPolicy:
19 | automated:
20 | selfHeal: true
21 | prune: true
22 | retry:
23 | limit: -1
24 | backoff:
25 | duration: 1m
26 | factor: 2
27 | maxDuration: 23h
28 | syncOptions:
29 | - CreateNamespace=true
30 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/orchestrator_service/src/main/resources/db/changelog/v1.0.0/004-db.changelog-dropNotNullConstraintUsernameColumnUsersTable.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/recognizer_service/src/main/java/com/override/recognizer_service/feign/OrchestratorFeign.java:
--------------------------------------------------------------------------------
1 | package com.override.recognizer_service.feign;
2 |
3 | import com.override.dto.TransactionDTO;
4 | import com.override.recognizer_service.config.FeignConfiguration;
5 | import org.springframework.cloud.openfeign.FeignClient;
6 | import org.springframework.http.ResponseEntity;
7 | import org.springframework.web.bind.annotation.PutMapping;
8 | import org.springframework.web.bind.annotation.RequestBody;
9 |
10 | @FeignClient(value = "orchestrator", url = "${integration.internal.host.orchestrator}",
11 | configuration = FeignConfiguration.class)
12 | public interface OrchestratorFeign {
13 |
14 | @PutMapping("/transaction")
15 | ResponseEntity editTransaction(@RequestBody TransactionDTO transactionDTO);
16 | }
17 |
--------------------------------------------------------------------------------
/orchestrator_service/src/main/resources/db/changelog/v1.0.0/002-db.changelog-setTelegramUserIdInTransaction.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/actuator_git_info_starter/src/main/java/com/overmoney/actuator_git_info/config/InfoGitProperties.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.actuator_git_info.config;
2 |
3 |
4 | import lombok.Getter;
5 | import lombok.Setter;
6 | import org.springframework.boot.context.properties.ConfigurationProperties;
7 |
8 |
9 | @Getter
10 | @Setter
11 | @ConfigurationProperties(prefix = "app.git")
12 | public class InfoGitProperties {
13 |
14 | private String branch;
15 | private Commit commit;
16 |
17 | @Getter
18 | @Setter
19 | public static class Commit {
20 | private String id;
21 | private String time;
22 | private User user;
23 |
24 | @Getter
25 | @Setter
26 | public static class User {
27 | private String name;
28 | private String email;
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/service/calc/TransactionHandlerImplInvalidTransaction.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.service.calc;
2 |
3 | import com.override.orchestrator_service.exception.TransactionProcessingException;
4 |
5 | public class TransactionHandlerImplInvalidTransaction implements TransactionHandler {
6 | @Override
7 | public double calculateAmount(String transaction) {
8 | throw new TransactionProcessingException("Неподдерживаемый формат транзакции");
9 | }
10 |
11 | @Override
12 | public String getTransactionComment(String transaction) {
13 | throw new TransactionProcessingException("Неподдерживаемый формат транзакции");
14 | }
15 |
16 | @Override
17 | public String getRegExp() {
18 | return ".*";
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/default/prometheus.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: prometheus
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: default
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: HEAD
14 | path: charts/prometheus
15 | helm:
16 | parameters:
17 | - name: serviceAccountNamespace
18 | value: default
19 | syncPolicy:
20 | automated:
21 | selfHeal: true
22 | prune: true
23 | retry:
24 | limit: -1
25 | backoff:
26 | duration: 1m
27 | factor: 2
28 | maxDuration: 23h
29 | syncOptions:
30 | - CreateNamespace=true
31 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/recognizer_service/src/main/java/com/override/recognizer_service/config/DeepSeekOptionsProperties.java:
--------------------------------------------------------------------------------
1 | package com.override.recognizer_service.config;
2 |
3 |
4 | import lombok.AllArgsConstructor;
5 | import lombok.Getter;
6 | import lombok.NoArgsConstructor;
7 | import lombok.Setter;
8 | import org.springframework.boot.context.properties.ConfigurationProperties;
9 | import org.springframework.stereotype.Component;
10 |
11 | /**
12 | * мета информации для настройки работы модели
13 | * deepseek API doc
14 | */
15 | @Component
16 | @Getter
17 | @Setter
18 | @AllArgsConstructor
19 | @NoArgsConstructor
20 | @ConfigurationProperties(prefix = "deepseek.options")
21 | public class DeepSeekOptionsProperties {
22 | private Float temperature;
23 | private Float topP;
24 | }
25 |
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/applications-qa/postgres-exporter-telegram.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: postgres-exporter-telegram-qa
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: qa
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: qa
14 | path: charts/postgres-exporter-telegram
15 | helm:
16 | valueFiles:
17 | - values-qa.yaml
18 | syncPolicy:
19 | automated:
20 | selfHeal: true
21 | prune: true
22 | retry:
23 | limit: -1
24 | backoff:
25 | duration: 1m
26 | factor: 2
27 | maxDuration: 23h
28 | syncOptions:
29 | - CreateNamespace=true
30 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/orchestrator_service/src/main/resources/db/changelog/v1.0.0/001-db.changelog-setSuggestedCategoryIdInTransaction.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/recognizer_service/src/main/java/com/override/recognizer_service/controller/rest/DeepSeekMetaInfoController.java:
--------------------------------------------------------------------------------
1 | package com.override.recognizer_service.controller.rest;
2 |
3 | import com.override.recognizer_service.service.DeepSeekBalanceService;
4 | import org.springframework.beans.factory.annotation.Autowired;
5 | import org.springframework.web.bind.annotation.GetMapping;
6 | import org.springframework.web.bind.annotation.RequestMapping;
7 | import org.springframework.web.bind.annotation.RestController;
8 |
9 | @RestController
10 | @RequestMapping("/recognizer/deepseek")
11 | public class DeepSeekMetaInfoController {
12 |
13 | @Autowired
14 | private DeepSeekBalanceService deepSeekBalanceService;
15 |
16 | @GetMapping("/balance")
17 | public String getBalance() {
18 | return deepSeekBalanceService.getBalance();
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/argocd/overmoney-cluster/applications-qa/postgres-exporter-orchestrator.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: argoproj.io/v1alpha1
2 | kind: Application
3 | metadata:
4 | name: postgres-exporter-orchestrator-qa
5 | namespace: argo-cd
6 | spec:
7 | project: default
8 | destination:
9 | server: https://kubernetes.default.svc
10 | namespace: qa
11 | source:
12 | repoURL: https://github.com/nekromant322/OverMoney.git
13 | targetRevision: qa
14 | path: charts/postgres-exporter-orchestrator
15 | helm:
16 | valueFiles:
17 | - values-qa.yaml
18 | syncPolicy:
19 | automated:
20 | selfHeal: true
21 | prune: true
22 | retry:
23 | limit: -1
24 | backoff:
25 | duration: 1m
26 | factor: 2
27 | maxDuration: 23h
28 | syncOptions:
29 | - CreateNamespace=true
30 | - ApplyOutOfSyncOnly=true
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/AmountRangeDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import com.fasterxml.jackson.annotation.JsonCreator;
4 | import com.fasterxml.jackson.annotation.JsonProperty;
5 | import io.swagger.v3.oas.annotations.media.Schema;
6 | import lombok.Getter;
7 | import lombok.Setter;
8 |
9 | @Setter
10 | @Getter
11 | @Schema(description = "Диапазон сум")
12 | public class AmountRangeDTO {
13 |
14 | @Schema(description = "минимальное значение", example = "35", nullable = true)
15 | private int begin;
16 |
17 | @Schema(description = "максимальное значение", example = "9999", nullable = true)
18 | private int end;
19 |
20 | @JsonCreator
21 | public AmountRangeDTO(@JsonProperty("begin") int begin, @JsonProperty("end") int end) {
22 | this.begin = begin;
23 | this.end = end;
24 | }
25 | }
26 |
27 |
28 |
--------------------------------------------------------------------------------
/telegram_bot_service/src/main/java/com/overmoney/telegram_bot_service/model/TelegramMessage.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.telegram_bot_service.model;
2 |
3 | import lombok.*;
4 |
5 | import javax.persistence.*;
6 | import java.util.UUID;
7 |
8 | @Entity
9 | @Table(name = "telegram_message")
10 | @Getter
11 | @Setter
12 | @NoArgsConstructor
13 | @AllArgsConstructor
14 | @Builder
15 | public class TelegramMessage {
16 |
17 | @Id
18 | @GeneratedValue(strategy = GenerationType.IDENTITY)
19 | private Long id;
20 |
21 | /**
22 | * Поле id сущности TelegramMessage соответствует id сообщения в телеграмме
23 | */
24 | @Column(name = "message_id")
25 | private Integer messageId;
26 |
27 | @Column(name = "chat_id")
28 | private Long chatId;
29 |
30 | @Column(name = "id_transaction")
31 | private UUID idTransaction;
32 | }
33 |
--------------------------------------------------------------------------------
/telegram_bot_service/src/main/resources/db/changelog/v1.0.0/005-db.changelog-createUserTable.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/model/ProfilePhoto.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.model;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 | import org.hibernate.annotations.Type;
8 | import javax.persistence.*;
9 |
10 | @Entity
11 | @Table(name = "profile_photos")
12 | @Data
13 | @AllArgsConstructor
14 | @NoArgsConstructor
15 | @Builder
16 | public class ProfilePhoto {
17 |
18 | @Id
19 | @GeneratedValue(strategy = GenerationType.IDENTITY)
20 | private Long id;
21 |
22 | @Lob
23 | @Column(name = "profile_photo", columnDefinition = "bytea")
24 | @Type(type = "org.hibernate.type.BinaryType")
25 | private byte[] photoData;
26 |
27 | @OneToOne(mappedBy = "profilePhoto")
28 | private User user;
29 | }
30 |
--------------------------------------------------------------------------------
/frontend/landing/src/styles/app/components/feature-card.css:
--------------------------------------------------------------------------------
1 | .feature-card {
2 | display: flex;
3 | flex-direction: column;
4 | max-width: 212px;
5 | }
6 |
7 | .feature-card__title {
8 | grid-area: title;
9 | color: #ffffff;
10 | font-size: 24px;
11 | line-height: 24px;
12 | font-weight: 700;
13 | }
14 |
15 | .feature-card__description {
16 | grid-area: description;
17 | color: #8B949E;
18 | font-size: 16px;
19 | line-height: 24px;
20 | margin: 24px 0;
21 | }
22 |
23 | .feature-card__link {
24 | grid-area: link;
25 | display: block;
26 | color: #58A6FF;
27 | font-size: 16px;
28 | line-height: 16px;
29 | font-weight: 700;
30 | margin-top: auto;
31 | text-decoration: none;
32 | transition: filter 250ms ease-in-out;
33 | }
34 |
35 |
36 | @media (hover: hover) {
37 | .feature-card__link:hover {
38 | filter:brightness(1.2);
39 | }
40 | }
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/config/WebConfig.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.config;
2 |
3 | import com.override.orchestrator_service.config.filter.RequestHeaderInterceptor;
4 | import org.springframework.beans.factory.annotation.Autowired;
5 | import org.springframework.context.annotation.Configuration;
6 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
7 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
8 |
9 | @Configuration
10 | public class WebConfig implements WebMvcConfigurer {
11 | @Autowired
12 | private RequestHeaderInterceptor requestHeaderInterceptor;
13 |
14 | @Override
15 | public void addInterceptors(InterceptorRegistry registry) {
16 | registry.addInterceptor(requestHeaderInterceptor).addPathPatterns("/**");
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/recognizer_service/src/main/java/com/override/recognizer_service/config/LlmOptionsProperties.java:
--------------------------------------------------------------------------------
1 | package com.override.recognizer_service.config;
2 |
3 |
4 | import lombok.AllArgsConstructor;
5 | import lombok.Getter;
6 | import lombok.NoArgsConstructor;
7 | import lombok.Setter;
8 | import org.springframework.boot.context.properties.ConfigurationProperties;
9 | import org.springframework.stereotype.Component;
10 |
11 | /**
12 | * мета информации для настройки работы модели
13 | * ссылка на deepseek, но суть одна
14 | * deepseek API doc
15 | */
16 | @Component
17 | @Getter
18 | @Setter
19 | @AllArgsConstructor
20 | @NoArgsConstructor
21 | @ConfigurationProperties(prefix = "llm.options")
22 | public class LlmOptionsProperties {
23 | private Float temperature;
24 | private Float topP;
25 | }
26 |
--------------------------------------------------------------------------------
/orchestrator_service/src/main/resources/db/changelog/v1.0.0/022-db.changelog-deleteColumnPhotoUrlFromUsers.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/telegram_bot_service/src/main/resources/db/changelog/v1.0.0/004-db.changelog-deleteColumnPhotoUrlFromUsers.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/telegram_bot_service/src/main/java/com/overmoney/telegram_bot_service/repository/MergeRequestRepository.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.telegram_bot_service.repository;
2 |
3 | import com.overmoney.telegram_bot_service.model.MergeRequest;
4 | import org.springframework.data.jpa.repository.JpaRepository;
5 | import org.springframework.data.jpa.repository.Modifying;
6 | import org.springframework.data.jpa.repository.Query;
7 | import org.springframework.data.repository.query.Param;
8 | import org.springframework.stereotype.Repository;
9 |
10 | @Repository
11 | public interface MergeRequestRepository extends JpaRepository {
12 |
13 | MergeRequest getMergeRequestByChatId(Long chatId);
14 |
15 | @Modifying
16 | @Query("UPDATE MergeRequest mr SET mr.completed = true WHERE mr.chatId = :chatId")
17 | void updateMergeRequestCompletionByChatId(@Param("chatId") Long chatId);
18 | }
--------------------------------------------------------------------------------
/orchestrator_service/src/main/resources/static/css/micromanagement.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | height: 100%;
3 | }
4 |
5 | table {
6 | display: table;
7 | border-collapse: collapse;
8 | width: 100%;
9 | height: calc(100% - 90px);
10 | }
11 |
12 | table thead {
13 | display: table-header-group;
14 | background-color: #2d2d2d;
15 | color: snow;
16 | position: sticky;
17 | top: 86px;
18 | }
19 |
20 | table tbody {
21 | display: table-row-group;
22 | position: sticky;
23 | top: 160px;
24 | }
25 |
26 | table tfoot {
27 | display: table-footer-group;
28 | }
29 |
30 | table tr {
31 | display: table-row;
32 | transition: all .5s;
33 | }
34 |
35 | table td {
36 | display: table-cell;
37 | text-align: center;
38 | vertical-align: middle;
39 | padding: 5px;
40 | }
41 |
42 | table tr:hover {
43 | background-color: rgba(23, 21, 21, 0.25);
44 | }
--------------------------------------------------------------------------------
/recognizer_service/src/main/java/com/override/recognizer_service/controller/rest/VoiceMessageController.java:
--------------------------------------------------------------------------------
1 | package com.override.recognizer_service.controller.rest;
2 |
3 | import com.override.dto.VoiceMessageDTO;
4 | import com.override.recognizer_service.service.voice.VoiceMessageService;
5 | import org.springframework.beans.factory.annotation.Autowired;
6 | import org.springframework.web.bind.annotation.PostMapping;
7 | import org.springframework.web.bind.annotation.RequestBody;
8 | import org.springframework.web.bind.annotation.RestController;
9 |
10 | @RestController
11 | public class VoiceMessageController {
12 |
13 | @Autowired
14 | private VoiceMessageService voiceMessageService;
15 |
16 | @PostMapping("/voice")
17 | public String processVoiceMessage(@RequestBody VoiceMessageDTO voiceMessage) {
18 | return voiceMessageService.processVoiceMessage(voiceMessage);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/recognizer_service/src/main/java/com/override/recognizer_service/service/DeepSeekBalanceService.java:
--------------------------------------------------------------------------------
1 | package com.override.recognizer_service.service;
2 |
3 |
4 | import com.override.recognizer_service.llm.deepseek.DeepSeekBalanceResponseDTO;
5 | import com.override.recognizer_service.feign.DeepSeekFeignClient;
6 | import org.springframework.beans.factory.annotation.Autowired;
7 | import org.springframework.beans.factory.annotation.Value;
8 | import org.springframework.stereotype.Service;
9 |
10 | @Service
11 | public class DeepSeekBalanceService {
12 |
13 | @Autowired
14 | private DeepSeekFeignClient client;
15 |
16 | @Value("${deepseek.auth-token}")
17 | private String authToken;
18 |
19 | public String getBalance() {
20 | DeepSeekBalanceResponseDTO dto = client.getBalance("Bearer " + authToken);
21 | return dto.getBalanceInfos().get(0).getTotalBalance();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/telegram_bot_service/src/test/java/com/overmoney/telegram_bot_service/utils/TestFieldsUtil.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.telegram_bot_service.utils;
2 |
3 | import com.overmoney.telegram_bot_service.model.TelegramMessage;
4 | import com.override.dto.TransactionMessageDTO;
5 | import org.telegram.telegrambots.meta.api.objects.File;
6 |
7 | import java.util.UUID;
8 |
9 | public class TestFieldsUtil {
10 |
11 | public static TransactionMessageDTO generateTransactionDTO() {
12 | return TransactionMessageDTO.builder()
13 | .message("message")
14 | .userId(123L)
15 | .build();
16 | }
17 |
18 | public static TelegramMessage generateTelegramMessage() {
19 | return new TelegramMessage(1L, 1, 1L, UUID.randomUUID());
20 | }
21 |
22 | public static File generateTelegramFile() {
23 | return new File("", "", 0L, "path");
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/charts/recognizer/values-qa.yaml:
--------------------------------------------------------------------------------
1 | deployment:
2 | containers:
3 | image: overregistry.ru/overmoney-recognizer-qa
4 | env:
5 | - name: SPRING_APPLICATION_PROFILE
6 | value: "prod"
7 | - name: JAVA_TOOL_OPTIONS
8 | value: "-XX:MaxRAMPercentage=70.0 -XX:MinRAMPercentage=50.0"
9 | - name: ENVIRONMENT
10 | value: "qa"
11 | envFrom:
12 | - name: INTERNAL_KEY_HEADER
13 | valueFrom:
14 | secretKeyRef:
15 | name: qa
16 | key: qa-internal-key-header
17 | - name: DEEPSEEK_AUTH_TOKEN
18 | valueFrom:
19 | secretKeyRef:
20 | name: qa
21 | key: qa-deepseek-auth-token
22 | volumes:
23 | - name: secrets-store-inline
24 | volumeMountPath: "/mnt/secrets-store"
25 | readOnly: true
26 | priorityClassName: qa-priority-class
27 |
28 | secretProviderClass:
29 | name: vault-qa
--------------------------------------------------------------------------------
/charts/recognizer/values.yaml:
--------------------------------------------------------------------------------
1 | deployment:
2 | containers:
3 | image: overregistry.ru/overmoney-recognizer
4 | env:
5 | - name: SPRING_APPLICATION_PROFILE
6 | value: "prod"
7 | - name: JAVA_TOOL_OPTIONS
8 | value: "-XX:MaxRAMPercentage=70.0 -XX:MinRAMPercentage=50.0"
9 | - name: ENVIRONMENT
10 | value: "prod"
11 | envFrom:
12 | - name: INTERNAL_KEY_HEADER
13 | valueFrom:
14 | secretKeyRef:
15 | name: prod
16 | key: internal-key-header
17 | - name: DEEPSEEK_AUTH_TOKEN
18 | valueFrom:
19 | secretKeyRef:
20 | name: prod
21 | key: deepseek-auth-token
22 | volumes:
23 | - name: secrets-store-inline
24 | volumeMountPath: "/mnt/secrets-store"
25 | readOnly: true
26 | priorityClassName: prod-priority-class
27 |
28 | secretProviderClass:
29 | name: vault-prod
--------------------------------------------------------------------------------
/telegram_bot_service/src/main/java/com/overmoney/telegram_bot_service/mapper/TransactionMapper.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.telegram_bot_service.mapper;
2 |
3 | import com.override.dto.TransactionResponseDTO;
4 | import org.springframework.stereotype.Component;
5 |
6 | @Component
7 | public class TransactionMapper {
8 |
9 | public String mapTransactionResponseToTelegramMessage(TransactionResponseDTO transactionResponseDTO) {
10 | String type = transactionResponseDTO.getType();
11 | if (type != null && type.equals("Error")) {
12 | return transactionResponseDTO.getComment();
13 | }
14 |
15 | return "Записал в " + transactionResponseDTO.getType() +
16 | " -> " + transactionResponseDTO.getCategory() +
17 | ". Сумма: " + transactionResponseDTO.getAmount() +
18 | " Примечание: " + transactionResponseDTO.getComment();
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/charts/postgres-exporter-telegram/values.yaml:
--------------------------------------------------------------------------------
1 | servicePort: 9187
2 | serviceTargetPort: 9187
3 |
4 | deployment:
5 | containers:
6 | image: prometheuscommunity/postgres-exporter
7 | pullPolicy: IfNotPresent
8 | containerPort: 9187
9 | env:
10 | - name: DATA_SOURCE_URI
11 | value: "194.87.235.171:5435/telegram-bot-db?sslmode=disable"
12 | envFrom:
13 | - name: DATA_SOURCE_USER
14 | valueFrom:
15 | secretKeyRef:
16 | name: prod
17 | key: telegram-bot-db-user
18 | - name: DATA_SOURCE_PASS
19 | valueFrom:
20 | secretKeyRef:
21 | name: prod
22 | key: telegram-bot-db-password
23 | volumes:
24 | - name: secrets-store-inline
25 | volumeMountPath: "/mnt/secrets-store"
26 | readOnly: true
27 | priorityClassName: prod-priority-class
28 |
29 | secretProviderClass:
30 | name: vault-prod
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/controller/AdminViewController.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.controller;
2 |
3 | import org.springframework.stereotype.Controller;
4 | import org.springframework.web.bind.annotation.GetMapping;
5 | import org.springframework.web.bind.annotation.RequestMapping;
6 |
7 | @Controller
8 | @RequestMapping("/admin")
9 | public class AdminViewController {
10 |
11 | @GetMapping("/panel")
12 | public String getPanel() {
13 | return "admin_panel";
14 | }
15 |
16 | @GetMapping("/stat")
17 | public String getStat() {
18 | return "admin_stat";
19 | }
20 |
21 | @GetMapping("/announces")
22 | public String getAnnounces() {
23 | return "admin_announces";
24 | }
25 |
26 | @GetMapping("/bugReports")
27 | public String getBugReports() {
28 | return "admin_bugreports";
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/charts/postgres-exporter-orchestrator/values.yaml:
--------------------------------------------------------------------------------
1 | servicePort: 9187
2 | serviceTargetPort: 9187
3 |
4 | deployment:
5 | containers:
6 | image: prometheuscommunity/postgres-exporter
7 | pullPolicy: IfNotPresent
8 | containerPort: 9187
9 | env:
10 | - name: DATA_SOURCE_URI
11 | value: "194.87.235.171:5433/orchestrator-db?sslmode=disable"
12 | envFrom:
13 | - name: DATA_SOURCE_USER
14 | valueFrom:
15 | secretKeyRef:
16 | name: prod
17 | key: orchestrator-db-user
18 | - name: DATA_SOURCE_PASS
19 | valueFrom:
20 | secretKeyRef:
21 | name: prod
22 | key: orchestrator-db-password
23 | volumes:
24 | - name: secrets-store-inline
25 | volumeMountPath: "/mnt/secrets-store"
26 | readOnly: true
27 | priorityClassName: prod-priority-class
28 |
29 | secretProviderClass:
30 | name: vault-prod
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/DateRangeDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import com.fasterxml.jackson.annotation.JsonCreator;
4 | import com.fasterxml.jackson.annotation.JsonProperty;
5 | import io.swagger.v3.oas.annotations.media.Schema;
6 | import lombok.Getter;
7 | import lombok.Setter;
8 |
9 | import java.time.LocalDateTime;
10 |
11 | @Setter
12 | @Getter
13 | @Schema(description = "Диапазон дат")
14 | public class DateRangeDTO {
15 |
16 | @Schema(description = "Начальная дата", example = "2024-01-01T00:00:00", nullable = true)
17 | private LocalDateTime begin;
18 |
19 | @Schema(description = "Конечная дата", example = "2024-12-31T23:59:59", nullable = true)
20 | private LocalDateTime end;
21 |
22 | @JsonCreator
23 | public DateRangeDTO(@JsonProperty("begin") LocalDateTime begin, @JsonProperty("end") LocalDateTime end) {
24 | this.begin = begin;
25 | this.end = end;
26 | }
27 | }
--------------------------------------------------------------------------------
/dto/src/main/java/com/override/dto/SumTransactionPerCategoryPerPeriodDTO.java:
--------------------------------------------------------------------------------
1 | package com.override.dto;
2 |
3 | import com.override.dto.constants.Type;
4 | import io.swagger.v3.oas.annotations.media.Schema;
5 | import lombok.AllArgsConstructor;
6 | import lombok.Builder;
7 | import lombok.Data;
8 | import lombok.NoArgsConstructor;
9 |
10 | @Data
11 | @AllArgsConstructor
12 | @NoArgsConstructor
13 | @Builder
14 | @Schema(description = "Сумма транзакций по категории")
15 | public class SumTransactionPerCategoryPerPeriodDTO {
16 |
17 | @Schema(description = "Id категории", example = "1")
18 | private Long id;
19 |
20 | @Schema(description = "Имя категории", example = "Рестораны")
21 | private String name;
22 |
23 | @Schema(description = "Сумма транзакций", example = "1200.0")
24 | private Double sum;
25 |
26 | @Schema(description = "Тип категории", example = "EXPENSE|INCOME")
27 | private Type type;
28 | }
29 |
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/repository/SuggestionRepository.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.repository;
2 |
3 | import com.override.orchestrator_service.model.Suggestion;
4 | import org.springframework.data.jpa.repository.JpaRepository;
5 | import org.springframework.data.jpa.repository.Modifying;
6 | import org.springframework.data.jpa.repository.Query;
7 | import org.springframework.data.repository.query.Param;
8 | import org.springframework.stereotype.Repository;
9 |
10 | import java.util.List;
11 | import java.util.UUID;
12 |
13 | @Repository
14 | public interface SuggestionRepository extends JpaRepository {
15 | @Modifying
16 | @Query(value = "DELETE FROM suggestions s WHERE s.transaction_id IN (:ids)", nativeQuery = true)
17 | void deleteByTransactionIds(@Param("ids") List ids);
18 |
19 | List findAllByAlgorithm(String algorithm);
20 | }
--------------------------------------------------------------------------------
/telegram_bot_service/src/main/java/com/overmoney/telegram_bot_service/model/OnboardingMessage.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.telegram_bot_service.model;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 | import org.hibernate.annotations.Type;
8 | import javax.persistence.*;
9 | import java.util.UUID;
10 |
11 | @Data
12 | @AllArgsConstructor
13 | @NoArgsConstructor
14 | @Builder
15 | @Entity
16 | @Table(name = "onboarding_messages")
17 | public class OnboardingMessage {
18 | @Id
19 | @Column(unique = true, columnDefinition = "UUID")
20 | private UUID id;
21 | @Column(name = "message")
22 | private String message;
23 | @Lob
24 | @Column(name = "image", columnDefinition = "bytea")
25 | @Type(type = "org.hibernate.type.BinaryType")
26 | private byte[] image;
27 | @Column(name = "day_delay")
28 | private Integer dayDelay;
29 | }
30 |
--------------------------------------------------------------------------------
/telegram_bot_service/src/main/java/com/overmoney/telegram_bot_service/config/FeignConfiguration.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.telegram_bot_service.config;
2 |
3 | import feign.RequestInterceptor;
4 | import feign.okhttp.OkHttpClient;
5 | import org.springframework.beans.factory.annotation.Value;
6 | import org.springframework.context.annotation.Bean;
7 | import org.springframework.context.annotation.Configuration;
8 |
9 | @Configuration
10 | public class FeignConfiguration {
11 |
12 | private final String HEADER_NAME = "X-INTERNAL-KEY";
13 |
14 | @Value("${authorization-header.header-value}")
15 | private String headerValue;
16 |
17 | @Bean
18 | public RequestInterceptor requestInterceptor() {
19 | return requestTemplate -> {
20 | requestTemplate.header(HEADER_NAME, headerValue);
21 | };
22 | }
23 |
24 | @Bean
25 | public feign.Client feignClient() {
26 | return new OkHttpClient();
27 | }
28 | }
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/kafka/consumerproducer/SseTransactionListener.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.kafka.consumerproducer;
2 |
3 |
4 | import com.override.orchestrator_service.service.SseService;
5 | import lombok.extern.slf4j.Slf4j;
6 | import org.springframework.beans.factory.annotation.Autowired;
7 | import org.springframework.kafka.annotation.KafkaHandler;
8 | import org.springframework.kafka.annotation.KafkaListener;
9 | import org.springframework.stereotype.Component;
10 |
11 | import java.util.UUID;
12 |
13 | @Component
14 | @Slf4j
15 | @KafkaListener(topics = "${spring.kafka.topics.sse}", groupId = "${HOSTNAME:localname}")
16 | public class SseTransactionListener {
17 | @Autowired
18 | private SseService sseService;
19 |
20 | @KafkaHandler
21 | public void processTransaction(UUID transactionId) {
22 | sseService.sendNewTransactionToUser(transactionId);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/orchestrator_service/src/test/java/com/override/orchestrator_service/util/TelegramUtilsTest.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.util;
2 |
3 |
4 | import com.override.orchestrator_service.config.jwt.JwtAuthentication;
5 | import org.junit.jupiter.api.Assertions;
6 | import org.junit.jupiter.api.Test;
7 | import org.junit.jupiter.api.extension.ExtendWith;
8 | import org.mockito.InjectMocks;
9 | import org.mockito.junit.jupiter.MockitoExtension;
10 |
11 | @ExtendWith(MockitoExtension.class)
12 | class TelegramUtilsTest {
13 |
14 | @InjectMocks
15 | private TelegramUtils telegramUtils;
16 |
17 | @Test
18 | public void testGetTelegramId() {
19 | long telegramTestId = 123456789L;
20 | JwtAuthentication principal = new JwtAuthentication();
21 | principal.setTelegramId(telegramTestId);
22 |
23 | long result = telegramUtils.getTelegramId(principal);
24 |
25 | Assertions.assertEquals(telegramTestId, result);
26 | }
27 | }
--------------------------------------------------------------------------------
/orchestrator_service/src/main/resources/db/changelog/v1.0.0/023-db.changelog-add-user-colum.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/orchestrator_service/src/main/resources/templates/login.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Login page
6 |
7 |
8 |
9 |
10 |
11 |
12 |
16 |
19 |
20 |
--------------------------------------------------------------------------------
/orchestrator_service/src/test/resources/application-test.yml:
--------------------------------------------------------------------------------
1 | server:
2 | port: 8081
3 | address: localhost
4 |
5 | integration:
6 | internal:
7 | host:
8 | orchestrator: http://localhost:8081
9 | recognizer: http://localhost:8080
10 | ---
11 | spring:
12 | datasource:
13 | password: postgres
14 | username: postgres
15 | url: jdbc:postgresql://localhost:8123/postgres
16 | driver-class-name: org.postgresql.Driver
17 | jpa:
18 | database: postgresql
19 | database-platform: org.hibernate.dialect.PostgreSQLDialect
20 | generate-ddl: true
21 | hibernate:
22 | ddl-auto: validate
23 | properties:
24 | hibernate:
25 | dialect: org.hibernate.dialect.PostgreSQLDialect
26 | current_session_context_class: org.springframework.orm.hibernate5.SpringSessionContext
27 | liquibase:
28 | change-log: classpath:db/changelog/db.changelog-master.xml
29 |
30 |
31 | telegram:
32 | bot:
33 | token: test
34 | name: test
--------------------------------------------------------------------------------
/orchestrator_service/src/main/java/com/override/orchestrator_service/config/SwaggerConfig.java:
--------------------------------------------------------------------------------
1 | package com.override.orchestrator_service.config;
2 |
3 | import io.swagger.v3.oas.models.OpenAPI;
4 | import io.swagger.v3.oas.models.info.Info;
5 | import org.springdoc.core.GroupedOpenApi;
6 | import org.springframework.context.annotation.Bean;
7 | import org.springframework.context.annotation.Configuration;
8 |
9 | @Configuration
10 | public class SwaggerConfig {
11 |
12 | @Bean
13 | public OpenAPI customOpenAPI() {
14 | return new OpenAPI()
15 | .info(new Info()
16 | .title("Overmoney API")
17 | .version("1.0")
18 | .description("Категории, транзакции"));
19 | }
20 |
21 | @Bean
22 | public GroupedOpenApi publicApi() {
23 | return GroupedOpenApi.builder()
24 | .group("public")
25 | .pathsToMatch("/**")
26 | .build();
27 | }
28 | }
--------------------------------------------------------------------------------
/payment_service/src/test/resources/application-test.yml:
--------------------------------------------------------------------------------
1 | server:
2 | port: 8084
3 | address: localhost
4 |
5 | integration:
6 | internal:
7 | host:
8 | orchestrator: http://localhost:8081
9 | recognizer: http://localhost:8080
10 |
11 | spring:
12 | datasource:
13 | password: postgres
14 | username: postgres
15 | url: jdbc:postgresql://localhost:8130/postgres
16 | driver-class-name: org.postgresql.Driver
17 | jpa:
18 | database: postgresql
19 | database-platform: org.hibernate.dialect.PostgreSQLDialect
20 | generate-ddl: false
21 | hibernate:
22 | ddl-auto: none
23 | properties:
24 | hibernate:
25 | dialect: org.hibernate.dialect.PostgreSQLDialect
26 | current_session_context_class: org.springframework.orm.hibernate5.SpringSessionContext
27 | liquibase:
28 | change-log: classpath:db/changelog/db.changelog-master.xml
29 |
30 |
31 | #настройка веб адреса приложения
32 | orchestrator:
33 | host: test.ru
34 |
--------------------------------------------------------------------------------
/telegram_bot_service/src/main/java/com/overmoney/telegram_bot_service/controller/rest/TelegramFileController.java:
--------------------------------------------------------------------------------
1 | package com.overmoney.telegram_bot_service.controller.rest;
2 |
3 | import com.overmoney.telegram_bot_service.service.TelegramFileService;
4 | import org.springframework.beans.factory.annotation.Autowired;
5 | import org.springframework.web.bind.annotation.GetMapping;
6 | import org.springframework.web.bind.annotation.PathVariable;
7 | import org.springframework.web.bind.annotation.RequestMapping;
8 | import org.springframework.web.bind.annotation.RestController;
9 |
10 | @RestController
11 | @RequestMapping("/telegram-files")
12 | public class TelegramFileController {
13 | @Autowired
14 | private TelegramFileService telegramFileService;
15 |
16 | @GetMapping("user/{userId}/photo")
17 | public byte[] getPhoto(@PathVariable Long userId) {
18 | return telegramFileService
19 | .getUserProfilePhoto(userId)
20 | .orElse(null);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/charts/kafka-ui/values-qa.yaml:
--------------------------------------------------------------------------------
1 | deployment:
2 | containers:
3 | env:
4 | - name: KAFKA_CLUSTERS_0_NAME
5 | value: "my-cluster"
6 | - name: KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS
7 | value: "kafka-service.qa.svc:9092"
8 | - name: MANAGEMENT_HEALTH_LDAP_ENABLED
9 | value: "FALSE"
10 | - name: SERVER_SERVLET_CONTEXT_PATH
11 | value: "/kafka-ui"
12 | - name: AUTH_TYPE
13 | value: "LOGIN_FORM"
14 | envFrom:
15 | - name: SPRING_SECURITY_USER_NAME
16 | valueFrom:
17 | secretKeyRef:
18 | name: qa
19 | key: qa-kafka-ui-user
20 | - name: SPRING_SECURITY_USER_PASSWORD
21 | valueFrom:
22 | secretKeyRef:
23 | name: qa
24 | key: qa-kafka-ui-password
25 | volumes:
26 | - name: secrets-store-inline
27 | volumeMountPath: "/mnt/secrets-store"
28 | readOnly: true
29 | priorityClassName: qa-priority-class
30 | secretProviderClass:
31 | name: vault-qa
--------------------------------------------------------------------------------