def METHOD_NAME(
    backend: BackendApp, app_cls: Type[BackendQuartTrio] = BackendQuartTrio
) -> BackendQuartTrio:
    app = app_cls(
        __name__,
        static_folder="../static",
        static_url_path="/static",
        template_folder="templates",
    )
    app.config["MAX_CONTENT_LENGTH"] = MAX_CONTENT_LENGTH
    app.jinja_options = JINJA_ENV_CONFIG  # Overload config
    app.backend = backend
    app.register_blueprint(administration_bp)
    app.register_blueprint(redirect_bp)
    app.register_blueprint(rpc_bp)
    app.register_blueprint(ws_bp)
    # Do https redirection if incoming request doesn't follow forward proto rules
    if backend.config.forward_proto_enforce_https:
        header_key, header_expected_value = backend.config.forward_proto_enforce_https
        @app.before_request
        def redirect_unsecure() -> ResponseReturnValue | None:  # type: ignore[misc]
            header_value = request.headers.get(header_key)
            # If redirection header match and protocol match, then no need for a redirection.
            if header_value is not None and header_value != header_expected_value:
                if request.url.startswith("http://"):
                    return quart_redirect(request.url.replace("http://", "https://", 1), code=301)
            return None
    @app.route("/", methods=["GET"])
    async def root() -> Any:  # type: ignore[misc]
        return await render_template("index.html")
    @app.errorhandler(404)
    async def page_not_found(e: Any) -> Any:  # type: ignore[misc]
        return await render_template("404.html"), 404
    return app