Skip to content

Design Patterns

Terry Thomas edited this page Nov 20, 2025 · 1 revision

Design Patterns

Trailhead uses common Rails and React design patterns to keep the codebase clean and testable.

Backend Patterns

Pattern Purpose
Service Objects Encapsulate API integrations + background sync logic
Serializer Pattern Controls JSON output shape
ActiveRecord ORM Model relationships and persistence
Job Pattern Long-running or scheduled jobs

Frontend Patterns

Pattern Purpose
Declarative Components UI defined by props, simple composition
Data Fetching Hooks Encapsulate API calls in reusable logic
Map Abstraction Layer Deck.gl manages map rendering separately from data state

Clone this wiki locally