Can anyone point me to some good resources on how to structure an Inertia/Laravel/Vue 3 app to also be able to support an API to be used by a mobile app and browser extension?
How can I get the most re-use out of my code? I don't want to paint myself into a corner.
I don't know of any resources specifically for this but I can give you some inspiration.
First of you cannot reuse your routes. That means you need to encapsulate your logic for easy reuse. For this i would use actions. Next i would use api resources that can be used to format the json structure in a way that works for both inertia and your mobile api.
This means you controller methods can be reduced to a few lines. First you get data with the action. Then you format it with the resource, and then you return it