R Shiny
From first app to production system
Shiny makes it very easy to build something that works and surprisingly hard to build something that keeps working. The first app takes an afternoon; the fourth one becomes a 2,000-line server.R that nobody wants to touch. This course is about the difference.
Who this is for
- R users who want to give colleagues an interface instead of a script
- Statistical programmers building data review, QC or signal-detection tools
- Anyone maintaining a Shiny app that has become unmanageable
- Teams that need an app to survive a validation review
You should be comfortable with dplyr, writing functions, and the material in R Programming lessons 1–8. Reactive programming is genuinely a new way of thinking, and lesson 2 spends real time on it.
What you will be able to do
Build a modular, tested, authenticated Shiny application, deploy it, and make sensible decisions about state, performance and architecture when the requirements grow.
Course outline
| # | Lesson | You will learn |
|---|---|---|
| 1 | Shiny application structure | UI/server, the app lifecycle, file layout |
| 2 | Reactive programming | The reactive graph, reactive(), observe(), isolate(), invalidation |
| 3 | Inputs and outputs | Every input type, render functions, validation |
| 4 | Modules | Namespaces, module contracts, communication between modules |
| 5 | Dynamic user interfaces | renderUI, insertUI, update*, conditional panels |
| 6 | Tables and plots | DT, reactable, ggplot2, plotly, click and brush events |
| 7 | File uploads and downloads | fileInput, downloadHandler, reports, safe file handling |
| 8 | Authentication | Session-based auth, SSO, roles, what not to build yourself |
| 9 | Testing Shiny applications | testServer, shinytest2, snapshots, CI |
| 10 | Deployment | shinyapps.io, Posit Connect, Shiny Server, Docker |
| 11 | Production application design | Architecture, performance, state, logging, validation |
How to work through it
Lessons 1–3 get you to a working app. Lesson 4 is the hinge of the course: modules are what make Shiny scale, and most apps that become unmaintainable do so because they were never modularised. Lessons 5–8 are features you will eventually need. Lessons 9–11 are the difference between a demo and a system.
Examples use Shiny ≥ 1.8, bslib ≥ 0.6 for layout, DT ≥ 0.30 and shinytest2 ≥ 0.3. Where an older idiom is still common in existing code — shinydashboard, fluidPage layouts, callModule() — the lesson mentions it so you can read what already exists.
Start with Shiny application structure.