Frontend communicates to backend. I am a developer of frontend and backend. I want to protect my app (prohibit end user from using my app without paying). The only thing I have in mind is to have some middle point, some my server. Frontend send some encoded request to my server, there request is being transformed in a form, that backend could understand. and only then backend can answer to frontend directly without my server as intermediary in communication chain. Client make request to my server, but get data directly from backend which is located on his side. I am not getting any private client information, but I have ability to protect app. Is it correct way? How it is usually done? Frontend - react app, backend - php.
Update:
My question in another words. I've created an app. It consits of two parts: frontend (React) and backend (Laravel). I would like to make it paid for end users. How it is usually done? Usually you put backend on some cloud server (Amazon for example), then users log in to your frontend and use your app (saas). Thus your app is good enough protected: backend is on server, to which only you have access. My app should be fully installed on client's server, both: frontend and backend. So the client can see backend code and frontend code. I need somehow to protect my app in such situation. Above I described my thoughs about how I could do it.