Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions application.properties.phase1
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Flight Spotlight Java Frontend Configuration
# Phase 1: Java Frontend Skeleton + Authentication

# Server Configuration
server.port=${PORT:8080}

# Application Name
spring.application.name=flight-spotlight-java

# Vaadin Configuration
vaadin.servlet.production-mode=false
vaadin.whitelisted-packages=com.flightspotlight

# OAuth2 / OIDC Configuration (User Authentication)
# These values should match the Node.js environment variables
spring.security.oauth2.client.registration.flight-passport.client-id=${CLIENT_ID}
spring.security.oauth2.client.registration.flight-passport.client-secret=${CLIENT_SECRET}
spring.security.oauth2.client.registration.flight-passport.authorization-grant-type=authorization_code
spring.security.oauth2.client.registration.flight-passport.redirect-uri=${SPOTLIGHT_BASE_URL}/login/oauth2/code/flight-passport
spring.security.oauth2.client.registration.flight-passport.scope=openid,profile

spring.security.oauth2.client.provider.flight-passport.authorization-uri=${OIDC_DOMAIN}/authorize
spring.security.oauth2.client.provider.flight-passport.token-uri=${OIDC_DOMAIN}/token/
spring.security.oauth2.client.provider.flight-passport.user-info-uri=${OIDC_DOMAIN}/userinfo/
spring.security.oauth2.client.provider.flight-passport.jwk-set-uri=${OIDC_DOMAIN}/.well-known/jwks.json
spring.security.oauth2.client.provider.flight-passport.user-name-attribute=sub

# Flight Passport M2M Token Configuration (for Flight Blender API calls)
flight.passport.m2m.client-id=${PASSPORT_BLENDER_CLIENT_ID}
flight.passport.m2m.client-secret=${PASSPORT_BLENDER_CLIENT_SECRET}
flight.passport.m2m.scope=${PASSPORT_BLENDER_SCOPE:blender.read blender.write}
flight.passport.m2m.audience=${PASSPORT_BLENDER_AUDIENCE}
flight.passport.m2m.token-url=${PASSPORT_URL}/oauth/token/
flight.passport.m2m.token-cache-key=blender_passport_token
flight.passport.m2m.token-cache-ttl=3500

# Flight Blender API Configuration
flight.blender.base-url=${BLENDER_BASE_URL}
flight.blender.ping-endpoint=/ping
flight.blender.declarations-endpoint=/flight_declaration_ops/flight_declaration

# Redis Configuration (for token caching)
# Note: REDIS_URL takes precedence if provided (format: rediss://host:port or redis://host:port)
# SSL is automatically detected from the URL scheme (rediss:// = SSL enabled)
spring.data.redis.host=${REDIS_HOST:localhost}
spring.data.redis.port=${REDIS_PORT:6379}
spring.data.redis.password=${REDIS_PASSWORD:}

# Cache Configuration
spring.cache.type=redis
spring.cache.redis.time-to-live=3500000

# Mapbox Configuration (for future phases)
mapbox.access-token=${MAPBOX_KEY}

# Logging
logging.level.com.flightspotlight=DEBUG
logging.level.org.springframework.security=DEBUG
logging.level.org.springframework.web=DEBUG
Binary file added java-frontend/.mvn/wrapper/maven-wrapper.jar
Binary file not shown.
2 changes: 2 additions & 0 deletions java-frontend/.mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
188 changes: 188 additions & 0 deletions java-frontend/mvnw.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

146 changes: 146 additions & 0 deletions java-frontend/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.0</version>
<relativePath/>
</parent>

<groupId>com.flightspotlight</groupId>
<artifactId>flight-spotlight-java</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>Flight Spotlight Java Frontend</name>
<description>Flight Spotlight frontend rebuilt in Java using Spring Boot and Vaadin</description>

<properties>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<vaadin.version>24.3.10</vaadin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-bom</artifactId>
<version>${vaadin.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<!-- Spring Boot Starters -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-oauth2-client</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-cache</artifactId>
</dependency>

<!-- Vaadin -->
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-spring-boot-starter</artifactId>
<version>${vaadin.version}</version>
</dependency>

<!-- WebClient for Flight Blender API calls -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>

<!-- Redis for token caching -->
<dependency>
<groupId>io.lettuce</groupId>
<artifactId>lettuce-core</artifactId>
</dependency>

<!-- Lombok (optional, for reducing boilerplate) -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>

<!-- Spring Boot DevTools (for development) -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>

<!-- Spring Boot Test -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>

<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.version}</version>
<executions>
<execution>
<goals>
<goal>prepare-frontend</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Loading