#pragma once #include #include #include struct RegistryStats { int total_functions = 0; int total_types = 0; int total_apps = 0; int total_analysis = 0; int total_unit_tests = 0; int total_proposals = 0; int tested_functions = 0; int pure_functions = 0; int impure_functions = 0; }; struct LangCount { std::string lang; int count = 0; }; struct DomainCount { std::string domain; int count = 0; }; struct KindCount { std::string kind; int count = 0; }; struct DateCount { std::string date; // YYYY-MM-DD int count = 0; }; struct FunctionRow { std::string id; std::string name; std::string lang; std::string domain; std::string kind; std::string purity; std::string description; std::string created_at; bool tested = false; }; struct AppRow { std::string id; std::string name; std::string lang; std::string domain; std::string description; std::string framework; }; struct AnalysisRow { std::string id; std::string name; std::string domain; std::string description; }; struct TypeRow { std::string id; std::string name; std::string lang; std::string domain; std::string algebraic; std::string description; }; // All data loaded from registry.db in one shot struct RegistryData { RegistryStats stats; std::vector by_lang; std::vector by_domain; std::vector by_kind; std::vector by_date; // last 30 days std::vector recent_funcs; // last 20 std::vector apps; std::vector analyses; std::vector types; // For chart data (populated by prepare_chart_data) std::vector lang_labels; std::vector lang_values; std::vector domain_labels; std::vector domain_values; std::vector kind_labels; std::vector kind_values; std::vector date_labels; std::vector date_values; void prepare_chart_data(); }; // Load all data from registry.db. Returns true on success. bool load_registry_data(const char* db_path, RegistryData& out);