Can I publish a shiny app package on CRAN that requires a database connection?

Hi,

I have created a shiny app that requires a database connection to populate a mapping dashboard.

I was wondering if I can publish my shiny app to CRAN, even if it requires a database connection?

I have been doing research to answer this question but I have been unsuccessful so far.

Hi @abee and welcome to the RStudio Community :partying_face: :partying_face: :partying_face: :partying_face:

This is not really an answer to your question, but I want to say that "I" have never seen such an application on CRAN. What you will see on CRAN; however, are packages that interact with an API to get data. Is it possible to explore that route in your case?

Hello @abee,

The CRAN submission policies don't specifically prohibit a package that relies on a database connection, however, there are a couple of caveats to this.

From the CRAN policies:

  • Packages which use Internet resources should fail gracefully with an informative message if the resource is not available or has changed (and not give a check warning nor error).
  • Packages should not write in the user’s home filespace (including clipboards), nor anywhere else on the file system apart from the R session’s temporary directory (or during installation in the location pointed to by TMPDIR : and such usage should be cleaned up). Installing into the system’s R installation (e.g., scripts to its bin directory) is not allowed.
  • Downloads of additional software or data as part of package installation or startup should only use secure download mechanisms (e.g., ‘https’ or ‘ftps’). For downloads of more than a few MB, ensure that a sufficiently large timeout is set.

Given those policies above, your package should pass a CRAN review as long as when the database is unavailable the package gives a reasonable error message, you're not leaking any information about the user in the database request, and your requests are encrypted.

Hi @gueynono

Thank you for the response. :blush:

That could be a possible route for me, I will have look more into it.

Thank you for your insight @EliMiller ! :blush:

This topic was automatically closed after 45 days. 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.