├── backend ├── .gitignore ├── src │ ├── main │ │ ├── resources │ │ │ ├── static │ │ │ │ ├── .gitignore │ │ │ │ └── index.html │ │ │ ├── dbchangelog │ │ │ │ ├── data │ │ │ │ │ └── app_user.csv │ │ │ │ ├── db.changelog-loaddata.xml │ │ │ │ └── changes │ │ │ │ │ └── db.changelog-2.xml │ │ │ ├── local │ │ │ │ └── data.sql │ │ │ ├── application-prod.properties │ │ │ ├── application-prod-kafka.properties │ │ │ └── application-kafka.properties │ │ └── java │ │ │ └── ch │ │ │ └── xxx │ │ │ └── manager │ │ │ ├── domain │ │ │ ├── utils │ │ │ │ └── TokenSubjectRole.java │ │ │ ├── model │ │ │ │ ├── dto │ │ │ │ │ ├── FeIdInfoDto.java │ │ │ │ │ ├── SigninEvent.java │ │ │ │ │ ├── YahooChartWrapper.java │ │ │ │ │ ├── LogoutEvent.java │ │ │ │ │ ├── SymbolNameDto.java │ │ │ │ │ ├── YahooTradingPeriod.java │ │ │ │ │ ├── YahooEventsSplit.java │ │ │ │ │ ├── YahooResult.java │ │ │ │ │ ├── YahooEventsDividend.java │ │ │ │ │ ├── YahooDailyQuoteWrapper.java │ │ │ │ │ ├── YahooTradingPeriods.java │ │ │ │ │ ├── YahooResultWrapper.java │ │ │ │ │ ├── YahooIndicators.java │ │ │ │ │ ├── YahooEvents.java │ │ │ │ │ ├── RefreshTokenDto.java │ │ │ │ │ ├── SymbolFinancialsIdParamDto.java │ │ │ │ │ ├── AuthCheckDto.java │ │ │ │ │ ├── FeConceptDto.java │ │ │ │ │ ├── SfCountryDto.java │ │ │ │ │ ├── SfQuarterDto.java │ │ │ │ │ └── YahooMetaData.java │ │ │ │ └── entity │ │ │ │ │ ├── SectorRepository.java │ │ │ │ │ ├── dto │ │ │ │ │ ├── CompanyReportWrapper.java │ │ │ │ │ ├── DailyQuoteEntityDto.java │ │ │ │ │ ├── CalcPortfolioElement.java │ │ │ │ │ ├── PortfolioBarData.java │ │ │ │ │ ├── ItemDto.java │ │ │ │ │ ├── PortfolioBarsWrapper.java │ │ │ │ │ ├── RssDto.java │ │ │ │ │ ├── EnclosureDto.java │ │ │ │ │ ├── PortfolioWithElements.java │ │ │ │ │ ├── AtomLinkDto.java │ │ │ │ │ └── ChannelDto.java │ │ │ │ │ ├── RevokedTokenRepository.java │ │ │ │ │ ├── CompanyReportRepository.java │ │ │ │ │ ├── CurrencyRepository.java │ │ │ │ │ ├── PortfolioToSymbolRepository.java │ │ │ │ │ ├── PortfolioRepository.java │ │ │ │ │ ├── AppUserRepository.java │ │ │ │ │ ├── PortfolioElementRepository.java │ │ │ │ │ └── EntityBase.java │ │ │ ├── file │ │ │ │ └── FileClient.java │ │ │ ├── producer │ │ │ │ ├── EventPublications.java │ │ │ │ └── EventProducer.java │ │ │ └── exception │ │ │ │ ├── ResourceForbiddenException.java │ │ │ │ ├── ResourceNotFoundException.java │ │ │ │ └── AuthenticationException.java │ │ │ ├── usecase │ │ │ ├── service │ │ │ │ ├── NasdaqClient.java │ │ │ │ ├── AppInfoService.java │ │ │ │ ├── XetraClient.java │ │ │ │ ├── HkexClient.java │ │ │ │ ├── SecSymbolClient.java │ │ │ │ ├── YahooClient.java │ │ │ │ ├── RapidApiClient.java │ │ │ │ ├── AlphavatageClient.java │ │ │ │ └── NewsFeedClient.java │ │ │ └── mapping │ │ │ │ ├── RevokedTokenMapper.java │ │ │ │ ├── FinancialElementMapper.java │ │ │ │ └── QuoteMapper.java │ │ │ ├── prod │ │ │ └── adapter │ │ │ │ └── controller │ │ │ │ └── ProdAppInfoController.java │ │ │ ├── dev │ │ │ └── adapter │ │ │ │ └── controller │ │ │ │ └── DevAppInfoController.java │ │ │ └── adapter │ │ │ ├── repository │ │ │ ├── JpaSectorRepository.java │ │ │ ├── JpaRevokedTokenRepository.java │ │ │ ├── JpaCompanyReportRepository.java │ │ │ ├── JpaCurrencyRepository.java │ │ │ └── SectorRepositoryBean.java │ │ │ └── config │ │ │ └── PGSQLMapDialect.java │ └── test │ │ ├── resources │ │ ├── application-test.properties │ │ └── tmp │ │ │ └── test.zip │ │ └── java │ │ └── ch │ │ └── xxx │ │ └── manager │ │ ├── ManagerApplicationTests.java │ │ └── MapTest.java ├── .settings │ ├── org.eclipse.buildship.core.prefs │ └── org.eclipse.jdt.core.prefs ├── .project └── .classpath ├── frontend ├── .gitignore ├── src │ └── angular │ │ ├── src │ │ ├── assets │ │ │ ├── .gitkeep │ │ │ └── icons │ │ │ │ ├── icon-72x72.png │ │ │ │ ├── icon-96x96.png │ │ │ │ ├── smiley-640.jpg │ │ │ │ ├── icon-128x128.png │ │ │ │ ├── icon-144x144.png │ │ │ │ ├── icon-152x152.png │ │ │ │ ├── icon-192x192.png │ │ │ │ ├── icon-384x384.png │ │ │ │ └── icon-512x512.png │ │ ├── app │ │ │ ├── app.component.scss │ │ │ ├── app.component.html │ │ │ ├── portfolios │ │ │ │ ├── portfolio-overview │ │ │ │ │ ├── components │ │ │ │ │ │ ├── portfolio-timechart │ │ │ │ │ │ │ ├── portfolio-timechart.component.html │ │ │ │ │ │ │ └── portfolio-timechart.component.scss │ │ │ │ │ │ ├── news-list │ │ │ │ │ │ │ ├── news-list.component.html │ │ │ │ │ │ │ ├── news-list.component.scss │ │ │ │ │ │ │ ├── news-list.component.ts │ │ │ │ │ │ │ └── news-list.component.spec.ts │ │ │ │ │ │ ├── portfolio-stats │ │ │ │ │ │ │ ├── portfolio-stats.component.scss │ │ │ │ │ │ │ └── portfolio-stats.component.ts │ │ │ │ │ │ └── portfolio-charts │ │ │ │ │ │ │ └── portfolio-charts.component.scss │ │ │ │ │ ├── service │ │ │ │ │ │ ├── news.service.ts │ │ │ │ │ │ ├── calendar.service.ts │ │ │ │ │ │ ├── news.service.spec.ts │ │ │ │ │ │ └── calendar.service.spec.ts │ │ │ │ │ ├── model │ │ │ │ │ │ ├── news-item.ts │ │ │ │ │ │ └── item.ts │ │ │ │ │ └── portfolio-overview-routing.module.ts │ │ │ │ ├── components │ │ │ │ │ ├── dev-config │ │ │ │ │ │ ├── dev-config.component.html │ │ │ │ │ │ ├── dev-config.component.scss │ │ │ │ │ │ ├── dev-config.component.spec.ts │ │ │ │ │ │ └── dev-config.component.ts │ │ │ │ │ ├── prod-config │ │ │ │ │ │ ├── prod-config.component.html │ │ │ │ │ │ ├── prod-config.component.scss │ │ │ │ │ │ ├── prod-config.component.spec.ts │ │ │ │ │ │ └── prod-config.component.ts │ │ │ │ │ ├── new-portfolio │ │ │ │ │ │ └── new-portfolio.component.scss │ │ │ │ │ ├── add-symbol │ │ │ │ │ │ ├── add-symbol.component.scss │ │ │ │ │ │ └── add-symbol.component.spec.ts │ │ │ │ │ ├── change-symbol │ │ │ │ │ │ ├── change-symbol.component.spec.ts │ │ │ │ │ │ └── change-symbol.component.scss │ │ │ │ │ └── overview │ │ │ │ │ │ └── overview.component.spec.ts │ │ │ │ ├── portfolio-detail │ │ │ │ │ ├── components │ │ │ │ │ │ ├── symbol-overview │ │ │ │ │ │ │ └── symbol-overview.component.scss │ │ │ │ │ │ ├── symbol │ │ │ │ │ │ │ └── symbol.component.spec.ts │ │ │ │ │ │ └── portfolio │ │ │ │ │ │ │ └── portfolio.component.spec.ts │ │ │ │ │ └── portfolio-detail-routing.module.ts │ │ │ │ └── service │ │ │ │ │ ├── dev-app-info.service.ts │ │ │ │ │ ├── prod-app-info.service.ts │ │ │ │ │ ├── dev-app-info.service.spec.ts │ │ │ │ │ └── prod-app-info.service.spec.ts │ │ │ ├── base │ │ │ │ ├── components │ │ │ │ │ └── dialog-spinner │ │ │ │ │ │ ├── dialog-spinner.component.html │ │ │ │ │ │ ├── dialog-spinner.component.scss │ │ │ │ │ │ ├── dialog-spinner.component.ts │ │ │ │ │ │ └── dialog-spinner.component.spec.ts │ │ │ │ └── utils │ │ │ │ │ └── funtions.ts │ │ │ ├── spinner │ │ │ │ ├── spinner.component.html │ │ │ │ ├── spinner.component.spec.ts │ │ │ │ └── spinner.component.scss │ │ │ ├── financial-data │ │ │ │ ├── model │ │ │ │ │ ├── fe-id-info.ts │ │ │ │ │ ├── fe-concept.ts │ │ │ │ │ ├── fe-country.ts │ │ │ │ │ ├── quarter-data.ts │ │ │ │ │ ├── sf-symbol-name.ts │ │ │ │ │ ├── symbol-financials.ts │ │ │ │ │ └── symbol-financials-query-params.ts │ │ │ │ ├── components │ │ │ │ │ ├── create-query │ │ │ │ │ │ └── create-query.component.spec.ts │ │ │ │ │ ├── query-results │ │ │ │ │ │ ├── query-results.component.spec.ts │ │ │ │ │ │ └── query-results.component.scss │ │ │ │ │ ├── overview │ │ │ │ │ │ ├── overview.component.scss │ │ │ │ │ │ └── overview.component.spec.ts │ │ │ │ │ ├── import-financials │ │ │ │ │ │ └── import-financials.component.scss │ │ │ │ │ ├── query │ │ │ │ │ │ └── query.component.spec.ts │ │ │ │ │ └── result-tree │ │ │ │ │ │ └── result-tree.component.spec.ts │ │ │ │ ├── service │ │ │ │ │ └── financial-data.service.spec.ts │ │ │ │ └── financial-data-routing.module.ts │ │ │ ├── model │ │ │ │ ├── portfolio-bar.ts │ │ │ │ ├── portfolio-data.ts │ │ │ │ ├── portfolio-bars.ts │ │ │ │ ├── import-data.ts │ │ │ │ ├── quote.ts │ │ │ │ ├── portfolio-element.ts │ │ │ │ └── symbol.ts │ │ │ ├── login │ │ │ │ ├── model │ │ │ │ │ └── login.ts │ │ │ │ ├── component │ │ │ │ │ ├── login │ │ │ │ │ │ ├── login.component.scss │ │ │ │ │ │ └── login.component.spec.ts │ │ │ │ │ └── main │ │ │ │ │ │ └── main.component.html │ │ │ │ └── login-routing.module.ts │ │ │ ├── app.component.ts │ │ │ └── service │ │ │ │ ├── symbol.service.spec.ts │ │ │ │ ├── portfolio.service.spec.ts │ │ │ │ ├── quote.service.spec.ts │ │ │ │ ├── main.guard.spec.ts │ │ │ │ ├── config.service.spec.ts │ │ │ │ ├── quote-import.service.spec.ts │ │ │ │ ├── symbol-import.service.spec.ts │ │ │ │ └── symbol.service.ts │ │ ├── environments │ │ │ ├── environment.prod.ts │ │ │ └── environment.ts │ │ ├── favicon.ico │ │ ├── styles.scss │ │ ├── index.html │ │ ├── main.ts │ │ └── test.ts │ │ ├── proxy.conf.js │ │ ├── browserslist │ │ ├── tsconfig.app.json │ │ ├── e2e │ │ ├── tsconfig.json │ │ ├── src │ │ │ ├── app.po.ts │ │ │ └── app.e2e-spec.ts │ │ └── protractor.conf.js │ │ ├── .editorconfig │ │ ├── tsconfig.spec.json │ │ ├── base │ │ └── index.html │ │ ├── tsconfig.json │ │ ├── .gitignore │ │ ├── README.md │ │ └── .eslintrc.json ├── .settings │ ├── org.eclipse.buildship.core.prefs │ └── org.eclipse.jdt.core.prefs ├── .classpath └── .project ├── structurizr └── .gitignore ├── .gitignore ├── .settings ├── org.eclipse.core.resources.prefs ├── org.jboss.ide.eclipse.as.core.prefs ├── org.eclipse.buildship.core.prefs └── org.eclipse.jdt.core.prefs ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── runStructurizr.sh ├── runPrometheus.sh ├── helm ├── kafka │ ├── Chart.yaml │ ├── .helmignore │ └── values.yaml ├── helmCommand.sh ├── angularportfoliomgr │ ├── Chart.yaml │ └── .helmignore ├── minikubeSetup.sh └── scaledobject.yaml ├── postgres_init.sql ├── runGrafana.sh ├── dockerStartArtemis.sh ├── prometheus-local.yml ├── Dockerfile ├── .travis.yml ├── .vscode └── launch.json ├── .classpath ├── docker-postgres.sh ├── settings.gradle ├── .project └── runKafka.sh /backend/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | /build/ 3 | -------------------------------------------------------------------------------- /frontend/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | /build/ 3 | -------------------------------------------------------------------------------- /frontend/src/angular/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/app.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /structurizr/.gitignore: -------------------------------------------------------------------------------- 1 | /workspace.json 2 | .structurizr/ -------------------------------------------------------------------------------- /backend/src/main/resources/static/.gitignore: -------------------------------------------------------------------------------- 1 | /de/ 2 | /en/ 3 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.gradle/ 2 | /build/ 3 | /bin/ 4 | /src/main/resources/static 5 | /.idea/ 6 | -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /backend/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | connection.project.dir=.. 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /frontend/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | connection.project.dir=.. 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /backend/src/test/resources/application-test.properties: -------------------------------------------------------------------------------- 1 | path.financial-data=tmp/test.zip 2 | 3 | spring.jpa.show-sql=false -------------------------------------------------------------------------------- /frontend/src/angular/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true, 3 | }; 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Angular2Guy/AngularPortfolioMgr/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /frontend/src/angular/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Angular2Guy/AngularPortfolioMgr/HEAD/frontend/src/angular/src/favicon.ico -------------------------------------------------------------------------------- /.settings/org.jboss.ide.eclipse.as.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.jboss.ide.eclipse.as.core.singledeployable.deployableList= 3 | -------------------------------------------------------------------------------- /backend/src/test/resources/tmp/test.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Angular2Guy/AngularPortfolioMgr/HEAD/backend/src/test/resources/tmp/test.zip -------------------------------------------------------------------------------- /runStructurizr.sh: -------------------------------------------------------------------------------- 1 | docker pull structurizr/lite 2 | docker run -it --rm -p 8080:8080 -v ~/git/AngularPortfolioMgr/structurizr:/usr/local/structurizr structurizr/lite -------------------------------------------------------------------------------- /frontend/src/angular/src/assets/icons/icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Angular2Guy/AngularPortfolioMgr/HEAD/frontend/src/angular/src/assets/icons/icon-72x72.png -------------------------------------------------------------------------------- /frontend/src/angular/src/assets/icons/icon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Angular2Guy/AngularPortfolioMgr/HEAD/frontend/src/angular/src/assets/icons/icon-96x96.png -------------------------------------------------------------------------------- /frontend/src/angular/src/assets/icons/smiley-640.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Angular2Guy/AngularPortfolioMgr/HEAD/frontend/src/angular/src/assets/icons/smiley-640.jpg -------------------------------------------------------------------------------- /frontend/src/angular/src/assets/icons/icon-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Angular2Guy/AngularPortfolioMgr/HEAD/frontend/src/angular/src/assets/icons/icon-128x128.png -------------------------------------------------------------------------------- /frontend/src/angular/src/assets/icons/icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Angular2Guy/AngularPortfolioMgr/HEAD/frontend/src/angular/src/assets/icons/icon-144x144.png -------------------------------------------------------------------------------- /frontend/src/angular/src/assets/icons/icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Angular2Guy/AngularPortfolioMgr/HEAD/frontend/src/angular/src/assets/icons/icon-152x152.png -------------------------------------------------------------------------------- /frontend/src/angular/src/assets/icons/icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Angular2Guy/AngularPortfolioMgr/HEAD/frontend/src/angular/src/assets/icons/icon-192x192.png -------------------------------------------------------------------------------- /frontend/src/angular/src/assets/icons/icon-384x384.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Angular2Guy/AngularPortfolioMgr/HEAD/frontend/src/angular/src/assets/icons/icon-384x384.png -------------------------------------------------------------------------------- /frontend/src/angular/src/assets/icons/icon-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Angular2Guy/AngularPortfolioMgr/HEAD/frontend/src/angular/src/assets/icons/icon-512x512.png -------------------------------------------------------------------------------- /runPrometheus.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | #docker pull prom/prometheus 3 | LOCALDIR=pwd 4 | docker run --network "host" -v "$LOCALDIR/prometheus-local.yml:/etc/prometheus/prometheus.yml" prom/prometheus -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/portfolio-overview/components/portfolio-timechart/portfolio-timechart.component.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /helm/kafka/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | appVersion: "1.0" 3 | description: Kafka Development Setup 4 | name: kafkadev 5 | version: 0.1.0 6 | icon: "https://angular.io/assets/images/logos/angular/angular.png" -------------------------------------------------------------------------------- /postgres_init.sql: -------------------------------------------------------------------------------- 1 | create table appuser (id bigint identity primary key, name varchar(50), firstname varchar(50), birthdate date); 2 | insert into appuser (name, firstname, birthdate) values ('Max', 'Smith', now()); -------------------------------------------------------------------------------- /helm/helmCommand.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | #helm install kafka ./kafka 3 | #kubectl create namespace keda 4 | #helm install keda kedacore/keda --namespace keda 5 | #helm install angularportfoliomgr ./angularportfoliomgr 6 | -------------------------------------------------------------------------------- /helm/angularportfoliomgr/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | appVersion: "1.0" 3 | description: AngularPortfolioManager Config 4 | name: angularportfoliomgr 5 | version: 0.1.0 6 | icon: "https://angular.io/assets/images/logos/angular/angular.png" -------------------------------------------------------------------------------- /runGrafana.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | #docker pull grafana/grafana 3 | MYID=`id -u` 4 | #data will be stored in ~/tmp/data 5 | #mkdir ~/tmp/data 6 | MYDATA=echo ~/tmp/data 7 | docker run --user "$MYID" --volume "$MYID:$MYDATA" --network "host" grafana/grafana -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists -------------------------------------------------------------------------------- /frontend/src/angular/proxy.conf.js: -------------------------------------------------------------------------------- 1 | const PROXY_CONFIG = [ 2 | { 3 | context: [ 4 | "/rest" 5 | ], 6 | target: "http://localhost:8080", 7 | secure: false 8 | } 9 | ] 10 | 11 | module.exports = PROXY_CONFIG; -------------------------------------------------------------------------------- /dockerStartArtemis.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | docker run -it -p 61616:61616 -p 8161:8161 -v :/var/lib/artemis-instance --name activemqartemis --memory="1g" --network="host" angular2guy/activemqartemis 3 | #docker start activemqartemis 4 | #docker stop activemqartemis -------------------------------------------------------------------------------- /backend/src/main/resources/dbchangelog/data/app_user.csv: -------------------------------------------------------------------------------- 1 | id,user_name,birth_date,updated_at,password,email_address,user_role,locked,enabled,uuid,alphavantage_key,rapid_api_key 2 | 1,sven,2000-01-01,2021-01-01,pwd,sven@gmx.de,USERS,false,true,95fabc67-2ab6-470a-9df9-e500b540cbd0,XXX,YYY -------------------------------------------------------------------------------- /frontend/src/angular/src/styles.scss: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | @use "@angular/material" as mat; 3 | 4 | @use "material-icons/iconfont/material-icons.scss"; 5 | 6 | @include mat.elevation-classes(); 7 | @include mat.app-background(); 8 | -------------------------------------------------------------------------------- /frontend/src/angular/browserslist: -------------------------------------------------------------------------------- 1 | last 2 Chrome version 2 | last 2 Firefox version 3 | last 2 Edge major versions 4 | last 2 Safari major version 5 | last 2 iOS major versions 6 | Firefox ESR 7 | not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the `not` prefix on this line..<% } %> 8 | -------------------------------------------------------------------------------- /frontend/src/angular/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./out-tsc/app", 5 | "types": [] 6 | }, 7 | "files": [ 8 | "src/main.ts", 9 | "src/polyfills.ts" 10 | ], 11 | "include": [ 12 | "src/**/*.d.ts" 13 | ] 14 | } -------------------------------------------------------------------------------- /frontend/src/angular/e2e/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/e2e", 5 | "module": "commonjs", 6 | "target": "es2018", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /frontend/src/angular/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /frontend/src/angular/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get(browser.baseUrl) as Promise; 6 | } 7 | 8 | getTitleText() { 9 | return element(by.css('app-root h1')).getText() as Promise; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/base/components/dialog-spinner/dialog-spinner.component.html: -------------------------------------------------------------------------------- 1 |

