Compare commits

..

4 Commits

Author SHA1 Message Date
4fcf5d8547
refactor
All checks were successful
CI / eslint (pull_request) Successful in 22s
CI / prettier (pull_request) Successful in 21s
CI / test-build (pull_request) Successful in 40s
2025-02-19 11:41:17 +01:00
8d8adafcd3
satisfy quality tools
All checks were successful
CI / eslint (pull_request) Successful in 22s
CI / prettier (pull_request) Successful in 17s
CI / test-build (pull_request) Successful in 38s
2025-02-19 11:39:03 +01:00
0d94436639
fix: fix some stuff 2025-02-19 11:34:49 +01:00
2e5cd2a6f1
feat: add user creation on login (wip)
Some checks failed
CI / eslint (pull_request) Failing after 16s
CI / prettier (pull_request) Failing after 17s
CI / test-build (pull_request) Successful in 26s
2025-02-13 13:17:24 +01:00
25 changed files with 72 additions and 690 deletions

View File

@ -4,39 +4,6 @@ on:
pull_request: pull_request:
jobs: jobs:
checkstyle:
name: "Checkstyle Main"
runs-on: "vps-4"
container:
image: "cimg/openjdk:22.0-node"
steps:
- name: "Checkout"
uses: actions/checkout@v3
- name: Setup Java 22
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "22"
- uses: actions/cache@v3
working-directory: ./backend
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: "Prepare Gradle"
working-directory: ./backend
run: gradle clean
- name: "Check"
working-directory: ./backend
run: gradle checkstyleMain
- name: "Stop Gradle"
working-directory: ./backend
run: gradle --stop
eslint: eslint:
name: eslint name: eslint
runs-on: vps-4 runs-on: vps-4

View File

@ -2,21 +2,6 @@ plugins {
java java
id("org.springframework.boot") version "3.3.3" id("org.springframework.boot") version "3.3.3"
id("io.spring.dependency-management") version "1.1.6" id("io.spring.dependency-management") version "1.1.6"
id("checkstyle")
}
checkstyle {
configFile = file("$rootDir/config/checkstyle/checkstyle.xml")
}
tasks.withType<Checkstyle> {
reports {
// Disable HTML report
html.required.set(false)
// Disable XML report
xml.required.set(false)
}
} }
group = "de.szut" group = "de.szut"

View File

@ -1,18 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd"
>
<module name="Checker">
<property name="severity" value="error"/>
<property name="tabWidth" value="4"/>
<module name="LineLength">
<property name="max" value="500"/>
</module>
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
</module>
<module name="NewlineAtEndOfFile"/>
</module>

View File

@ -58,4 +58,4 @@ public class OpenAPIConfiguration {
} }
} }

View File

@ -45,4 +45,4 @@ public class KeycloakLogoutHandler implements LogoutHandler {
} }
} }
} }

View File

@ -1,3 +1,5 @@
version: '3'
volumes: volumes:
keycloak_data: keycloak_data:
postgres_data_keycloak_db: postgres_data_keycloak_db:

View File

