Architecture: Rails Views — ERB templates and Hotwire patterns

arch-rails-views Architecture

architecture active

Rails Views: paldocs

Diagram

Components

Component Purpose Notes
ERB templates Server-rendered HTML Sanitized HTML rendering for note content
Turbo Frames Partial page updates Section navigation, inline editing
Turbo Streams Live updates Board item moves, real-time collaboration
Stimulus controllers Client-side behavior Drag-and-drop kanban, search typeahead
CSS (mobile-first) Responsive layout No JS framework, no Tailwind — plain CSS

Key Decisions

  • Hotwire over React/Vue — stays within Rails ecosystem, no JS build pipeline
  • Mobile-first CSS — paldocs must work on phone for quick lookups
  • Sanitized HTML rendering — note content is stored as HTML, rendered with Rails sanitizer to prevent XSS
  • Stimulus for kanban — drag-and-drop board interactions without a full JS framework
  • project-paldocs — parent project page
  • arch-rails-api — API controllers share models with view controllers
  • story-paldocs-sprint-orchestration — sprint planning UI story