Pyramid of doom Grape endpoints
You don't have to define the whole flow per route, this still leads you to the pyramid of hell.

  namespace :users do
    route_param :user_id do
      resource :activities do
        desc 'Create User + Activity associations'
        route_param :activity_id do
          post do
            #pyramid of doom
          end

          delete do
            #pyramid of doom
          end
        end
      end
    end
  end


However, you can register parts of the route in different files

namespace :users do
  register UserActivities
end


Then, within user_activities.rb you can add the rest of the code