@ -5,19 +5,13 @@
"name": "lf10-starter2024", "name": "lf10-starter2024",
"dependencies": { "dependencies": {
"@angular/animations": "^18.2.0", "@angular/animations": "^18.2.0",
"@angular/cdk": "~18.2.14",
"@angular/common": "^18.2.0", "@angular/common": "^18.2.0",
"@angular/compiler": "^18.2.0", "@angular/compiler": "^18.2.0",
"@angular/core": "^18.2.0", "@angular/core": "^18.2.0",
"@angular/forms": "^18.2.0", "@angular/forms": "^18.2.0",
"@angular/material": "~18.2.14",
"@angular/platform-browser": "^18.2.0", "@angular/platform-browser": "^18.2.0",
"@angular/platform-browser-dynamic": "^18.2.0", "@angular/platform-browser-dynamic": "^18.2.0",
"@angular/router": "^18.2.0", "@angular/router": "^18.2.0",
"@fortawesome/angular-fontawesome": "^1.0.0",
"@fortawesome/fontawesome-svg-core": "^6.7.2",
"@fortawesome/free-brands-svg-icons": "^6.7.2",
"@fortawesome/free-solid-svg-icons": "^6.7.2",
"@stripe/stripe-js": "^5.6.0", "@stripe/stripe-js": "^5.6.0",
"@tailwindcss/postcss": "^4.0.3", "@tailwindcss/postcss": "^4.0.3",
"keycloak-angular": "^16.0.1", "keycloak-angular": "^16.0.1",
@ -79,8 +73,6 @@
"@angular/build": ["@angular/build@18.2.14", "", { "dependencies": { "@ampproject/remapping": "2.3.0", "@angular-devkit/architect": "0.1802.14", "@babel/core": "7.25.2", "@babel/helper-annotate-as-pure": "7.24.7", "@babel/helper-split-export-declaration": "7.24.7", "@babel/plugin-syntax-import-attributes": "7.24.7", "@inquirer/confirm": "3.1.22", "@vitejs/plugin-basic-ssl": "1.1.0", "browserslist": "^4.23.0", "critters": "0.0.24", "esbuild": "0.23.0", "fast-glob": "3.3.2", "https-proxy-agent": "7.0.5", "listr2": "8.2.4", "lmdb": "3.0.13", "magic-string": "0.30.11", "mrmime": "2.0.0", "parse5-html-rewriting-stream": "7.0.0", "picomatch": "4.0.2", "piscina": "4.6.1", "rollup": "4.22.4", "sass": "1.77.6", "semver": "7.6.3", "vite": "5.4.14", "watchpack": "2.4.1" }, "peerDependencies": { "@angular/compiler-cli": "^18.0.0", "@angular/localize": "^18.0.0", "@angular/platform-server": "^18.0.0", "@angular/service-worker": "^18.0.0", "less": "^4.2.0", "postcss": "^8.4.0", "tailwindcss": "^2.0.0 || ^3.0.0", "typescript": ">=5.4 <5.6" }, "optionalPeers": ["@angular/localize", "@angular/platform-server", "@angular/service-worker", "less", "postcss", "tailwindcss"] }, "sha512-9g24Oe/ZLULacW3hEpRCjSZIJPJTzN5BeFbA27epSV5NsrQOoeUGsEpRs90Zmt6eReO0fW1BGshWRoZtpSedcw=="], "@angular/build": ["@angular/build@18.2.14", "", { "dependencies": { "@ampproject/remapping": "2.3.0", "@angular-devkit/architect": "0.1802.14", "@babel/core": "7.25.2", "@babel/helper-annotate-as-pure": "7.24.7", "@babel/helper-split-export-declaration": "7.24.7", "@babel/plugin-syntax-import-attributes": "7.24.7", "@inquirer/confirm": "3.1.22", "@vitejs/plugin-basic-ssl": "1.1.0", "browserslist": "^4.23.0", "critters": "0.0.24", "esbuild": "0.23.0", "fast-glob": "3.3.2", "https-proxy-agent": "7.0.5", "listr2": "8.2.4", "lmdb": "3.0.13", "magic-string": "0.30.11", "mrmime": "2.0.0", "parse5-html-rewriting-stream": "7.0.0", "picomatch": "4.0.2", "piscina": "4.6.1", "rollup": "4.22.4", "sass": "1.77.6", "semver": "7.6.3", "vite": "5.4.14", "watchpack": "2.4.1" }, "peerDependencies": { "@angular/compiler-cli": "^18.0.0", "@angular/localize": "^18.0.0", "@angular/platform-server": "^18.0.0", "@angular/service-worker": "^18.0.0", "less": "^4.2.0", "postcss": "^8.4.0", "tailwindcss": "^2.0.0 || ^3.0.0", "typescript": ">=5.4 <5.6" }, "optionalPeers": ["@angular/localize", "@angular/platform-server", "@angular/service-worker", "less", "postcss", "tailwindcss"] }, "sha512-9g24Oe/ZLULacW3hEpRCjSZIJPJTzN5BeFbA27epSV5NsrQOoeUGsEpRs90Zmt6eReO0fW1BGshWRoZtpSedcw=="],
"@angular/cdk": ["@angular/cdk@18.2.14", "", { "dependencies": { "tslib": "^2.3.0" }, "optionalDependencies": { "parse5": "^7.1.2" }, "peerDependencies": { "@angular/common": "^18.0.0 || ^19.0.0", "@angular/core": "^18.0.0 || ^19.0.0", "rxjs": "^6.5.3 || ^7.4.0" } }, "sha512-vDyOh1lwjfVk9OqoroZAP8pf3xxKUvyl+TVR8nJxL4c5fOfUFkD7l94HaanqKSRwJcI2xiztuu92IVoHn8T33Q=="],
"@angular/cli": ["@angular/cli@18.2.14", "", { "dependencies": { "@angular-devkit/architect": "0.1802.14", "@angular-devkit/core": "18.2.14", "@angular-devkit/schematics": "18.2.14", "@inquirer/prompts": "5.3.8", "@listr2/prompt-adapter-inquirer": "2.0.15", "@schematics/angular": "18.2.14", "@yarnpkg/lockfile": "1.1.0", "ini": "4.1.3", "jsonc-parser": "3.3.1", "listr2": "8.2.4", "npm-package-arg": "11.0.3", "npm-pick-manifest": "9.1.0", "pacote": "18.0.6", "resolve": "1.22.8", "semver": "7.6.3", "symbol-observable": "4.0.0", "yargs": "17.7.2" }, "bin": { "ng": "bin/ng.js" } }, "sha512-kWgRRQtJPkr8iwN7DMbTi3sXOnv7H5QhbU/GgD3nNX3D8YCSPmnby4PAE/P3wn7FsIK9JsSchsCt7MZ37Urh9A=="], "@angular/cli": ["@angular/cli@18.2.14", "", { "dependencies": { "@angular-devkit/architect": "0.1802.14", "@angular-devkit/core": "18.2.14", "@angular-devkit/schematics": "18.2.14", "@inquirer/prompts": "5.3.8", "@listr2/prompt-adapter-inquirer": "2.0.15", "@schematics/angular": "18.2.14", "@yarnpkg/lockfile": "1.1.0", "ini": "4.1.3", "jsonc-parser": "3.3.1", "listr2": "8.2.4", "npm-package-arg": "11.0.3", "npm-pick-manifest": "9.1.0", "pacote": "18.0.6", "resolve": "1.22.8", "semver": "7.6.3", "symbol-observable": "4.0.0", "yargs": "17.7.2" }, "bin": { "ng": "bin/ng.js" } }, "sha512-kWgRRQtJPkr8iwN7DMbTi3sXOnv7H5QhbU/GgD3nNX3D8YCSPmnby4PAE/P3wn7FsIK9JsSchsCt7MZ37Urh9A=="],
"@angular/common": ["@angular/common@18.2.13", "", { "dependencies": { "tslib": "^2.3.0" }, "peerDependencies": { "@angular/core": "18.2.13", "rxjs": "^6.5.3 || ^7.4.0" } }, "sha512-4ZqrNp1PoZo7VNvW+sbSc2CB2axP1sCH2wXl8B0wdjsj8JY1hF1OhuugwhpAHtGxqewed2kCXayE+ZJqSTV4jw=="], "@angular/common": ["@angular/common@18.2.13", "", { "dependencies": { "tslib": "^2.3.0" }, "peerDependencies": { "@angular/core": "18.2.13", "rxjs": "^6.5.3 || ^7.4.0" } }, "sha512-4ZqrNp1PoZo7VNvW+sbSc2CB2axP1sCH2wXl8B0wdjsj8JY1hF1OhuugwhpAHtGxqewed2kCXayE+ZJqSTV4jw=="],
@ -93,8 +85,6 @@
"@angular/forms": ["@angular/forms@18.2.13", "", { "dependencies": { "tslib": "^2.3.0" }, "peerDependencies": { "@angular/common": "18.2.13", "@angular/core": "18.2.13", "@angular/platform-browser": "18.2.13", "rxjs": "^6.5.3 || ^7.4.0" } }, "sha512-A67D867fu3DSBhdLWWZl/F5pr7v2+dRM2u3U7ZJ0ewh4a+sv+0yqWdJW+a8xIoiHxS+btGEJL2qAKJiH+MCFfg=="], "@angular/forms": ["@angular/forms@18.2.13", "", { "dependencies": { "tslib": "^2.3.0" }, "peerDependencies": { "@angular/common": "18.2.13", "@angular/core": "18.2.13", "@angular/platform-browser": "18.2.13", "rxjs": "^6.5.3 || ^7.4.0" } }, "sha512-A67D867fu3DSBhdLWWZl/F5pr7v2+dRM2u3U7ZJ0ewh4a+sv+0yqWdJW+a8xIoiHxS+btGEJL2qAKJiH+MCFfg=="],
"@angular/material": ["@angular/material@18.2.14", "", { "dependencies": { "tslib": "^2.3.0" }, "peerDependencies": { "@angular/animations": "^18.0.0 || ^19.0.0", "@angular/cdk": "18.2.14", "@angular/common": "^18.0.0 || ^19.0.0", "@angular/core": "^18.0.0 || ^19.0.0", "@angular/forms": "^18.0.0 || ^19.0.0", "@angular/platform-browser": "^18.0.0 || ^19.0.0", "rxjs": "^6.5.3 || ^7.4.0" } }, "sha512-28pxzJP49Mymt664WnCtPkKeg7kXUsQKTKGf/Kl95rNTEdTJLbnlcc8wV0rT0yQNR7kXgpfBnG7h0ETLv/iu5Q=="],
"@angular/platform-browser": ["@angular/platform-browser@18.2.13", "", { "dependencies": { "tslib": "^2.3.0" }, "peerDependencies": { "@angular/animations": "18.2.13", "@angular/common": "18.2.13", "@angular/core": "18.2.13" }, "optionalPeers": ["@angular/animations"] }, "sha512-tu7ZzY6qD3ATdWFzcTcsAKe7M6cJeWbT/4/bF9unyGO3XBPcNYDKoiz10+7ap2PUd0fmPwvuvTvSNJiFEBnB8Q=="], "@angular/platform-browser": ["@angular/platform-browser@18.2.13", "", { "dependencies": { "tslib": "^2.3.0" }, "peerDependencies": { "@angular/animations": "18.2.13", "@angular/common": "18.2.13", "@angular/core": "18.2.13" }, "optionalPeers": ["@angular/animations"] }, "sha512-tu7ZzY6qD3ATdWFzcTcsAKe7M6cJeWbT/4/bF9unyGO3XBPcNYDKoiz10+7ap2PUd0fmPwvuvTvSNJiFEBnB8Q=="],
"@angular/platform-browser-dynamic": ["@angular/platform-browser-dynamic@18.2.13", "", { "dependencies": { "tslib": "^2.3.0" }, "peerDependencies": { "@angular/common": "18.2.13", "@angular/compiler": "18.2.13", "@angular/core": "18.2.13", "@angular/platform-browser": "18.2.13" } }, "sha512-kbQCf9+8EpuJC7buBxhSiwBtXvjAwAKh6MznD6zd2pyCYqfY6gfRCZQRtK59IfgVtKmEONWI9grEyNIRoTmqJg=="], "@angular/platform-browser-dynamic": ["@angular/platform-browser-dynamic@18.2.13", "", { "dependencies": { "tslib": "^2.3.0" }, "peerDependencies": { "@angular/common": "18.2.13", "@angular/compiler": "18.2.13", "@angular/core": "18.2.13", "@angular/platform-browser": "18.2.13" } }, "sha512-kbQCf9+8EpuJC7buBxhSiwBtXvjAwAKh6MznD6zd2pyCYqfY6gfRCZQRtK59IfgVtKmEONWI9grEyNIRoTmqJg=="],
@ -377,16 +367,6 @@
"@eslint/plugin-kit": ["@eslint/plugin-kit@0.2.5", "", { "dependencies": { "@eslint/core": "^0.10.0", "levn": "^0.4.1" } }, "sha512-lB05FkqEdUg2AA0xEbUz0SnkXT1LcCTa438W4IWTUh4hdOnVbQyOJ81OrDXsJk/LSiJHubgGEFoR5EHq1NsH1A=="], "@eslint/plugin-kit": ["@eslint/plugin-kit@0.2.5", "", { "dependencies": { "@eslint/core": "^0.10.0", "levn": "^0.4.1" } }, "sha512-lB05FkqEdUg2AA0xEbUz0SnkXT1LcCTa438W4IWTUh4hdOnVbQyOJ81OrDXsJk/LSiJHubgGEFoR5EHq1NsH1A=="],
"@fortawesome/angular-fontawesome": ["@fortawesome/angular-fontawesome@1.0.0", "", { "dependencies": { "@fortawesome/fontawesome-svg-core": "^6.7.1", "tslib": "^2.8.1" }, "peerDependencies": { "@angular/core": "^19.0.0" } }, "sha512-EC2fYuXIuw2ld1kzJi+zysWus6OeGGfLQtbh0hW9zyyq5aBo8ZJkcJKBsVQ8E6Mg7nHyTWaXn+sdcXTPDWz+UQ=="],
"@fortawesome/fontawesome-common-types": ["@fortawesome/fontawesome-common-types@6.7.2", "", {}, "sha512-Zs+YeHUC5fkt7Mg1l6XTniei3k4bwG/yo3iFUtZWd/pMx9g3fdvkSK9E0FOC+++phXOka78uJcYb8JaFkW52Xg=="],
"@fortawesome/fontawesome-svg-core": ["@fortawesome/fontawesome-svg-core@6.7.2", "", { "dependencies": { "@fortawesome/fontawesome-common-types": "6.7.2" } }, "sha512-yxtOBWDrdi5DD5o1pmVdq3WMCvnobT0LU6R8RyyVXPvFRd2o79/0NCuQoCjNTeZz9EzA9xS3JxNWfv54RIHFEA=="],
"@fortawesome/free-brands-svg-icons": ["@fortawesome/free-brands-svg-icons@6.7.2", "", { "dependencies": { "@fortawesome/fontawesome-common-types": "6.7.2" } }, "sha512-zu0evbcRTgjKfrr77/2XX+bU+kuGfjm0LbajJHVIgBWNIDzrhpRxiCPNT8DW5AdmSsq7Mcf9D1bH0aSeSUSM+Q=="],
"@fortawesome/free-solid-svg-icons": ["@fortawesome/free-solid-svg-icons@6.7.2", "", { "dependencies": { "@fortawesome/fontawesome-common-types": "6.7.2" } }, "sha512-GsBrnOzU8uj0LECDfD5zomZJIjrPhIlWU82AHwa2s40FKH+kcxQaBvBo3Z4TxyZHIyX8XTDxsyA33/Vx9eFuQA=="],
"@humanfs/core": ["@humanfs/core@0.19.1", "", {}, "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA=="], "@humanfs/core": ["@humanfs/core@0.19.1", "", {}, "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA=="],
"@humanfs/node": ["@humanfs/node@0.16.6", "", { "dependencies": { "@humanfs/core": "^0.19.1", "@humanwhocodes/retry": "^0.3.0" } }, "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw=="], "@humanfs/node": ["@humanfs/node@0.16.6", "", { "dependencies": { "@humanfs/core": "^0.19.1", "@humanwhocodes/retry": "^0.3.0" } }, "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw=="],

View File

@ -14,19 +14,13 @@
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "^18.2.0", "@angular/animations": "^18.2.0",
"@angular/cdk": "~18.2.14",
"@angular/common": "^18.2.0", "@angular/common": "^18.2.0",
"@angular/compiler": "^18.2.0", "@angular/compiler": "^18.2.0",
"@angular/core": "^18.2.0", "@angular/core": "^18.2.0",
"@angular/forms": "^18.2.0", "@angular/forms": "^18.2.0",
"@angular/material": "~18.2.14",
"@angular/platform-browser": "^18.2.0", "@angular/platform-browser": "^18.2.0",
"@angular/platform-browser-dynamic": "^18.2.0", "@angular/platform-browser-dynamic": "^18.2.0",
"@angular/router": "^18.2.0", "@angular/router": "^18.2.0",
"@fortawesome/angular-fontawesome": "^1.0.0",
"@fortawesome/fontawesome-svg-core": "^6.7.2",
"@fortawesome/free-brands-svg-icons": "^6.7.2",
"@fortawesome/free-solid-svg-icons": "^6.7.2",
"@stripe/stripe-js": "^5.6.0", "@stripe/stripe-js": "^5.6.0",
"@tailwindcss/postcss": "^4.0.3", "@tailwindcss/postcss": "^4.0.3",
"keycloak-angular": "^16.0.1", "keycloak-angular": "^16.0.1",
@ -53,4 +47,4 @@
"typescript": "~5.5.2", "typescript": "~5.5.2",
"typescript-eslint": "8.23.0" "typescript-eslint": "8.23.0"
} }
} }