{{ data.title }}

2 |
3 | 8 | 9 |
10 | -------------------------------------------------------------------------------- /backend/src/main/resources/local/data.sql: -------------------------------------------------------------------------------- 1 | insert into appuser (username, birthdate, updated_at, password, email_address, user_role, locked, enabled, uuid) 2 | values ('max', now(), now(), 'pwd', 'sven@gmx.de', 'USERS', false, true, 'uuid'); 3 | --insert into dailyquote (symbol, open, high, low, close, volume, day) values ('MSFT',92.7500,94.5000,91.9380,29.8767,46349000,now()); -------------------------------------------------------------------------------- /prometheus-local.yml: -------------------------------------------------------------------------------- 1 | global: 2 | scrape_interval: 15s 3 | 4 | scrape_configs: 5 | - job_name: 'prometheus' 6 | scrape_interval: 5s 7 | 8 | static_configs: 9 | - targets: ['localhost:9090'] 10 | 11 | - job_name: 'spring-actuator' 12 | metrics_path: '/actuator/prometheus' 13 | scrape_interval: 5s 14 | static_configs: 15 | - targets: ['localhost:8080'] -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM eclipse-temurin:25-jdk-alpine 2 | VOLUME /tmp 3 | RUN sh -c 'touch /app.jar' 4 | ARG JAR_FILE 5 | ADD backend/build/libs/${JAR_FILE} /app.jar 6 | ENV JAVA_OPTS="-XX:+UseG1GC -XX:MaxGCPauseMillis=50 -XX:+UseStringDeduplication -XX:MaxDirectMemorySize=64m" 7 | ENTRYPOINT exec java $JAVA_OPTS -Dliquibase.duplicateFileMode=WARN -Djava.security.egd=file:/dev/./urandom -jar /app.jar -------------------------------------------------------------------------------- /frontend/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /frontend/src/angular/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node" 8 | ] 9 | }, 10 | "files": [ 11 | "src/test.ts", 12 | "src/polyfills.ts" 13 | ], 14 | "include": [ 15 | "src/**/*.spec.ts", 16 | "src/**/*.d.ts" 17 | ] 18 | } -------------------------------------------------------------------------------- /.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | arguments= 2 | auto.sync=false 3 | build.scans.enabled=false 4 | connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) 5 | connection.project.dir= 6 | eclipse.preferences.version=1 7 | gradle.user.home= 8 | java.home= 9 | jvm.arguments= 10 | offline.mode=false 11 | override.workspace.settings=false 12 | show.console.view=false 13 | show.executions.view=false 14 | -------------------------------------------------------------------------------- /frontend/src/angular/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Manager 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /helm/kafka/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | 3 | jdk: 4 | - openjdk11 5 | 6 | addons: 7 | chrome: beta 8 | 9 | services: 10 | - docker 11 | 12 | notifications: 13 | email: 14 | recipients: 15 | - angular2guy@gmx.ch 16 | on_success: always 17 | on_failure: always 18 | 19 | before_install: 20 | - nvm install 14.15 21 | - nvm use 14.15 22 | 23 | script: 24 | ./gradlew build docker -PwithAngular=true -PbuildDockerImage=true -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "jdk", 9 | "request": "launch", 10 | "name": "Launch Java App" 11 | }, 12 | ] 13 | } -------------------------------------------------------------------------------- /helm/angularportfoliomgr/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/portfolio-overview/components/news-list/news-list.component.html: -------------------------------------------------------------------------------- 1 |
2 | @for (item of newsItems; track item) { 3 |
4 |

{{ item.title }}

5 |
{{ item.publishedDate | date: "dd-MM-yyyy" }}
6 | Open article 7 |
8 | } 9 |
10 | 15 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/spinner/spinner.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | Welcome to AngularPortfolioManager 4 |
5 |
6 |
7 |
8 | 13 |
14 |
15 | -------------------------------------------------------------------------------- /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /frontend/src/angular/base/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | The languages german and english are supported:
11 | German 12 | English 13 | 14 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/components/dev-config/dev-config.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Dev Config Values

4 |
5 |
    6 |
  • 7 | Classname: {{ classNameObs | async }} 9 |
  • 10 |
11 |
12 | 13 |
14 |
15 | -------------------------------------------------------------------------------- /backend/src/main/resources/static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | The languages german and english are supported:
11 | German 12 | English 13 | 14 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/components/prod-config/prod-config.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Prod Config Values

4 |
5 |
    6 |
  • 7 | Classname: {{ classNameObs | async }} 9 |
  • 10 |
