9.1 Shiny app basics

Every Shiny app is composed of two parts: a web page that shows the app to the user called the UI (user interface), and a computer that powers the app known as the server. The computer that runs the app can either be your own laptop (such as when you’re running an app from RStudio) or a server somewhere else. You, as the Shiny app developer, need to write these two parts.

If you look at the app that can be built following the instructions here: tutorial , the page that you see is built with the UI code. UI is just a web document that the user gets to see, it’s HTML that you write using Shiny’s functions. The UI is responsible for creating the layout of the app and telling Shiny exactly where things go like controls to adjust the price or choose a country or where the plot and table appear on the page. The server is responsible for the logic of the app; it’s the set of instructions that tell the web page what to show, like the data for the table and the plot seen, when the user interacts with the page.