LBRY Block Explorer

LBRY Claims • let's-build-with-ruby-on-rails-book-5

712d62c189390fbf831023bc724bbc156ea050fe

Published By
Created On
11 Jan 2024 20:29:58 UTC
Transaction ID
Cost
Safe for Work
Free
Yes
Let's Build: With Ruby On Rails - Book Library App - Views and Pricing Page - Part 4
Hi, My name is Andy Leverenz and I work as a Product Designer at Dribbble. For fun I design, code, and write. Check out my blog called Web-Crunch https://web-crunch.com where I publish design and development tutorials with the occasional vlog.

========================
▶️ You are watching: PART 4 of 6

Download the source code:
⚙️ https://github.com/justalever/book_library
========================

Welcome to my eleventh Let's Build series featuring Ruby on Rails. This installment, once again, focuses on accepting payments using Ruby on Rails as a web application framework. We partner Ruby on Rails with Stripe to create a subscription based SaaS model for a book library application.

What's new in this build?
========================

* Rails 5.2 makes an appearance

* We use ActiveStorage which comes new with Rails 5.2. No longer do we require third-party gems like PaperClip or Carrierwave.

* New encrypted secrets which make managing any environment variables or keys way easier. You can commit these to version control without fear thanks to the encrypted quality

* Stripe Billing - Stripe recently released a new model around their subscription products. Within Stripe Billing you can define overlying products which have associated plans. It's a nicer way to bundle whatever it is you sell but still be able to sell things in different manners i.e. Flat rates, Multiple Plans, Per seat, Usage-based, and Flat rate + overage.


The Book Library application
=========================

The application is a simple book application that allows a user to add and remove books from their library. These books can be downloaded for reading once a user is subscribed. Accessing a library is only possible if a user is subscribed. This app differs than previous apps where a user must pay before making an account.

A user is presented with buttons for adding a book to their library. As you can guess, to do this action a user first needs an account. Upon clicking the "add to library" button a public facing user (someone with no account) is redirected to a signup page of which we implement using the Devise gem.

A nice callback function from Devise allows us to redirect a user upon successfully signing up. In this case, we redirect a user to a pricing page which features three plans to choose from. Each plan has its own parameters associated with it. Upon clicking the "subscribe" button on any of the tiers, the user is redirected to a payment page carrying over the necessary parameters to hook into Stripe with.

What seems like a simple app carries some logic and weight to cover all our tracks. The application is far from complete but you can, however, extend this to be much more however you like.

I ran out of time but one obvious area to extend this app is to save what plan a user has subscribed to. This can be done at the time they create a subscription. From there you can query different places in your app to show and hide specific features based on their plan type.

========================

??Help me keep going. Become a patreon or buy me a coffee:

https://www.patreon.com/webcrunch
☕️ https://www.buymeacoffee.com/webcrunch

? Previously published at:
https://web-crunch.com/lets-build-ruby-on-rails-book-library-stripe-subscription-payments

? Check out the blog:
https://web-crunch.com

? ? Check out my agency:
https://coupleofcreatives.com

? Check out my personal site:
https://justalever.com

? Links:
Weekly Newsletter: https://web-crunch.com/subscribe
Twitter: https://twitter.com/webcrunchblog
Twitter(Personal Account): https://twitter.com/justalever
Facebook: https://facebook.com/webcrunchblog
Dribbble: https://dribbble.com/justalever
Github: https://github.com/justalever
Medium: https://medium.com/the-web-crunch-publication

?Check out my book on UX Design:
"LUXD: Learn User Experience Design"
https://web-crunch.com/books/luxd

? Check out my FREE book on Tumblr Theming:
"Pro Tumblr Theming"
https://web-crunch.com/books/ptt

? Need awesome web hosting? Check out cloudways. They allow me to use a variety of hosting providers and build apps with ease:
http://bit.ly/webcrunchhosting

? Need more advanced hosting for Rails, PHP, Node, or other projects? Digital Ocean has you covered.
https://m.do.co/c/ee243ee15648
...
https://www.youtube.com/watch?v=56vbxhw3S2o
Author
Content Type
Unspecified
video/mp4
Language
English
Open in LBRY

More from the publisher

Controlling
VIDEO
HOW T
Controlling
VIDEO
HOW T
Controlling
VIDEO
RUBY
Controlling
VIDEO
LET'S
Controlling
VIDEO
RAILS
Controlling
VIDEO
EASY
Controlling
VIDEO
THE L
Controlling
VIDEO
LET'S
Controlling
VIDEO
LET'S