$ show nextcloud/social
Nextcloud Social is a federated social networking application implemented as a Nextcloud app. It allows each Nextcloud user to become an ActivityPub actor (Person), enabling posting, following, liking, boosting, replying, and direct messaging across the Fediverse. The system is fully compatible with the Mastodon client API, supporting timelines, lists, filters, scheduled posts, polls, stories, collections, trends, and moderation features. The backend is written in PHP, structured with controllers, services, database request builders, and ActivityPub model classes. The frontend is built with Vue 3, Pinia, and Vue Router, providing a responsive single-page application for timelines, profiles, and settings. The app integrates deeply with Nextcloud's dashboard, notifications, search, user migration, and admin settings. Federation is handled via ActivityPub protocols with HTTP signature verification, outbound delivery queues, and WebFinger discovery. The codebase is well-tested with both PHPUnit and Vitest suites, covering unit, integration, and federation wire compatibility tests.
The LLM identified 5 files worth highlighting for reuse:
Provides safe dot-notation array access with type coercion and default values. Used pervasively across all models and services to avoid null checks and type errors. Reusable in any PHP project needing robust array handling.
Encrypts and decrypts private keys at rest using the Nextcloud instance secret via sodium seal/open. Protects sensitive cryptographic material from database leaks. Reusable for any application requiring server-side key encryption.
Serves files with HTTP Range header support for partial content (206), enabling video/audio seeking. Handles unseekable streams (e.g., object storage) by reading the full file into memory. Reusable for any PHP application needing byte-range file downloads.
Signs outgoing HTTP requests using the draft-cavage HTTP Signature scheme. Supports both POST (delivery) and GET (fetch) with automatic digest header generation. Reusable for any ActivityPub or federated application requiring request signing.
Sanitizes HTML content using DOMPurify with custom hooks to allow Nextcloud-specific tags (e.g., mentions, hashtags) while stripping dangerous elements. Reusable in any Vue.js application needing safe HTML rendering of user-generated content.