# ===================================================================
# Spring Boot configuration.
#
# This configuration will be overridden by the Spring profile you use,
# for example application-dev.yml if you use the "dev" profile.
#
# More information on profiles: https://www.jhipster.tech/profiles/
# More information on configuration properties: https://www.jhipster.tech/common-application-properties/
# ===================================================================

# ===================================================================
# Standard Spring Boot properties.
# Full reference is available at:
# http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html
# ===================================================================

---
# Conditionally disable springdoc on missing api-docs profile
spring:
  config:
    activate:
      on-profile: '!api-docs'
springdoc:
  api-docs:
    enabled: false
---
management:
  endpoints:
    web:
      base-path: /management
      exposure:
        include:
          - configprops
          - env
          - health
          - info
          - jhimetrics
          - jhiopenapigroups
          - logfile
          - loggers
          - prometheus
          - threaddump
          - caches
          - liquibase
  endpoint:
    health:
      show-details: when_authorized
      roles: 'ROLE_ADMIN'
      probes:
        enabled: true
      group:
        liveness:
          include: livenessState
        readiness:
          include: readinessState,db
    jhimetrics:
      enabled: true
  info:
    git:
      mode: full
    env:
      enabled: true
  health:
    mail:
      enabled: false # When using the MailService, configure an SMTP server and set this to true
  prometheus:
    metrics:
      export:
        enabled: true
        step: 60
  observations:
    key-values:
      application: ${spring.application.name}
  metrics:
    enable:
      http: true
      jvm: true
      logback: true
      process: true
      system: true
    distribution:
      percentiles-histogram:
        all: true
      percentiles:
        all: 0, 0.5, 0.75, 0.95, 0.99, 1.0
    data:
      repository:
        autotime:
          enabled: true
    tags:
      application: ${spring.application.name}

spring:
  application:
    name: tarotAiChat
  docker:
    compose:
      enabled: false
      lifecycle-management: start-only
      file: src/main/docker/services.yml
  profiles:
    # The commented value for `active` can be replaced with valid Spring profiles to load.
    # Otherwise, it will be filled in by maven when building the JAR file
    # Either way, it can be overridden by `--spring.profiles.active` value passed in the commandline or `-Dspring.profiles.active` set in `JAVA_OPTS`
    active: '@spring.profiles.active@'
    group:
      dev:
        - dev
        - api-docs
        # Uncomment to activate TLS for the dev profile
        #- tls
  jmx:
    enabled: false
  data:
    jpa:
      repositories:
        bootstrap-mode: deferred
  jpa:
    open-in-view: false
    properties:
      hibernate.jdbc.time_zone: UTC
      hibernate.timezone.default_storage: NORMALIZE
      hibernate.type.preferred_instant_jdbc_type: TIMESTAMP
      hibernate.id.new_generator_mappings: true
      hibernate.connection.provider_disables_autocommit: true
      hibernate.cache.use_second_level_cache: true
      hibernate.cache.use_query_cache: false
      hibernate.generate_statistics: false
      # modify batch size as necessary
      hibernate.jdbc.batch_size: 25
      hibernate.order_inserts: true
      hibernate.order_updates: true
      hibernate.query.fail_on_pagination_over_collection_fetch: true
      hibernate.query.in_clause_parameter_padding: true
    hibernate:
      ddl-auto: none
      naming:
        physical-strategy: org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy
        implicit-strategy: org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy
  messages:
    basename: i18n/messages
  main:
    allow-bean-definition-overriding: true
  mvc:
    problemdetails:
      enabled: true
  security:
    oauth2:
      resourceserver:
        jwt:
          authority-prefix: ''
          authorities-claim-name: auth
  task:
    execution:
      thread-name-prefix: tarot-ai-chat-task-
      pool:
        core-size: 2
        max-size: 50
        queue-capacity: 10000
    scheduling:
      thread-name-prefix: tarot-ai-chat-scheduling-
      pool:
        size: 2
  thymeleaf:
    mode: HTML
  output:
    ansi:
      console-available: true

server:
  servlet:
    session:
      cookie:
        http-only: true

springdoc:
  show-actuator: true

# Properties to be exposed on the /info management endpoint
info:
  # Comma separated list of profiles that will trigger the ribbon to show
  display-ribbon-on-profiles: 'dev'

# ===================================================================
# JHipster specific properties
#
# Full reference is available at: https://www.jhipster.tech/common-application-properties/
# ===================================================================

jhipster:
  clientApp:
    name: 'tarotAiChatApp'
  # By default CORS is disabled. Uncomment to enable.
   cors:
     allowed-origins: "http://localhost:8100,http://localhost:9000,http://ellall44.com,http://app.ellall44.com"
     allowed-methods: "*"
     allowed-headers: "*"
     exposed-headers: "Authorization,Link,X-Total-Count,X-${jhipster.clientApp.name}-alert,X-${jhipster.clientApp.name}-error,X-${jhipster.clientApp.name}-params"
     allow-credentials: true
     max-age: 1800
  mail:
    from: tarotAiChat@localhost
  api-docs:
    default-include-pattern: /api/**
    management-include-pattern: /management/**
    title: Tarot Ai Chat API
    description: Tarot Ai Chat API documentation
    version: 0.0.1
    terms-of-service-url:
    contact-name:
    contact-url:
    contact-email:
    license: unlicensed
    license-url:
  security:

# jhipster-needle-add-application-yaml-document
---
# ===================================================================
# Application specific properties
# Add your own application properties here, see the ApplicationProperties class
# to have type-safe configuration, like in the JHipsterProperties above
#
# More documentation is available at:
# https://www.jhipster.tech/common-application-properties/
# ===================================================================

application:
  stripe:
    merchant-secret: sk_test_51Rlco5PHEyNqiYDUiwDhgFa2KOeiqzk7AKn5v7TdnQkOjEyjyluk3BfusCxTRuTrBBhw6gJIOEyHiEJRTTSelZee003Do6aiMw
    enabled: true
  twilio:
    account-sid: ACecea48597b686f22337790ac4210d73a
    auth-token: 3bd7b551e0bb9f910369744a5eb14175
    verify-service-sid: VA58bee20cc1cbfa524e08523d347b72d1
    enabled: true
  openrouter:
#    open router api key
#    api-key: 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
#    base-url: https://openrouter.ai/api/v1/
    enabled: false
#    model:
#      primary: google/gemini-2.0-flash-001 # Free tier model
#      fallback: deepseek/deepseek-v3-base:free # Fallback model
#    parameters:
#      temperature: 0.7
#      top-p: 1.0
#      max-tokens: 20000

    #    deep seek api key
#    api-key: sk-3a486d7cb8d34c16bb1b959d5c5e8cf2
#    base-url: https://api.deepseek.com/
#    model:
#      primary: deepseek-chat
#      fallback: deepseek-chat
#    parameters:
#          temperature: 0.7
#          top-p: 1.0
#          max-tokens: 8192  # the valid range of max_tokens is [1, 8192]

  gemini:
    api-key: AIzaSyBfs9wlFV30fKyNrW-IiejZwvZQZ3CjYHg
    enabled: true
    model:
      primary: gemini-2.5-flash
      fallback: gemini-2.0-flash
    parameters:
      temperature: 0.7
      max-tokens: 8192
      top-p: 0.9
      top-k: 40
