API Development Patterns

Installation
SKILL.md

API Development Patterns

Complete patterns and best practices for building production-grade REST APIs in Rails 7.x/8.x.

RESTful API Conventions

Resource-Oriented Design

Core Principles:

  • Resources are nouns (not verbs): /users, /posts, not /get_user
  • Use HTTP methods for actions: GET (read), POST (create), PATCH/PUT (update), DELETE (destroy)
  • Nest resources for relationships, but limit nesting to 1-2 levels
  • Use plural resource names: /users not /user

Standard Resource Routes:

# config/routes.rb
Rails.application.routes.draw do
Related skills

More from kaakati/rails-enterprise-dev

Installs
GitHub Stars
8
First Seen