I feel your pain as you try to make sense of all of it ;-)
Ok one by one:
What is front end - this is what users see and interact with. It should hold no logic and only display data to users and get data from users.
What is backed? It is something like an admin panel where you do "stuff" with what users expect you to do eg. moderate, generate etc.
Your code. Now this is where magic happens. The code you write will in the end generate frontend, generate your backend if needed and also handle API.
Ok so what is API then? Well, imagine it is a front end but without all those nice html and css. In fact if you go to any of the functions in your app and at the end instead of
return view('welcome');
you do this or any other data you want:
return User::all();
You will get proper json response which is exactly what you expect from API.
5 Address of the backend - everyone can know it. You just secure it with something like Laravel Fortify.
6 File storage - look at answer 3.
7 S3 - nothing to do with any of it. You can use it or not, it has nothing to do with mobile apps or your app.
my two questions are these: the api controller have to stay on the frontend or backend? example.com/api/ecc or admin.example.com/api/ecc
@yohannes81 An API is neither front-end or back-end.
I would like no one to know the address of the backend
That’s not going to be possible if your “front-end” is consuming your API. All someone has to do is open the dev tools in any modern browser and they can see what URLs your application is making requests to, including any APIs.
the other question is about file storage. Which of the two domains should it be in?
if i had to have a mobile app tomorrow, should i use amazon s3?
Why would file storage be in any particular domain? I assume files will be consuming in both the front-end and back-end. So yes, S3 would be an appropriate location, especially if you’re planning to support other, non-web apps such as mobile apps.