Skip to content

Latest commit

 

History

History
137 lines (107 loc) · 7.58 KB

README.md

File metadata and controls

137 lines (107 loc) · 7.58 KB

My Rails Application Template

Initialize rails project with custom configuration. See Rails Application Templates

Usage

  1. git clone this project

  2. rails new with template.rb

rails new app_name -d postgresql --skip-turbolinks -m jumpstart/template.rb
  1. add/move keys to credentials or .env file

  2. reorder gems in Gemfile for better practice

Content(WIP)

Application Settings

  • Disable auto generated stylesheets & helpers
  • Time zone: Taipei
  • Add middleware ActionDispatch::Static, Rack::Deflater - smaller rails page size
  • Add hosts lvh.me & .ngrok.io
  • require master_key
  • I18n
  • Enable webpack chunks
  • Locale
    • default: zh-TW
    • available: zh-TW, en
    • load path: config/locales/**/*.{yml,rb}

Development Experience

Assets Related

Presentation Related

Background Job

Security

  • lockbox - Encrypted fields and files
  • brakeman - Checks rails applications for security vulnerabilities
  • rack-attack - Rack middleware for blocking & throttling

Performance

Tracking & Log Related

  • paper_trail - Track changes to models
  • lograge - Simplify rails' default request logging
  • marginalia - Attach comments to ActiveRecord queries

Test

Others

Optional