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.
First things first. Create a repository from this template. It's only two steps!
- Click on "Use this template" above the file list
- Select "Create a new repository"
Clone the new repo to your local machine, and you're done! (I suppose that's technically three steps)
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.2Unless 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-confirmationThe 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.
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 .envOpen .env and replace FONT_AWESOME_KIT_URL with your kit's url.
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/setupThat's it! Code away my sweet angelic butterfly.
Rails Superstack is installed by default with:
Rails Superstack has been preloaded and configured with the following:
- Strong Migrations (catch unsafe migrations)
- LogBench (log viewer)
- RSpec + Factory Bot + Faker (testing)
- Passwordless + CanCanCan (auth, roles)
- Letter Opener + Letter Opener Web (preview emails)
- Font Awesome + Gravatar Image Tag Plugin (icons)
- SuperAdmin + Flipper (admin + feature flags)
- Commonmarker (syntax highlighting)
- Resque (background jobs)
| 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 |
| 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 |
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.
cd /path/to/your/repo
# Lint code for consistent style
bin/rubocopcd /path/to/your/repo
# Run RSpec tests
bin/rspeccd /path/to/your/repo
bin/ciThe Rails Superstack logo was crafted from an illustration by Muhammad Afandi on Unsplash.