Skip to content

A ready-to-go Ruby on Rails instance with front-end, database, and accouterments.

License

Notifications You must be signed in to change notification settings

nschneble/rails-superstack

Repository files navigation

Rails Superstack

Rails Superstack

Rails Superstack is a ready-to-go Ruby on Rails instance with front-end, database, and accouterments. A majestic monolith with a f*ckton of useful gems. It's a free public template anyone can use to hit the ground running with their own app ideas.

CI License: CC0-1.0

Getting Started

First things first. Create a repository from this template. It's only two steps!

  1. Click on "Use this template" above the file list
  2. Select "Create a new repository"

Clone the new repo to your local machine, and you're done! (I suppose that's technically three steps)

Prerequisites

With your shiny new repo in hand, here's what you need to get cooking:

  • PostgreSQL 14.20
  • Ruby 3.4.7
  • Bundler 2.7.2

I'd personally recommend Homebrew and rbenv to install these prerequisites:

cd /path/to/your/repo

# Install Homebrew + Postgres
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install postgresql@14

# Install rbenv + Ruby
curl -fsSL https://rbenv.org/install.sh | bash
rbenv install 3.4.7

# Install Bundler
gem install bundler -v 2.7.2

Run Rename Script

Unless you want your app to be called "Rails Superstack", you'll probably want to run this script:

cd /path/to/your/repo

# Get help
script/rename.sh —help

# Preview changes
script/rename.sh --dry-run

# Run interactively
script/rename.sh

# Run without prompts
script/rename.sh --no-confirmation

The script should be clever enough to detect your new repo's origin url. If not, it'll prompt you for it. If that fails, it'll prompt for your GitHub username and repository name.

After the script runs successfully, it'll delete itself and create a new README.

Set Up Font Awesome

This one's easy. Navigate to Get Started with Font Awesome to sign up and add a new icon kit. Create a file for your environment variables using the included .env.example file, then plug in your shiny new kit:

cd /path/to/your/repo
cp .env.example .env

Open .env and replace FONT_AWESOME_KIT_URL with your kit's url.

Build and Run

You can install dependencies, set up the database, run migrations – etc. etc. – or you can live on the wild side and just run the setup script:

cd /path/to/your/repo
bin/setup

That's it! Code away my sweet angelic butterfly.

What's in a Superstack, Exactly?

Tech Stack

Rails Superstack is installed by default with:

Gems and Resources

Rails Superstack has been preloaded and configured with the following:

Code Features

Feature Description
Abilities (Roles) Ability
Models User, MacGuffin
Helpers Text, web urls, forms, Font Awesome icons
Normalizers Email addresses
Validators Email addresses, web urls
View Components Clipboard button, toast notifications, code snippets

Routes

Endpoint Description
/sign_in Sign in as a new user
/sign_out Sign out the current user
/sent_mail Preview sent mail in development
/notice Sample endpoint for notice notifications
/alert Sample endpoint for alert notifications
/admin SuperAdmin dashboard
/flipper Flipper feature flags
/resque Resque jobs dashboard
/mac_guffins Items visible to the current user
/profile Change current user email

Linting, Testing, and CI

There's handy binstubs for RSpec and RuboCop. Local CI will mirror the GitHub workflow that runs when you make commits and merge pull requests.

Linting

cd /path/to/your/repo

# Lint code for consistent style
bin/rubocop

Testing

cd /path/to/your/repo

# Run RSpec tests
bin/rspec

Local CI

cd /path/to/your/repo
bin/ci

Acknowledgements

The Rails Superstack logo was crafted from an illustration by Muhammad Afandi on Unsplash.

About

A ready-to-go Ruby on Rails instance with front-end, database, and accouterments.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •