How to protect the calculator for calculating the cost of building a pool from downloading on the site?

  • 0
    Good afternoon, I would like to know the current topic. I have never done such a thing, so I want to understand what the correct architecture looks like.

    Have an idea - & gt; a website for the construction of pools and a calculator that will give the final cost based on a sample of 8-10 constants and variables that will be entered into the input or selected from the proposed drop-down list.

    Question: I will write the calculator in JS. How are these calculators usually protected? So that no one can download a js file and get a calculator for themselves. How do you write such small calculators correctly?

    If there is an example for such calculators, and an example of their development, I will be very grateful.
    JavaScript Anonymous, May 18, 2020

  • 4 Answers
  • 0
    No way. Dot. Forget about any means of protecting your code front. If they want it, they will steal it. You can make the code less readable, add a lot of water, but nothing will give any guarantees. We steal the wallet js code and made a modified copy. And the reason is simple - all the executable code comes to the client on the PC and then remains with him. But don't worry, your logic is so basic that writing it will be easier than pressing ctrl + s.



    Well, right, if you think that your efforts have surrendered to someone - do it through the backend, the calculation time will grow, but for that your certainly expensive and complex code will not be stolen
    Anonymous

  • 0
    Obfuscation

    P.S. Well, if possible, transfer the functionality to the backend, no one will get it there.
    Anonymous

  • 0
    It is better, of course, to write a calculator in php and place it as a northern script.
    Anonymous

  • 0
    If we are talking about protecting your code, then execute it on the server (NodeJS).
    Anonymous

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!