Skip to content

Conversation

@SamR1
Copy link
Owner

@SamR1 SamR1 commented Jan 5, 2025

Allow a FitTrackee instance to federate with other instances with ActivityPub.

Note

Development is on hold since February 2023. The first part of the social features will be released without federation.
Before resuming development, adaptations and fixes must be done following the implementation of this first part.


First draft (as experimental feature)

scope may evolve

Notes

  • by default, federation is disabled. FitTrackee can still be used as single user application.
    Note: actors for local users are created even if federation is disabled in case it is activated later
  • visibility levels: add "local followers only" and "local and remote followers" levels to existing ones
  • visibility level on analysis data to handle (added after development was paused)
  • workouts
    • a custom object on FitTrackee instances, a Note for non-Fittrackee Instances (for example Mastodon)
    • for now, location-related data remain on local instances
      => a workout created with a gpx file appears like a workout without gpx on remote instances (FitTrackee or non-FitTrackee).
    • visibility update
      • if workout visibility changes to private, it sends a Delete activity to remote instances
      • if workout visibility changes from private to another visibility, it sends a Create activity to remote instances
      • otherwise, it sends an Update activity
    • if workout sport does not exist (the instance has not been updated since release of a new sport), workout is not created
  • domain change not supported for now

Progress

(not exhaustive)

Latest tests with another application

latest federation testing with a Mastodon (v4.0.2) and another FitTrackee instances:

FitTrackee Mastodon
FitTrackee Mastodon

Federation

  • Federation configuration

    • federation can be enabled (disabled by default)
    • allow disabling federation after activation (impact?)
    • allowed/blocked instances
  • Webfinger

    • /.well-known/webfinger (get resource links)
    • /.well-known/nodeinfo (get node info links)
  • Node info

    • [in progress 🔄] /nodeinfo/2.0
  • Keys and signature

    • note: actor keys are generated even when federation is disabled to easy its activation
    • generate signed headers
    • signature verification
      • with and w/o digest
      • check if actor who signed header is the same in activity
  • Application

    • [in progress 🔄] Shared inbox
  • Actor

    • Types:
      • Person
      • Application
      • ...
    • [in progress 🔄] Inbox
    • Outbox
    • Collections
      • Followers Collection
      • Following Collection
      • ...
  • Visibility settings

    • visibility levels
      • public
      • only local followers
      • only local and remote followers
      • private for workout, mentioned users for comments
    • applied on:
      • workouts data (without location data)
      • map
      • comments
      • analysis data
  • Activities

    • Follow
    • Accept
      • FollowRequest
    • Reject
      • FollowRequest
    • Undo
      • FollowRequest
      • Like
    • Create
      • Workout on remote FitTrackee instances
        • only workout data (no location-related data)
        • archive import: limit on 5 latest workouts (to improve or remove)
      • Workout on non-FitTrackee instances (= Note)
        • handle i18n and imperial units depending on user preferences
      • Note (Workout comment)
        • update template
    • Delete
      • Workout (on FitTrackee and non-Fitrackee)
      • Workout comment (= Note)
      • User/Actor
    • [in progress 🔄] Update
      Note: previous versions are not stored for now.
      • Workout (on Fittrackee instance)
        • data update
        • visibility update
        • workout refresh
      • Workout (on non-Fittrackee instance) (= Note)
      • Workout comment (only content can be updated)
      • User/Actor
    • Like
      • Workout
      • Comment
    • Block
  • Objects

    • FollowRequest (custom object)
    • Workout (custom object for FitTrackee instances)
    • Note (workout notification of a workout on a non-FitTrackee instance)
    • [in progress 🔄] Comment on Workout (= Note)
      • handle mentions
      • reply to comment
    • Tombstone
    • ...

User account

  • allow importing data exported from another instance

Comments

  • update autocomplete with remote users
  • pagination?
    • how to handle replies?
    • direct link to comment?

Notifications

  • add UI notification from remote instance events
  • ...

Moderation

  • handle remote content

TODO in a next version

  • map thumbnails for remote workouts (on FitTrackee and non-Fitrackee instances)?
  • store edited versions of a comment
  • workout for remote follower
  • tags?

SamR1 added 30 commits February 20, 2022 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants