0
I am rewriting an application for better structuring of it and I have arisen some doubts.
The application is a football betting management system and has a web app for management and a mobile app for betting to be made. So this application is currently used by three different clients and will certainly use more in the future.
I wish that, unlike the current scenario, I didn’t need to repeat code for each of the applications. I would like to have a domain and identify which user is making use of the application based on the subdomain used. For example: usuario1.meudominio.com. Then I would know that the user accessing the system is user 1 and would use a token to access data from it in a common database to all users differentiating the records by tokens.
It would be risky to mix data?
I also thought about actually doing three separate systems and even got to do the draft in the image below. The API bank is an API that will provide me with match data, teams, championships and so on. I imagined the Banco Master as being the database that has all the data in common between all the different instances of the system, in case it would be all that will come from the API. And the other three banks being the banks of each of the instances. I opened this topic to listen to opinions and share experiences of how I can best implement this architecture.
What can I change?
I thank everyone who can contribute.
Obs: I intend to use PHP + Codeigniter to develop the web system and the mobile app will be written with Apache Cordova and the database used will be Mysql.
Guilherme, you are publishing the idea of your app. I recommend to edit the question in order to protect your idea and continue leaving your doubt clarified.
– Thiago Lunardi