11 |
12 | 13 |
14 |
15 | -------------------------------------------------------------------------------- /frontend/src/angular/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode, provideZoneChangeDetection } from "@angular/core"; 2 | import { platformBrowserDynamic } from "@angular/platform-browser-dynamic"; 3 | 4 | import { AppModule } from "./app/app.module"; 5 | import { environment } from "./environments/environment"; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic() 12 | .bootstrapModule(AppModule, { applicationProviders: [provideZoneChangeDetection()], }) 13 | .catch((err) => console.error(err)); 14 | -------------------------------------------------------------------------------- /docker-postgres.sh: -------------------------------------------------------------------------------- 1 | docker pull postgres:16 2 | # docker run --name local-postgres-pfm -e POSTGRES_PASSWORD=sven1 -e POSTGRES_USER=sven1 -e POSTGRES_DB=portfoliomgr -p 5432:5432 -d postgres:16 3 | docker run --name local-postgres-pfm -e POSTGRES_PASSWORD=sven1 -e POSTGRES_USER=sven1 -e POSTGRES_DB=portfoliomgr --network=host -d postgres:16 4 | 5 | # docker start local-postgres-pfm 6 | # docker stop local-postgres-pfm 7 | # docker exec -it local-postgres-pfm bash 8 | # pg_dump -h localhost -U sven1 -d portfoliomgr -c > portfolioMgr.sql 9 | # psql -h localhost -U sven1 -d portfoliomgr < portfolioMgr.sql -------------------------------------------------------------------------------- /backend/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=25 4 | org.eclipse.jdt.core.compiler.compliance=25 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 7 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 8 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 9 | org.eclipse.jdt.core.compiler.release=enabled 10 | org.eclipse.jdt.core.compiler.source=25 11 | -------------------------------------------------------------------------------- /frontend/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 4 | org.eclipse.jdt.core.compiler.compliance=21 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 7 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 8 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 9 | org.eclipse.jdt.core.compiler.release=enabled 10 | org.eclipse.jdt.core.compiler.source=21 11 | -------------------------------------------------------------------------------- /frontend/src/angular/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import "zone.js/testing"; 4 | import { getTestBed } from "@angular/core/testing"; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting, 8 | } from "@angular/platform-browser-dynamic/testing"; 9 | 10 | // First, initialize the Angular testing environment. 11 | getTestBed().initTestEnvironment( 12 | BrowserDynamicTestingModule, 13 | platformBrowserDynamicTesting(), 14 | { 15 | teardown: { destroyAfterEach: false }, 16 | }, 17 | ); 18 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/portfolio-overview/service/news.service.ts: -------------------------------------------------------------------------------- 1 | import { HttpClient } from "@angular/common/http"; 2 | import { Injectable } from "@angular/core"; 3 | import { Observable } from "rxjs"; 4 | import { NewsItem } from "../model/news-item"; 5 | 6 | @Injectable() 7 | export class NewsService { 8 | constructor(private httpClient: HttpClient) {} 9 | 10 | getSeekingAlphaNews(): Observable { 11 | return this.httpClient.get("/rest/newsfeed/seeking-alpha"); 12 | } 13 | 14 | getCnbcFinanceNews(): Observable { 15 | return this.httpClient.get("/rest/newsfeed/cnbc-finance"); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /backend/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | backend 4 | Project backend created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.buildship.core.gradleprojectbuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.buildship.core.gradleprojectnature 22 | 23 | 24 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | rootProject.name = 'manager' 14 | include 'frontend' , 'backend' -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | manager 4 | Project AngularPortfolioMgr created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.buildship.core.gradleprojectbuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.buildship.core.gradleprojectnature 22 | 23 | 24 | -------------------------------------------------------------------------------- /frontend/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | frontend 4 | Project frontend created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.buildship.core.gradleprojectbuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.buildship.core.gradleprojectnature 22 | 23 | 24 | -------------------------------------------------------------------------------- /runKafka.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # network config for KRaft 3 | docker network create app-tier --driver bridge 4 | # Kafka with KRaft 5 | docker run -d \ 6 | -p 9092:9092 \ 7 | --name kafka-server \ 8 | --hostname kafka-server \ 9 | --network app-tier \ 10 | -e KAFKA_CFG_NODE_ID=0 \ 11 | -e KAFKA_CFG_PROCESS_ROLES=controller,broker \ 12 | -e KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093 \ 13 | -e KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT \ 14 | -e KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=0@kafka-server:9093 \ 15 | -e KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER \ 16 | bitnami/kafka:latest 17 | # Start Kafka with KRaft 18 | docker start kafka-server -------------------------------------------------------------------------------- /backend/src/main/resources/application-prod.properties: -------------------------------------------------------------------------------- 1 | spring.h2.console.enabled=false 2 | spring.datasource.initialize=true 3 | spring.datasource.url=${POSTGRES_URL:jdbc:postgresql://localhost:5432/portfoliomgr} 4 | spring.datasource.username=${POSTGRES_USER:sven1} 5 | spring.datasource.password=${POSTGRES_PASSWORD:sven1} 6 | spring.datasource.driver-class-name=org.postgresql.Driver 7 | spring.jpa.database=POSTGRESQL 8 | spring.jpa.database-platform=ch.xxx.manager.adapter.config.PGSQLMapDialect 9 | spring.jpa.hibernate.ddl-auto=validate 10 | spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults = false 11 | spring.jpa.properties.hibernate.jdbc.batch_size=20000 12 | spring.jpa.show-sql=false 13 | spring.datasource.hikari.auto-commit=false -------------------------------------------------------------------------------- /helm/minikubeSetup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # execute helmCommand.sh 3 | 4 | kubectl get services 5 | minikube ip 6 | http://:/ 7 | 8 | minikube config set memory 16384 9 | minikube config set cpu 4 10 | minikube config set driver docker 11 | minikube addons list 12 | minikube addons enable metrics-server 13 | minikube start --extra-config=apiserver.service-node-port-range=1024-65535 14 | kubectl edit deployment -n kube-system metrics-server 15 | 16 | kubectl logs --previous 17 | kubectl exec --stdin --tty -- /bin/bash 18 | kubectl expose pod --port=5432 --type="NodePort" 19 | #psql -d movies -U dbuser -h minikubeip -p dbport < dump.sql 20 | 21 | minikube pause 22 | minikube unpause -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/portfolio-overview/components/portfolio-timechart/portfolio-timechart.component.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | -------------------------------------------------------------------------------- /frontend/src/angular/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | import { browser, logging } from 'protractor'; 3 | 4 | describe('workspace-project App', () => { 5 | let page: AppPage; 6 | 7 | beforeEach(() => { 8 | page = new AppPage(); 9 | }); 10 | 11 | it('should display welcome message', () => { 12 | page.navigateTo(); 13 | expect(page.getTitleText()).toEqual('Welcome to manager!'); 14 | }); 15 | 16 | afterEach(async () => { 17 | // Assert that there are no errors emitted from the browser 18 | const logs = await browser.manage().logs().get(logging.Type.BROWSER); 19 | expect(logs).not.toContain(jasmine.objectContaining({ 20 | level: logging.Level.SEVERE, 21 | } as logging.Entry)); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/financial-data/model/fe-id-info.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | export interface FeIdInfo { 14 | info: string; 15 | id: number; 16 | } 17 | -------------------------------------------------------------------------------- /frontend/src/angular/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false, 7 | }; 8 | 9 | /* 10 | * For easier debugging in development mode, you can import the following file 11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 12 | * 13 | * This import should be commented out in production mode because it will have a negative impact 14 | * on performance if an error is thrown. 15 | */ 16 | // import 'zone.js/plugins/zone-error'; // Included with Angular CLI. 17 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/financial-data/model/fe-concept.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | export interface FeConcept { 14 | concept: string; 15 | timesFound: number; 16 | } 17 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/financial-data/model/fe-country.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | export interface FeCountry { 14 | country: string; 15 | timesFound: number; 16 | } 17 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/financial-data/model/quarter-data.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | export interface QuarterData { 14 | quarter: string; 15 | timesFound: number; 16 | } 17 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/financial-data/model/sf-symbol-name.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | export interface SfSymbolName { 14 | symbol: string; 15 | name: string; 16 | } 17 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/model/portfolio-bar.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | export interface PortfolioBar { 14 | value: number; 15 | name: string; 16 | weight: number; 17 | } 18 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/model/portfolio-data.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { Portfolio } from "./portfolio"; 14 | 15 | export interface PortfolioData { 16 | portfolio: Portfolio; 17 | } 18 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/components/dev-config/dev-config.component.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | .my-button { 14 | float: right; 15 | } 16 | .my-header { 17 | padding-left: 20px; 18 | } 19 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/components/prod-config/prod-config.component.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | .my-button { 14 | float: right; 15 | } 16 | .my-header { 17 | padding-left: 20px; 18 | } 19 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/utils/TokenSubjectRole.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.utils; 14 | 15 | public record TokenSubjectRole(String subject, String role) {} 16 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/dto/FeIdInfoDto.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.dto; 14 | 15 | public record FeIdInfoDto(Long id, String info) { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/dto/SigninEvent.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.dto; 14 | 15 | public record SigninEvent(AppUserDto appUserDto) { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/portfolio-overview/model/news-item.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | export interface NewsItem { 14 | link: string; 15 | publishedDate: string; 16 | title: string; 17 | } 18 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/spinner/spinner.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from "@angular/core/testing"; 2 | 3 | import { SpinnerComponent } from "./spinner.component"; 4 | 5 | /* 6 | describe('SpinnerComponent', () => { 7 | let component: SpinnerComponent; 8 | let fixture: ComponentFixture; 9 | 10 | beforeEach(async(() => { 11 | TestBed.configureTestingModule({ 12 | declarations: [ SpinnerComponent ] 13 | }) 14 | .compileComponents(); 15 | })); 16 | 17 | beforeEach(() => { 18 | fixture = TestBed.createComponent(SpinnerComponent); 19 | component = fixture.componentInstance; 20 | fixture.detectChanges(); 21 | }); 22 | 23 | it('should create', () => { 24 | expect(component).toBeTruthy(); 25 | }); 26 | }); 27 | */ 28 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/file/FileClient.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.file; 14 | 15 | public interface FileClient { 16 | Boolean importZipFile(String filename); 17 | } 18 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/dto/YahooChartWrapper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.dto; 14 | 15 | public record YahooChartWrapper(YahooResult chart) { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/dto/LogoutEvent.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.dto; 14 | 15 | public record LogoutEvent(RevokedTokenDto revokedTokenDto) { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/dto/SymbolNameDto.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.dto; 14 | 15 | public record SymbolNameDto(String symbol, String name) { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/financial-data/components/create-query/create-query.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from "@angular/core/testing"; 2 | 3 | import { CreateQueryComponent } from "./create-query.component"; 4 | /* 5 | describe('CreateQueryComponent', () => { 6 | let component: CreateQueryComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ CreateQueryComponent ] 12 | }) 13 | .compileComponents(); 14 | 15 | fixture = TestBed.createComponent(CreateQueryComponent); 16 | component = fixture.componentInstance; 17 | fixture.detectChanges(); 18 | }); 19 | 20 | it('should create', () => { 21 | expect(component).toBeTruthy(); 22 | }); 23 | }); 24 | */ 25 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/financial-data/components/query-results/query-results.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from "@angular/core/testing"; 2 | 3 | import { QueryResultsComponent } from "./query-results.component"; 4 | /* 5 | describe('QueryResultsComponent', () => { 6 | let component: QueryResultsComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ QueryResultsComponent ] 12 | }) 13 | .compileComponents(); 14 | 15 | fixture = TestBed.createComponent(QueryResultsComponent); 16 | component = fixture.componentInstance; 17 | fixture.detectChanges(); 18 | }); 19 | 20 | it('should create', () => { 21 | expect(component).toBeTruthy(); 22 | }); 23 | }); 24 | */ 25 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/entity/SectorRepository.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.entity; 14 | 15 | public interface SectorRepository { 16 | Sector save(Sector sector); 17 | } 18 | -------------------------------------------------------------------------------- /frontend/src/angular/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "forceConsistentCasingInFileNames": true, 7 | "esModuleInterop": true, 8 | "noImplicitReturns": true, 9 | "noFallthroughCasesInSwitch": true, 10 | "sourceMap": true, 11 | "declaration": false, 12 | "experimentalDecorators": true, 13 | "module": "esnext", 14 | "moduleResolution": "bundler", 15 | "importHelpers": true, 16 | "target": "ES2022", 17 | "typeRoots": [ 18 | "node_modules/@types" 19 | ], 20 | "useDefineForClassFields": false 21 | }, 22 | "angularCompilerOptions": { 23 | "strictTemplates": true, 24 | "fullTemplateTypeCheck": true, 25 | "strictInjectionParameters": true, 26 | "noImplicitAny": false 27 | } 28 | } -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/components/dev-config/dev-config.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from "@angular/core/testing"; 2 | 3 | import { DevConfigComponent } from "./dev-config.component"; 4 | 5 | /* 6 | describe('DevConfigComponent', () => { 7 | let component: DevConfigComponent; 8 | let fixture: ComponentFixture; 9 | 10 | beforeEach(async () => { 11 | await TestBed.configureTestingModule({ 12 | declarations: [ DevConfigComponent ] 13 | }) 14 | .compileComponents(); 15 | }); 16 | 17 | beforeEach(() => { 18 | fixture = TestBed.createComponent(DevConfigComponent); 19 | component = fixture.componentInstance; 20 | fixture.detectChanges(); 21 | }); 22 | 23 | it('should create', () => { 24 | expect(component).toBeTruthy(); 25 | }); 26 | }); 27 | */ 28 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/components/prod-config/prod-config.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from "@angular/core/testing"; 2 | 3 | import { ProdConfigComponent } from "./prod-config.component"; 4 | /* 5 | describe('ProdConfigComponent', () => { 6 | let component: ProdConfigComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ ProdConfigComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ProdConfigComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | */ 27 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/portfolio-detail/components/symbol-overview/symbol-overview.component.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | .symbol-data { 14 | margin-right: 10px; 15 | } 16 | 17 | .text-container { 18 | margin-bottom: 10px; 19 | } 20 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/dto/YahooTradingPeriod.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.dto; 14 | 15 | public record YahooTradingPeriod(String timezone, Long start, Long end, Long gmtoffset) { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/model/portfolio-bars.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { PortfolioBar } from "./portfolio-bar"; 14 | 15 | export interface PortfolioBars { 16 | title: string; 17 | from: string; 18 | portfolioBars: PortfolioBar[]; 19 | } 20 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/dto/YahooEventsSplit.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.dto; 14 | 15 | public record YahooEventsSplit(Long date, Long numerator, Long denominator, String splitRatio) { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/dto/YahooResult.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.dto; 14 | 15 | import java.util.List; 16 | 17 | public record YahooResult(List result, String error) { 18 | 19 | } 20 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/usecase/service/NasdaqClient.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.usecase.service; 14 | 15 | import java.util.ArrayList; 16 | 17 | public interface NasdaqClient { 18 | ArrayList importSymbols(); 19 | } 20 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/components/new-portfolio/new-portfolio.component.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | ul { 14 | list-style-type: none; 15 | } 16 | 17 | .errorText { 18 | color: red; 19 | } 20 | 21 | mat-form-field { 22 | margin-right: 12px; 23 | } 24 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/dto/YahooEventsDividend.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.dto; 14 | 15 | import java.math.BigDecimal; 16 | 17 | public record YahooEventsDividend(BigDecimal amount, Long date) { 18 | 19 | } 20 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/producer/EventPublications.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.producer; 14 | 15 | public interface EventPublications { 16 | void resubmitUnpublishedEvents(); 17 | void clearPublishedEvents(); 18 | } 19 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/dto/YahooDailyQuoteWrapper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.dto; 14 | 15 | import java.util.List; 16 | 17 | public record YahooDailyQuoteWrapper(List result, String error) { } 18 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/dto/YahooTradingPeriods.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.dto; 14 | 15 | public record YahooTradingPeriods(YahooTradingPeriod pre, YahooTradingPeriod regular, YahooTradingPeriod post) { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/model/import-data.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | export enum ImportDataType { 14 | Sec = "Sec", 15 | Stocks = "Stocks", 16 | } 17 | 18 | export interface ImportData { 19 | filename: string; 20 | path?: string; 21 | dataType: ImportDataType; 22 | } 23 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/usecase/service/AppInfoService.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.usecase.service; 14 | 15 | public interface AppInfoService { 16 | String getProfiles(); 17 | String getClassName(); 18 | String getFinancialDataImportPath(); 19 | } 20 | -------------------------------------------------------------------------------- /helm/scaledobject.yaml: -------------------------------------------------------------------------------- 1 | # kubectl apply -f scaledobject.yaml 2 | apiVersion: keda.sh/v1alpha1 3 | kind: ScaledObject 4 | metadata: 5 | name: keda-scaled-webapp 6 | namespace: default 7 | labels: 8 | deploymentName: angularportfoliomgrapp 9 | spec: 10 | scaleTargetRef: 11 | name: angularportfoliomgrapp 12 | pollingInterval: 10 # Optional. Default: 30 seconds 13 | minReplicaCount: 1 # Optional. Default: 0 14 | maxReplicaCount: 3 # Optional. Default: 100 15 | triggers: 16 | - type: metrics-api 17 | metadata: 18 | targetValue: "10" 19 | url: "http://angularportfoliomgrservice.default.svc.cluster.local:8080/actuator/metrics/http.server.requests.active" 20 | valueLocation: "measurements.0.value" 21 | - type: cpu 22 | metricType: Utilization # Allowed types are 'Utilization' or 'AverageValue' 23 | metadata: 24 | value: "60" -------------------------------------------------------------------------------- /frontend/src/angular/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | # Only exists if Bazel was run 8 | /bazel-out 9 | 10 | # dependencies 11 | /node_modules 12 | 13 | # profiling files 14 | chrome-profiler-events.json 15 | speed-measure-plugin.json 16 | 17 | # IDEs and editors 18 | /.idea 19 | .project 20 | .classpath 21 | .c9/ 22 | *.launch 23 | .settings/ 24 | *.sublime-workspace 25 | 26 | # IDE - VSCode 27 | .vscode/* 28 | !.vscode/settings.json 29 | !.vscode/tasks.json 30 | !.vscode/launch.json 31 | !.vscode/extensions.json 32 | .history/* 33 | 34 | # misc 35 | /.angular/cache 36 | /.sass-cache 37 | /connect.lock 38 | /coverage 39 | /libpeerconnection.log 40 | npm-debug.log 41 | yarn-error.log 42 | testem.log 43 | /typings 44 | 45 | # System Files 46 | .DS_Store 47 | Thumbs.db 48 | /.angular/ 49 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/prod/adapter/controller/ProdAppInfoController.java: -------------------------------------------------------------------------------- 1 | package ch.xxx.manager.prod.adapter.controller; 2 | 3 | import org.springframework.http.MediaType; 4 | import org.springframework.web.bind.annotation.GetMapping; 5 | import org.springframework.web.bind.annotation.RequestMapping; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | import ch.xxx.manager.usecase.service.AppInfoService; 9 | 10 | @RestController 11 | @RequestMapping("/rest/prod/app-info") 12 | public class ProdAppInfoController { 13 | private final AppInfoService appInfoService; 14 | 15 | public ProdAppInfoController(AppInfoService appInfoService) { 16 | this.appInfoService = appInfoService; 17 | } 18 | 19 | @GetMapping(path = "/class-name", produces = MediaType.TEXT_PLAIN_VALUE) 20 | public String getClassName() { 21 | return this.appInfoService.getClassName(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/usecase/service/XetraClient.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.usecase.service; 14 | 15 | import java.util.List; 16 | import java.util.Optional; 17 | 18 | public interface XetraClient { 19 | Optional> importXetraSymbols(); 20 | } 21 | -------------------------------------------------------------------------------- /backend/src/main/resources/application-prod-kafka.properties: -------------------------------------------------------------------------------- 1 | kafka.server.name=${KAFKA_SERVER_NAME:kafkaapp} 2 | spring.kafka.bootstrap-servers=${KAFKA_SERVICE_NAME}:9092 3 | spring.kafka.producer.compression-type=gzip 4 | spring.kafka.producer.transaction-id-prefix: tx- 5 | spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.StringSerializer 6 | spring.kafka.producer.value-serializer=org.apache.kafka.common.serialization.StringSerializer 7 | spring.kafka.consumer.group-id=group_id 8 | spring.kafka.consumer.auto-offset-reset=earliest 9 | spring.kafka.consumer.key-deserializer=org.apache.kafka.common.serialization.StringDeserializer 10 | spring.kafka.consumer.value-deserializer=org.apache.kafka.common.serialization.StringDeserializer 11 | spring.kafka.consumer.enable-auto-commit=false 12 | spring.kafka.consumer.isolation-level=read_committed 13 | spring.kafka.consumer.transaction-id-prefix: tx- -------------------------------------------------------------------------------- /frontend/src/angular/src/app/model/quote.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | export interface Quote { 14 | open: number; 15 | high: number; 16 | low: number; 17 | close: number; 18 | volume: number; 19 | timestamp: string; 20 | symbol: string; 21 | split: number; 22 | dividend: number; 23 | } 24 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/portfolio-overview/components/news-list/news-list.component.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | .news-item { 14 | padding: 10px; 15 | border-bottom: solid 1px #000; 16 | } 17 | 18 | .container { 19 | overflow-y: scroll; 20 | height: calc(100vh - 134px); 21 | } 22 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=25 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 6 | org.eclipse.jdt.core.compiler.compliance=25 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 12 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 13 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 14 | org.eclipse.jdt.core.compiler.release=enabled 15 | org.eclipse.jdt.core.compiler.source=25 16 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/spinner/spinner.component.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | 14 | .container { 15 | display: flex; 16 | width: 100%; 17 | justify-content: center; 18 | align-content: center; 19 | } 20 | .content { 21 | margin-top: 50px; 22 | } 23 | .example-margin { 24 | margin: 0 10px; 25 | } 26 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/login/model/login.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | export interface Login { 14 | id?: number; 15 | username: string; 16 | password: string; 17 | emailAddress: string; 18 | token: string; 19 | secUntilNexLogin?: number; 20 | alphavantageKey?: string; 21 | rapidApiKey?: string; 22 | } 23 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/model/portfolio-element.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { CommonValues } from "./portfolio"; 14 | 15 | export interface PortfolioElement extends CommonValues { 16 | symbol: string; 17 | weight: number; 18 | sector: string; 19 | lastClose: number; 20 | changedAt?: string; 21 | } 22 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/dto/YahooResultWrapper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.dto; 14 | 15 | import java.util.List; 16 | 17 | public record YahooResultWrapper(YahooMetaData meta, List timestamp, YahooEvents events, YahooIndicators indicators) { 18 | 19 | } 20 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/entity/dto/CompanyReportWrapper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.entity.dto; 14 | 15 | import ch.xxx.manager.domain.model.entity.CompanyReport; 16 | 17 | public record CompanyReportWrapper(String cik, String reportZipUrl, CompanyReport companyReport) { 18 | } 19 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/portfolio-overview/service/calendar.service.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { Injectable } from "@angular/core"; 14 | 15 | @Injectable() 16 | export class CalendarService { 17 | public static readonly DAY_WIDTH = 20; 18 | public static readonly MONTH_WIDTH = 100; 19 | 20 | constructor() {} 21 | } 22 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { Component } from "@angular/core"; 14 | 15 | @Component({ 16 | selector: "app-root", 17 | templateUrl: "./app.component.html", 18 | styleUrls: ["./app.component.scss"], 19 | standalone: false 20 | }) 21 | export class AppComponent { 22 | title = "manager"; 23 | } 24 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/dev/adapter/controller/DevAppInfoController.java: -------------------------------------------------------------------------------- 1 | package ch.xxx.manager.dev.adapter.controller; 2 | 3 | import org.springframework.context.annotation.Primary; 4 | import org.springframework.http.MediaType; 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 | import ch.xxx.manager.usecase.service.AppInfoService; 10 | 11 | @Primary 12 | @RestController 13 | @RequestMapping("/rest/dev/app-info") 14 | public class DevAppInfoController { 15 | private final AppInfoService appInfoService; 16 | 17 | public DevAppInfoController(AppInfoService appInfoService) { 18 | this.appInfoService = appInfoService; 19 | } 20 | 21 | @GetMapping(path = "/class-name", produces = MediaType.TEXT_PLAIN_VALUE) 22 | public String getClassName() { 23 | return this.appInfoService.getClassName(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/entity/dto/DailyQuoteEntityDto.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.entity.dto; 14 | 15 | import ch.xxx.manager.domain.model.dto.QuoteDto; 16 | import ch.xxx.manager.domain.model.entity.DailyQuote; 17 | 18 | public record DailyQuoteEntityDto(DailyQuote entity, QuoteDto dto) { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/usecase/service/HkexClient.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.usecase.service; 14 | 15 | import java.util.List; 16 | import java.util.Optional; 17 | 18 | import ch.xxx.manager.domain.model.dto.HkSymbolImportDto; 19 | 20 | public interface HkexClient { 21 | Optional> importSymbols(); 22 | } 23 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/usecase/service/SecSymbolClient.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.usecase.service; 14 | 15 | import java.util.Map; 16 | 17 | import ch.xxx.manager.domain.model.dto.SymbolToCikWrapperDto.CompanySymbolDto; 18 | 19 | public interface SecSymbolClient { 20 | Map importSymbols(); 21 | } 22 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/adapter/repository/JpaSectorRepository.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.adapter.repository; 14 | 15 | import org.springframework.data.repository.CrudRepository; 16 | 17 | import ch.xxx.manager.domain.model.entity.Sector; 18 | 19 | public interface JpaSectorRepository extends CrudRepository{ 20 | 21 | } 22 | -------------------------------------------------------------------------------- /frontend/src/angular/e2e/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | // Protractor configuration file, see link for more information 3 | // https://github.com/angular/protractor/blob/master/lib/config.ts 4 | 5 | const { SpecReporter } = require('jasmine-spec-reporter'); 6 | 7 | /** 8 | * @type { import("protractor").Config } 9 | */ 10 | exports.config = { 11 | allScriptsTimeout: 11000, 12 | specs: [ 13 | './src/**/*.e2e-spec.ts' 14 | ], 15 | capabilities: { 16 | 'browserName': 'chrome' 17 | }, 18 | directConnect: true, 19 | baseUrl: 'http://localhost:4200/', 20 | framework: 'jasmine', 21 | jasmineNodeOpts: { 22 | showColors: true, 23 | defaultTimeoutInterval: 30000, 24 | print: function() {} 25 | }, 26 | onPrepare() { 27 | require('ts-node').register({ 28 | project: require('path').join(__dirname, './tsconfig.json') 29 | }); 30 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); 31 | } 32 | }; -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/dto/YahooIndicators.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.dto; 14 | 15 | import java.math.BigDecimal; 16 | import java.util.List; 17 | import java.util.Map; 18 | 19 | public record YahooIndicators(List>> quote, List>> adjclose) { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/entity/dto/CalcPortfolioElement.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.entity.dto; 14 | 15 | import java.math.BigDecimal; 16 | import java.time.LocalDate; 17 | 18 | public record CalcPortfolioElement(Long symbolId, LocalDate localDate, BigDecimal value, String symbolName, 19 | Long weight) { 20 | } 21 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/entity/dto/PortfolioBarData.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.entity.dto; 14 | 15 | import java.util.Collection; 16 | 17 | import ch.xxx.manager.domain.model.entity.Portfolio; 18 | 19 | public record PortfolioBarData(Portfolio portfolio, Collection portfolioElements) { 20 | } 21 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/dto/YahooEvents.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.dto; 14 | 15 | import java.util.Map; 16 | 17 | import com.fasterxml.jackson.annotation.JsonProperty; 18 | 19 | public record YahooEvents(@JsonProperty Map dividends, @JsonProperty Map splits) { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/adapter/repository/JpaRevokedTokenRepository.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.adapter.repository; 14 | 15 | import org.springframework.data.repository.CrudRepository; 16 | 17 | import ch.xxx.manager.domain.model.entity.RevokedToken; 18 | 19 | public interface JpaRevokedTokenRepository extends CrudRepository { 20 | } 21 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/adapter/config/PGSQLMapDialect.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.adapter.config; 14 | 15 | import org.hibernate.dialect.DatabaseVersion; 16 | import org.hibernate.dialect.PostgreSQLDialect; 17 | 18 | public class PGSQLMapDialect extends PostgreSQLDialect { 19 | 20 | public PGSQLMapDialect() { 21 | super( DatabaseVersion.make( 9, 5 ) ); 22 | } 23 | } -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/exception/ResourceForbiddenException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.exception; 14 | 15 | public class ResourceForbiddenException extends RuntimeException { 16 | private static final long serialVersionUID = -4066280643955795514L; 17 | 18 | public ResourceForbiddenException(String message) { 19 | super(message); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/entity/dto/ItemDto.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.entity.dto; 14 | 15 | import com.fasterxml.jackson.annotation.JsonRootName; 16 | 17 | @JsonRootName("item") 18 | public record ItemDto(String title, String link, String guid, EnclosureDto enclosure, String description, String pubDate, EdgarXbrlFilingDto xbrlFiling) {} 19 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/components/dev-config/dev-config.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from "@angular/core"; 2 | import { MatDialogRef } from "@angular/material/dialog"; 3 | import { Observable } from "rxjs"; 4 | import { DevAppInfoService } from "../../service/dev-app-info.service"; 5 | import { OverviewComponent } from "../overview/overview.component"; 6 | 7 | @Component({ 8 | selector: "app-dev-config", 9 | templateUrl: "./dev-config.component.html", 10 | styleUrls: ["./dev-config.component.scss"], 11 | standalone: false 12 | }) 13 | export class DevConfigComponent implements OnInit { 14 | classNameObs: Observable; 15 | 16 | constructor( 17 | private dialogRef: MatDialogRef, 18 | private devAppInfoService: DevAppInfoService, 19 | ) {} 20 | 21 | ngOnInit(): void { 22 | this.classNameObs = this.devAppInfoService.getClassName(); 23 | } 24 | 25 | closeDialog(): void { 26 | this.dialogRef.close(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/portfolio-overview/components/portfolio-stats/portfolio-stats.component.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | .grid-container { 14 | display: grid; 15 | width: 100%; 16 | grid-template-columns: repeat(3, 25% 8.3%); 17 | } 18 | .grid-element { 19 | padding: 5px; 20 | min-height: 10px; 21 | overflow: hidden; 22 | white-space: nowrap; 23 | text-overflow: ellipsis; 24 | } -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/exception/ResourceNotFoundException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.exception; 14 | 15 | public class ResourceNotFoundException extends RuntimeException { 16 | 17 | private static final long serialVersionUID = -4246075150244552193L; 18 | 19 | public ResourceNotFoundException(String message) { 20 | super(message); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/portfolio-overview/model/item.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { EventEmitter } from "@angular/core"; 14 | 15 | export class Item { 16 | id: number; 17 | lineId: string; 18 | name: string; 19 | details: string; 20 | start: Date; 21 | end: Date; 22 | eventEmitter = new EventEmitter(); 23 | cssClass = ""; 24 | headerAnchorId = ""; 25 | } 26 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/entity/dto/PortfolioBarsWrapper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.entity.dto; 14 | 15 | import java.time.LocalDate; 16 | import java.util.List; 17 | 18 | import ch.xxx.manager.domain.model.entity.Portfolio; 19 | 20 | public record PortfolioBarsWrapper(Portfolio portfolio, LocalDate start, List portfolioElements) {} 21 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/usecase/service/YahooClient.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.usecase.service; 14 | 15 | import java.time.Duration; 16 | import java.util.List; 17 | 18 | import ch.xxx.manager.domain.model.dto.YahooDailyQuoteImportDto; 19 | 20 | public interface YahooClient { 21 | List getTimeseriesDailyHistory(String symbol, Duration delay); 22 | } 23 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/model/symbol.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | export interface Symbol { 14 | id: number; 15 | symbol: string; 16 | name: string; 17 | weight?: number; 18 | changedAt: string; 19 | removedAt?: string; 20 | source: string; 21 | currencyKey: string; 22 | sector?: string; 23 | industry?: string; 24 | description?: string; 25 | address?: string; 26 | country?: string; 27 | } 28 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/entity/dto/RssDto.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.entity.dto; 14 | 15 | import com.fasterxml.jackson.annotation.JsonRootName; 16 | import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; 17 | 18 | 19 | @JsonRootName("rss") 20 | public record RssDto(@JacksonXmlProperty(isAttribute = true) String version, ChannelDto channel) { } 21 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/usecase/service/RapidApiClient.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.usecase.service; 14 | 15 | import java.time.Duration; 16 | import java.util.Optional; 17 | 18 | import ch.xxx.manager.domain.model.dto.RapidOverviewImportDto; 19 | 20 | public interface RapidApiClient { 21 | Optional importCompanyProfile(String symbol, Duration delay); 22 | } 23 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/financial-data/model/symbol-financials.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { FinancialElement } from "./financial-element"; 14 | 15 | export interface SymbolFinancials { 16 | id: number; 17 | startDate: Date; 18 | endDate: Date; 19 | year: number; 20 | quarter: string; 21 | symbol: string; 22 | name: string; 23 | country: string; 24 | city: string; 25 | financialElements: FinancialElement[]; 26 | } 27 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/components/prod-config/prod-config.component.ts: -------------------------------------------------------------------------------- 1 | import { OnInit } from "@angular/core"; 2 | import { Component } from "@angular/core"; 3 | import { MatDialogRef } from "@angular/material/dialog"; 4 | import { Observable } from "rxjs"; 5 | import { ProdAppInfoService } from "../../service/prod-app-info.service"; 6 | import { OverviewComponent } from "../overview/overview.component"; 7 | 8 | @Component({ 9 | selector: "app-prod-config", 10 | templateUrl: "./prod-config.component.html", 11 | styleUrls: ["./prod-config.component.scss"], 12 | standalone: false 13 | }) 14 | export class ProdConfigComponent implements OnInit { 15 | classNameObs: Observable; 16 | 17 | constructor( 18 | private dialogRef: MatDialogRef, 19 | private prodAppInfoService: ProdAppInfoService, 20 | ) {} 21 | 22 | ngOnInit(): void { 23 | this.classNameObs = this.prodAppInfoService.getClassName(); 24 | } 25 | 26 | closeDialog(): void { 27 | this.dialogRef.close(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/service/symbol.service.spec.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { TestBed } from "@angular/core/testing"; 14 | 15 | import { SymbolService } from "./symbol.service"; 16 | 17 | /*describe('SymbolService', () => { 18 | beforeEach(() => TestBed.configureTestingModule({})); 19 | 20 | it('should be created', () => { 21 | const service: SymbolService = TestBed.get(SymbolService); 22 | expect(service).toBeTruthy(); 23 | }); 24 | });*/ 25 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/adapter/repository/JpaCompanyReportRepository.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.adapter.repository; 14 | 15 | import org.springframework.data.repository.CrudRepository; 16 | 17 | import ch.xxx.manager.domain.model.entity.CompanyReport; 18 | 19 | public interface JpaCompanyReportRepository extends CrudRepository { 20 | Iterable findByReportUrlIn(Iterable reportUrls); 21 | } 22 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/entity/RevokedTokenRepository.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.entity; 14 | 15 | import java.util.Collection; 16 | 17 | public interface RevokedTokenRepository { 18 | Collection findAll(); 19 | Collection saveAll(Iterable revokedTokens); 20 | void deleteAll(Iterable revokedTokens); 21 | RevokedToken save(RevokedToken revokedToker); 22 | } 23 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/service/portfolio.service.spec.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { TestBed } from "@angular/core/testing"; 14 | 15 | import { PortfolioService } from "./portfolio.service"; 16 | 17 | /*describe('PortfolioService', () => { 18 | beforeEach(() => TestBed.configureTestingModule({})); 19 | 20 | it('should be created', () => { 21 | const service: PortfolioService = TestBed.get(PortfolioService); 22 | expect(service).toBeTruthy(); 23 | }); 24 | });*/ 25 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/base/components/dialog-spinner/dialog-spinner.component.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | 14 | .header { 15 | margin-top: 20px; 16 | text-align: center; 17 | } 18 | 19 | .container { 20 | display: flex; 21 | width: 100%; 22 | justify-content: center; 23 | align-content: center; 24 | } 25 | 26 | .example-margin { 27 | margin: 50px; 28 | } 29 | 30 | ::ng-deep { 31 | .cdk-overlay-backdrop-showing { 32 | backdrop-filter: blur(3px); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/login/component/login/login.component.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | ul { 14 | list-style-type: none; 15 | } 16 | 17 | .errorText { 18 | color: red; 19 | } 20 | 21 | .spacer { 22 | margin-left: 20px; 23 | } 24 | 25 | .spinner-container { 26 | display: flex; 27 | justify-content: center; 28 | align-items: center; 29 | padding: 20px; 30 | } 31 | 32 | ::ng-deep { 33 | .cdk-overlay-backdrop-showing { 34 | backdrop-filter: blur(3px); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/portfolio-overview/components/portfolio-charts/portfolio-charts.component.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | .my-container { 14 | background: #ffffff; 15 | height: 100%; 16 | width: 100%; 17 | } 18 | 19 | .mat-mdc-tab-group { 20 | height: 100%; 21 | } 22 | 23 | /*TODO(mdc-migration): The following rule targets internal classes of tabs that may no longer apply for the MDC version. 24 | */ 25 | ::ng-deep .mat-mdc-tab-body-wrapper { 26 | height: 100%; 27 | } 28 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/exception/AuthenticationException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.exception; 14 | 15 | public class AuthenticationException extends RuntimeException { 16 | 17 | private static final long serialVersionUID = -4778173207515812187L; 18 | 19 | public AuthenticationException(String message) { 20 | super(message); 21 | } 22 | 23 | public AuthenticationException(String message, Throwable th) { 24 | super(message, th); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/service/quote.service.spec.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { TestBed } from "@angular/core/testing"; 14 | 15 | import { QuoteService } from "./quote.service"; 16 | 17 | /*describe('QuoteService', () => { 18 | let service: QuoteService; 19 | 20 | beforeEach(() => { 21 | TestBed.configureTestingModule({}); 22 | service = TestBed.inject(QuoteService); 23 | }); 24 | 25 | it('should be created', () => { 26 | expect(service).toBeTruthy(); 27 | }); 28 | });*/ 29 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/service/main.guard.spec.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { TestBed, inject, waitForAsync } from "@angular/core/testing"; 14 | 15 | import { MainGuard } from "./main.guard"; 16 | 17 | /* 18 | describe('MainGuard', () => { 19 | beforeEach(() => { 20 | TestBed.configureTestingModule({ 21 | providers: [MainGuard] 22 | }); 23 | }); 24 | 25 | it('should ...', inject([MainGuard], (guard: MainGuard) => { 26 | expect(guard).toBeTruthy(); 27 | })); 28 | }); 29 | */ 30 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/service/dev-app-info.service.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { HttpClient } from "@angular/common/http"; 14 | import { Injectable } from "@angular/core"; 15 | import { Observable } from "rxjs"; 16 | 17 | @Injectable() 18 | export class DevAppInfoService { 19 | constructor(private http: HttpClient) {} 20 | 21 | getClassName(): Observable { 22 | return this.http.get("/rest/dev/app-info/class-name", { 23 | responseType: "text", 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/entity/CompanyReportRepository.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.entity; 14 | 15 | /** 16 | * 17 | * @author sven 18 | */ 19 | public interface CompanyReportRepository { 20 | void save(CompanyReport companyReport); 21 | Iterable findAll(); 22 | Iterable findByReportUrlIn(Iterable reportUrls); 23 | Iterable saveAll(Iterable companyReports); 24 | } 25 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/entity/CurrencyRepository.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.entity; 14 | 15 | import java.util.Collection; 16 | import java.util.List; 17 | import java.util.Optional; 18 | 19 | import ch.xxx.manager.domain.utils.DataHelper; 20 | 21 | public interface CurrencyRepository { 22 | Optional findByToCurr(DataHelper.CurrencyKey toCurr); 23 | List findAll(); 24 | List saveAll(Collection currencies); 25 | } 26 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/base/utils/funtions.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { DestroyRef } from "@angular/core"; 14 | import { MonoTypeOperatorFunction, Subject, takeUntil } from "rxjs"; 15 | 16 | export function takeUntilDestroyed( 17 | destroyRef: DestroyRef, 18 | ): MonoTypeOperatorFunction { 19 | const subject = new Subject(); 20 | 21 | destroyRef.onDestroy(() => { 22 | subject.next(true); 23 | subject.complete(); 24 | }); 25 | 26 | return takeUntil(subject.asObservable()); 27 | } 28 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/service/prod-app-info.service.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { HttpClient } from "@angular/common/http"; 14 | import { Injectable } from "@angular/core"; 15 | import { Observable } from "rxjs"; 16 | 17 | @Injectable() 18 | export class ProdAppInfoService { 19 | constructor(private http: HttpClient) {} 20 | 21 | getClassName(): Observable { 22 | return this.http.get("/rest/prod/app-info/class-name", { 23 | responseType: "text", 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/producer/EventProducer.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.producer; 14 | 15 | import ch.xxx.manager.domain.model.dto.AppUserDto; 16 | import ch.xxx.manager.domain.model.dto.KafkaEventDto; 17 | import ch.xxx.manager.domain.model.dto.RevokedTokenDto; 18 | 19 | public interface EventProducer { 20 | void sendLogoutMsg(RevokedTokenDto revokedTokenDto); 21 | void sendNewUserMsg(AppUserDto appUserDto); 22 | void sendKafkaEvent(KafkaEventDto kafkaEventDto); 23 | } 24 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/service/config.service.spec.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { TestBed } from "@angular/core/testing"; 14 | 15 | import { ConfigService } from "./config.service"; 16 | 17 | /* 18 | describe('ConfigService', () => { 19 | let service: ConfigService; 20 | 21 | beforeEach(() => { 22 | TestBed.configureTestingModule({}); 23 | service = TestBed.inject(ConfigService); 24 | }); 25 | 26 | it('should be created', () => { 27 | expect(service).toBeTruthy(); 28 | }); 29 | }); 30 | */ 31 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/portfolio-overview/service/news.service.spec.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { TestBed } from "@angular/core/testing"; 14 | 15 | import { NewsService } from "./news.service"; 16 | /* 17 | describe('NewsService', () => { 18 | let service: NewsService; 19 | 20 | beforeEach(() => { 21 | TestBed.configureTestingModule({}); 22 | service = TestBed.inject(NewsService); 23 | }); 24 | 25 | it('should be created', () => { 26 | expect(service).toBeTruthy(); 27 | }); 28 | }); 29 | */ 30 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/dto/RefreshTokenDto.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.dto; 14 | 15 | public class RefreshTokenDto { 16 | private String refreshToken; 17 | 18 | public RefreshTokenDto(String refreshToken) { 19 | super(); 20 | this.refreshToken = refreshToken; 21 | } 22 | 23 | public String getRefreshToken() { 24 | return refreshToken; 25 | } 26 | 27 | public void setRefreshToken(String refreshToken) { 28 | this.refreshToken = refreshToken; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/login/login-routing.module.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { NgModule } from "@angular/core"; 14 | import { Routes, RouterModule } from "@angular/router"; 15 | import { MainComponent } from "./component/main/main.component"; 16 | 17 | const routes: Routes = [ 18 | { path: "login", component: MainComponent }, 19 | { path: "**", redirectTo: "login" }, 20 | ]; 21 | 22 | @NgModule({ 23 | imports: [RouterModule.forChild(routes)], 24 | exports: [RouterModule], 25 | }) 26 | export class LoginRoutingModule {} 27 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/service/quote-import.service.spec.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { TestBed } from "@angular/core/testing"; 14 | 15 | import { QuoteImportService } from "./quote-import.service"; 16 | 17 | /*describe('QuoteImportService', () => { 18 | let service: QuoteImportService; 19 | 20 | beforeEach(() => { 21 | TestBed.configureTestingModule({}); 22 | service = TestBed.inject(QuoteImportService); 23 | }); 24 | 25 | it('should be created', () => { 26 | expect(service).toBeTruthy(); 27 | }); 28 | });*/ 29 | -------------------------------------------------------------------------------- /frontend/src/angular/README.md: -------------------------------------------------------------------------------- 1 | # Manager 2 | 3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.0.1. 4 | 5 | ## Development server 6 | 7 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. 8 | 9 | ## Code scaffolding 10 | 11 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. 12 | 13 | ## Build 14 | 15 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. 16 | 17 | ## Running unit tests 18 | 19 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). 20 | 21 | ## Running end-to-end tests 22 | 23 | Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). 24 | 25 | ## Further help 26 | 27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). 28 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/service/symbol-import.service.spec.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { TestBed } from "@angular/core/testing"; 14 | 15 | import { SymbolImportService } from "./symbol-import.service"; 16 | 17 | /*describe('SymbolImportService', () => { 18 | let service: SymbolImportService; 19 | 20 | beforeEach(() => { 21 | TestBed.configureTestingModule({}); 22 | service = TestBed.inject(SymbolImportService); 23 | }); 24 | 25 | it('should be created', () => { 26 | expect(service).toBeTruthy(); 27 | }); 28 | });*/ 29 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/usecase/service/AlphavatageClient.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.usecase.service; 14 | 15 | import java.util.Optional; 16 | 17 | import ch.xxx.manager.domain.model.dto.AlphaOverviewImportDto; 18 | import ch.xxx.manager.domain.model.dto.DailyFxWrapperImportDto; 19 | 20 | public interface AlphavatageClient { 21 | Optional importCompanyProfile(String symbol); 22 | Optional getFxTimeseriesDailyHistory(String to_currency, boolean fullSeries); 23 | } 24 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/usecase/service/NewsFeedClient.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.usecase.service; 14 | 15 | import java.util.List; 16 | 17 | import com.rometools.rome.feed.synd.SyndFeed; 18 | 19 | import ch.xxx.manager.domain.model.entity.dto.CompanyReportWrapper; 20 | 21 | public interface NewsFeedClient { 22 | SyndFeed importSeekingAlphaFeed(); 23 | SyndFeed importCnbcFinanceNewsFeed(); 24 | List importSecEdgarUsGaapNewsFeed(); 25 | byte[] loadCompanyReportZip(String url); 26 | } 27 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/portfolio-overview/service/calendar.service.spec.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { TestBed } from "@angular/core/testing"; 14 | 15 | import { CalendarService } from "./calendar.service"; 16 | /* 17 | describe('CalendarService', () => { 18 | let service: CalendarService; 19 | 20 | beforeEach(() => { 21 | TestBed.configureTestingModule({}); 22 | service = TestBed.inject(CalendarService); 23 | }); 24 | 25 | it('should be created', () => { 26 | expect(service).toBeTruthy(); 27 | }); 28 | }); 29 | */ 30 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/service/dev-app-info.service.spec.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { TestBed } from "@angular/core/testing"; 14 | 15 | import { DevAppInfoService } from "./dev-app-info.service"; 16 | 17 | /* 18 | describe('DevAppInfoService', () => { 19 | let service: DevAppInfoService; 20 | 21 | beforeEach(() => { 22 | TestBed.configureTestingModule({}); 23 | service = TestBed.inject(DevAppInfoService); 24 | }); 25 | 26 | it('should be created', () => { 27 | expect(service).toBeTruthy(); 28 | }); 29 | }); 30 | */ 31 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/service/prod-app-info.service.spec.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { TestBed } from "@angular/core/testing"; 14 | 15 | import { ProdAppInfoService } from "./prod-app-info.service"; 16 | 17 | /* 18 | describe('ProdAppInfoService', () => { 19 | let service: ProdAppInfoService; 20 | 21 | beforeEach(() => { 22 | TestBed.configureTestingModule({}); 23 | service = TestBed.inject(ProdAppInfoService); 24 | }); 25 | 26 | it('should be created', () => { 27 | expect(service).toBeTruthy(); 28 | }); 29 | }); 30 | */ 31 | -------------------------------------------------------------------------------- /helm/kafka/values.yaml: -------------------------------------------------------------------------------- 1 | webAppName: kafkaapp 2 | dbName: zookeeperserver 3 | webImageName: bitnami/kafka 4 | webImageVersion: latest 5 | dbImageName: bitnami/zookeeper 6 | dbImageVersion: latest 7 | volumeClaimName: postgres-pv-claim 8 | persistentVolumeName: task-pv-volume 9 | webServiceName: kafkaservice 10 | dbServiceName: zookeeperservice 11 | #for production use replace the jwtTokenSecrect value with a random alphanumeric string of the same length or longer 12 | jwtTokenSecrect: secret-key1234567890abcdefghijklmnopqrstuvpxyz 13 | 14 | secret: 15 | nameApp: app-env-secret 16 | nameDb: db-env-secret 17 | 18 | envDb: 19 | normal: 20 | ALLOW_ANONYMOUS_LOGIN: yes 21 | secret: 22 | ZOOKEEPER_TICK_TIME: "2000" 23 | 24 | envApp: 25 | normal: 26 | KAFKA_BROKER_ID: "1" 27 | KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT 28 | KAFKA_CFG_LISTENERS: PLAINTEXT://:9092 29 | KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://:9092 30 | KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: false 31 | ALLOW_PLAINTEXT_LISTENER: yes 32 | KAFKA_ENABLE_KRAFT: false 33 | secret: 34 | KAFKA_ZOOKEEPER_CONNECT: "zookeeperservice:2181" -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/entity/dto/EnclosureDto.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * Unless required by applicable law or agreed to in writing, software 8 | * distributed under the License is distributed on an "AS IS" BASIS, 9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | * See the License for the specific language governing permissions and 11 | * limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.entity.dto; 14 | 15 | import com.fasterxml.jackson.annotation.JsonRootName; 16 | import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; 17 | 18 | @JsonRootName("enclosure") 19 | public record EnclosureDto(@JacksonXmlProperty(isAttribute = true) String url, 20 | @JacksonXmlProperty(isAttribute = true) String length, 21 | @JacksonXmlProperty(isAttribute = true) String type) { 22 | } 23 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/dto/SymbolFinancialsIdParamDto.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.dto; 14 | 15 | import java.util.ArrayList; 16 | import java.util.List; 17 | 18 | public class SymbolFinancialsIdParamDto { 19 | private List symbolFinancialsIds = new ArrayList<>(); 20 | 21 | public List getSymbolFinancialsIds() { 22 | return symbolFinancialsIds; 23 | } 24 | 25 | public void setSymbolFinancialsIds(List symbolFinancialsIds) { 26 | this.symbolFinancialsIds = symbolFinancialsIds; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/financial-data/service/financial-data.service.spec.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { TestBed } from "@angular/core/testing"; 14 | 15 | import { FinancialDataService } from "./financial-data.service"; 16 | /* 17 | describe('FinancialDataService', () => { 18 | let service: FinancialDataService; 19 | 20 | beforeEach(() => { 21 | TestBed.configureTestingModule({}); 22 | service = TestBed.inject(FinancialDataService); 23 | }); 24 | 25 | it('should be created', () => { 26 | expect(service).toBeTruthy(); 27 | }); 28 | }); 29 | */ 30 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/portfolio-detail/portfolio-detail-routing.module.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { NgModule } from "@angular/core"; 14 | import { Routes, RouterModule } from "@angular/router"; 15 | import { PortfolioComponent } from "./components/portfolio/portfolio.component"; 16 | 17 | const routes: Routes = [ 18 | { path: "portfolio/:portfolioId", component: PortfolioComponent }, 19 | ]; 20 | 21 | @NgModule({ 22 | imports: [RouterModule.forChild(routes)], 23 | exports: [RouterModule], 24 | }) 25 | export class PortfolioDetailRoutingModule {} 26 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/entity/dto/PortfolioWithElements.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.entity.dto; 14 | 15 | import java.util.List; 16 | 17 | import ch.xxx.manager.domain.model.entity.DailyQuote; 18 | import ch.xxx.manager.domain.model.entity.Portfolio; 19 | import ch.xxx.manager.domain.model.entity.PortfolioElement; 20 | 21 | public record PortfolioWithElements(Portfolio portfolio, List portfolioElements, 22 | List dailyQuotesToRemove, List portfolioDailyQuotes) { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/financial-data/financial-data-routing.module.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { NgModule } from "@angular/core"; 14 | import { RouterModule, Routes } from "@angular/router"; 15 | import { OverviewComponent } from "./components/overview/overview.component"; 16 | 17 | const routes: Routes = [ 18 | { path: "overview", component: OverviewComponent }, 19 | { path: "**", redirectTo: "overview" }, 20 | ]; 21 | 22 | @NgModule({ 23 | imports: [RouterModule.forChild(routes)], 24 | exports: [RouterModule], 25 | }) 26 | export class FinancialDataRoutingModule {} 27 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/components/add-symbol/add-symbol.component.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | .symbol-element { 14 | margin: 5px 0; 15 | } 16 | 17 | .form-field { 18 | width: 100%; 19 | } 20 | 21 | .list-style { 22 | list-style-type: none; 23 | padding-left: 0; 24 | } 25 | 26 | .container { 27 | display: flex; 28 | width: 100%; 29 | justify-content: center; 30 | align-content: center; 31 | } 32 | 33 | .content { 34 | margin: 50px 0; 35 | } 36 | 37 | .example-margin { 38 | margin: 0 10px; 39 | } 40 | 41 | .buttons-element { 42 | margin-top: 15px; 43 | } 44 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/portfolio-overview/components/portfolio-stats/portfolio-stats.component.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { Component, Input } from '@angular/core'; 14 | import { Portfolio } from 'src/app/model/portfolio'; 15 | 16 | @Component({ 17 | selector: 'app-portfolio-stats', 18 | templateUrl: './portfolio-stats.component.html', 19 | styleUrl: './portfolio-stats.component.scss', 20 | standalone: false 21 | }) 22 | export class PortfolioStatsComponent { 23 | protected readonly years = [1,2,5,10]; 24 | @Input() 25 | selPortfolio: Portfolio; 26 | } 27 | -------------------------------------------------------------------------------- /backend/src/main/resources/dbchangelog/db.changelog-loaddata.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 14 | 15 | 17 | 18 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/financial-data/components/overview/overview.component.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | .header-space { 14 | margin-left: 20px; 15 | } 16 | 17 | .example-fill-remaining-space { 18 | // This fills the remaining space, by using flexbox. 19 | // Every toolbar row uses a flexbox row layout. 20 | flex: 1 1 auto; 21 | } 22 | 23 | .base-container { 24 | display: flex; 25 | flex: 1 1 auto; 26 | align-items: stretch; 27 | height: calc(100vh - 80px); 28 | width: 100%; 29 | } 30 | 31 | .query-container { 32 | width: 100%; 33 | } 34 | 35 | .result-container { 36 | width: 100%; 37 | } 38 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/entity/dto/AtomLinkDto.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * Unless required by applicable law or agreed to in writing, software 8 | * distributed under the License is distributed on an "AS IS" BASIS, 9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | * See the License for the specific language governing permissions and 11 | * limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.entity.dto; 14 | 15 | 16 | import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; 17 | import tools.jackson.dataformat.xml.annotation.JacksonXmlRootElement; 18 | 19 | @JacksonXmlRootElement(localName = "link", namespace = "atom") 20 | public record AtomLinkDto(@JacksonXmlProperty(isAttribute = true) String href, 21 | @JacksonXmlProperty(isAttribute = true) String rel, 22 | @JacksonXmlProperty(isAttribute = true) String type) { 23 | } 24 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/entity/PortfolioToSymbolRepository.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.entity; 14 | 15 | import java.util.List; 16 | 17 | public interface PortfolioToSymbolRepository { 18 | List findByPortfolioId(Long portfolioId); 19 | List findBySymbolId(Long symbolId); 20 | List findByPortfolioIdAndSymbolId(Long portfolioId, Long symbolId); 21 | PortfolioToSymbol saveAndFlush(PortfolioToSymbol portfolioToSymbol); 22 | List findPortfolioCalcEntitiesByPortfolioId(Long portfolioId); 23 | } 24 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/entity/dto/ChannelDto.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * Unless required by applicable law or agreed to in writing, software 8 | * distributed under the License is distributed on an "AS IS" BASIS, 9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | * See the License for the specific language governing permissions and 11 | * limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.entity.dto; 14 | 15 | import java.util.List; 16 | 17 | import com.fasterxml.jackson.annotation.JsonRootName; 18 | import tools.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; 19 | 20 | @JsonRootName("channel") 21 | public record ChannelDto(String title, String link, AtomLinkDto atomLink, String description, String language, 22 | String pubDate, String lastBuildDate, 23 | @JacksonXmlElementWrapper(useWrapping = false) List item) { 24 | } 25 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/login/component/main/main.component.html: -------------------------------------------------------------------------------- 1 | 2 | Portfolio Manager 3 | 4 | @if (login === null) { 5 | 15 | } 16 | @if (login !== null) { 17 | 22 | } 23 | 24 | @if (login !== null) { 25 |
26 |

