from flask import Blueprint, render_template
from modules.core.security import requires_app_auth
from config_loader import load_config

home_bp = Blueprint("home", __name__)
config = load_config()
API_BASE_URL = f"{config.app_base}:{config.service_port}"

@home_bp.route("/")
@requires_app_auth
def index():
    return render_template(
        "index.html",
        api_base_url=API_BASE_URL,
        config=config
    )