How to integrate multiple Shiny apps into a single website using a shared database?


#1

I have a collection of multiple R Shiny apps that are currently standalone applications. Each one reads in a set of 8 CSV files and visualizes the data in various ways. All of the apps use the same set of 8 source data files.

Now, I'm aiming to create a website that integrates all of these Shiny apps into a single, unified platform, with a database backend that will host the 8 datasets, as well as store operations performed by users (e.g. I want to add a dashboard to display user-selected analyses performed using the apps).

I've reviewed available documentation about doing this, but I still have questions about how to integrate multiple standalone apps (and add a dashboard page) via a unified website and database. Questions include:

~ I seem to have encountered conflicting info about hosting such a website that features Shiny apps. I will eventually need it to be hosted on my employer's institutional platform, and I'm not clear about which option(s) of database and website setup will permit this. Does using Shiny apps require the use of Shiny's platform for hosting?

~ From documentation I've reviewed, I saw the recommendation: "If your data fits in memory there is no advantage to putting it in a database: it will only be slower and more frustrating." The datasets I'm using are small, and don't require big-data strategies. I believe that if I want users to interact with my apps, I'll need to have a database to handle this new data, but it would be good to get confirmation that using a database is the correct strategy.

Before I realized that this would be the better forum for this question, I posted this on Stack Overflow:

The one response I have received so far advised to use a navbarPage or tabsets. I don't want to use tabs, as I would like each app to have its own separate webpage. Using a navbar is a possibility, but doesn't address the issue of how to set up a shared database among all apps.

I also posted this to the R mailing list a few weeks ago, but haven't yet received any responses.

I appreciate any suggestions to direct me to strategies that will allow me to unify my Shiny apps into a functional website with database backend. Thanks in advance for your input.


#2

Set up your own server, here is Dean's shiny site with links to multiple shinyapps: https://daattali.com/shiny/ and relevant blog post: https://deanattali.com/2015/05/09/setup-rstudio-shiny-server-digital-ocean/

Then keep your CSVs on the server as files, or as RData, or in a database, so all apps can access.


#3

Thanks for your helpful response, zx8754. I'm wondering, though: if I need to have my site hosted by my institution, it seems that having it hosted by DigitalOcean, as described in Dean's tutorial, wouldn't be compatible with this. Is anyone aware of a resource describing how to host a Shiny app-based website on an institutional server?