Coder Social home page Coder Social logo

preswick / speedrail Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ryanckulp/speedrail

0.0 0.0 0.0 538 KB

Rails 7 app template: user auth, Stripe billing, Tailwind CSS, admin panel, SEO, gravatar, etc

Shell 0.13% JavaScript 1.82% Ruby 51.55% CSS 0.99% HTML 45.46% Procfile 0.05%

speedrail's Introduction

Speedrail

a Rails 7 boilerplate template by @ryanckulp, created to ship SaaS apps quickly. Learn how to use this at 24 Hour MVP.

features:

  • user authentication via Devise
  • design via Tailwind UI
  • user billing management via Stripe Checkout portal
  • safely manage ENV variables with Figaro
  • responsive toggle navbar w/ logic for login, signup, settings
  • SEO toolbelt via metamagic
  • rename your app in 1 command with Rename
  • increased debugging power with Better Errors
  • seed your DB in seconds via Seed Dump
  • production-ready DB via Postgres
  • easy API requests with HTTParty
  • Postmark for transactional emails, letter_opener for local dev mailers
  • script tag component (Google Analytics, etc)
  • testing suite via RSpec
  • cron job task scheduler (lib/tasks/scheduler.rake)
  • random data generation with Faker
  • Heroku <> Cloudflare HTTPS via lib/cloudflare_proxy.rb
  • background job queue via Delayed
  • paid subscriptions CRUD via Stripe Checkout

Installation

  1. clone the repo
  2. cd speedrail && bundle (installs dependencies)
  3. rails g rename:into new_app_name (then cd ../new_app_name to refresh)
  4. remove gem 'rename' from Gemfile, then bin/setup to create DB
  5. bundle exec figaro install
  6. cp config/application-sample.yml config/application.yml (put ENV vars here)
  7. rm -rf .git && git init && git add . && git commit -m 'first commit' to remove git references to this repo and reinitialize git

Development

bin/dev # uses foreman to boot server, frontend, and bg job queue

troubleshooting Turbo Drive lazy-loads pages following form submission, causing script tags at the bottom of following views to not always load.

<!-- add data-turbo=false to form submission buttons if the following view needs a full render -->
<button data-turbo="false" type="submit" ...>Submit</button>

Testing

bundle exec rspec # run all tests inside spec/
bundle exec rspec spec/dir_name # run all tests inside given directory

Deploying

figaro heroku:set -e production # you only need to do this once
heroku git:remote -a heroku_app_name_here # you only need to do this once
git push heroku master # deploys master branch
git push heroku some_branch_name:master # deploys non-master branch

note: Heroku must have 2 'dynos' enabled, web + worker, to process background jobs. if you don't need a queue, simply remove the worker task from Procfile and don't invoke .delayed functions.

Miscellaneous

to use Postmark for emails, set postmark_api_token inside application.yml, then verify your sending domain.

speedrail's People

Contributors

dependabot[bot] avatar stets avatar matevzgolavsek avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.