feat(swarm): Implement decentralized node discovery and content federation system

- Add swarm node registry with discovery, gossip, and timeline synchronization
- Implement database schema for swarm nodes, seeds, and sync logs with proper indexing
- Create swarm API endpoints for node discovery, gossip protocol, timeline sharing, and announcements
- Add content moderation features with NSFW flagging and muted nodes support
- Implement user settings pages for content filtering and node moderation
- Add background scheduler for automated swarm synchronization and node health checks
- Create .well-known endpoint for swarm protocol discovery
- Remove legacy bot-cron.ts in favor of integrated scheduler system
- Add user account NSFW preferences and age verification tracking
- Update database schema with swarm-related tables and user moderation fields
- Enhance post and user components to support federated content display
- Add instrumentation for monitoring swarm operations and node health
This commit is contained in:
AskIt
2026-01-25 23:01:29 +01:00
parent 765845bd89
commit e2fa572e84
42 changed files with 10829 additions and 164 deletions
+2
View File
@@ -25,6 +25,7 @@ export async function PATCH(req: NextRequest) {
bannerUrl: data.bannerUrl,
logoUrl: data.logoUrl,
accentColor: data.accentColor,
isNsfw: data.isNsfw ?? false,
}).returning();
} else {
[node] = await db.update(nodes)
@@ -36,6 +37,7 @@ export async function PATCH(req: NextRequest) {
bannerUrl: data.bannerUrl,
logoUrl: data.logoUrl,
accentColor: data.accentColor,
isNsfw: data.isNsfw ?? node.isNsfw,
updatedAt: new Date(),
})
.where(eq(nodes.id, node.id))