12: frontend for 09_goals

shiny meets ambiorix

frontend_for_09_goals
Author

Kennedy Mwavu

Published

July 26, 2024

Goals

This is a frontend for example 09_goals. Built using {shiny}.

Features

  • Auth:
    • Custom sign up & login pages
    • Cookies: Auto-login next time you visit/reload the app
  • APIs:
    • Make API requests to the backend using {httr2}
    • Handle any request errors gracefully via tryCatch()

Run app

  1. First make sure that the backend is running. See how here.

  2. cd into the dir 12_shiny_frontend_for_09_goals/:

    cd 12_shiny_frontend_for_09_goals/
  3. Fire up R & restore pkg dependencies:

    renv::restore()
  4. Add these env vars to your .Renviron:

    BASE_URL = http://127.0.0.1:5000
    RENV_CONFIG_SANDBOX_ENABLED = FALSE
  5. app.R is the entry point. Run this on the terminal to start the app:

    Rscript app.R