@kkuffour/solid-moderation-plugin
v0.3.0
Published
Content moderation plugin for Community Solid Server
Maintainers
Readme
@kkuffour/solid-moderation-plugin
Content moderation plugin for Community Solid Server using SightEngine API.
Status
✅ Functional - Uses CSS ExtensionHandler pattern (v0.3.0+)
Installation
npm install @solid/community-server
npm install @kkuffour/solid-moderation-pluginConfiguration
Set environment variables:
export SIGHTENGINE_API_USER="your_api_user"
export SIGHTENGINE_API_SECRET="your_api_secret"Run CSS with the plugin:
npx community-solid-server \
-c @css:config/file.json \
-c @kkuffour/solid-moderation-plugin:config/default.json \
-f data/ -p 3000How It Works
The plugin uses CSS's ExtensionHandler pattern to intercept POST/PUT/PATCH operations before they reach storage:
- Handler runs first in the operation chain
- Moderates image/video/text content using SightEngine API
- Blocks inappropriate content with 403 Forbidden
- Passes approved content to standard handlers
Components
ModerationHandler- OperationHandler that moderates POST/PUT/PATCH operationsSightEngineProvider- SightEngine API client
License
MIT
