package de.effigenix;

import de.effigenix.infrastructure.config.DatabaseProfileInitializer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * Main Application Class for Effigenix ERP System.
 *
 * Architecture: DDD + Clean Architecture
 * - Domain Layer: Pure business logic, no framework dependencies
 * - Application Layer: Use Cases (Transaction Script pattern for Generic Subdomains)
 * - Infrastructure Layer: Spring, JPA, Security, REST
 * - Shared Kernel: Cross-cutting concerns (AuthorizationPort, Result, etc.)
 */
@SpringBootApplication
@EnableAsync
@EnableScheduling
public class EffigenixApplication {

    public static void main(String[] args) {
        var app = new SpringApplication(EffigenixApplication.class);
        app.addInitializers(new DatabaseProfileInitializer());
        app.run(args);
    }
}
