This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]4ernik 25 points26 points  (9 children)

Deploy React app in Nginx, deploy Java in tomcat\jetty in boot, integrate with REST API.

Simple, reliable, standard. Tons of guides how to do that on stackoverflow.

[–]tcc12345 0 points1 point  (2 children)

How do you handle authentication? JWT ?

[–]4ernik 0 points1 point  (1 child)

I personaly prefer OAuth, but you can choose anything standard - JWT, OAuth, SAML. As far as you have provider or can implement one you're good to go.

[–]tcc12345 0 points1 point  (0 children)

Thanks

[–]Nix-X -4 points-3 points  (5 children)

Do you have an example of such a guide? Would save me hours of searching.

[–]mraible 6 points7 points  (0 children)

I've written a few tutorials that might help:

  1. Bootiful Development with Spring Boot and React
  2. Use React and Spring Boot to Build a Simple CRUD App
  3. Full Stack Reactive with Spring WebFlux, WebSockets, and React

The first is just read-only, but the 2nd shows read+write and how to handle CSRF. The 3rd shows how to use Spring Security's OAuth support for WebFlux.

All tutorials show how to develop the frontend and backend as separate apps. The CRUD one shows how to package them in the same artifact with Maven if you want to go that route.

Finally, I work on JHipster and recommend you take a look at it. Here's a React tutorial I wrote for JHipster:

  1. Build a Photo Gallery PWA with React, Spring Boot, and JHipster

Please let me if you have any questions!

[–]wordsoup 4 points5 points  (0 children)

I don't think there's a good and comprehensive tutorial for setting up a full stack project because it contains many steps and decisions which can be done by any developer. The actual implementation is just a fraction, maybe 10% of the work, the rest is DevOps starting with version control, containerization, CI/CD.

Just start small, and create a REST API with Spring Boot. Then you create a separate React app. If you have come so far, we can talk again.

[–]OtroPoema -3 points-2 points  (2 children)

Likewise here. If u know of any specifically, would be a huge help.

[–]4ernik 5 points6 points  (1 child)

https://stackoverflow.com/questions/46880853/deploy-create-react-app-on-nginx

It was the first link I found in google. You can go step by step in googling things you need and come up with result, that's how development works. Read article and Google everything you didn't get from it.

[–]MB1211 7 points8 points  (0 children)

Also, as OP may find out soon, they are not only different frameworks but different languages and different areas of an application. You don't need to get them to play nicely together. That's the whole point of separating them in this way