Skip to content

A Rails engine implementing the client (non-provider) side of the FASP standard (https://fediscovery.org)

License

Notifications You must be signed in to change notification settings

manyfold3d/fasp_client

Repository files navigation

FaspClient

A Rails engine that implements the non-provider side of the Fediverse Auxiliary Service Provider (FASP) standard.

Features

Installation

Add to your application's Gemfile:

gem "fasp_client", github: "manyfold3d/fasp_client"

Install configuration and run migrations (you'll also want to do this when upgrading).

bin/rails generate fasp_client:install && bin/rails db:migrate

You will probably want to customise the view templates used for editing and listing providers. You can copy the default views like so:

bin/rails generate fasp_client:views

Usage

Mount the engine in your routes.rb file:

mount FaspClient::Engine => "/fasp"

Add the base URL to your nodeinfo metadata:

"faspBaseUrl" => Rails.application.routes.url_helpers.fasp_client_url

If you're using Federails, you can add this to the metadata using the configuration option (currently only on the nodeinfo-metadata branch):

conf.nodeinfo_metadata = -> do
	{"faspBaseUrl" => Rails.application.routes.url_helpers.fasp_client_url}
end

Edit config/initializers/fasp_client.rb and add customise the template authenticate method. It should return true if the current user should be able to access the provider approval/edit pages.

Once you've done that, you can sign up to FASP providers using the URL of your site, and you should be able to register, approve, and choose capabilities.

Currently a simple UI is included at /fasp/providers; the next version will let you customise this.

License

The gem is available as open source under the terms of the MIT License.

Credits

This code was originally written for the Manyfold project, which is funded through NGI0 Entrust, a fund established by NLnet with financial support from the European Commission's Next Generation Internet program. Learn more at the NLnet project page.

NLnet foundation logo NGI Zero Logo

About

A Rails engine implementing the client (non-provider) side of the FASP standard (https://fediscovery.org)

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages