Creating a paid R SaaS with Firebase, Stripe and Shiny
Create a template for R users to create paid subscription services for Shiny Apps.
Many thanks to...
This project is derived from:
Steps to Run the Shiny App
- Download or clone this repository
- Create a Firebase account, and in your new account create a project
- In your new Firebase project enable the login providers you want (currently supporting Google, GitHub and Twitter)
- Click the "Web Setup" button (top right in above screenshot) and copy your project's "apiKey", "authDomain", and "projectId" into the object defined in line 1 of the file "www/sof-auth.js"
- Run the Shiny app
The functions in
global.R take care of communicating with the Firebase database and Stripe, but do not handle payments which is passed off to the payment app.
Running the payment app
The Shiny App will offer to link to the payment app via links in its free content after login. The payment app is a React Firebase hosted app that takes care of payment details. The user needs to log in to the apps with the same email/method and enter credit card details which are stored in Stripe and Firebase, accessed via the Shiny app to allow entry to paid content.
How to deploy the payment app
WIP - working demo here https://sunholo-bootstrap-dev.web.app/