Shiny Utilities

Small tools to help understand your Shiny app

Quarto
Shiny
RMarkdown
Author

Martin Frigaard

Published

February 21, 2026

ImportantDRAFT!

This post is currently under development–thank you for your patience.

This post will cover some small tools that have helped me while developing Shiny apps in Positron. I’ll cover my experience using Positron’s Assistant1, useful LLM system prompt tips, tools for debugging the parameterized reports, and representing module call stacks.

App structure

I tend to stick to a common app structure and naming convention:

  1. Utility functions for (i.e., for loading data, creating graphs, rendering R Markdown and Quarto reports, etc.) are named with simple verbs (make_, load_, render_).
  2. Modules are named according to their primary purpose (collecting inputs, displaying outputs, and downloading reports) with a mod_ prefix and either a _ui() or _server() suffix.
  3. All apps have separate UI and server functions (app_ui() and app_server()).
  4. Running the app locally is done with a standalone app function: launch() or launch_app()

%%{init: {'theme': 'neutral', 'look': 'neo', 'themeVariables': { 'fontFamily': 'monospace', "fontSize":"18px"}}}%%


flowchart TD
  Launch["launch()"] --> UI["app_ui()"]
  Launch --> Server["app_server()"]
  Server --> Input["mod_input_server()"]
  Input --> Data["load_tt_data()"]
  Server --> ReportInput["mod_report_input_server()"]
  ReportInput --> ReportDesc["mod_report_desc_server()"]
  ReportInput --> ReportDownload["mod_report_download_server()"]
  ReportDownload --> RenderReport["render_report()"]
  Server --> List["mod_list_server()"]
  Server --> Table["mod_table_server()"]
  Server --> Plot["mod_plot_server()"]
  Plot --> InspectPlot["inspect_plot()"]
  Data --> List
  Data --> Table
  Data --> Plot

style Server fill:#FF6B6B
style UI fill:#87CEEB
style Launch fill:#90EE90

style Input fill:#DDA0DD
style ReportInput fill:#DDA0DD
style ReportDesc fill:#DDA0DD
style ReportDownload fill:#DDA0DD
style List fill:#DDA0DD
style Table fill:#DDA0DD
style Plot fill:#DDA0DD


style Data fill:#FFD700
style RenderReport fill:#FFD700
style InspectPlot fill:#FFD700

App/package functions

I used openAI’s codex to help with the mermaid documentation for the ttdviewer package.

Module trees

Footnotes

  1. Read more about configuring Positron Assistant.↩︎