I have to do an app that has a part of users that manage all their things and another part of admin, and here come my questions:
a person experienced in react told me that if the admin is oneself, it is better to separate the administrator from the user's app because otherwise it becomes very heavy (I do not know if slow).
But thinking, I am the admin, but I have components in common with the users, I prefer to have an app for both.
It is very expensive? or can I do my administrative panel together with the login / registration and user front?
Either option can work, if done correctly. In general, I would prefer to use the same application because it is simpler to maintain, particularly if the two applications share a lot of common code. However, there are some considerations which could tip the scales in favor of two distinct applications, mainly:
1. It is easier to lock down a separate HR application to more than
simply a login role.For example, the Employee app may be publicly
accessible via the
internet, but the HR app could be locked down to the internal
network, or even certain user's workstations.
2. It would be much harder to brute force a valid login for the HR
app without having access to it.
3. With a single app, it is possible for a developer to make a
mistake and accidentally expose admin functionality to regular
users.
This obviously would not happen with separate apps. (This is why
stressed "if done correctly" in the first sentence.)
Yes sure you can keep the code for user and admin in the same app. It will surely increase the bundle size of your app and hence make it slow, but at the same time you can make use of lazy loading and chunking like techniques to make sure the performance of the app still remains well.
If your user side app is huge then to make things smoother you can go for separate admin.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With