A generic, plug-and-play Express.js boilerplate that automatically detects and blocks NSFW (Not Safe For Work) image and video uploads using the Tabu AI Moderation API.
If you are building an application where users can upload images, you are legally liable for the content they upload (especially under the EU DSA or App Store Guidelines).
This boilerplate provides a ready-to-use backend server route that intercepts image and video uploads, scans them using Tabu's enterprise-grade visual AI, and blocks them if they are explicit.
You can plug this into any platform:
- 📱 Next.js / React Native Social Networks
- 💬 Dating Apps
- 🏢 Community Forums (Discourse, NodeBB)
- 🤖 Custom Chat Bots (Discord, Slack, Telegram)
- 🚀 Drop-in Ready: Pre-configured Express + Multer setup.
- 🛡️ Zero Data Retention: Tabu processes images in-memory and instantly deletes them. We never store your users' private media.
- 👨⚖️ Human-in-the-Loop Dashboard: Includes a free web dashboard where you can log in, review flagged edge-cases, and adjust AI sensitivity individually for both photos and videos.
- 📄 Compliance Reports: One-click generation of PDF transparency reports to prove your app is actively moderated.
If you don't want to use an Express boilerplate and just want to call the REST API directly from your existing backend, check out our Official API Documentation.
You need a Tabu API key to power the AI engine.
- Go to TabuShield.com and click "Start for free".
- Sign in (No credit card required).
- Go to the API Keys tab and create a new key.
Clone this repository and open the folder in your terminal:
git clone https://github.com/sulejj/tabu-nsfw.git
cd tabu-nsfwInstall dependencies:
npm installRename .env.example to .env and paste your API key:
TABU_API_KEY=your_tabu_key_here
PORT=3000Start the server!
npm startYou can test the server by sending a POST request with an image file:
curl -X POST http://localhost:3000/upload \
-F "image=@/path/to/your/test_image.jpg"If the image is safe, the server will accept it. If it's NSFW, the server will instantly reject the upload.
Your free Tabu account includes 5,000 image scans per month.
You can monitor your usage, review flagged images, and generate moderation reports by logging into your Tabu Dashboard. If your app grows and you need higher limits, you can upgrade your plan directly in the dashboard.
Built with ❤️ by the team at Tabu - Content safety without the headache.