graph LR
Execution_Monitor["Execution Monitor"]
Data_Transformation_API["Data Transformation & API"]
Web_Server_Renderer["Web Server & Renderer"]
Browser_Frontend_External_["Browser Frontend (External)"]
Execution_Monitor -- "provides raw execution data to" --> Data_Transformation_API
Data_Transformation_API -- "supplies processed visualization data to" --> Web_Server_Renderer
Web_Server_Renderer -- "serves the web interface and data to" --> Browser_Frontend_External_
Browser_Frontend_External_ -- "requests visualization data and views from" --> Web_Server_Renderer
click Execution_Monitor href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/heartrate/Execution_Monitor.md" "Details"
click Data_Transformation_API href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/heartrate/Data_Transformation_API.md" "Details"
click Web_Server_Renderer href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/heartrate/Web_Server_Renderer.md" "Details"
The heartrate project is structured around a clear client-server architecture designed for real-time Python code visualization. The Execution Monitor acts as the core data source, intercepting and collecting raw execution traces. This raw data is then fed into the Data Transformation & API, which processes, enriches, and aggregates it into a format suitable for visualization. The Web Server & Renderer, built with Flask, serves as the backend API, hosting the web interface and delivering the processed data. Finally, the Browser Frontend (External), an external client-side component, consumes the served HTML, CSS, and JavaScript to render the interactive code visualization, completing the data flow from execution to user display.
Execution Monitor [Expand]
Intercepts Python execution, filters relevant files, and collects raw line-by-line execution data, acting as the primary data source.
Related Classes/Methods:
heartrate.core.trace_func:195-205heartrate.core.trace:64-216heartrate.files.all:5-6heartrate.files.path_contains:9-13heartrate.core.queuesheartrate.core.totals
Data Transformation & API [Expand]
Processes raw execution data, navigates stack frames, highlights code, and aggregates all necessary information for the web frontend, serving as the backend API for visualization data.
Related Classes/Methods:
heartrate.core.current_frame:150-151heartrate.core.frames_matching:153-158heartrate.core.highlight_python:34-39heartrate.core.highlight_ranges:223-255heartrate.core.highlight_python_and_ranges:42-46heartrate.core.highlight_stack_frame:49-61heartrate.core.file_table_context:99-144heartrate.core.stacktrace:160-182
Web Server & Renderer [Expand]
The Flask application responsible for hosting the web interface, serving static assets, routing HTTP requests, and rendering HTML views using processed data.
Related Classes/Methods:
The client-side web browser that consumes HTML, CSS, and JavaScript served by the Web Server & Renderer to display the interactive code visualization. As an external component, it does not have direct source code references within the heartrate project.
Related Classes/Methods: None