reactjssymfonyfeedback

React / Symfony: How to start my project?


It's been a few days since I broke my head to find the right method but I can't make up my mind so I decide to call on your experience :)

My project is to develop a membership management site / dues / ... for a (small) association. I want to use React for the frontend and Symfony 4 for the backend because these are the two technologies that I master the best.

My question is: (1) should I start a Symfony project and integrate React, or (2) should I start a React project and create an API with Symfony for my application?

Indeed if I go on the first solution my biggest problem is that I do not see how to manage the routing of my application (via React or Symfony).

If I go on the second method, I am afraid that my application is less secure (report to the management of authentication).

That's it I hope to enjoy your lights and thank you in advance :)


Solution

  • I think the best approach is the second. If you manage routes through the backend, you don't have the advantages of SPA.

    In the other hand, to secure data you can take a look at JWT (JSON Web Tokens). That way you can safely manage info between the app and the api.