bradfeehan / rails-template

A Rails Application template with my preferred setup

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rails-template

A Rails Application Template with my preferred setup:

  • An empty initial commit
  • My preferred EditorConfig:
    • UTF-8 encoding
    • Unix line endings
    • Trailing newline on last line
    • Trim trailing whitespace
    • 2 spaces indentation in most files (common in Ruby projects)
    • 4 spaces indentation in plain-text files (necessary for Markdown)
  • Docker environment
    • Dockerfile based on official Ruby image, with Node and Yarn
    • Docker Compose development environment with official Postgres image
  • Pre-commit hook to run linters, with no dependencies other than the shell
    • Run against the state in the index, excluding uncommited changes
    • Check filenames for invalid patterns
      • Enforce .yml over *.yaml
      • Prevent capital letters in filenames
    • Check files for whitespace errors and merge conflict markers
    • actionlint: GitHub Actions workflow linter
    • hadolint: Dockerfile linter
    • v8r: JSON schema validation
    • rubocop: Ruby style guide linter
    • shellcheck: Shell script linter
    • stylelint: CSS and SCSS linter
    • yamllint: YAML file linter
  • GitHub Actions for linting and testing on push
  • Ruby version management with Bundler and .ruby-version
  • Rails add-ons
    • ActiveDecorator: Presenter pattern implementation
    • GoodJob: Postgres-based backend for ActiveJob
    • Gretel: Helper to show navigation breadcrumbs
    • Lograge: Improved defaults to improve Rails logging
    • Pagy: Pagination for collections of items in Ruby
    • PaperTrail: Track changes to models for auditing or versioning
    • pgcli-rails: Replaces Rails PostgreSQL dbconsole with pgcli
    • Pundit: Authorization framework to manage permissions
    • Rails Admin: Admin dashboard and data management, in a Rails engine
    • Rodauth: Authentication framework to manage user accounts
    • Sorbet: Static type checking for Ruby
      • Tapioca: Generate RBI files for gems and DSLs
    • Propshaft: Simplified asset pipeline for Rails 7
  • Testing
    • Factory Bot: Fixture objects for test data
    • Faker: Generates plausible/realistic data for addresses, names, etc.
    • Pry: Developer console for Ruby, better replacement for irb
    • RSpec: Readable testing framework for Ruby

About

A Rails Application template with my preferred setup

License:MIT License


Languages

Language:Shell 50.6%Language:Ruby 40.9%Language:Dockerfile 7.6%Language:JavaScript 0.6%Language:SCSS 0.2%Language:CSS 0.1%