def setup_frontend(
    root: Path,
    disable_telemetry: bool = True,
):
    """Set up the frontend to run the app.

    Args:
        root: The root path of the project.
        disable_telemetry: Whether to disable the Next telemetry.
    """
    # Create the assets dir if it doesn't exist.
    path_ops.mkdir(constants.Dirs.APP_ASSETS)
    path_ops.copy_tree(
        src=str(root / constants.Dirs.APP_ASSETS),
        dest=str(root / prerequisites.get_web_dir() / constants.Dirs.PUBLIC),
        ignore=tuple(f"*.{ext}" for ext in constants.Reflex.STYLESHEETS_SUPPORTED),
    )

    # Set the environment variables in client (env.json).
    set_env_json()

    # update the last reflex run time.
    prerequisites.set_last_reflex_run_time()

    # Disable the Next telemetry.
    if disable_telemetry:
        processes.new_process(
            [
                *prerequisites.get_js_package_executor(raise_on_none=True)[0],
                "run",
                "next",
                "telemetry",
                "disable",
            ],
            cwd=prerequisites.get_web_dir(),
            stdout=subprocess.DEVNULL,
            shell=constants.IS_WINDOWS,
        )
Set up the frontend to run the app.

    Args:
        root: The root path of the project.
        disable_telemetry: Whether to disable the Next telemetry.
    
reflex/utils/build.py