rails-37-style-backend-database
CommunityDatabase patterns for Rails apps
AuthorChwistophe
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill provides a set of best practices and patterns for structuring and interacting with databases in Rails applications, focusing on robustness, maintainability, and performance.
Core Features & Use Cases
- UUIDs as Primary Keys: Enhances security and distribution by using UUIDs instead of sequential integers.
- State as Records: Manages application state through dedicated database records rather than boolean flags, providing richer history and attribution.
- Database-Backed Infrastructure: Leverages the database for jobs, caching, and WebSockets (Solid Queue, Solid Cache, Solid Cable) to reduce external dependencies.
- Account ID Scoping: Implements multi-tenancy by consistently using
account_idfor data isolation. - Hard Deletes: Employs direct record deletion for simpler queries, relying on audit logs for history.
- Counter Caches: Denormalizes counts to optimize read performance.
- Index Strategy: Outlines best practices for indexing foreign keys, query filters, and common query patterns.
- Sharded Search: Describes a strategy for scalable full-text search using sharded MySQL instances.
Quick Start
Apply the rails-37-style-backend-database skill to configure UUIDs as primary keys in a new Rails migration.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: rails-37-style-backend-database Download link: https://github.com/Chwistophe/agent-skills-unofficial-37-signals-rails-way-fizzy/archive/main.zip#rails-37-style-backend-database Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.