b76e586bbccd1117ec4f0bedfb1b986ca14d2e13
Project Synapsis
An open-source, federated social network designed as global communication infrastructure.
Features
- Federation: ActivityPub-compatible, interoperable with Mastodon and other fediverse platforms
- Global Identity: Portable identity backed by DIDs - your handle works everywhere
- Easy Deployment: Deploy to Vercel with one click, no Docker or complex setup required
- Modern UX: Clean, Vercel-inspired dark theme with responsive design
- Transparent Feeds: Chronological and curated feeds with clear algorithms
- Moderation: Admin dashboard for reports, post removals, and user actions
Quick Start
Prerequisites
- Node.js 18+
- A Neon PostgreSQL database (free tier available at https://neon.tech)
- An Upstash Redis database (free tier available at https://upstash.com)
Setup
-
Clone the repository:
git clone https://github.com/your-username/synapsis.git cd synapsis -
Install dependencies:
npm install -
Copy the environment example and configure:
cp .env.example .env -
Update
.envwith your database credentials:DATABASE_URL=postgresql://... UPSTASH_REDIS_REST_URL=https://... UPSTASH_REDIS_REST_TOKEN=...
AUTH_SECRET=generate-a-random-string NEXT_PUBLIC_NODE_DOMAIN=your-domain.com NEXT_PUBLIC_NODE_NAME=My Synapsis Node ADMIN_EMAILS=comma,separated,emails
5. Run database migrations:
```bash
npm run db:push
- Start the development server:
npm run dev
Deploy to Vercel
- Click the button above
- Connect your Neon PostgreSQL and Upstash Redis
- Configure environment variables
- Deploy!
Architecture
- Frontend: Next.js 14+ with App Router
- Backend: Next.js API Routes (serverless)
- Database: PostgreSQL via Neon
- Cache: Redis via Upstash
- Federation: ActivityPub protocol
API Endpoints
Authentication
POST /api/auth/register- Create accountPOST /api/auth/login- LoginPOST /api/auth/logout- LogoutGET /api/auth/me- Get current user
Posts
POST /api/posts- Create a postGET /api/posts- Get feedPOST /api/posts/[id]/like- Like a postDELETE /api/posts/[id]/like- Unlike a postPOST /api/posts/[id]/repost- Repost
Federation
GET /.well-known/webfinger- WebFinger discoveryGET /.well-known/nodeinfo- NodeInfo discoveryGET /nodeinfo/2.1- Node metadataGET /.well-known/synapsis-handles- Handle registry exportPOST /api/federation/handles- Ingest handle registry from peersPOST /api/federation/gossip- Pull registry from peer nodes (admin)GET /api/handles/resolve- Resolve handle to DID
Installation
GET /install- Setup wizardGET /api/install/status- Installation status
License
Apache 2.0 License - see LICENSE file for details.
Description
Languages
TypeScript
97.5%
CSS
1.9%
JavaScript
0.3%
Shell
0.3%