Skip to content

Instantly share code, notes, and snippets.

@SegundoRP
SegundoRP / CONVENTIONS.md
Created February 18, 2026 04:14 — forked from peterc/CONVENTIONS.md
CONVENTIONS.md file for AI Rails 8 development
  • You MUST NOT try and generate a Rails app from scratch on your own by generating each file. For a NEW app you MUST use rails new first to generate all of the boilerplate files necessary.
  • Create an app in the current directory with rails new .
  • Use Tailwind CSS for styling. Use --css tailwind as an option on the rails new call to do this automatically.
  • Use Ruby 3.2+ and Rails 8.0+ practices.
  • Use the default Minitest approach for testing, do not use RSpec.
  • Default to using SQLite in development. rails new will do this automatically but take care if you write any custom SQL that it is SQLite compatible.
  • An app can be built with a devcontainer such as rails new myapp --devcontainer but only do this if requested directly.
  • Rails apps have a lot of directories to consider, such as app, config, db, etc.
  • Adhere to MVC conventions: singular model names (e.g., Product) map to plural tables (products); controllers are plural.
  • Guard against incapable browsers accessing controllers with `allo

The Unofficial 37signals/DHH Rails Style Guide

About This Document

This style guide was generated by Claude Code through deep analysis of the Fizzy codebase - 37signals' open-source project management tool.

Why Fizzy matters: While 37signals has long advocated for "vanilla Rails" and opinionated software design, their production codebases (Basecamp, HEY, etc.) have historically been closed source. Fizzy changes that. For the first time, developers can study a real 37signals/DHH-style Rails application - not just blog posts and conference talks, but actual production code with all its patterns, trade-offs, and deliberate omissions.

How this was created: Claude Code analyzed the entire codebase - routes, controllers, models, concerns, views, JavaScript, CSS, tests, and configuration. The goal was to extract not just what patterns are used, but why - inferring philosophy from implementation choices.

@SegundoRP
SegundoRP / request.rb
Created November 26, 2024 04:49 — forked from MatheusRich/request.rb
Request Specs vs. System Specs Comparison
require "rails_helper"
RSpec.describe "User management", type: :request do
# Runs in about 0.2 seconds (excluding file load time)
it "lists existing users" do
User.create!(name: "John", age: 30)
get users_path
expect(page).to have_table "Users" do |table|

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default

Keybase proof

I hereby claim:

  • I am segundorp on github.
  • I am secondr (https://keybase.io/secondr) on keybase.
  • I have a public key ASCxJZzhjDBWTMUJhefTy1fBNMNerhXu2RsvcFLkUf5C5Ao

To claim this, I am signing this object:

@SegundoRP
SegundoRP / curl.md
Created July 15, 2024 05:54 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.