View File

@ -1,6 +1 @@
<div class="min-h-screen flex flex-col"> <router-outlet></router-outlet>
<main class="flex-grow">
<router-outlet></router-outlet>
</main>
<app-footer></app-footer>
</div>

View File

@ -2,12 +2,11 @@ import { Component, ChangeDetectionStrategy } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { RouterOutlet } from '@angular/router'; import { RouterOutlet } from '@angular/router';
import { KeycloakAngularModule } from 'keycloak-angular'; import { KeycloakAngularModule } from 'keycloak-angular';
import { FooterComponent } from './shared/components/footer/footer.component';
@Component({ @Component({
selector: 'app-root', selector: 'app-root',
standalone: true, standalone: true,
imports: [CommonModule, RouterOutlet, KeycloakAngularModule, FooterComponent], imports: [CommonModule, RouterOutlet, KeycloakAngularModule],
providers: [], providers: [],
templateUrl: './app.component.html', templateUrl: './app.component.html',
styleUrl: './app.component.css', styleUrl: './app.component.css',

View File

@ -4,7 +4,6 @@ import {
provideExperimentalZonelessChangeDetection, provideExperimentalZonelessChangeDetection,
} from '@angular/core'; } from '@angular/core';
import { provideRouter } from '@angular/router'; import { provideRouter } from '@angular/router';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
import { routes } from './app.routes'; import { routes } from './app.routes';
import { import {
@ -13,7 +12,6 @@ import {
KeycloakService, KeycloakService,
} from 'keycloak-angular'; } from 'keycloak-angular';
import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'; import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
export const initializeKeycloak = (keycloak: KeycloakService) => async () => export const initializeKeycloak = (keycloak: KeycloakService) => async () =>
keycloak.init({ keycloak.init({
@ -39,7 +37,6 @@ export const appConfig: ApplicationConfig = {
providers: [ providers: [
provideRouter(routes), provideRouter(routes),
KeycloakAngularModule, KeycloakAngularModule,
FontAwesomeModule,
{ {
provide: APP_INITIALIZER, provide: APP_INITIALIZER,
useFactory: initializeApp, useFactory: initializeApp,
@ -54,6 +51,5 @@ export const appConfig: ApplicationConfig = {
useClass: KeycloakBearerInterceptor, useClass: KeycloakBearerInterceptor,
multi: true, multi: true,
}, },
provideAnimationsAsync(),
], ],
}; };

View File

@ -2,6 +2,7 @@ import { Routes } from '@angular/router';
import { LandingComponent } from './feature/landing/landing.component'; import { LandingComponent } from './feature/landing/landing.component';
import { HomeComponent } from './feature/home/home.component'; import { HomeComponent } from './feature/home/home.component';
import { authGuard } from './auth.guard'; import { authGuard } from './auth.guard';
import { DepositComponent } from './deposit/deposit.component';
import { LoginSuccessComponent } from './login-success/login-success.component'; import { LoginSuccessComponent } from './login-success/login-success.component';
export const routes: Routes = [ export const routes: Routes = [
@ -18,4 +19,9 @@ export const routes: Routes = [
component: HomeComponent, component: HomeComponent,
canActivate: [authGuard], canActivate: [authGuard],
}, },
{
path: 'deposit',
component: DepositComponent,
canActivate: [authGuard],
},
]; ];

View File

@ -0,0 +1,21 @@
<form [formGroup]="form" class="max-w-md mx-auto p-4 bg-white shadow-md rounded-lg">
<div *ngIf="errorMsg" class="mb-4 text-red-500">
{{ errorMsg }}
</div>
<div class="mb-4">
<label for="amount" class="block text-sm font-medium text-gray-700">Betrag</label>
<input
type="number"
id="amount"
formControlName="amount"
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm text-black bg-white"
/>
</div>
<button
type="button"
(click)="submit()"
class="w-full bg-indigo-600 text-white py-2 px-4 rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
>
Einzahlen
</button>
</form>

View File

@ -1,30 +1,17 @@
import { ChangeDetectionStrategy, Component, inject, OnInit } from '@angular/core'; import { ChangeDetectionStrategy, Component, inject, OnInit } from '@angular/core';
import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms'; import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';
import { loadStripe, Stripe } from '@stripe/stripe-js'; import { loadStripe, Stripe } from '@stripe/stripe-js';
import { DepositService } from '../../service/deposit.service'; import { DepositService } from '../service/deposit.service';
import { debounceTime } from 'rxjs'; import { debounceTime } from 'rxjs';
import { environment } from '../../../environments/environment'; import { environment } from '../../environments/environment';
import { NgIf } from '@angular/common'; import { NgIf } from '@angular/common';
import {
MatDialogActions,
MatDialogContent,
MatDialogRef,
MatDialogTitle,
} from '@angular/material/dialog';
import { MatButton } from '@angular/material/button';
@Component({ @Component({
selector: 'app-deposit', selector: 'app-deposit',
standalone: true, standalone: true,
imports: [ imports: [ReactiveFormsModule, NgIf],
ReactiveFormsModule,
NgIf,
MatDialogTitle,
MatDialogContent,
MatDialogActions,
MatButton,
],
templateUrl: './deposit.component.html', templateUrl: './deposit.component.html',
styleUrl: './deposit.component.css',
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,
}) })
export class DepositComponent implements OnInit { export class DepositComponent implements OnInit {
@ -32,7 +19,6 @@ export class DepositComponent implements OnInit {
protected errorMsg = ''; protected errorMsg = '';
private stripe: Stripe | null = null; private stripe: Stripe | null = null;
private service: DepositService = inject(DepositService); private service: DepositService = inject(DepositService);
public dialogRef: MatDialogRef<DepositComponent> = inject(MatDialogRef<DepositComponent>);
async ngOnInit() { async ngOnInit() {
this.form = new FormGroup({ this.form = new FormGroup({
@ -62,8 +48,4 @@ export class DepositComponent implements OnInit {
this.stripe?.redirectToCheckout({ sessionId }); this.stripe?.redirectToCheckout({ sessionId });
}); });
} }
public closeDialog(): void {
this.dialogRef.close();
}
} }

View File

@ -1,21 +0,0 @@
<h2 mat-dialog-title class="text-xl font-semibold">Guthaben aufladen</h2>
<mat-dialog-content>
<form [formGroup]="form">
<div *ngIf="errorMsg">
{{ errorMsg }}
</div>
<div class="mb-2">
<label for="amount">Betrag</label>
<input
type="number"
id="amount"
formControlName="amount"
class="w-full px-2 py-1 bg-white text-black"
/>
</div>
</form>
</mat-dialog-content>
<mat-dialog-actions>
<button mat-flat-button (click)="closeDialog()">Abbrechen</button>
<button mat-flat-button (click)="submit()">Einzahlen</button>
</mat-dialog-actions>

View File

@ -1,4 +1,14 @@
<app-navbar></app-navbar> <nav class="bg-black border-b border-amber-600/30 sticky top-0 z-50">
<div class="container mx-auto px-4 py-3 flex justify-between items-center">
<!-- logo goes here -->
<div class="flex gap-4">
<button class="btn-primary" (click)="logout()">Ausloggen</button>
</div>
<div>
<button class="btn-primary">Benutzer</button>
</div>
</div>
</nav>
<div class="grid grid-cols-3"> <div class="grid grid-cols-3">
<div class="w-1/3 h-1/4"> <div class="w-1/3 h-1/4">

View File

@ -1,27 +1,19 @@
import { ChangeDetectionStrategy, Component, inject } from '@angular/core'; import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
import { KeycloakService } from 'keycloak-angular'; import { KeycloakService } from 'keycloak-angular';
import { MatDialog } from '@angular/material/dialog';
import { DepositComponent } from '../deposit/deposit.component';
import { NavbarComponent } from '../../shared/components/navbar/navbar.component';
@Component({ @Component({
selector: 'app-homepage', selector: 'app-homepage',
standalone: true, standalone: true,
imports: [NavbarComponent], imports: [],
templateUrl: './home.component.html', templateUrl: './home.component.html',
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,
}) })
export class HomeComponent { export class HomeComponent {
private keycloakService: KeycloakService = inject(KeycloakService); private keycloakService: KeycloakService = inject(KeycloakService);
public dialog: MatDialog = inject(MatDialog);
public logout() { logout() {
const baseUrl = window.location.origin; const baseUrl = window.location.origin;
this.keycloakService.logout(`${baseUrl}/`); this.keycloakService.logout(`${baseUrl}/`);
} }
public openDialog() {
this.dialog.open(DepositComponent);
}
} }

View File

@ -1,142 +1,5 @@
<app-navbar></app-navbar> @if (isLoggedIn) {
<button routerLink="/home">Zur Homepage</button>
<div class="min-h-screen bg-deep-blue text-text-primary"> } @else {
<div class="container mx-auto px-4 py-8 sm:py-12"> <button (click)="login()">Einloggen</button>
<div class="max-w-5xl mx-auto"> }
<div class="text-center mb-12 sm:mb-16">
<h1 class="text-3xl sm:text-4xl lg:text-5xl section-heading mb-2 sm:mb-3">
Willkommensbonus
</h1>
<div class="welcome-bonus">200% bis zu 500€</div>
<p class="bonus-description">+ 200 Freispiele</p>
<button class="w-full sm:w-auto button-base px-6 sm:px-8 py-3 shadow-lg">
Bonus Sichern
</button>
</div>
<div class="relative mb-16">
<h2 class="text-xl sm:text-2xl section-heading mb-4 sm:mb-6">Beliebte Spiele</h2>
<div class="relative group">
<div class="overflow-hidden rounded-lg">
<div
class="slider-container"
[style.transform]="'translateX(-' + currentSlide * 100 + '%)'"
>
<div class="slider-grid">
<div class="card">
<div class="game-card-content">
<h3 class="game-heading">Slots</h3>
<p class="game-text">Klassische Spielautomaten</p>
<button class="button-base w-full py-2">Jetzt Spielen</button>
</div>
</div>
<div class="card">
<div class="game-card-content">
<h3 class="game-heading">Plinko</h3>
<p class="game-text">Spannendes Geschicklichkeitsspiel</p>
<button class="button-base w-full py-2">Jetzt Spielen</button>
</div>
</div>
<div class="hidden lg:block card">
<div class="game-card-content">
<h3 class="game-heading">Blackjack</h3>
<p class="game-text">Klassisches Kartenspiel</p>
<button class="button-base w-full py-2">Jetzt Spielen</button>
</div>
</div>
</div>
<div class="slider-grid">
<div class="card">
<div class="game-card-content">
<h3 class="game-heading">Poker</h3>
<p class="game-text">Texas Hold'em & mehr</p>
<button class="button-base w-full py-2">Jetzt Spielen</button>
</div>
</div>
<div class="card">
<div class="game-card-content">
<h3 class="game-heading">Liars Dice</h3>
<p class="game-text">Würfelspiel mit Strategie</p>
<button class="button-base w-full py-2">Jetzt Spielen</button>
</div>
</div>
<div class="hidden lg:block card">
<div class="game-card-content">
<h3 class="game-heading">Lootboxen</h3>
<p class="game-text">Überraschungskisten</p>
<button class="button-base w-full py-2">Jetzt Spielen</button>
</div>
</div>
</div>
</div>
</div>
<button class="nav-button left-[-4rem]" (click)="prevSlide()">
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-6 w-6"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M15 19l-7-7 7-7"
/>
</svg>
</button>
<button class="nav-button right-[-4rem]" (click)="nextSlide()">
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-6 w-6"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 5l7 7-7 7"
/>
</svg>
</button>
<div class="absolute -bottom-6 left-1/2 -translate-x-1/2 flex gap-2">
<button
*ngFor="let _ of [0, 1]; let i = index"
[class]="
'w-2 h-2 rounded-full transition-all duration-300 ' +
(currentSlide === i ? 'bg-emerald w-4' : 'bg-text-tertiary')
"
(click)="goToSlide(i)"
>
<span class="sr-only">Slide {{ i + 1 }}</span>
</button>
</div>
</div>
</div>
<div class="grid grid-cols-1 sm:grid-cols-3 gap-4 sm:gap-6">
<div class="stat-container">
<div class="stat-number">50 Mio.€+</div>
<div class="stat-text">Ausgezahlt</div>
</div>
<div class="stat-container">
<div class="stat-number">10 Mio.+</div>
<div class="stat-text">Spiele</div>
</div>
<div class="stat-container">
<div class="stat-number">24/7</div>
<div class="stat-text">Support <span class="text-emerald text-xs">*</span></div>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,55 +1,21 @@
import { ChangeDetectionStrategy, Component, OnInit, OnDestroy } from '@angular/core'; import { Component, inject } from '@angular/core';
import { NavbarComponent } from '../../shared/components/navbar/navbar.component'; import { KeycloakService } from 'keycloak-angular';
import { NgFor } from '@angular/common'; import { RouterLink } from '@angular/router';
@Component({ @Component({
selector: 'app-landing-page', selector: 'app-landing',
standalone: true, standalone: true,
imports: [NavbarComponent, NgFor], imports: [RouterLink],
templateUrl: './landing.component.html', templateUrl: './landing.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
}) })
export class LandingComponent implements OnInit, OnDestroy { export class LandingComponent {
currentSlide = 0; private keycloakService: KeycloakService = inject(KeycloakService);
private autoplayInterval: ReturnType<typeof setInterval> | undefined;
ngOnInit() { public isLoggedIn = this.keycloakService.isLoggedIn();
this.startAutoplay();
}
ngOnDestroy() { public login() {
this.stopAutoplay(); const baseUrl = window.location.origin;
}
prevSlide() { this.keycloakService.login({ redirectUri: `${baseUrl}/login/success` });
this.currentSlide = this.currentSlide === 0 ? 1 : 0;
this.resetAutoplay();
}
nextSlide() {
this.currentSlide = this.currentSlide === 1 ? 0 : 1;
this.resetAutoplay();
}
goToSlide(index: number) {
this.currentSlide = index;
this.resetAutoplay();
}
private startAutoplay() {
this.autoplayInterval = setInterval(() => {
this.nextSlide();
}, 5000);
}
private stopAutoplay() {
if (this.autoplayInterval) {
clearInterval(this.autoplayInterval);
}
}
private resetAutoplay() {
this.stopAutoplay();
this.startAutoplay();
} }
} }

View File

@ -1,80 +0,0 @@
<footer class="bg-deep-blue mt-auto">
<div class="max-w-7xl mx-auto py-12 px-4 sm:px-6 lg:px-8">
<div class="grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-8">
<div class="footer-section">
<h3 class="footer-heading">Casino Spiele</h3>
<ul class="space-y-3">
<li>
<a routerLink="/games" class="footer-link">Slots</a>
</li>
<li>
<a routerLink="/games" class="footer-link">Plinko</a>
</li>
<li>
<a routerLink="/games" class="footer-link">Blackjack</a>
</li>
<li>
<a routerLink="/games" class="footer-link">Poker</a>
</li>
<li>
<a routerLink="/games" class="footer-link">Liars Dice</a>
</li>
</ul>
</div>
<div class="footer-section">
<h3 class="footer-heading">Andere Spiele</h3>
<ul class="space-y-3">
<li>
<a routerLink="/games" class="footer-link">Lootboxen</a>
</li>
</ul>
</div>
<div class="col-span-2 lg:col-span-2">
<h3 class="footer-heading">Einzahlungsmöglichkeiten</h3>
<div class="grid grid-cols-2 md:grid-cols-3 gap-4">
<div class="footer-payment-method">
<fa-icon [icon]="faMoneyBillTransfer" class="footer-payment-icon"></fa-icon>
<span class="footer-payment-text">Sofort</span>
</div>
<div class="footer-payment-method">
<fa-icon [icon]="faPaypal" class="footer-payment-icon"></fa-icon>
<span class="footer-payment-text">Paypal</span>
</div>
<div class="footer-payment-method">
<fa-icon [icon]="faCreditCard" class="footer-payment-icon"></fa-icon>
<span class="footer-payment-text">Kreditkarte</span>
</div>
<div class="footer-payment-method">
<fa-icon [icon]="faWallet" class="footer-payment-icon"></fa-icon>
<span class="footer-payment-text">Klara</span>
</div>
<div class="footer-payment-method">
<fa-icon [icon]="faMoneyBillTransfer" class="footer-payment-icon"></fa-icon>
<span class="footer-payment-text">Sepa</span>
</div>
<div class="footer-payment-method">
<fa-icon [icon]="faGooglePay" class="footer-payment-icon"></fa-icon>
<span class="footer-payment-text">Google Pay</span>
</div>
<div class="footer-payment-method">
<fa-icon [icon]="faApplePay" class="footer-payment-icon"></fa-icon>
<span class="footer-payment-text">Apple Pay</span>
</div>
</div>
</div>
</div>
<div class="mt-12 pt-8 border-t border-deep-blue-light">
<div class="flex flex-col md:flex-row justify-between items-center">
<div class="footer-copyright">
<span class="footer-disclaimer">
<span class="text-emerald">*</span> nicht vorhanden.
</span>
<br />
© {{ currentYear }} Trustworthy Casino. Keine Rechte vorbehalten.
</div>
</div>
</div>
</div>
</footer>

View File

@ -1,22 +0,0 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
import { faMoneyBillTransfer, faCreditCard, faWallet } from '@fortawesome/free-solid-svg-icons';
import { faPaypal, faGooglePay, faApplePay } from '@fortawesome/free-brands-svg-icons';
@Component({
selector: 'app-footer',
standalone: true,
templateUrl: './footer.component.html',
imports: [FontAwesomeModule],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class FooterComponent {
currentYear: number = new Date().getFullYear();
faPaypal = faPaypal;
faCreditCard = faCreditCard;
faMoneyBillTransfer = faMoneyBillTransfer;
faWallet = faWallet;
faGooglePay = faGooglePay;
faApplePay = faApplePay;
}

View File

@ -1,70 +0,0 @@
<nav class="bg-deep-blue border-b border-deep-blue-contrast">
<div class="max-w-full mx-auto px-4">
<div class="flex justify-between items-center h-14">
<div class="flex items-center space-x-6">
<a routerLink="/" class="nav-brand">
<span>Trustworthy Casino</span>
</a>
<div class="hidden md:flex items-center space-x-1">
<a routerLink="/games" class="nav-link">Spiele</a>
</div>
</div>
<div class="hidden md:flex items-center space-x-4">
@if (!isLoggedIn) {
<button (click)="login()" class="button-base px-4 py-1.5">Anmelden</button>
}
@if (isLoggedIn) {
<button (click)="logout()" class="button-base px-4 py-1.5">Abmelden</button>
}
</div>
<div class="md:hidden">
<button (click)="toggleMenu()" class="nav-toggle">
<svg
class="h-6 w-6"
[class.hidden]="isMenuOpen"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M4 6h16M4 12h16M4 18h16"
/>
</svg>
<svg
class="h-6 w-6"
[class.hidden]="!isMenuOpen"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M6 18L18 6M6 6l12 12"
/>
</svg>
</button>
</div>
</div>
<div [class]="isMenuOpen ? 'block' : 'hidden'" class="md:hidden">
<div class="nav-mobile-menu">
<a routerLink="/games" class="nav-mobile-link">Spiele</a>
<div class="pt-2 space-y-2">
@if (!isLoggedIn) {
<button (click)="login()" class="button-base w-full py-1.5">Anmelden</button>
}
@if (isLoggedIn) {
<button (click)="logout()" class="button-base w-full py-1.5">Abmelden</button>
}
</div>
</div>
</div>
</div>
</nav>

View File

@ -1,34 +0,0 @@
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
import { RouterModule } from '@angular/router';
import { KeycloakService } from 'keycloak-angular';
@Component({
selector: 'app-navbar',
templateUrl: './navbar.component.html',
standalone: true,
imports: [RouterModule],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class NavbarComponent {
isMenuOpen = false;
private keycloakService: KeycloakService = inject(KeycloakService);
isLoggedIn = this.keycloakService.isLoggedIn();
login() {
try {
const baseUrl = window.location.origin;
this.keycloakService.login({ redirectUri: `${baseUrl}/home` });
} catch (error) {
console.error('Login failed:', error);
}
}
logout() {
this.keycloakService.logout();
}
toggleMenu() {
this.isMenuOpen = !this.isMenuOpen;
}
}

View File

@ -1,143 +1,12 @@
@import 'tailwindcss'; @import 'tailwindcss';
@theme { @theme {
--color-deep-blue: #0a1219; --color-deep-blue: #0f212e;
--color-deep-blue-light: #121e27; --color-deep-blue-light: #1a2c38;
--color-deep-blue-contrast: #1a2835; --color-deep-blue-contrast: #1b2c3b;
--color-light-blue: #1475e1;
--color-emerald: #10b981;
--color-emerald-dark: #059669;
--color-emerald-light: #34d399;
--color-text-primary: #ffffff;
--color-text-secondary: #94a3b8;
--color-text-tertiary: #64748b;
--color-accent-yellow: #fbbf24;
--color-accent-red: #ef4444;
--color-accent-purple: #8b5cf6;
} }
body { body {
@apply bg-deep-blue text-text-primary h-full; @apply bg-deep-blue text-gray-100;
}
button,
a {
@apply cursor-pointer active:scale-95 text-text-primary transition-all duration-200;
}
.card {
@apply bg-deep-blue-contrast rounded-lg overflow-hidden shadow-lg hover:shadow-xl transition-shadow duration-300;
}
.button-base {
@apply bg-emerald hover:bg-emerald-dark text-text-primary transition-all duration-300 active:scale-95 rounded;
}
.game-card-content {
@apply p-4;
}
.nav-button {
@apply hidden lg:block absolute top-1/2 -translate-y-1/2 bg-deep-blue-contrast hover:bg-deep-blue-contrast/90 text-text-primary p-3 rounded-full opacity-0 group-hover:opacity-100 transition-all duration-300 shadow-lg hover:scale-110;
}
.slider-container {
@apply flex transition-transform duration-500 ease-out;
}
.slider-grid {
@apply min-w-full grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4;
}
.welcome-bonus {
@apply text-4xl sm:text-5xl lg:text-7xl font-extrabold text-emerald-light mb-3 sm:mb-4;
}
.bonus-description {
@apply text-text-secondary text-base sm:text-lg mb-6 sm:mb-8;
}
.section-heading {
@apply font-bold text-text-primary;
}
.game-heading {
@apply font-bold text-text-primary text-sm mb-2;
}
.game-text {
@apply text-text-secondary text-sm mb-4;
}
.stat-container {
@apply bg-deep-blue-contrast rounded-lg shadow-lg p-4 sm:p-6 text-center;
}
.stat-number {
@apply text-xl sm:text-2xl font-bold text-emerald;
}
.stat-text {
@apply text-text-secondary text-sm;
}
.nav-brand {
@apply flex items-center text-text-primary text-xl font-semibold;
}
.nav-link {
@apply px-3 py-2 rounded-md font-normal text-sm text-text-secondary hover:text-text-primary hover:bg-deep-blue-contrast transition-all duration-200;
}
.nav-toggle {
@apply text-text-secondary hover:text-text-primary transition-colors duration-200;
}
.nav-mobile-menu {
@apply p-2 pt-2 mb-4 space-y-1 bg-deep-blue-contrast rounded-b-lg;
}
.nav-mobile-link {
@apply block px-3 py-2 rounded-md text-sm text-text-secondary hover:text-text-primary hover:bg-deep-blue-light transition-all duration-200;
}
.footer-section {
@apply col-span-2 md:col-span-1;
}
.footer-heading {
@apply text-text-primary text-sm font-semibold mb-4;
}
.footer-link {
@apply text-text-secondary hover:text-text-primary text-sm transition-all duration-200;
}
.footer-payment-method {
@apply bg-deep-blue rounded p-3 flex items-center justify-center space-x-2 hover:bg-deep-blue/50 transition-all duration-200;
}
.footer-payment-icon {
@apply text-text-secondary text-lg;
}
.footer-payment-text {
@apply text-text-secondary text-xs whitespace-nowrap;
}
.footer-copyright {
@apply text-text-secondary text-sm;
}
.footer-disclaimer {
@apply text-xs;
}
.mat-mdc-dialog-container {
--mdc-dialog-container-color: var(--color-deep-blue-light) important;
--mdc-dialog-subhead-color: var(--color-text-primary) important;
--mdc-dialog-supporting-text-color: var(--color-text-secondary) important;
--mdc-dialog-container-shape: 6px important;
} }