Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Federation support [development on pause] #679

Draft
wants to merge 303 commits into
base: v0.9.x
Choose a base branch
from
Draft

Federation support [development on pause] #679

wants to merge 303 commits into from

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 currently 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 levels on analysis data to handle
  • 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)

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)
    • 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 (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 16:57
Add different visibility levels (private, followers_only, private) on:
- on some user infos
- workouts
- workout map
SamR1 added 28 commits April 13, 2024 14:35
@SamR1 SamR1 marked this pull request as draft January 5, 2025 15:38
@SamR1
Copy link
Owner Author

SamR1 commented Jan 5, 2025

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

FitTrackee Mastodon
FitTrackee Mastodon

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.

1 participant