Loading

27 |
28 | } 29 | @if (login !== null) { 30 |
31 | 36 |
37 | } 38 |
39 | Your token is expired. To reconnect please logout and login again. 42 |
43 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/dto/AuthCheckDto.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2018 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.dto; 14 | 15 | import com.fasterxml.jackson.annotation.JsonProperty; 16 | 17 | public class AuthCheckDto { 18 | private final String path; 19 | private final boolean authorized; 20 | 21 | public AuthCheckDto(@JsonProperty("path") String path, @JsonProperty("authorized") boolean authorized) { 22 | this.path = path; 23 | this.authorized = authorized; 24 | } 25 | 26 | public boolean isAuthorized() { 27 | return authorized; 28 | } 29 | 30 | public String getPath() { 31 | return path; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/financial-data/components/import-financials/import-financials.component.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | @use "@angular/material" as mat; 14 | 15 | .file-path { 16 | margin-bottom: 10px; 17 | } 18 | 19 | .form-field { 20 | width: 100%; 21 | } 22 | 23 | .list-style { 24 | list-style-type: none; 25 | padding-left: 0; 26 | } 27 | 28 | .container { 29 | display: flex; 30 | width: 100%; 31 | justify-content: center; 32 | align-content: center; 33 | } 34 | 35 | .content { 36 | margin: 50px 0; 37 | } 38 | 39 | .example-margin { 40 | margin: 0 10px; 41 | } 42 | 43 | .buttons-element { 44 | margin-top: 20px; 45 | } 46 | -------------------------------------------------------------------------------- /frontend/src/angular/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "ignorePatterns": [ 4 | "projects/**/*" 5 | ], 6 | "overrides": [ 7 | { 8 | "files": [ 9 | "*.ts" 10 | ], 11 | "parserOptions": { 12 | "project": [ 13 | "tsconfig.json", 14 | "e2e/tsconfig.json" 15 | ], 16 | "createDefaultProgram": true 17 | }, 18 | "extends": [ 19 | "plugin:@angular-eslint/recommended", 20 | "plugin:@angular-eslint/template/process-inline-templates" 21 | ], 22 | "rules": { 23 | "@angular-eslint/component-selector": [ 24 | "error", 25 | { 26 | "prefix": "app", 27 | "style": "kebab-case", 28 | "type": "element" 29 | } 30 | ], 31 | "@angular-eslint/directive-selector": [ 32 | "error", 33 | { 34 | "prefix": "app", 35 | "style": "camelCase", 36 | "type": "attribute" 37 | } 38 | ] 39 | } 40 | }, 41 | { 42 | "files": [ 43 | "*.html" 44 | ], 45 | "extends": [ 46 | "plugin:@angular-eslint/template/recommended" 47 | ], 48 | "rules": {} 49 | } 50 | ] 51 | } 52 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/entity/PortfolioRepository.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.entity; 14 | 15 | import java.util.List; 16 | import java.util.Optional; 17 | 18 | import ch.xxx.manager.domain.model.entity.dto.PortfolioAndSymbolDto; 19 | 20 | public interface PortfolioRepository { 21 | Optional findById(Long id); 22 | List findByUserId(Long userId); 23 | List findPortfolioCalcEntitiesByPortfolioId(Long portfolioId); 24 | Portfolio save(Portfolio portfolio); 25 | Long countPortfolioSymbolsByUserId(Long userId); 26 | List findAllWithPts(); 27 | } 28 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/service/symbol.service.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { Injectable } from "@angular/core"; 14 | import { HttpClient } from "@angular/common/http"; 15 | import { Observable } from "rxjs"; 16 | import { Symbol } from "../model/symbol"; 17 | 18 | @Injectable({ providedIn: "root" }) 19 | export class SymbolService { 20 | constructor(private http: HttpClient) {} 21 | 22 | getSymbolBySymbol(symbol: string): Observable { 23 | return this.http.get(`/rest/symbol/symbol/${symbol}`); 24 | } 25 | 26 | getSymbolByName(name: string): Observable { 27 | return this.http.get(`/rest/symbol/name/${name}`); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/entity/AppUserRepository.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.entity; 14 | 15 | import java.util.List; 16 | import java.util.Optional; 17 | import java.util.Set; 18 | 19 | import org.springframework.data.repository.query.Param; 20 | 21 | public interface AppUserRepository { 22 | Optional findByUsername(String username); 23 | Optional findByUuid(String uuid); 24 | List findAll(); 25 | Optional findById(Long id); 26 | AppUser save(AppUser appUser); 27 | Iterable saveAll(Iterable users); 28 | Set findAllUserSymbolsByAppUserId(@Param(value="userId") Long id); 29 | } 30 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/usecase/mapping/RevokedTokenMapper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.usecase.mapping; 14 | 15 | import org.springframework.stereotype.Component; 16 | 17 | import ch.xxx.manager.domain.model.dto.RevokedTokenDto; 18 | import ch.xxx.manager.domain.model.entity.RevokedToken; 19 | 20 | @Component 21 | public class RevokedTokenMapper { 22 | 23 | public RevokedToken convert(RevokedTokenDto dto) { 24 | return new RevokedToken(dto.getName(), dto.getUuid(), dto.getLastLogout()); 25 | } 26 | 27 | public RevokedTokenDto convert(RevokedToken entity) { 28 | return new RevokedTokenDto(entity.getName(), entity.getUuid(), entity.getLastLogout()); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/entity/PortfolioElementRepository.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.entity; 14 | 15 | import java.util.List; 16 | import java.util.Optional; 17 | 18 | public interface PortfolioElementRepository { 19 | Optional findById(Long id); 20 | Optional findBySymbol(String symbol); 21 | Iterable saveAll(Iterable portfolios); 22 | void delete(PortfolioElement portfolioElement); 23 | Optional findByPortfolioId(Long portfolioId); 24 | List findByPortfolioIds(List portfolioIds); 25 | void deleteAll(Iterable elements); 26 | } 27 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/dto/FeConceptDto.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.dto; 14 | 15 | public class FeConceptDto { 16 | private String concept; 17 | private Long timesFound; 18 | 19 | public FeConceptDto(String concept, Long timesFound) { 20 | super(); 21 | this.concept = concept; 22 | this.timesFound = timesFound; 23 | } 24 | 25 | public String getConcept() { 26 | return concept; 27 | } 28 | 29 | public void setConcept(String concept) { 30 | this.concept = concept; 31 | } 32 | 33 | public Long getTimesFound() { 34 | return timesFound; 35 | } 36 | 37 | public void setTimesFound(Long timesFound) { 38 | this.timesFound = timesFound; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/financial-data/components/query-results/query-results.component.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | .container { 14 | //background-color: #0000ff; 15 | width: calc(50vw - 15px); 16 | height: 100%; 17 | } 18 | .mytable { 19 | width: 100%; 20 | } 21 | .no-display { 22 | display: none; 23 | } 24 | 25 | .mat-column-concept { 26 | overflow: hidden; 27 | flex: 1 1 auto; 28 | } 29 | 30 | .mat-column-value { 31 | min-width: 50px; 32 | flex: 1 0 auto; 33 | justify-content: right; 34 | } 35 | 36 | .mat-column-symbol { 37 | min-width: 100px; 38 | flex: 0 0 auto; 39 | } 40 | 41 | .mat-column-year, 42 | .mat-column-quarter, 43 | .mat-column-currency { 44 | min-width: 50px; 45 | flex: 0 0 auto; 46 | } 47 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/adapter/repository/JpaCurrencyRepository.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.adapter.repository; 14 | 15 | import java.util.Optional; 16 | 17 | import org.springframework.data.jpa.repository.JpaRepository; 18 | import org.springframework.data.jpa.repository.Query; 19 | import org.springframework.data.repository.query.Param; 20 | 21 | import ch.xxx.manager.domain.model.entity.Currency; 22 | import ch.xxx.manager.domain.utils.DataHelper; 23 | 24 | public interface JpaCurrencyRepository extends JpaRepository { 25 | @Query("select c from Currency c where c.toCurrKey = :toCurr") 26 | Optional findByToCurr(@Param(value = "toCurr") DataHelper.CurrencyKey toCurr); 27 | } 28 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/dto/SfCountryDto.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.dto; 14 | 15 | public class SfCountryDto { 16 | private String country; 17 | private Long timesFound; 18 | 19 | public SfCountryDto() {} 20 | 21 | public SfCountryDto(String country, Long timesFound) { 22 | super(); 23 | this.country = country; 24 | this.timesFound = timesFound; 25 | } 26 | public String getCountry() { 27 | return country; 28 | } 29 | public void setCountry(String country) { 30 | this.country = country; 31 | } 32 | public Long getTimesFound() { 33 | return timesFound; 34 | } 35 | public void setTimesFound(Long timesFound) { 36 | this.timesFound = timesFound; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/adapter/repository/SectorRepositoryBean.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.adapter.repository; 14 | 15 | import org.springframework.stereotype.Repository; 16 | 17 | import ch.xxx.manager.domain.model.entity.Sector; 18 | import ch.xxx.manager.domain.model.entity.SectorRepository; 19 | 20 | @Repository 21 | public class SectorRepositoryBean implements SectorRepository { 22 | private JpaSectorRepository jpaSectorRepository; 23 | 24 | public SectorRepositoryBean(JpaSectorRepository jpaSectorRepository) { 25 | this.jpaSectorRepository = jpaSectorRepository; 26 | } 27 | 28 | @Override 29 | public Sector save(Sector sector) { 30 | return this.jpaSectorRepository.save(sector); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/financial-data/model/symbol-financials-query-params.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | export interface FilterBase { 14 | operation: string; 15 | } 16 | export interface FilterNumber extends FilterBase { 17 | value: number; 18 | } 19 | 20 | export interface FilterString extends FilterBase { 21 | value: string; 22 | } 23 | 24 | export interface FinancialElementParams { 25 | conceptFilter?: FilterString; 26 | valueFilter?: FilterNumber; 27 | operation?: string; 28 | termType: string; 29 | } 30 | 31 | export interface SymbolFinancialsQueryParams { 32 | yearFilter: FilterNumber; 33 | quarters: string[]; 34 | symbol: string; 35 | country: string; 36 | name: string; 37 | financialElementParams: FinancialElementParams[]; 38 | } 39 | -------------------------------------------------------------------------------- /backend/src/test/java/ch/xxx/manager/ManagerApplicationTests.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager; 14 | 15 | import org.junit.jupiter.api.Test; 16 | import org.springframework.boot.autoconfigure.EnableAutoConfiguration; 17 | import org.springframework.boot.test.context.SpringBootTest; 18 | import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; 19 | import org.springframework.test.context.ContextConfiguration; 20 | 21 | import ch.xxx.manager.adapter.config.ApplicationConfig; 22 | 23 | @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) 24 | @EnableAutoConfiguration 25 | @ContextConfiguration(classes = ApplicationConfig.class) 26 | class ManagerApplicationTests { 27 | 28 | @Test 29 | void contextLoads() { 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/entity/EntityBase.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.entity; 14 | 15 | import jakarta.persistence.GeneratedValue; 16 | import jakarta.persistence.GenerationType; 17 | import jakarta.persistence.Id; 18 | import jakarta.persistence.MappedSuperclass; 19 | import jakarta.persistence.SequenceGenerator; 20 | 21 | @MappedSuperclass 22 | public abstract class EntityBase { 23 | @Id 24 | @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seq") 25 | @SequenceGenerator(name="seq", sequenceName="hibernate_sequence", allocationSize=50) 26 | private Long id; 27 | 28 | public Long getId() { 29 | return id; 30 | } 31 | 32 | public void setId(Long id) { 33 | this.id = id; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/base/components/dialog-spinner/dialog-spinner.component.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { Component, OnInit, Inject } from "@angular/core"; 14 | import { 15 | MatDialog, 16 | MatDialogRef, 17 | MAT_DIALOG_DATA, 18 | } from "@angular/material/dialog"; 19 | 20 | export interface SpinnerData { 21 | title: string; 22 | } 23 | 24 | @Component({ 25 | selector: "app-dialog-spinner", 26 | templateUrl: "./dialog-spinner.component.html", 27 | styleUrls: ["./dialog-spinner.component.scss"], 28 | standalone: false 29 | }) 30 | export class DialogSpinnerComponent implements OnInit { 31 | constructor(@Inject(MAT_DIALOG_DATA) public data: SpinnerData) {} 32 | 33 | ngOnInit(): void { 34 | console.log("title: " + this.data.title); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/financial-data/components/query/query.component.spec.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { ComponentFixture, TestBed } from "@angular/core/testing"; 14 | 15 | import { QueryComponent } from "./query.component"; 16 | /* 17 | describe('QueryComponent', () => { 18 | let component: QueryComponent; 19 | let fixture: ComponentFixture; 20 | 21 | beforeEach(async () => { 22 | await TestBed.configureTestingModule({ 23 | declarations: [ QueryComponent ] 24 | }) 25 | .compileComponents(); 26 | 27 | fixture = TestBed.createComponent(QueryComponent); 28 | component = fixture.componentInstance; 29 | fixture.detectChanges(); 30 | }); 31 | 32 | it('should create', () => { 33 | expect(component).toBeTruthy(); 34 | }); 35 | }); 36 | */ 37 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/portfolio-overview/components/news-list/news-list.component.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { Component, Input, OnInit } from "@angular/core"; 14 | import { NewsService } from "../../service/news.service"; 15 | import { 16 | Observable, 17 | ReplaySubject, 18 | Subject, 19 | interval, 20 | mergeMap, 21 | of, 22 | repeat, 23 | } from "rxjs"; 24 | import { takeUntilDestroyed } from "src/app/base/utils/funtions"; 25 | import { NewsItem } from "../../model/news-item"; 26 | 27 | @Component({ 28 | selector: "app-news-list", 29 | templateUrl: "./news-list.component.html", 30 | styleUrl: "./news-list.component.scss", 31 | standalone: false 32 | }) 33 | export class NewsListComponent { 34 | @Input() 35 | protected newsItems: NewsItem[] = []; 36 | } 37 | -------------------------------------------------------------------------------- /backend/src/main/resources/dbchangelog/changes/db.changelog-2.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/usecase/mapping/FinancialElementMapper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.usecase.mapping; 14 | 15 | import org.springframework.stereotype.Component; 16 | 17 | import ch.xxx.manager.domain.model.dto.FinancialElementDto; 18 | import ch.xxx.manager.domain.model.entity.FinancialElement; 19 | 20 | @Component 21 | public class FinancialElementMapper { 22 | 23 | public FinancialElementDto toDto(FinancialElement entity) { 24 | FinancialElementDto dto = new FinancialElementDto(); 25 | dto.setConcept(entity.getConcept()); 26 | dto.setCurrency(entity.getCurrency()); 27 | dto.setFinancialElementType(entity.getFinancialElementType()); 28 | dto.setLabel(entity.getLabel()); 29 | dto.setValue(entity.getValue()); 30 | dto.setId(entity.getId()); 31 | return dto; 32 | } 33 | } -------------------------------------------------------------------------------- /frontend/src/angular/src/app/financial-data/components/overview/overview.component.spec.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { ComponentFixture, TestBed } from "@angular/core/testing"; 14 | 15 | import { OverviewComponent } from "./overview.component"; 16 | /* 17 | describe('OverviewComponent', () => { 18 | let component: OverviewComponent; 19 | let fixture: ComponentFixture; 20 | 21 | beforeEach(async () => { 22 | await TestBed.configureTestingModule({ 23 | declarations: [ OverviewComponent ] 24 | }) 25 | .compileComponents(); 26 | 27 | fixture = TestBed.createComponent(OverviewComponent); 28 | component = fixture.componentInstance; 29 | fixture.detectChanges(); 30 | }); 31 | 32 | it('should create', () => { 33 | expect(component).toBeTruthy(); 34 | }); 35 | }); 36 | */ 37 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/dto/SfQuarterDto.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.dto; 14 | 15 | import ch.xxx.manager.domain.utils.DataHelper; 16 | 17 | public class SfQuarterDto { 18 | private String quarter; 19 | private Long timesFound; 20 | 21 | public SfQuarterDto() { 22 | } 23 | 24 | public SfQuarterDto(DataHelper.Quarter quarter, Long timesFound) { 25 | super(); 26 | this.quarter = quarter.toString(); 27 | this.timesFound = timesFound; 28 | } 29 | 30 | public String getQuarter() { 31 | return quarter; 32 | } 33 | public void setQuarter(String quarter) { 34 | this.quarter = quarter; 35 | } 36 | public Long getTimesFound() { 37 | return timesFound; 38 | } 39 | public void setTimesFound(Long timesFound) { 40 | this.timesFound = timesFound; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/login/component/login/login.component.spec.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { ComponentFixture, TestBed, waitForAsync } from "@angular/core/testing"; 14 | 15 | import { LoginComponent } from "./login.component"; 16 | 17 | /* 18 | describe('LoginComponent', () => { 19 | let component: LoginComponent; 20 | let fixture: ComponentFixture; 21 | 22 | beforeEach(async(() => { 23 | TestBed.configureTestingModule({ 24 | declarations: [ LoginComponent ] 25 | }) 26 | .compileComponents(); 27 | })); 28 | 29 | beforeEach(() => { 30 | fixture = TestBed.createComponent(LoginComponent); 31 | component = fixture.componentInstance; 32 | fixture.detectChanges(); 33 | }); 34 | 35 | it('should create', () => { 36 | expect(component).toBeTruthy(); 37 | }); 38 | }); 39 | */ 40 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/financial-data/components/result-tree/result-tree.component.spec.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { ComponentFixture, TestBed } from "@angular/core/testing"; 14 | 15 | import { ResultTreeComponent } from "./result-tree.component"; 16 | /* 17 | describe('ResultTreeComponent', () => { 18 | let component: ResultTreeComponent; 19 | let fixture: ComponentFixture; 20 | 21 | beforeEach(async () => { 22 | await TestBed.configureTestingModule({ 23 | declarations: [ ResultTreeComponent ] 24 | }) 25 | .compileComponents(); 26 | 27 | fixture = TestBed.createComponent(ResultTreeComponent); 28 | component = fixture.componentInstance; 29 | fixture.detectChanges(); 30 | }); 31 | 32 | it('should create', () => { 33 | expect(component).toBeTruthy(); 34 | }); 35 | }); 36 | */ 37 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/portfolio-overview/components/news-list/news-list.component.spec.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { ComponentFixture, TestBed } from "@angular/core/testing"; 14 | 15 | import { NewsListComponent } from "./news-list.component"; 16 | 17 | /* 18 | describe('NewsListComponent', () => { 19 | let component: NewsListComponent; 20 | let fixture: ComponentFixture; 21 | 22 | beforeEach(async () => { 23 | await TestBed.configureTestingModule({ 24 | imports: [NewsListComponent] 25 | }) 26 | .compileComponents(); 27 | 28 | fixture = TestBed.createComponent(NewsListComponent); 29 | component = fixture.componentInstance; 30 | fixture.detectChanges(); 31 | }); 32 | 33 | it('should create', () => { 34 | expect(component).toBeTruthy(); 35 | }); 36 | }); 37 | */ 38 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/usecase/mapping/QuoteMapper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.usecase.mapping; 14 | 15 | import org.springframework.stereotype.Component; 16 | 17 | import ch.xxx.manager.domain.model.dto.QuoteDto; 18 | import ch.xxx.manager.domain.model.entity.DailyQuote; 19 | import ch.xxx.manager.domain.model.entity.dto.DailyQuoteEntityDto; 20 | 21 | @Component 22 | public class QuoteMapper { 23 | public QuoteDto convert(DailyQuote entity) { 24 | return new QuoteDto(entity.getOpen(), entity.getHigh(), entity.getLow(), entity.getClose(), entity.getAdjClose(), entity.getVolume(), 25 | entity.getLocalDay().atStartOfDay(), entity.getSymbol().getSymbol(), entity.getSplit(), entity.getDividend()); 26 | } 27 | 28 | public QuoteDto convert(DailyQuoteEntityDto myRecord) { 29 | return myRecord.dto(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /backend/src/test/java/ch/xxx/manager/MapTest.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager; 14 | 15 | import java.time.LocalDate; 16 | import java.util.HashMap; 17 | import java.util.Map; 18 | 19 | import org.junit.jupiter.api.Assertions; 20 | import org.junit.jupiter.api.Test; 21 | 22 | public class MapTest { 23 | @Test 24 | public void hashMapTest() { 25 | Map testMap = new HashMap<>(); 26 | LocalDate localDate1 = LocalDate.of(2020, 1, 1); 27 | LocalDate localDate2 = LocalDate.of(2020, 1, 1); 28 | LocalDate localDate3 = LocalDate.of(2020, 1, 2); 29 | LocalDate localDate4 = LocalDate.of(2020, 1, 2); 30 | testMap.put(localDate1, "test"); 31 | testMap.put(localDate3, "test2"); 32 | Assertions.assertEquals("test", testMap.get(localDate2)); 33 | Assertions.assertEquals("test2", testMap.get(localDate4)); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/portfolio-overview/portfolio-overview-routing.module.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { NgModule } from "@angular/core"; 14 | import { Routes, RouterModule } from "@angular/router"; 15 | import { PortfolioChartsComponent } from "./components/portfolio-charts/portfolio-charts.component"; 16 | import { NewsListComponent } from "./components/news-list/news-list.component"; 17 | 18 | const routes: Routes = [ 19 | { 20 | path: "portfolio-charts/:portfolioId", 21 | component: PortfolioChartsComponent, 22 | }, 23 | { 24 | path: "news-list", 25 | component: NewsListComponent, 26 | }, 27 | { path: "**", redirectTo: "portfolio-charts" }, 28 | ]; 29 | 30 | @NgModule({ 31 | imports: [RouterModule.forChild(routes)], 32 | exports: [RouterModule], 33 | }) 34 | export class PortfoliosOverviewRoutingModule {} 35 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/components/change-symbol/change-symbol.component.spec.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { ComponentFixture, TestBed } from "@angular/core/testing"; 14 | 15 | import { ChangeSymbolComponent } from "./change-symbol.component"; 16 | /* 17 | describe('ChangeSymbolComponent', () => { 18 | let component: ChangeSymbolComponent; 19 | let fixture: ComponentFixture; 20 | 21 | beforeEach(async () => { 22 | await TestBed.configureTestingModule({ 23 | declarations: [ ChangeSymbolComponent ] 24 | }) 25 | .compileComponents(); 26 | 27 | fixture = TestBed.createComponent(ChangeSymbolComponent); 28 | component = fixture.componentInstance; 29 | fixture.detectChanges(); 30 | }); 31 | 32 | it('should create', () => { 33 | expect(component).toBeTruthy(); 34 | }); 35 | }); 36 | */ 37 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/portfolio-detail/components/symbol/symbol.component.spec.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { ComponentFixture, TestBed, waitForAsync } from "@angular/core/testing"; 14 | 15 | import { SymbolComponent } from "./symbol.component"; 16 | 17 | /*describe('SymbolComponent', () => { 18 | let component: SymbolComponent; 19 | let fixture: ComponentFixture; 20 | 21 | beforeEach(async(() => { 22 | TestBed.configureTestingModule({ 23 | declarations: [ SymbolComponent ] 24 | }) 25 | .compileComponents(); 26 | })); 27 | 28 | beforeEach(() => { 29 | fixture = TestBed.createComponent(SymbolComponent); 30 | component = fixture.componentInstance; 31 | fixture.detectChanges(); 32 | }); 33 | 34 | it('should create', () => { 35 | expect(component).toBeTruthy(); 36 | }); 37 | });*/ 38 | -------------------------------------------------------------------------------- /backend/src/main/java/ch/xxx/manager/domain/model/dto/YahooMetaData.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package ch.xxx.manager.domain.model.dto; 14 | 15 | import java.math.BigDecimal; 16 | import java.util.List; 17 | 18 | public record YahooMetaData(String currency, String symbol, String exchangeName, String fullExchangeName, String instrumentType, Long firstTradeDate, Long regularMarketTime, 19 | Boolean hasPrePostMarketData, Long gmtoffset, String timezone, String exchangeTimezoneName, BigDecimal regularMarketPrice, BigDecimal fiftyTwoWeekHigh, 20 | BigDecimal fiftyTwoWeekLow, BigDecimal regularMarketDayHigh, BigDecimal regularMarketDayLow, Long regularMarketVolume, String longName, String shortName, 21 | BigDecimal chartPreviousClose, Long priceHint, YahooTradingPeriods currentTradingPeriod, String dataGranularity, String range, List validRanges) { 22 | 23 | } 24 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/base/components/dialog-spinner/dialog-spinner.component.spec.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { ComponentFixture, TestBed } from "@angular/core/testing"; 14 | 15 | import { DialogSpinnerComponent } from "./dialog-spinner.component"; 16 | /* 17 | describe('DialogSpinnerComponent', () => { 18 | let component: DialogSpinnerComponent; 19 | let fixture: ComponentFixture; 20 | 21 | beforeEach(async () => { 22 | await TestBed.configureTestingModule({ 23 | declarations: [ DialogSpinnerComponent ] 24 | }) 25 | .compileComponents(); 26 | 27 | fixture = TestBed.createComponent(DialogSpinnerComponent); 28 | component = fixture.componentInstance; 29 | fixture.detectChanges(); 30 | }); 31 | 32 | it('should create', () => { 33 | expect(component).toBeTruthy(); 34 | }); 35 | }); 36 | */ 37 | -------------------------------------------------------------------------------- /backend/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/components/change-symbol/change-symbol.component.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | .grid-container { 14 | display: grid; 15 | grid-template-columns: max-content 1fr; 16 | column-gap: 10px; 17 | } 18 | 19 | .symbol-element { 20 | margin: 5px 0; 21 | } 22 | 23 | .form-field { 24 | width: 100%; 25 | } 26 | 27 | .list-style { 28 | list-style-type: none; 29 | padding-left: 0; 30 | } 31 | 32 | .container { 33 | display: flex; 34 | width: 100%; 35 | justify-content: center; 36 | align-content: center; 37 | } 38 | 39 | .content { 40 | margin: 50px 0; 41 | } 42 | 43 | .example-margin { 44 | margin: 0 10px; 45 | } 46 | 47 | .buttons-element { 48 | margin-top: 15px; 49 | } 50 | 51 | .delete-button { 52 | float: right; 53 | color: #f00; 54 | } 55 | 56 | .delete-text { 57 | margin-bottom: 20px; 58 | color: #f00; 59 | } 60 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/components/overview/overview.component.spec.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { ComponentFixture, TestBed, waitForAsync } from "@angular/core/testing"; 14 | 15 | import { OverviewComponent } from "./overview.component"; 16 | 17 | /* 18 | describe('OverviewComponent', () => { 19 | let component: OverviewComponent; 20 | let fixture: ComponentFixture; 21 | 22 | beforeEach(async(() => { 23 | TestBed.configureTestingModule({ 24 | declarations: [ OverviewComponent ] 25 | }) 26 | .compileComponents(); 27 | })); 28 | 29 | beforeEach(() => { 30 | fixture = TestBed.createComponent(OverviewComponent); 31 | component = fixture.componentInstance; 32 | fixture.detectChanges(); 33 | }); 34 | 35 | it('should create', () => { 36 | expect(component).toBeTruthy(); 37 | }); 38 | }); 39 | */ 40 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/portfolio-detail/components/portfolio/portfolio.component.spec.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { ComponentFixture, TestBed, waitForAsync } from "@angular/core/testing"; 14 | 15 | import { PortfolioComponent } from "./portfolio.component"; 16 | 17 | /*describe('SymbolComponent', () => { 18 | let component: SymbolComponent; 19 | let fixture: ComponentFixture; 20 | 21 | beforeEach(async(() => { 22 | TestBed.configureTestingModule({ 23 | declarations: [ SymbolComponent ] 24 | }) 25 | .compileComponents(); 26 | })); 27 | 28 | beforeEach(() => { 29 | fixture = TestBed.createComponent(SymbolComponent); 30 | component = fixture.componentInstance; 31 | fixture.detectChanges(); 32 | }); 33 | 34 | it('should create', () => { 35 | expect(component).toBeTruthy(); 36 | }); 37 | });*/ 38 | -------------------------------------------------------------------------------- /backend/src/main/resources/application-kafka.properties: -------------------------------------------------------------------------------- 1 | kafka.server.name=${KAFKA_SERVER_NAME:localhost} 2 | spring.kafka.bootstrap-servers=localhost:9092 3 | spring.kafka.producer.compression-type=gzip 4 | spring.kafka.producer.transaction-id-prefix: tx- 5 | spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.StringSerializer 6 | spring.kafka.producer.value-serializer=org.apache.kafka.common.serialization.StringSerializer 7 | spring.kafka.producer.enable.idempotence=true 8 | spring.kafka.consumer.group-id=group_id 9 | spring.kafka.consumer.auto-offset-reset=earliest 10 | spring.kafka.consumer.key-deserializer=org.apache.kafka.common.serialization.StringDeserializer 11 | spring.kafka.consumer.value-deserializer=org.apache.kafka.common.serialization.StringDeserializer 12 | spring.kafka.consumer.enable-auto-commit=false 13 | spring.kafka.consumer.isolation-level=read_committed 14 | spring.kafka.consumer.transaction-id-prefix: tx- 15 | #spring.kafka.consumer.key-deserializer: org.apache.kafka.common.serialization.StringDeserializer 16 | #spring.kafka.consumer.value-deserializer: org.springframework.kafka.support.serializer.JsonDeserializer 17 | #spring.kafka.consumer.properties.spring.json.trusted.packages=* 18 | #spring.kafka.producer.key-serializer: org.apache.kafka.common.serialization.StringSerializer 19 | #spring.kafka.producer.value-serializer: org.springframework.kafka.support.serializer.JsonSerializer 20 | #spring.kafka.producer.properties.spring.json.trusted.packages=* 21 | -------------------------------------------------------------------------------- /frontend/src/angular/src/app/portfolios/components/add-symbol/add-symbol.component.spec.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 Sven Loesekann 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { ComponentFixture, TestBed, waitForAsync } from "@angular/core/testing"; 14 | 15 | import { AddSymbolComponent } from "./add-symbol.component"; 16 | 17 | /* 18 | describe('AddSymbolComponent', () => { 19 | let component: AddSymbolComponent; 20 | let fixture: ComponentFixture; 21 | 22 | beforeEach(async(() => { 23 | TestBed.configureTestingModule({ 24 | declarations: [ AddSymbolComponent ] 25 | }) 26 | .compileComponents(); 27 | })); 28 | 29 | beforeEach(() => { 30 | fixture = TestBed.createComponent(AddSymbolComponent); 31 | component = fixture.componentInstance; 32 | fixture.detectChanges(); 33 | }); 34 | 35 | it('should create', () => { 36 | expect(component).toBeTruthy(); 37 | }); 38 | }); 39 | */ 40 | --------------------------------------------------------------------------------