Module Phase1_structure

Phase 1: Project Structure Verification This phase ensures that the MoneyWise project has all required directories and files before proceeding with further setup phases. This verification is critical because:

1. Missing core directories (backend/frontend) would prevent proper application setup 2. Missing setup scripts would break the automated installation process 3. Missing configuration files would lead to runtime errors

The verification checks for:

Note: Shell scripts are being migrated to OCaml, so we no longer check for the scripts directory or shell utilities.

type path_check_result = {
  1. path : string;
    (*

    Path being checked

    *)
  2. description : string;
    (*

    Human-readable description of the path

    *)
  3. exists : bool;
    (*

    Whether the path exists

    *)
  4. error_message : string option;
    (*

    Error message if path doesn't exist

    *)
}

Result of checking a single path (file or directory)

type structure_status = {
  1. total_checks : int;
    (*

    Total number of path checks performed

    *)
  2. passed_checks : int;
    (*

    Number of checks that passed

    *)
  3. failed_checks : int;
    (*

    Number of checks that failed

    *)
  4. results : path_check_result list;
    (*

    List of individual check results

    *)
}

Overall structure verification status

val create_empty_status : unit -> structure_status

Create an initial empty structure status

val check_single_path : string -> string -> string -> (string -> bool) -> path_check_result

Check a single path and return its result

Update structure status with a new check result

val display_structure_status : structure_status -> unit

Display the results of structure verification

val verify_project_structure : string -> Types.phase_result