The SwarmOverview

The Swarm

The Swarm is Synapsis’s native node-to-node communication layer. It enables fast, real-time data exchange between Synapsis nodes.

What is the Swarm?

The Swarm is a mesh network of Synapsis nodes that communicate directly via simple JSON APIs. It handles:

  • Node Discovery — Automatic discovery of other Synapsis nodes
  • User Profiles — View any user’s full profile across nodes
  • Timeline Aggregation — Build swarm-wide feeds from multiple nodes
  • Handle Resolution — Find which node hosts a given user
  • Social Interactions — Likes, reposts, follows, and mentions delivered directly
  • Real DMs — Private messaging between users on any node as you’re used to

Why the Swarm?

The Swarm was designed specifically for Synapsis, providing:

FeatureBenefit
SpeedSingle request, instant response
Real-time DataAlways fresh, complete information
Clean FormatSimple JSON APIs
Instant DeliveryInteractions delivered immediately
Real DMsAn actual dm inbox, no compromises
Auto DiscoveryNodes find each other automatically

Key Features

Real DMs

An actual direct message inbox just like you’re used to, with no compromises and no “private mentions”.

  • Real-time message delivery
  • Read receipts and delivery status
  • Proper chat UI with conversations

Cross-Node User Profiles

Click on any user from another Synapsis node and see their full profile — avatar, header, bio, accurate follower counts, and all their posts. It works just like viewing a local user.

Swarm Timeline

The Explore page aggregates posts from across the swarm, giving you a network-wide view of activity.

Instant Interactions

Like, repost, follow, or mention users on other Synapsis nodes with instant delivery. Interactions are delivered directly via the swarm protocol.

Automatic Discovery

Nodes automatically discover each other through gossip. No manual configuration needed — just join the swarm and start connecting.

How It Works

The Swarm uses a hybrid approach combining the best of centralized and decentralized systems:

  1. Seed Nodes provide initial bootstrap points
  2. Gossip Protocol spreads node information through the network
  3. Direct APIs enable real-time data exchange between nodes

This means:

  • New nodes can easily join by contacting a seed
  • The network remains functional even if seeds go down
  • Cross-node features work instantly without complex federation

Quick Start

For Node Operators

Your node automatically participates in the Swarm. On startup, it will:

  1. Announce itself to configured seed nodes
  2. Begin periodic gossip rounds with known peers
  3. Build a local registry of discovered nodes

Manual Operations (Admin)

Admins can trigger swarm operations via the API:

# Announce to all seeds
curl -X POST https://your-node.com/api/swarm/nodes \
  -H "Content-Type: application/json" \
  -d '{"action": "announce"}'
 
# Run a gossip round
curl -X POST https://your-node.com/api/swarm/nodes \
  -H "Content-Type: application/json" \
  -d '{"action": "gossip"}'
 
# Discover a specific node
curl -X POST https://your-node.com/api/swarm/nodes \
  -H "Content-Type: application/json" \
  -d '{"action": "discover", "domain": "other-node.com"}'

Endpoints

EndpointDescription
GET /api/swarm/users/[handle]Get a user’s profile and posts
GET /api/swarm/posts/[id]Get a single post
GET /api/swarm/timelineGet recent posts from this node
GET /api/swarm/infoThis node’s swarm info
GET /api/swarm/nodesList known nodes
POST /api/swarm/announceReceive node announcements
POST /api/swarm/gossipExchange gossip with peers
POST /api/swarm/interactions/likeReceive likes
POST /api/swarm/interactions/followReceive follows
POST /api/swarm/interactions/repostReceive reposts
POST /api/swarm/interactions/mentionReceive mentions
POST /api/swarm/repliesReceive replies
GET /.well-known/synapsis-swarmPublic swarm discovery info