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¶
- The C++ backend constructs report layout using the AST module.
- It serializes the structure to JSON using RapidJSON.
- 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}]"
}
}
]
}