diff --git a/README.md b/README.md index a16e946..997628d 100644 --- a/README.md +++ b/README.md @@ -1,32 +1,73 @@ # Synapsis -Synapsis is an open-source, federated social network built to serve as global communication infrastructure. It is designed to be lightweight, easy to deploy, and interoperable with the broader fediverse. +Synapsis is an open-source, federated social network built to serve as global communication infrastructure. It is designed to be lightweight, easy to deploy, and interoperable with the broader Fediverse. ## Features -- **Federation Ready**: Built with ActivityPub compatibility in mind (WebFinger, NodeInfo). -- **Identity**: Portable identity system backed by user handles. +- **Federation Ready**: Built with ActivityPub compatibility for cross-platform communication. +- **Decentralized Identity (DIDs)**: Portable identity system that you truly own. - **Modern UI**: Clean, responsive interface inspired by Vercel's design system. - **Rich Media**: Support for image uploads and media galleries. - **Moderation**: Built-in admin dashboard for user management and content moderation. - **Setup Wizard**: User-friendly `/install` flow to get your node running in minutes. - **Curated Feeds**: Smart feed algorithms to highlight engaging content. +--- + +## 📖 User Guide + +New to Synapsis or the Fediverse? Visit the **[/guide](/guide)** page in the app for a comprehensive walkthrough on: + +- What the Fediverse is and how it works +- How Synapsis differs from platforms like Mastodon +- How to follow users on other servers +- How others can follow you +- Understanding Decentralized Identifiers (DIDs) and portable identity + +--- + ## Architecture & Concepts Synapsis differs from traditional social networks by prioritizing **sovereign identity** and **federated interoperability**. -### 🔐 The ID System -Unlike centralized platforms where your identity is a row in a database owned by a corporation, Synapsis uses a cryptographic identity system: -- **DIDs (Decentralized Identifiers)**: Every user is assigned a unique DID (`did:key:...`) upon registration. This is your true, portable identity that exists independently of any specific server. -- **Handles**: Human-readable names (e.g., `@alice`) are mapped to DIDs. This allows you to potentially move your account to a different node while keeping your connections, as the underlying DID remains the same. -- **Cryptographic Signing**: Every post and action is cryptographically signed using your private key, ensuring authenticity and preventing tampering. +### 🔐 Decentralized Identity (DIDs) -### 🌐 Federation -Synapsis is designed as a network of independent **Nodes**. -- **Sovereign Data**: Communities can run their own Synapsis node, setting their own moderation rules and data policies. -- **Interconnectivity**: Nodes can talk to each other (via ActivityPub), allowing a user on *Node A* to follow and interact with a user on *Node B*. -- **Shared Protocol**: By adhering to open standards (WebFinger, NodeInfo), Synapsis plays nicely with the broader Fediverse. +Unlike centralized platforms where your identity is a row in a database owned by a corporation, Synapsis uses a cryptographic identity system: + +| Concept | Description | +|---------|-------------| +| **DID** | A unique, cryptographically-generated identifier (`did:key:...`) assigned to every user. This is your true identity that exists independently of any server. | +| **Handle** | A human-readable username (`@alice`) that points to your DID. Think of it like a domain name pointing to an IP address. | +| **Key Pair** | Every account has a public/private key pair. Your private key proves you are you; your public key lets others verify your identity. | + +**Why this matters:** +- **Ownership**: Your identity is cryptographically yours, not controlled by a company. +- **Authenticity**: Every post is signed with your private key, proving it came from you. +- **Future Portability**: The foundation for moving your account between nodes without losing followers. + +### 🌐 Federation via ActivityPub + +Synapsis is designed as a network of independent **Nodes** that communicate using the ActivityPub protocol. + +- **Sovereign Data**: Communities run their own Synapsis nodes with their own rules. +- **Interconnectivity**: A user on *Node A* can follow and interact with a user on *Node B*. +- **Fediverse Compatibility**: Synapsis can communicate with Mastodon, Pleroma, Misskey, and other ActivityPub platforms. + +**How it works:** +1. **WebFinger**: When you search for `@user@other-server.com`, WebFinger discovers their profile. +2. **Follow Request**: Synapsis sends an ActivityPub `Follow` activity to the remote server. +3. **Content Delivery**: When they post, it's delivered to your inbox via ActivityPub. + +### 🆚 Synapsis vs. Mastodon + +| Feature | Mastodon | Synapsis | +|---------|----------|----------| +| **Identity** | Server-bound (`@user@server`) | DID-based (cryptographic, portable) | +| **Account Migration** | Limited (followers don't auto-migrate) | **Supported**: Full DID-based migration with auto-follow | +| **Cryptographic Signing** | HTTP Signatures only | Full post signing with user keys | +| **Protocol** | ActivityPub | ActivityPub + DID layer | + +--- ## Tech Stack @@ -36,6 +77,8 @@ Synapsis is designed as a network of independent **Nodes**. - **Authentication**: Auth.js (NextAuth) - **Type Safety**: TypeScript +--- + ## Installation & Setup You can run Synapsis locally for development or deploy it to a VPS for production. @@ -75,6 +118,14 @@ NEXT_PUBLIC_NODE_NAME="My Synapsis Node" # Admin Access ADMIN_EMAILS="admin@example.com" + +# Object Storage (Optional - for media uploads) +STORAGE_ENDPOINT=https://your-s3-endpoint.com +STORAGE_REGION=us-east-1 +STORAGE_BUCKET=your-bucket-name +STORAGE_ACCESS_KEY=your-access-key +STORAGE_SECRET_KEY=your-secret-key +STORAGE_PUBLIC_BASE_URL=https://your-public-bucket-url.com ``` ### 3. Initialize Database @@ -122,6 +173,8 @@ server { } ``` +--- + ## Updates To update your node: @@ -133,6 +186,8 @@ npm run build pm2 restart synapsis ``` +--- + ## License Licensed under the **Apache 2.0 License**. See [LICENSE](LICENSE) for details. diff --git a/src/app/[handle]/page.tsx b/src/app/[handle]/page.tsx index da26774..fec5a22 100644 --- a/src/app/[handle]/page.tsx +++ b/src/app/[handle]/page.tsx @@ -17,6 +17,7 @@ interface User { followingCount: number; postsCount: number; createdAt: string; + movedTo?: string; // New actor URL if account has migrated } interface UserSummary { @@ -367,6 +368,36 @@ export default function ProfilePage() { + {/* Account Moved Banner */} + {user.movedTo && ( +
+ Understanding the federated social network +
++ The Fediverse (federated universe) is a network of interconnected social platforms that can talk to each other. Unlike centralized platforms like Twitter or Facebook, the Fediverse is made up of thousands of independent servers (called "instances" or "nodes") that share a common protocol. +
++ Think of it like email: you can send an email from Gmail to Outlook because they speak the same language. Similarly, you can follow someone on a Mastodon server from your Synapsis account because they both speak ActivityPub. +
+@alice@mynode.com).+ While Synapsis uses ActivityPub like Mastodon, it introduces a key difference: Decentralized Identifiers (DIDs). +
+ +
+ On Mastodon, your identity is @username@server.com. If your server shuts down, or you want to move to a different one, you effectively lose your identity. Your followers have to re-follow your new account, and your post history doesn't come with you.
+
+ When you create an account on Synapsis, you're assigned a unique DID (Decentralized Identifier) — a cryptographic ID like did:key:z6Mk.... This DID is your true identity. Your human-readable handle (@alice) is simply a friendly pointer to that DID.
+
+ Note: Full account migration is a future feature. Today, DIDs establish the foundation for this capability. +
++ To follow a user on a different Synapsis node, use the Explore / Search feature. Enter their full handle in the format: +
++ Synapsis uses WebFinger to discover the user's profile on the remote server, then sends a Follow request via ActivityPub. +
+ ++ The process is identical! Enter their full handle: +
++ Because ActivityPub is an open standard, Synapsis can communicate with Mastodon, Pleroma, Misskey, and other compatible platforms. +
++ To let someone on another server follow you, share your full handle. It includes your username and this node's domain: +
++ When they search for your handle on their platform (Mastodon, another Synapsis node, etc.), their server will use WebFinger to find your profile and send a Follow request. +
++ You can find your full handle on your Profile page. +
++ Synapsis offers true account portability powered by DIDs. You can migrate your entire account — identity, posts, and media — to another Synapsis node. +
+ ++ Unlike Mastodon where followers must manually re-follow you, Synapsis followers are automatically migrated because they follow your DID, not just a server-specific account. This is true account portability. +
+