Files
archlens/docs/arch/lucy/lucy.html
Gabriel Kaszewski c4fb1ed699
All checks were successful
CI / Check / Test (push) Successful in 2m51s
Architecture Docs / Generate diagrams (push) Successful in 3m36s
fix: remove unused assignment and import warnings in tests
2026-06-17 10:34:56 +02:00

142 lines
33 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Architecture Diagram</title>
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: sans-serif; background: #1a1a2e; color: #eee; display: flex; height: 100vh; }
#sidebar { width: 280px; background: #16213e; padding: 1rem; overflow-y: auto; border-right: 1px solid #0f3460; }
#cy { flex: 1; }
h2 { color: #e94560; margin-bottom: 0.5rem; font-size: 1rem; }
#detail { padding: 0.5rem 0; font-size: 0.85rem; }
.member { padding: 2px 0; color: #aaa; }
</style>
</head>
<body>
<div id="sidebar">
<h2>Architecture Diagram</h2>
<div id="detail"><p>Click a node to see details.</p></div>
</div>
<div id="cy"></div>
<script>
const GRAPH = {"nodes":[{"id":"n0","label":"AissEventType","module":"Aiss_worker","kind":"Class","fields":[],"methods":[]},{"id":"n1","label":"WidgetJobData","module":"Aiss_worker","kind":"Class","fields":[],"methods":[]},{"id":"n2","label":"JobLookupResult","module":"Aiss_worker","kind":"Class","fields":[],"methods":[]},{"id":"n3","label":"_BaseModel","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n4","label":"KeycloakOauthConfig","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n5","label":"AissClientConfig","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n6","label":"AissMessage","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n7","label":"AissDuplicateMessage","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n8","label":"AissReopenedMessage","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n9","label":"AissGenericMessage","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n10","label":"Audience","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n11","label":"AudienceComplex","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n12","label":"AissEventTypeEnum","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n13","label":"AissClient","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n14","label":"DtoBaseModel","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n15","label":"AudienceInsightsApiClientConfig","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n16","label":"Age","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n17","label":"Gad","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n18","label":"GlobalAudienceDefinition","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n19","label":"GlobalAudienceData","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n20","label":"Audience","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n21","label":"Project","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n22","label":"AudienceInsightsApiError","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n23","label":"AudienceInsightsApiClient","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n24","label":"AsyncAudienceInsightsApiClient","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n25","label":"AudienceBuilderNotFoundError","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n26","label":"AudienceBuilderNotReadyException","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n27","label":"AudienceOriginNotFoundError","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n28","label":"AudienceOriginError","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n29","label":"AudienceOriginNotReadyException","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n30","label":"EmptyDataException","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n31","label":"PendingDataException","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n32","label":"ExternalApiError","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n33","label":"ApiTimeoutError","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n34","label":"AudienceOriginApiError","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n35","label":"AissAudienceNotReadyException","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n36","label":"FacadeApiClientError","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n37","label":"MarketFetchFailedError","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n38","label":"InvalidMarketResponseError","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n39","label":"AudienceOriginApiClientConfig","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n40","label":"AudienceOriginApiClient","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n41","label":"GoogleApiClientConfig","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n42","label":"DtoBaseModel","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n43","label":"GoogleValue","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n44","label":"GoogleAttributeDto","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n45","label":"InterestsDto","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n46","label":"PassionAndHabitsDto","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n47","label":"ActivelyResearchedDto","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n48","label":"GoogleApiClient","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n49","label":"DtoBaseModel","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n50","label":"AudienceBuilderApiClientConfig","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n51","label":"GeoregionsRequestDto","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n52","label":"DataPoint","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n53","label":"AudienceInsightDto","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n54","label":"DistributionDto","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n55","label":"GeoregionsResponseDto","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n56","label":"AudienceBuilderApiClient","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n57","label":"FacadeApiClientConfig","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n58","label":"FacadeApiClient","module":"Commons","kind":"Class","fields":[],"methods":["+get_market_country_code(md_id: str) -> str"]},{"id":"n59","label":"ImageConverterApiConfig","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n60","label":"ImageConverterApiClient","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n61","label":"AssetNotFound","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n62","label":"FileProvider","module":"Commons","kind":"Class","fields":[],"methods":["+get_asset(file_path: str) -> tuple[bytes, str]","+upload_file(file_bytes: bytes, target_path: str) -> str","+generate_unique_path(directory: str, content_type: str | None) -> str","+copy_file(source_path: str, destination_path: str) -> str"]},{"id":"n63","label":"GCSFileProvider","module":"Commons","kind":"Class","fields":[],"methods":["+get_asset(file_path: str) -> tuple[bytes, str]","+upload_file(file_bytes: bytes, target_path: str) -> str","+generate_unique_path(directory: str, content_type: str | None) -> str","+copy_file(source_path: str, destination_path: str) -> str"]},{"id":"n64","label":"LocalFileProvider","module":"Commons","kind":"Class","fields":[],"methods":["+get_asset(file_path: str) -> tuple[bytes, str]","+upload_file(file_bytes: bytes, target_path: str) -> str","+generate_unique_path(directory: str, content_type: str | None) -> str","+copy_file(source_path: str, destination_path: str) -> str"]},{"id":"n65","label":"WorkerErrorCode","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n66","label":"WidgetStatus","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n67","label":"WidgetType","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n68","label":"JobEventType","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n69","label":"GooglePubSubEmitter","module":"Commons","kind":"Class","fields":[],"methods":["+emit(event: DomainEvent) -> None"]},{"id":"n70","label":"DomainEvent","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n71","label":"EventEmitter","module":"Commons","kind":"Class","fields":[],"methods":["+emit(event: DomainEvent) -> None"]},{"id":"n72","label":"BackendEventMessage","module":"Commons","kind":"Class","fields":[],"methods":[]},{"id":"n73","label":"ContextFilter","module":"Worker","kind":"Class","fields":[],"methods":["+filter(record: logging.LogRecord) -> bool"]},{"id":"n74","label":"JobContext","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n75","label":"VertexAIError","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n76","label":"VertexAIRateLimitError","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n77","label":"VertexAIServerError","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n78","label":"JobNotFoundError","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n79","label":"SummaryNotGeneratedError","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n80","label":"WidgetNotGeneratedError","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n81","label":"CountryCodeMissingError","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n82","label":"JobWasCancelled","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n83","label":"PublishedJobCannotBeModifiedError","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n84","label":"PromptNotFoundError","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n85","label":"PromptProvider","module":"Worker","kind":"Class","fields":[],"methods":["+get_prompt_template(prompt_name: str) -> dict"]},{"id":"n86","label":"GCSPromptProvider","module":"Worker","kind":"Class","fields":[],"methods":["+get_prompt_template(prompt_name: str) -> dict"]},{"id":"n87","label":"LocalFilePromptProvider","module":"Worker","kind":"Class","fields":[],"methods":["+get_prompt_template(prompt_name: str) -> dict"]},{"id":"n88","label":"StepType","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n89","label":"PromptMetadata","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n90","label":"PromptExample","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n91","label":"PromptStructure","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n92","label":"SummaryPromptSchema","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n93","label":"GenderRuleAction","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n94","label":"GenderRules","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n95","label":"PostProcessing","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n96","label":"MarketSpecificRuleConfig","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n97","label":"MarketSpecificRules","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n98","label":"PersonaGenerationStep","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n99","label":"ContextSettingStep","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n100","label":"GenerationStep","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n101","label":"PersonaGenerationFlowSchema","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n102","label":"CachedPromptProvider","module":"Worker","kind":"Class","fields":[],"methods":["+get_prompt_template(prompt_name: str) -> dict"]},{"id":"n103","label":"ProcessingStatus","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n104","label":"PromptDataPoint","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n105","label":"AdmSummaryService","module":"Worker","kind":"Class","fields":[],"methods":["+generate_adm_demographics_summary_sync(audience_id: UUID, workspace_id: UUID) -> Optional[str]","+generate_adm_media_summary_sync(audience_id: UUID, workspace_id: UUID) -> Optional[str]"]},{"id":"n106","label":"ImagePipeline","module":"Worker","kind":"Class","fields":[],"methods":["+run(initial_image_bytes: bytes, initial_content_type: str) -> ImageOperationResult"]},{"id":"n107","label":"JobNotFoundError","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n108","label":"ImagePolicyViolationError","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n109","label":"NoAudiencesToGenerateError","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n110","label":"ImageTools","module":"Worker","kind":"Class","fields":[],"methods":["+create_image_with_black_rectangle_as_mask(image_width: int, image_height: int, rect_width: int, rect_height: int, left_padding: int, top_padding: int) -> bytes","+has_person_in_outpainted_areas(image_bytes: bytes, original_width: int, total_width: int) -> bool","+has_letter_like_shapes_in_outpainted_areas(image_bytes: bytes, original_width: int, total_width: int) -> bool","+has_sharp_vertical_separation_in_outpainted_areas(image_bytes: bytes, original_width: int, total_width: int) -> bool","+outpainted_image_with_size(image: bytes, desired_width: int) -> bytes","+resize_image_bytes(image_bytes: bytes, width: int, height: int) -> bytes","+has_white_vertical_strips(image_bytes: bytes) -> bool","+crop_remove_bottom_bytes(image_bytes: bytes, pixels_to_remove: int) -> bytes","+get_nose_x_mediapipe(image_bytes: bytes) -> int | None","+crop_image_to_width_centered_at_x(image_bytes: bytes, desired_center: int, final_width: int) -> bytes","+blur_background(image_bytes: bytes, segmentation_model_path: str, face_model_path: str) -> bytes"]},{"id":"n111","label":"ImageProcessor","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n112","label":"Gender","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n113","label":"PersonaUtils","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n114","label":"PersonaPrompt","module":"Worker","kind":"Class","fields":[],"methods":["+extract_items_with_name(data: dict[str, any], target_names: str) -> list[dict[str, any]]","+get_top_n(data: list[dict[str, any]], extracted_value: str, field_number: int) -> str","+extract_max_percentages(data: list[dict[str, any]], field_number: int) -> list[tuple[float, float, str]]","+generate_prompt(welcome_prompt: str, group_data: list[tuple[str, float]]) -> str","+create_subprompts() -> tuple[str, str, str, str, str, str, str, str, str, str, str, str, str]","+create_prompt_and_extract_gender() -> tuple[str, str]"]},{"id":"n115","label":"PersonaPromptAOBased","module":"Worker","kind":"Class","fields":[],"methods":["+generate_persona(market_name: str, population_segment_list: list, user_prompt: str | None) -> dict"]},{"id":"n116","label":"AdmAudienceGenerator","module":"Worker","kind":"Class","fields":[],"methods":["+generate_persona()"]},{"id":"n117","label":"ImageStorage","module":"Worker","kind":"Class","fields":[],"methods":["+upload_persona_images(job_id: UUID, persona_id: UUID, original_image: ImageOperationResult, final_image: ImageOperationResult) -> str","+upload_avatar(job_id: UUID, persona_id: UUID, avatar_image: ImageOperationResult) -> str"]},{"id":"n118","label":"PersonaImageStorage","module":"Worker","kind":"Class","fields":[],"methods":["+upload_persona_images(job_id: UUID, persona_id: UUID, original_image: ImageOperationResult, final_image: ImageOperationResult) -> str","+upload_avatar(job_id: UUID, persona_id: UUID, avatar_image: ImageOperationResult) -> str"]},{"id":"n119","label":"ImageOperation","module":"Worker","kind":"Class","fields":[],"methods":["+execute(result: ImageOperationResult) -> ImageOperationResult"]},{"id":"n120","label":"ResizeOperation","module":"Worker","kind":"Class","fields":[],"methods":["+execute(result: ImageOperationResult) -> ImageOperationResult"]},{"id":"n121","label":"ComplexImageOperation","module":"Worker","kind":"Class","fields":[],"methods":["+execute(result: ImageOperationResult) -> ImageOperationResult"]},{"id":"n122","label":"AlphaPostProcessingStep","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n123","label":"_GentleEdgeCleanup","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n124","label":"_SmoothAlpha","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n125","label":"FeatureDetectionOperation","module":"Worker","kind":"Class","fields":[],"methods":["+execute(result: ImageOperationResult) -> ImageOperationResult"]},{"id":"n126","label":"OptimizingOperation","module":"Worker","kind":"Class","fields":[],"methods":["+execute(result: ImageOperationResult) -> ImageOperationResult"]},{"id":"n127","label":"PersonaFlowRunner","module":"Worker","kind":"Class","fields":[],"methods":["+run_flow(flow_name: str, initial_context: dict) -> dict"]},{"id":"n128","label":"StorageType","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n129","label":"PromptProviderType","module":"Worker","kind":"Class","fields":[],"methods":[]},{"id":"n130","label":"JobNotificationService","module":"Worker","kind":"Class","fields":[],"methods":["+notify_job_started(audience_id: UUID, widget_type: WidgetType) -> None","+notify_widget_generated(audience_id: UUID, widget_type: WidgetType, widget_data: dict[str, Any]) -> None","+notify_job_published(audience_id: UUID, widget_type: WidgetType) -> None","+notify_job_empty(audience_id: UUID, widget_type: WidgetType) -> None","+notify_job_changed(audience_id: UUID, status: WidgetStatus, extras: dict) -> None","+notify_job_failure(audience_id: UUID, error_message: str, widget_type: WidgetType) -> None"]},{"id":"n131","label":"DtoBaseModel","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n132","label":"WidgetJob","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n133","label":"AudienceData","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n134","label":"PersonaWidget","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n135","label":"SummaryWidgetMixin","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n136","label":"DemographicsSummaryWidget","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n137","label":"MediaConsumptionSummaryWidget","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n138","label":"Base","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n139","label":"WidgetStatus","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n140","label":"PersonaWidgetDescription","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n141","label":"PersonaWidgetData","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n142","label":"PersonaWidgetOut","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n143","label":"DemographicsSummaryWidgetData","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n144","label":"DemographicsSummaryWidgetOut","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n145","label":"MediaConsumptionSummaryWidgetData","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n146","label":"MediaConsumptionSummaryWidgetOut","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n147","label":"UpdateSummaryWidgetIn","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n148","label":"UpdatePersonaWidgetIn","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n149","label":"WidgetApiError","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n150","label":"CountryCodeMissingError","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n151","label":"WidgetServiceError","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n152","label":"InvalidFileTypeError","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n153","label":"FileTooLargeError","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n154","label":"PersonaNotFoundError","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n155","label":"AudiencePublishedError","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n156","label":"WidgetNotFoundError","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n157","label":"NoOriginalDataError","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n158","label":"ImageProcessingError","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n159","label":"AssetNotFound","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n160","label":"FileProvider","module":"Api","kind":"Class","fields":[],"methods":["+get_asset(file_path: str) -> tuple[bytes, str]","+upload_file(directory: str, file_bytes: bytes, content_type: str | None) -> str"]},{"id":"n161","label":"GCSFileProvider","module":"Api","kind":"Class","fields":[],"methods":["+get_asset(file_path: str) -> tuple[bytes, str]","+upload_file(directory: str, file_bytes: bytes, content_type: str | None) -> str"]},{"id":"n162","label":"WidgetAction","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n163","label":"MarketCodeOut","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n164","label":"PersonaImageOut","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n165","label":"ProjectPersonasOut","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n166","label":"WidgetEndpointConfig","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n167","label":"ApiStatus","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n168","label":"ApiResponse","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n169","label":"UploadErrorCode","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n170","label":"WidgetImageUploadService","module":"Api","kind":"Class","fields":[],"methods":["+validate(file_bytes: bytes, content_type: str | None) -> None","+upload(file_provider: FileProvider, file_bytes: bytes, content_type: str | None, directory: str) -> str"]},{"id":"n171","label":"WidgetDataSource","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n172","label":"PersonaWidgetService","module":"Api","kind":"Class","fields":[],"methods":["+get_persona_for_audience() -> tuple[Optional[WidgetJob], Optional[PersonaWidget]]","+update_persona_widget(update_data: UpdatePersonaWidgetIn) -> tuple[WidgetJob, PersonaWidget]","+upload_custom_image(file_provider: FileProvider, upload_service: WidgetImageUploadService, file: UploadFile, content_type: str | None) -> tuple[WidgetJob, PersonaWidget]","+restore_persona_widget() -> tuple[WidgetJob, PersonaWidget]","+restore_persona_image() -> None","+regenerate_persona_widget() -> None","+get_persona_image_url() -> str"]},{"id":"n173","label":"BaseWidgetLogic","module":"Api","kind":"Class","fields":[],"methods":["+fetch_latest_widget_for_update(widget_model: type) -> tuple[Optional[WidgetJob], Any]","+get_latest_job() -> Optional[WidgetJob]","+fetch_widget_by_job(job: Optional[WidgetJob], widget_model: type) -> Any","+update_widget_fields(widget, update_data: UpdateSummaryWidgetIn)","+update_job_status(status: WidgetStatus) -> WidgetJob","+upload_image(upload_service: WidgetImageUploadService, file_provider: FileProvider, file_bytes: bytes, content_type: str | None, widget_model: type) -> tuple[WidgetJob, Any]","+restore_widget(widget_model: type) -> tuple[WidgetJob, Any]","+restore_image(widget_model: type) -> None"]},{"id":"n174","label":"ProjectPersonaService","module":"Api","kind":"Class","fields":[],"methods":["+get_personas_for_project(project_id: UUID) -> ProjectPersonasOut"]},{"id":"n175","label":"ImageProcessingService","module":"Api","kind":"Class","fields":[],"methods":["+convert_to_png(image_bytes: bytes) -> bytes"]},{"id":"n176","label":"FileProviderType","module":"Api","kind":"Class","fields":[],"methods":[]},{"id":"n177","label":"Settings","module":"Api","kind":"Class","fields":[],"methods":[]}],"edges":[{"source":"n1","target":"n67","kind":"Composition"},{"source":"n1","target":"n139","kind":"Composition"},{"source":"n5","target":"n4","kind":"Composition"},{"source":"n6","target":"n3","kind":"Inheritance"},{"source":"n7","target":"n6","kind":"Inheritance"},{"source":"n8","target":"n6","kind":"Inheritance"},{"source":"n9","target":"n6","kind":"Inheritance"},{"source":"n20","target":"n3","kind":"Inheritance"},{"source":"n11","target":"n20","kind":"Inheritance"},{"source":"n13","target":"n5","kind":"Composition"},{"source":"n13","target":"n5","kind":"Composition"},{"source":"n18","target":"n49","kind":"Inheritance"},{"source":"n18","target":"n17","kind":"Composition"},{"source":"n20","target":"n49","kind":"Inheritance"},{"source":"n21","target":"n49","kind":"Inheritance"},{"source":"n23","target":"n15","kind":"Composition"},{"source":"n24","target":"n15","kind":"Composition"},{"source":"n34","target":"n32","kind":"Inheritance"},{"source":"n37","target":"n36","kind":"Inheritance"},{"source":"n38","target":"n36","kind":"Inheritance"},{"source":"n40","target":"n39","kind":"Composition"},{"source":"n43","target":"n49","kind":"Inheritance"},{"source":"n44","target":"n49","kind":"Inheritance"},{"source":"n44","target":"n43","kind":"Composition"},{"source":"n45","target":"n49","kind":"Inheritance"},{"source":"n46","target":"n49","kind":"Inheritance"},{"source":"n47","target":"n49","kind":"Inheritance"},{"source":"n48","target":"n41","kind":"Composition"},{"source":"n51","target":"n49","kind":"Inheritance"},{"source":"n52","target":"n49","kind":"Inheritance"},{"source":"n53","target":"n49","kind":"Inheritance"},{"source":"n54","target":"n49","kind":"Inheritance"},{"source":"n55","target":"n49","kind":"Inheritance"},{"source":"n56","target":"n50","kind":"Composition"},{"source":"n58","target":"n57","kind":"Composition"},{"source":"n60","target":"n59","kind":"Composition"},{"source":"n69","target":"n71","kind":"Inheritance"},{"source":"n76","target":"n75","kind":"Inheritance"},{"source":"n77","target":"n75","kind":"Inheritance"},{"source":"n92","target":"n89","kind":"Composition"},{"source":"n92","target":"n91","kind":"Composition"},{"source":"n98","target":"n88","kind":"Composition"},{"source":"n99","target":"n98","kind":"Inheritance"},{"source":"n99","target":"n88","kind":"Composition"},{"source":"n100","target":"n98","kind":"Inheritance"},{"source":"n100","target":"n88","kind":"Composition"},{"source":"n101","target":"n89","kind":"Composition"},{"source":"n102","target":"n85","kind":"Composition"},{"source":"n111","target":"n110","kind":"Inheritance"},{"source":"n114","target":"n113","kind":"Inheritance"},{"source":"n115","target":"n113","kind":"Inheritance"},{"source":"n116","target":"n113","kind":"Inheritance"},{"source":"n116","target":"n85","kind":"Composition"},{"source":"n116","target":"n85","kind":"Composition"},{"source":"n118","target":"n160","kind":"Composition"},{"source":"n126","target":"n60","kind":"Composition"},{"source":"n127","target":"n85","kind":"Composition"},{"source":"n130","target":"n71","kind":"Composition"},{"source":"n132","target":"n138","kind":"Inheritance"},{"source":"n132","target":"n139","kind":"Composition"},{"source":"n132","target":"n67","kind":"Composition"},{"source":"n133","target":"n138","kind":"Inheritance"},{"source":"n134","target":"n138","kind":"Inheritance"},{"source":"n136","target":"n135","kind":"Inheritance"},{"source":"n136","target":"n138","kind":"Inheritance"},{"source":"n137","target":"n135","kind":"Inheritance"},{"source":"n137","target":"n138","kind":"Inheritance"},{"source":"n140","target":"n131","kind":"Inheritance"},{"source":"n141","target":"n131","kind":"Inheritance"},{"source":"n141","target":"n140","kind":"Composition"},{"source":"n142","target":"n131","kind":"Inheritance"},{"source":"n142","target":"n139","kind":"Composition"},{"source":"n143","target":"n131","kind":"Inheritance"},{"source":"n144","target":"n131","kind":"Inheritance"},{"source":"n144","target":"n139","kind":"Composition"},{"source":"n145","target":"n131","kind":"Inheritance"},{"source":"n146","target":"n131","kind":"Inheritance"},{"source":"n146","target":"n139","kind":"Composition"},{"source":"n147","target":"n131","kind":"Inheritance"},{"source":"n148","target":"n131","kind":"Inheritance"},{"source":"n152","target":"n151","kind":"Inheritance"},{"source":"n153","target":"n151","kind":"Inheritance"},{"source":"n154","target":"n151","kind":"Inheritance"},{"source":"n155","target":"n151","kind":"Inheritance"},{"source":"n156","target":"n151","kind":"Inheritance"},{"source":"n157","target":"n151","kind":"Inheritance"},{"source":"n158","target":"n151","kind":"Inheritance"},{"source":"n161","target":"n160","kind":"Inheritance"},{"source":"n163","target":"n131","kind":"Inheritance"},{"source":"n165","target":"n131","kind":"Inheritance"},{"source":"n166","target":"n67","kind":"Composition"},{"source":"n168","target":"n131","kind":"Inheritance"},{"source":"n168","target":"n167","kind":"Composition"},{"source":"n173","target":"n67","kind":"Composition"},{"source":"n177","target":"n176","kind":"Composition"}]};
// Inline minimal Cytoscape-compatible renderer using Canvas API
(function() {
const canvas = document.createElement('canvas');
const container = document.getElementById('cy');
canvas.style.width = '100%';
canvas.style.height = '100%';
container.appendChild(canvas);
const detail = document.getElementById('detail');
function resize() {
canvas.width = container.clientWidth;
canvas.height = container.clientHeight;
draw();
}
// Group nodes by module
const modules = {};
GRAPH.nodes.forEach(n => {
const m = n.module || '(ungrouped)';
if (!modules[m]) modules[m] = [];
modules[m].push(n);
});
// Layout: arrange modules in a grid, nodes within each module in a column
const positions = {};
const modNames = Object.keys(modules);
const cols = Math.ceil(Math.sqrt(modNames.length));
const cellW = 220, cellH = 200, pad = 60;
modNames.forEach((mod, mi) => {
const col = mi % cols, row = Math.floor(mi / cols);
const bx = pad + col * (cellW + pad);
const by = pad + row * (cellH + pad);
modules[mod].forEach((n, ni) => {
positions[n.id] = {
x: bx + 20 + (ni % 2) * 90,
y: by + 30 + Math.floor(ni / 2) * 50
};
});
});
let selected = null;
const nodeRadius = 18;
function draw() {
const ctx = canvas.getContext('2d');
ctx.clearRect(0, 0, canvas.width, canvas.height);
// Draw module backgrounds
modNames.forEach((mod, mi) => {
const col = mi % cols, row = Math.floor(mi / cols);
const bx = pad / 2 + col * (cellW + pad);
const by = pad / 2 + row * (cellH + pad);
ctx.fillStyle = 'rgba(15,52,96,0.4)';
ctx.fillRect(bx, by, cellW + pad / 2, cellH + pad / 2);
ctx.fillStyle = '#4fc3f7';
ctx.font = '11px sans-serif';
ctx.fillText(mod, bx + 6, by + 14);
});
// Draw edges
GRAPH.edges.forEach(e => {
const sp = positions[e.source], tp = positions[e.target];
if (!sp || !tp) return;
ctx.strokeStyle = e.kind === 'Inheritance' ? '#e94560' : '#aaa';
ctx.lineWidth = 1;
ctx.beginPath();
ctx.moveTo(sp.x, sp.y);
ctx.lineTo(tp.x, tp.y);
ctx.stroke();
});
// Draw nodes
GRAPH.nodes.forEach(n => {
const p = positions[n.id];
if (!p) return;
ctx.fillStyle = selected && selected.id === n.id ? '#e94560' : '#0f3460';
ctx.beginPath();
ctx.arc(p.x, p.y, nodeRadius, 0, Math.PI * 2);
ctx.fill();
ctx.fillStyle = '#eee';
ctx.font = '10px sans-serif';
ctx.textAlign = 'center';
ctx.fillText(n.label.substring(0, 12), p.x, p.y + 4);
});
}
canvas.addEventListener('click', e => {
const rect = canvas.getBoundingClientRect();
const mx = e.clientX - rect.left, my = e.clientY - rect.top;
selected = null;
for (const n of GRAPH.nodes) {
const p = positions[n.id];
if (!p) continue;
const dx = mx - p.x, dy = my - p.y;
if (dx * dx + dy * dy < nodeRadius * nodeRadius) {
selected = n;
break;
}
}
if (selected) {
detail.innerHTML = `<strong>${selected.label}</strong><br><em>${selected.module}</em>` +
(selected.fields.length ? '<br><b>Fields:</b><br>' + selected.fields.map(f => `<div class="member">${f}</div>`).join('') : '') +
(selected.methods.length ? '<br><b>Methods:</b><br>' + selected.methods.map(m => `<div class="member">${m}</div>`).join('') : '');
} else {
detail.innerHTML = '<p>Click a node to see details.</p>';
}
draw();
});
window.addEventListener('resize', resize);
resize();
})();
</script>
</body>
</html>