Skip to content

Architecture Overview

The AST Reporting Protocol bridges C++ server-side logic and ReactJS client rendering.

System Diagram

graph LR
A[C++ Server] -->|Builds JSON AST| B[ReactJS SPA]
B -->|Renders via| C[Recharts + HTML]
C --> D[Interactive Report]

Flow

  1. The C++ backend constructs report layout using the AST module.
  2. It serializes the structure to JSON using RapidJSON.
  3. The ReactJS SPA dynamically renders it as charts and tables.

Example JSON Markup

{
  "type": "ResponsiveContainer",
  "props": { "width": "100%", "height": "300" },
  "children": [
    {
      "type": "LineChart",
      "props": {
        "data": "[{\"day\":\"Mon\",\"value\":12},{\"day\":\"Tue\",\"value\":18}]"
      }
    }
  ]
}