Essential session storage is required to sign in. Optional analytics remain off unless you allow them.
Extend Rails into something interactive — EITHER a Hotwire-driven UI OR a JSON API (pick one). Shared requirements: model a domain with associations; query the ORM EFFICIENTLY — use scopes, filter with the query interface, and AVOID N+1 with eager loading via includes; add validations + a couple of tests. For the HOTWIRE path: use Turbo Frames and/or Turbo Streams (and a Stimulus controller) to update part of the page without a full reload. For the API path: 'rails new --api' or an /api/v1 namespace, render JSON, add token-based auth and pagination. Write model + request/system tests (Minitest or RSpec) with fixtures/FactoryBot. Explain one place includes eliminated an N+1.
Associations + scopes; a documented N+1 eliminated with includes; the query interface used idiomatically.
Either Turbo (Frames/Streams) + Stimulus updating the page without a reload, OR a clean JSON API (namespaced, token auth, pagination).
Model + request/system tests (Minitest or RSpec) with fixtures/FactoryBot cover the happy path and an error case.
Use this README structure to make the work reviewable.
DevPath fetches a read-only, size-capped snapshot. Submitted code is never executed.
# A Hotwire app or JSON API with efficient Active Record ## Goal Extend Rails into something interactive — EITHER a Hotwire-driven UI OR a JSON API (pick one). Shared requirements: model a domain with associations; query the ORM EFFICIENTLY — use scopes, filter with the query interface, and AVOID N+1 with eager loading via includes; add validations + a couple of tests. For the HOTWIRE path: use Turbo Frames and/or Turbo Streams (and a Stimulus controller) to update part of the page without a full reload. For the API path: 'rails new --api' or an /api/v1 namespace, render JSON, add token-based auth and pagination. Write model + request/system tests (Minitest or RSpec) with fixtures/FactoryBot. Explain one place includes eliminated an N+1. ## Acceptance criteria - [ ] Efficient Active Record: Associations + scopes; a documented N+1 eliminated with includes; the query interface used idiomatically. - [ ] Hotwire or API: Either Turbo (Frames/Streams) + Stimulus updating the page without a reload, OR a clean JSON API (namespaced, token auth, pagination). - [ ] Tests: Model + request/system tests (Minitest or RSpec) with fixtures/FactoryBot cover the happy path and an error case. ## Verification - [ ] Document installation and run commands. - [ ] Record automated checks and their exact commands. - [ ] Add representative output, screenshots, or a short demo where useful. - [ ] Confirm failure paths and known constraints. ## Decision log ### Decision title - Context: - Choice: - Alternatives considered: - Tradeoffs: ## Evidence - Link each rubric criterion to the file, test, or artifact that demonstrates it. ## Known limitations - List what is intentionally out of scope and what should be improved next.