Hi everyone,
I’m working on integrating a Frappe backend with a React frontend, and I’m exploring the best approach to serve real-time reports from Frappe into the React UI.
What I have in mind:
- I want to fetch report data (possibly based on
frappe.desk.query_report.run
) and display it in React. - The data should update in near real-time when relevant changes occur (new records, updates, etc.).
- I’m okay using WebSockets, polling, or other pub-sub strategies—whatever is idiomatic for Frappe.
Questions:
- Is there a recommended pattern to expose report data via a REST or WebSocket API in Frappe?
- Can
frappe.publish_realtime
orfrappe.realtime
be used to push updates from reports? - How would you structure this if the report logic is complex and involves custom server-side filters?
Bonus points if anyone has experience syncing this kind of setup with a frontend state management solution (like Redux, Zustand, etc.).
Any guidance, examples, or pitfalls to avoid would be much appreciated!
Thanks in advance!