Federails - a Rails engine that brings ActivityPub to Rails applications

Well, the title is a bit lying as the engine is a work in progress.

This discussion follows this thread; its goal is to discuss about the gem, how you plan to use it, and what you want to see in it…

Well, the path it’s taking is something like that, for an existing application with users and an Article model that should have ActivityPub “capability”:

  1. Setup:

    # Gemfile
    gem 'federails'
    
    # Copy initializer and other configuration files
    rails generate federails:install
    # Copy migrations
    rails federails:install:migrations
    
  2. Configure User model

    class User < ApplicationRecord
      include Federails::User
    
      #...
    end
    
  3. Configure Article model

    class Article < ApplicationRecord
      include Federails::Federable
    
      belongs_to :user, optional: true # MUST be optional now
    
      #...
    end
    

There will be some extra steps to create custom migrations (publish existing content, attach actors to existing articles, etc…), this is only where I am in the gem development now.