walter44's avatar

Help needed with React project build structure

I want to build a react application in such a way that only specific modules will be built and deployed within the application.

For example, there can be 3 different modules, A, B and C, but when i build and deploy the application for one client, it will contain only module A and B, while for a different client, it can be modules B and C.

What would be the best approach to allow this functionality?

0 likes
1 reply
vincent15000's avatar

I think that the rights have to be managed by the backend.

If you load module A, you will probably need to load some data from the backend and the backend should then refuse to send the datas to the frontend if the user isn't allowed to load the module.

The frontend will also check for the rights and not load the module on the screen, but these rights are communicated by the backend. Be aware that React, as all the other JS frameworks, are in Javascript, then the user can access and modify all data via the browser's devtools, so it's important that the backend is well secured.

1 like

Please or to participate in this conversation.