What is the best way to implement dynamic template-based calculation and HTML rendering in Job Card

Hi Everyone,

I am trying to design a dynamic calculation + rendering mechanism in Frappe Framework / ERP Next and would appreciate guidance on the best approach.

Requirement:

I need a system where:

  • Different Job Cards can have different inputs (e.g., - length, width, rate, logic, etc.,)
  • Based on those inputs, a template-driven calculation runs
  • The result is then rendered as formatted HTML
  • The output should update automatically when inputs change
  • Each document should maintain its own calculated output.

In case - we introduce individual and respective Jinja template at routing side; would it be heavy on app side for rendering aspects? kindly share opinions. Any other best practice?