Shiny in Production : App Template


I'm looking for best practices to design a shiny app to deploy into production.
I've seen a fair amount of documentation about shiny in production but only a very few is talking about design and app structure.

So I would like to clarify a few things when it comes to shiny in production regarding the app design.

1st thing, do I really need to build my shiny app as a package (if I don't need to share it as a package) ?
Applying the production best practices to the shiny app, like testing... doesn't need the app to be a package, right ?
Also I never deployed an app on Shiny Server for example, but it doesn't seem to expect the shiny app to be a package.

So what are the benefits to develop a shiny app as a whole package ? Documentation ?

Secondly, I've checked a lot of shiny apps as a package on github, and I've seen most of the time apps in which all the shiny code goes into the "inst" folder, whith a single function in the "R" folder calling runApp or shinyApp.
On the other hand there is a package called "golem", which "is an opiniated framework for building production-grade shiny applications", in which all the R code of the shiny app is designed to go into the R folder. Only ressources like "www" go into the "inst" folder.

When developping a classic package all the R code go into the "R" folder, but when it comes to shiny apps it looks like that most of the time (from what i've seen) it's prefered to put the shiny code into the "inst" folder.
Is there a reason for that ? What is the best option ?

Thank You !

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