mgmgpyaesonewin / web-crawler-assignment

0 stars 0 forks source link

[Question] Selection of tools and techs #10

Open malparty opened 3 months ago

malparty commented 3 months ago

What arbitrations led you to choose a combination of both Next.js and Laravel?

Why not only use Laravel fullstack? Or only Next.js fullstack? This would allow writing code in a single language and reduce the complexity of configuring tests and deployment.

mgmgpyaesonewin commented 3 months ago

Choosing the combination of Laravel and Next.js, instead of Full Stack Laravel or Full Stack Next.js is based on the specific need of the project and the advantages of each framework.

Full Stack Laravel app will not required to develop the API, since I would also like to expose the API part as well. Laravel offers the session-based Next.js template if we use this approach. The reason I use the session-based approach is it is required to register from web UI only instead of API due to limited scope and focused requirements. Users would need to sign up via the Web UI (in-browser) to use the API.

So, working on Laravel for API will help me develop the feature faster due to its reusability and allow me to focus on the core part of the application. Using Laravel Sanctum for session-based authentication was a good option to enhance security, especially since the register functionality needed to be protected and not exposed publicly.

For deployment, it doesn't add more complexity since we are already running our spider on node.js running with PM2. Running next.js will be adding one more process to PM2.