I'm developing a system, and I've had a question that might help other people.
The system would be written in PHP, with a lot of chance of turning a mobile app later, too. Normally, I would create it with a controller that would make the connection to the database, and others responsible for inserts, updates, etc.
Considering the application, you would then do an API with endpoints for the same functions.
Thinking about it, I imagined then that the system itself could also work with the API. In this way, it would be the same as the mobile application: It would not connect directly to the database, but would connect to the API and it would take care of operations.
I see that, this way, the system would be slower than connecting directly to the database, but, perhaps, it would be more useful in maintenance, because it would be just a place to change, the API.