https://github.com/dnsos/rails-starter
Rails application template with some basic configurations and features
https://github.com/dnsos/rails-starter
devise lookbook rails ruby security-tools template
Last synced: 3 months ago
JSON representation
Rails application template with some basic configurations and features
- Host: GitHub
- URL: https://github.com/dnsos/rails-starter
- Owner: dnsos
- License: gpl-3.0
- Created: 2022-05-09T20:22:15.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-10-01T19:10:33.000Z (almost 4 years ago)
- Last Synced: 2025-01-08T09:16:49.177Z (over 1 year ago)
- Topics: devise, lookbook, rails, ruby, security-tools, template
- Language: Ruby
- Homepage:
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rails Starter Template
This repository contains a starter [template](https://guides.rubyonrails.org/rails_application_templates.html) for Ruby on Rails apps.
## Requirements
- **Rails >= 7**. Older versions may work with at least some configurations of this template, but not guaranteed.
- **Node.js** installed on your local machine (this is only used for formatting via Prettier)
- **TailwindCSS** for styling. Configure this easily by using the flag `--css=tailwind` when creating your Rails app with this template
## What does this template do?
This template installs and configures some practical Rails defaults, see `template.rb` for details or the following overview.
### 👮 Linting and security tools
### 💎 Code formatting via Prettier
We want our Rails app to use consistent formatting for `.rb` files. This is achieved with the [Ruby plugin for Prettier](https://github.com/prettier/plugin-ruby).
### 📈 Test coverage configuration
- SimpleCov
- Run with COVERAGE=true
### 👀 Component setup
- View Component
- Lookbook
### 👥 User management
- Devise
- letter_opener for email in development
- two roles: user (default) and admin
### 🕓 Set app's timezone to Berlin (optional)
You will be asked if you want to set the timezone to Berlin. Answer according to your requirements.
## Usage
Generate a new Rails app with this template by running:
```bash
rails new your-app-name [...] -m https://raw.githubusercontent.com/dnsos/rails-starter/main/template.rb
```
> Note that this template can currently only be used for _new_ Rails apps. It can not be applied to existing ones.
## After using this template
1. Create and migrate your database with `bin/rails db:create && bin/rails db:migrate`
2. It's possible that the initial Rubocop run was not able to fix all issues. Check if you need manual adjustments by running `bundle exec rubocop`.
### Other things you may want to configure
- RenovateBot
- .github/CODEOWNERS
- GitHub Actions CI (should actually be optional addition!)
- Content Security Policy
- SMTP in production
- Devise :confirmable if desired (https://github.com/heartcombo/devise/wiki/How-To%3A-Add-%3Aconfirmable-to-Users)