Hi!
I am stuck. I need to develop a medium sized application but I can't decide on the architecture. First, let me briefly describe the app itself.
It will consist of two or three different login areas (administrative, reseller, customer) - haven't decided yet.
Core functionalities need to be available through REST API, as a resellers will gain access to that api so they can build their own solution around what I provide.
API may be separated to its own instance in the future, and I want to avoid setting up whole additional app instance just for this purpose. I am also going to develop SDK dedicated for this API and I will probably use this SDK myself to interact with API module.
I've been looking into different approaches in laravel and the best what I came out with seems to be nWidart's laravel-modules package. However, I have never used it before and I do not really know its limitations. And whats most important - it is additional dependency to my project, as it's not laravel native.
I made some research and found out that most of Laravel apps (available on github), no matter what size - are usually built as a monotliths.
For each "module" I would love to have a separated git repository, so it would be easy to use in another project as well as easy to update without worring about touching something wrong in the monotlih (yeah, I know - tests :-)).
-
Do you think using laravel-modules in this case is a good idea or should I stick to laravel native ways - then, how can I develop it as independent parts so its reusable in the future?
-
Access to different parts of the system will be protected with roles (probably laravel permissions by spatie). I wonder what whould be the best way to authenticate api access - laravel passport or simple JWT? I've an impression that laravel passport is quite an overkill in this particular case, as all I need is to give access to API to a given user, already registered in my system. However, it is possible that one user will have several tokens (several apps using api). No matter what auth system I will use it should make use of roles and permissions before accessing resources.