package dev.lions.unionflow.server;

import io.quarkus.runtime.Quarkus;
import io.quarkus.runtime.QuarkusApplication;
import io.quarkus.runtime.annotations.QuarkusMain;
import jakarta.enterprise.context.ApplicationScoped;
import org.jboss.logging.Logger;

/**
 * Application principale UnionFlow Server
 *
 * @author Lions Dev Team
 * @version 1.0.0
 */
@QuarkusMain
@ApplicationScoped
public class UnionFlowServerApplication implements QuarkusApplication {

  private static final Logger LOG = Logger.getLogger(UnionFlowServerApplication.class);

  public static void main(String... args) {
    Quarkus.run(UnionFlowServerApplication.class, args);
  }

  @Override
  public int run(String... args) throws Exception {
    LOG.info("🚀 UnionFlow Server démarré avec succès!");
    LOG.info("📊 API disponible sur http://localhost:8080");
    LOG.info("📖 Documentation OpenAPI sur http://localhost:8080/q/swagger-ui");
    LOG.info("💚 Health check sur http://localhost:8080/health");

    Quarkus.waitForExit();
    return 0;
  }
}
