Skip to content

marcusjrc/ror-saas-boilerplate

Repository files navigation

SaaS Boilerplate - Ruby on Rails

This is a wip project for creating a SaaS boilerplate/template application using Ruby on Rails.

Currently uses these gems: Tailwindcss, Devise, Rspec, standardrb, stripe

Features

  1. User Login, Registration & Forgot Password functionality (via Devise gem)
  2. Stripe integration for basic monthly subscription tiers. Webhooks are supported. Uses Stripe customer portal for user subscription management
  3. Basic ticket system & help chat system (websocket supported via Turbo Streams)
  4. Notification system (websocket supported via Turbo streams)

Testing and Linting

  1. For linting, standardrb is used, use standardrb to run
  2. RSpec is to be used for testing going forward, using bundle exec rspec. TODO: Controller tests to be migrated to rspec controller & feature tests - along with factories (using Factory Bot) instead of fixtures.

To do..

  1. Set up feature testing using Rspec
  2. Add SSO (via Devise)
  3. Setup basic admin functionality (subscription, ticketing)
  4. Setup basic isolated "apps" to share between users/teams
  5. Feature toggling

Local setup

  1. You will need Ruby 3+ and Docker installed
  2. After cloning the repo, run bundle install inside the root folder to install the dependencies.
  3. Next, run docker-compose up in the root folder to setup your local & test postgres dbs and redis.
  4. Before migrating & seeding your database, you need to setup a Stripe account and obtain a test API key from the developers portal. Then set your env var, look at `config/initializers/stripe.rb`` for more info.
  5. You will need to migrate & seed your database using rails db:setup
  6. Now run using ./bin/dev

About

A Ruby on Rails Saas Boilerplate

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published