Cleanstr is a Google Cloud Function node application designed to filter and moderate content from Nostr using OpenAI's moderation service. With the surge in user-generated content, maintaining the quality and safety of shared data is paramount. Cleanstr seamlessly takes in a pubsub feed of Nostr content, checks it, and generates Nostr events tagging the results.
Clone the Repository
git clone https://github.com/planetary-social/cleanstr.git
cd cleanstr
Prerequisites
pnpm install
Testing Setup
NOSTR_PRIVATE_KEY
environment variable with the private key of a test nostr account used to publish moderation reports.pnpm test
to ensure everything is set up correctly.Deployment to Google Cloud
gcloud
) is installed and configured with your account.NOSTR_PRIVATE_KEY
for the reporting account private key, and OPENAI_API_CSV
for your OpenAI API keys.pnpm run deploy
to upload Cleanstr to Google Cloud.wss://relay.nos.social
. You can change this relay to your own.Integration with our Nostr Relay
wss://relay.nos.social
to your Nostr client's relay list.For any issues or suggestions, please open an issue or contact our support team at support@nos.social.
We welcome contributions! To contribute, fork the repository, create a feature branch, implement your changes, commit, push to your branch, and open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.