Sentinel is a decentralized, full-stack Web3 platform designed to combat misinformation and deepfakes by leveraging community consensus and immutable blockchain anchoring.
Whenever community consensus is reached on a piece of content (Post or Comment), the system natively generates a cryptographic SHA-256 hash of the content and permanently anchors the verdict to the Sepolia Ethereum network via a gasless relayer.
- Frontend: React (Vite), Tailwind CSS, ethers.js, Lucide Icons.
- Backend: Node.js, Express.js, native
crypto(SHA-256), ethers.js relayer. - Smart Contract: Deployed on Sepolia Testnet.
Follow these instructions to run the full-stack environment locally for testing.
Your teammate will provide you with .env files or you can use the .env.example templates.
- Backend: Place the provided
.envfile directly into the/backenddirectory. It contains theRPC_URL,RELAYER_PRIVATE_KEY, andCONTRACT_ADDRESSneeded for on-chain transactions. - AI Orchestrator: Add
GOOGLE_API_KEY,GROQ_API_KEY, andOPENAI_API_KEYto/ai-orchestrator/.env. - Moderation Service: Add
HF_TOKEN(Hugging Face token) to/moderation_service/.envfor downloading gated models like NudeNet and SwinV2.
Open four terminal windows.
Terminal 1 (Backend - Node.js):
cd backend
npm installTerminal 2 (Frontend - React):
cd frontend
npm installTerminal 3 (AI Orchestrator - Python):
cd ai-orchestrator
python -m venv venv
source venv/Scripts/activate
pip install -r requirements.txt
# Requires GOOGLE_API_KEY, GROQ_API_KEY, OPENAI_API_KEY in .envTerminal 4 (Moderation Service - Python):
cd moderation_service
python -m venv venv
source venv/Scripts/activate
pip install -r requirements.txt
# Note: First run will download ~2GB of ML models (SwinV2, NudeNet). Ensure HF_TOKEN is in .env.Start all four servers simultaneously in their respective terminals:
Backend:
cd backend
npm run dev
# Expected output: 🚀 Sentinel Node.js Backend running on port 8000Frontend:
cd frontend
npm run dev
# Expected output: ➜ Local: http://localhost:5173/Moderation Service:
cd moderation_service
source venv/Scripts/activate
python app.py
# Expected output: INFO: Uvicorn running on http://0.0.0.0:8002AI Orchestrator:
cd ai-orchestrator
source venv/Scripts/activate
uvicorn app:app --host 0.0.0.0 --port 5000 --reload
# Expected output: Uvicorn running on http://0.0.0.0:5000To safely shut down the servers, navigate to each of the four terminal windows you opened and press:
Ctrl + C (Windows/Linux) or Cmd + C (Mac)
If you are prompted with Terminate batch job (Y/N)? on Windows, simply type Y and press Enter. Once you have done this in all four terminals, the entire project will be closed.
The platform features a 3-tier LangChain Fallback Hierarchy (Gemini 2.0 Flash → Groq Llama 3.3 70B → OpenAI GPT-4o-mini) that evaluates text posts in a single pass to provide:
- AI Generation Detection: Identifies stylometric markers indicating LLM authorship.
- Harm & Safety Assessment: Flags hate speech, misinformation, and other high-risk content using a strictly enforced 10-Tag Harm Taxonomy (e.g., Harassment, Self-Harm, Scams) and a Zero-Tolerance Rubric.
- Domain Classification: Categorizes the text by topic (e.g., Politics, Tech).
The backend automatically routes text posts to this engine and renders the resulting scores and tags seamlessly in the frontend UI.
The platform features a multi-stage image analysis pipeline that processes visual content in a single pass:
- NSFW Detection: Uses NudeNet to identify and block explicit content before further processing.
- C2PA Provenance: Scans for embedded Content Credentials (C2PA manifests) to detect cryptographically disclosed AI generation.
- Deepfake & AI Generation Detection: Employs a SwinV2 Transformer (converted to ONNX FP16 for CPU efficiency) for whole-image classification, flagging deepfakes and AI-generated imagery without relying on face detection.
This service operates sequentially for early exits and uses ONNX Runtime to provide extremely fast inference.
Once the servers are running, open http://localhost:5173/dashboard in your browser.
- Connect Wallet: Click the top right button to connect your MetaMask.
- Submit Content: Go to the Verification Feed tab and submit a test post.
- Trigger Consensus:
- A post requires exactly 3 unique votes to hit consensus.
- Vote on the post with your current wallet.
- Switch accounts in MetaMask (Account 2, Account 3) and cast the remaining votes.
- On-Chain Anchoring (The 15-Second Delay):
- Upon the 3rd vote, the backend will compute the hash and call the Sepolia blockchain.
- Wait roughly 15 seconds for the Ethereum block to be mined.
- Verify Cryptography:
- The post will move to the On-Chain Record tab.
- Click the "Verify Local Integrity" button. The browser will hash the raw text locally using
crypto.subtleand compare it to the blockchain record. You should see a massive green success notification! - Click View Record to see the actual anchored transaction on the Sepolia Blockscout explorer.
Built for the Hackathon. 🚀