Recently I have been working on a rather large system with Vue.js for a single page app (SPA) and an API for the backend. The customer is concerned with the security, performance and maintainability.
So, I'm thinking along having API broken into 3 separate pieces:
- the security api which authenticates/authorizes, issues/revokes token with user roles/permissions and accounts. It would have a separate db
- the business API that has the business functionality, accessible only thru the token issued by the security api. It would have a separate db
- notification api that sends real time notifications and email or text alerts. Again a separate db.
On the front there would be separate apps: one for security api for managing roles user accounts, monitor logs etc and another one, the business app, for the complex business functionality.
I would like to know:
what are the advantages and inconveniences of this architecture (2 frontend apps and 3 webapi) compared to a single frontend and a single web api ?
which one would be the recommended one, in view of the triple constraint of security, performance and maintainability ?