architecture for site with multiple shiny apps

I'm building a website that will feature multiple shiny apps. Ideally, I'd like the site to present to the user as consisting of multiple pages, each of which offers the option to interact with one or more shiny apps.

My sense (which could be wrong, I'm new to shiny), is that a site like this (i.e. one featuring multiple shiny apps appearing on a number of different pages) is best built using a general purpose web framework (my preference is Gatsby), with the shiny apps hosted on a shiny-specific server and pulled from that server into the site via <iframe> tags.

I can't think of a better architecture. But before I go too far down that road, I want to make sure that there's not someone out there who has come up with a better way. Obviously, there will be all sorts of javascript clusterf**k needed to make shiny apps presented through <iframe> tags look good and perform as expected.

Is there a better way?

If not...for those of you who have built such a site, what gotchas do I need to be aware of in setting up those <iframes>?

Note that this post seems to address the same general problem. But it doesn't specifically ask about the <iframe> approach and its challenges, so I'm starting a new thread.

(By the way, the BEST way to build the kind of site I have in mind is obviously just to use a native javascript library (e.g. D3) to build the data visualization apps, instead of shiny. But the team I'm building this site for only knows how to write in R, so we're stuck with shiny!)

Thanks!

I'm no expert either, but the <iframe> approach is the one that worked for me, embedded in rBlogdown / hugo combination. Only changes were to include runtime: shiny, in the header section, and the following code: knitr::include_app("https://username.shinyapps.io/shiny/").
I have not used multiple iframe instances, however, I see no technical reason why there should be immediate problems. Save for maybe the normal issues that arise if multiple applications manipulate the same instance of the data at the same time.
Good Luck!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.