MCPSERV.CLUB
diaspora*

diaspora*

Self-Hosted

Decentralized, privacy‑first social network

Stale(68)
13.8kstars
1views
Updated Jun 22, 2025

Overview

Discover what makes diaspora* powerful

diaspora* is a decentralized, privacy‑first social networking platform written primarily in Ruby on Rails. It implements the *Diaspora* federation protocol, allowing independent pods to interoperate while keeping user data under local control. From a developer’s standpoint the core problem it solves is building a scalable, distributed social graph without relying on central servers. Each pod exposes RESTful endpoints for profile lookup, post distribution, and notification delivery; these are built on top of the *diaspora* gem stack and can be extended through Rails’ conventional MVC architecture.

Language & Framework

Database

Message Queue

Front‑end

Overview

diaspora* is a decentralized, privacy‑first social networking platform written primarily in Ruby on Rails. It implements the Diaspora federation protocol, allowing independent pods to interoperate while keeping user data under local control. From a developer’s standpoint the core problem it solves is building a scalable, distributed social graph without relying on central servers. Each pod exposes RESTful endpoints for profile lookup, post distribution, and notification delivery; these are built on top of the diaspora gem stack and can be extended through Rails’ conventional MVC architecture.

Architecture & Technical Stack

  • Language & Framework: Ruby 3.x with Rails 7, leveraging Rails’ ActiveRecord ORM for data persistence.
  • Database: PostgreSQL is the default, but SQLite and MySQL are supported for testing.
  • Message Queue: Sidekiq (Redis‑backed) handles background jobs for activity propagation, email notifications, and image processing.
  • Front‑end: The UI is a single‑page application powered by StimulusJS and Turbo, enabling fast navigation while keeping the codebase light.
  • Federation: The Diaspora protocol is implemented as a set of Ruby modules that serialize activities to JSON‑LD, sign them with the pod’s private key, and verify incoming messages.
  • API Surface: A GraphQL endpoint (/graphql) is available for third‑party integrations, alongside legacy REST endpoints under /api/v1.

Core Capabilities & Developer APIs

  • Aspect Management: Programmable grouping of contacts (Aspects) with granular visibility controls.
  • Activity Streams: CRUD operations for status, photo, and link posts, with support for attachments and re‑posts.
  • Federation Hooks: Webhooks for incoming/outgoing activity streams, allowing external services to react in real time.
  • OAuth 2.0: Pods can act as OAuth providers, enabling single‑sign‑on for external applications.
  • Extensibility: A plugin system based on Rails engines lets developers ship reusable modules (e.g., new post types, custom UI widgets).
  • Internationalization: All strings are extracted to YAML files; contributors can add translations via GitHub.

Deployment & Infrastructure

Diaspora* pods are self‑hosted and can run on any Linux distribution with Ruby, PostgreSQL, Redis, and a web server (Puma or Passenger). Docker images are maintained in the official repository (diasporafoundation/diaspora), simplifying CI/CD pipelines. For scaling, horizontal pod replication is straightforward: multiple pods can be load‑balanced behind a reverse proxy (NGINX or Traefik), each maintaining its own database but sharing the federation layer. High‑availability is achieved by clustering Redis for Sidekiq and replicating PostgreSQL.

Integration & Extensibility

The plugin architecture means developers can ship entire Rails engines that plug into the main application without modifying core files. The GraphQL API is versioned, so clients can evolve independently. Webhooks expose events such as post.created, contact.added, and notification.sent. For custom authentication flows, the OAuth 2.0 provider can be replaced with a third‑party identity service while still keeping data on the pod.

Developer Experience

Diaspora* places emphasis on clean, well‑documented code. The wiki contains comprehensive guides for setting up a development environment, writing plugins, and contributing to the core. The community is active on Discourse and GitHub Discussions, offering quick feedback loops. Test coverage is high (≈70% with RSpec), and the code follows Ruby style guidelines, making onboarding smoother for new contributors.

Use Cases

  • Enterprise Private Social Network: Companies can host a pod to enable employee communication while keeping data in-house.
  • Non‑profit Community Platforms: NGOs can federate multiple local hubs, preserving autonomy and privacy.
  • Educational Projects: Universities can experiment with federated identity systems for student portals.
  • Open‑Source Collaboration: Projects that need a decentralized communication layer can embed diaspora* as an internal microservice.

Advantages

  • Decentralization: No single point of failure; pods can be run on modest hardware.
  • Privacy & Ownership: Users control their data; admins can enforce local policies without external oversight.
  • Open Source & License: Released under a permissive license, allowing commercial use without royalties.
  • Extensibility: Rails engines and GraphQL make it easy to add new features or integrate with existing services.
  • Community & Documentation: Active support channels and thorough guides reduce the learning curve.

In summary, diaspora* offers a robust, extensible platform for building distributed social applications. Its Ruby on Rails foundation, coupled with a well‑defined federation protocol and plugin ecosystem, makes it an attractive choice for developers who need privacy‑centric, self‑hosted social networking capabilities.

Open SourceReady to get started?

Join the community and start self-hosting diaspora* today

Weekly Views

Loading...
Support Us
Most Popular

Infrastructure Supporter

$5/month

Keep our servers running and help us maintain the best directory for developers

Repository Health

Loading health data...

Information

Category
apis-services
License
AGPL-3.0
Stars
13.8k
Technical Specs
Pricing
Open Source
Database
PostgreSQL
Docker
Community
Supported OS
Linux
Author
diaspora
diaspora
Last Updated
Jun 22, 2025