DuendeSoftware / docs.duendesoftware.com

Documentation for our Products
https://docs.duendesoftware.com
25 stars 125 forks source link

Understanding the BFF pattern #472

Open SangeetAgarwal opened 3 months ago

SangeetAgarwal commented 3 months ago

Bit of background: we use Identity4 but I'm in the process of upgrading to v7 and one of the challenges within the company is getting other developers to understand the BFF pattern. We have quite a few React apps that use the implicit flow and we'll need to migrate them to use the BFF pattern once I've upgraded to v7.

So keeping that in view I had created this animation here to help our developers understand the BFF concept better.

I don't mean to at all add to anyone's workload in your company but if you could review the animation here and let me know if it summarizes the Bff pattern as it relates to (say) a React app then that would be very helpful. I just want to make sure that when I explain the BFF concept to other developers within our organization then I'm not misleading them.

Again, please feel free to close this issue if you feel this isn't the right forum to ask this question. Thanks!

josephdecock commented 3 months ago

Wow, it's really impressive how much content you're creating for IdentityServer and the BFF. We love that community members like you are creating these kinds of resources and that you're putting so much effort into this.

While we can't review all this content, I did take a look at your diagram. I was a little confused by the reverse proxy at step 2, because the BFF of course does include its own reverse proxy for making API requests to external APIs. But that reverse proxy wouldn't apply to the management endpoint calls you were showing. I guess if you have a reverse proxy in front of the BFF in your architecture, maybe that's correct.

That was my first impression of the diagram, but what I've found is that a picture (or animation) can convey so much information that it is easy to overlook some details. So, rather than going into a lot of depth on this diagram, I think the best ways for us to help you are:

  1. If you have a specific question about how something in the BFF works, please create an issue here The support forum gets a little more visibility from our support team than issues here, so you're likely to get a faster response there.
  2. If you have suggestions or feedback about our BFF documentation, we'd be appreciative.
  3. We also have a sample react app using the BFF here.