Skip to content

Conversation

@richarvey
Copy link

Summary of Changes

This PR adds Pixelfed social provider support to mixpost.app. Pixelfed is an instagram like service for the feediverse and uses the same API as mastodon.

The implementation is efficient and avoids code duplication:

  • PixelfedProvider extends MastodonProvider - All OAuth, API calls, and resources management are
    inherited
  • Same ActivityPub API - Since Pixelfed implements the Mastodon API, all endpoints work identically
  • Unique branding - Only the service name, logo, and color are different
  • Independent configuration - Pixelfed has its own config section for potential future customization

Now when you create a Pixelfed account, it will display with the Pixelfed logo instead of the
Mastodon logo, but use the exact same connection and posting code!

Backend (PHP)

  1. PixelfedProvider (src/SocialProviders/Pixelfed/PixelfedProvider.php) - Created a new provider class
    that extends MastodonProvider, reusing all OAuth and API functionality while identifying as 'pixelfed'
  2. SocialProviderManager (src/SocialProviderManager.php) - Registered Pixelfed provider and added
    connectPixelfedProvider() method
  3. Config (config/mixpost.php) - Added Pixelfed configuration options with same limits as Mastodon
  4. Actions (src/Actions/CreatePixelfedApp.php) - Created OAuth app creation action for Pixelfed servers
  5. HTTP Layer:
    - src/Http/Requests/CreatePixelfedApp.php - Request validation
    - src/Http/Controllers/CreatePixelfedAppController.php - Controller for app creation
    - routes/web.php - Added route for creating Pixelfed apps
  6. Factory (database/factories/AccountFactory.php) - Added 'pixelfed' to test factory providers

Frontend (Vue.js/CSS)

  1. Icon (resources/js/Icons/Pixelfed.vue) - Created Pixelfed SVG icon component
  2. CSS (resources/css/app.css) - Added Pixelfed brand color (#ff0066)
  3. Components:
    - resources/js/Components/Account/ProviderIcon.vue - Added Pixelfed icon mapping
    - resources/js/Components/Account/AddPixelfedAccount.vue - Created account connection component
    - resources/js/Pages/Accounts/Accounts.vue - Added Pixelfed option to account modal
  4. Composables (resources/js/Composables/useProviderClassesColor.js) - Added Pixelfed color classes
    for text, border, and background

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