PHPReaction Frontend Report React
Summary
- What it is: The interface that renders a dashboard report: a grid of widgets (listing, summary, graph, gauge, HTML) fed by JSON templates and data-processor results.
- Goal: Store the widget as JSON props (not code) and render it with components that already live in this repo. No
.tsxin the DB, no build step per template change. See the reasoning in #123 . - Repository: phpreaction-frontend-report-react
- Primary users: Anyone viewing a KPI / dashboard report. Only new-style KPI reports (APIv3+) are supported.
How it works
A report is assembled from three CRUD records plus the JSON template:
- Template: the JSON that describes one widget (columns, headers, title, span). Stored in
template.source. - Widget: points at a data processor (the query) and carries the template
viewName. - Report: the container.
- Report / Widget link: puts a widget on a report.
The report page renders the template as an empty skeleton first, then populates it with the DP result. Filters are pulled from the widget’s metadata API at render time.
See:
- Template JSON schema: the format you write.
- Creating a report: the four API steps end to end.
Deployed environments
| Environment | URL |
|---|---|
| Development | https://{tenant}.dev.report.phpr.link |
| Staging | https://{tenant}.staging.report.phpr.link |
| Production | https://{tenant}.report.phpr.link |
Tenant-aware, e.g. demo1.dev.report.phpr.link. Render route: /[locale]/report/[id]/render.
Related links
Repo
Templates
Last updated on