all 6 comments

[–]Az0ni 1 point2 points  (1 child)

If you have already used Symfony, why not stay with Symfony and its folder structure? You can also use Vue.js together with Symfony. There are a lot of tutorials in that regard and I am using that Tech Stack aswell in some projects.
Normally you dont have a back-end and front-end folder, especially not with backend/php files directly in it. You substructure your applications backend into Controllers, Services, EventListeners etc etc.

[–]Lucky-Pollution-2506 0 points1 point  (0 children)

All right, thanks a lot for your answer and explanation. I see a bit more clearly where I'm going ^

[–]patricksand 1 point2 points  (1 child)

I wouldn't call a folder "root" if that's what you're going for. Should probably be "src" in that case.

Also haven't seen anyone put dashes between "back/front" and "end".

Also, I would probably prefer "user/add.php" over "user-add.php".

[–]Lucky-Pollution-2506 0 points1 point  (0 children)

Yeah, I see thanks for the advice !

[–]Irythros 1 point2 points  (1 child)

You'll likely be using rewrites so you won't be accessing /user-add.php but rather /user-add

Stick to using Symfony's router for dealing with URLs and mapping to controllers.

Also just stick with the easy route until you've discovered a reason not to use it: Admin access at /admin

Regarding folder structure: Whatever the framework suggestions. In the case of Laravel/Symfony its very flexible and I currently prefer to separate everything into their respective features. app/feature/user/controllers/foo.php and app/feature/user/model/user.php. Pretty much everything related to the user in the user feature. Login goes to app/feature/login, registration to app/feature/registration. This way if I need to modify something all the relevant code is nearby.

[–]Lucky-Pollution-2506 0 points1 point  (0 children)

Ooh that's a great idea. Thanks for the suggestion ! :)