An AI-powered tool that detects fake news and misinformation in real time. This project analyzes text using AI and provides a credibility score to help users identify whether the information is trustworthy or potentially misleading.
TruthGuard-X is a Next.js 16 (App Router) project built with React 19, Tailwind CSS v4, and Framer Motion. It calls the OpenRouter and Groq APIs to perform fact-checking and deepfake analysis for the Indian market ("Bharat Edition").
- 🔎 Real-time misinformation detection
- 🤖 AI-powered text analysis
- 📊 Credibility score (0–100)
- 🌐 Clean and modern UI
- ⚡ Fast response
- 🧠 Designed for Gen Z and general users
- User enters a statement or news text.
- The AI model analyzes the content.
- The system compares it with known patterns of misinformation.
- A credibility score is generated.
- The tool shows whether the content is likely true, suspicious, or misleading.
- Frontend: React 19, Next.js 16, TypeScript, Tailwind CSS.
- Backend: Next.js API Routes.
- AI: OpenRouter API (Multi-model support).
- Deployment: Vercel.
- Node.js 18+
- npm or yarn
-
Clone & Install:
git clone <repo-url> cd truthguard-x npm install
-
Optional: Add OpenRouter API Key (for AI-powered analysis)
- Edit
.env.local:OPENROUTER_API_KEY=sk-or-v1-your-key-here - Get a free key from: https://openrouter.ai/api/keys
- Note: The app works without a key using local pattern matching
- Edit
-
Run Development Server:
npm run dev
Open http://localhost:3000 in your browser.
-
Build for Production:
npm run build npm start
git add .
git commit -m "Ready for Vercel deployment"
git push origin main- Go to https://vercel.com
- Click "Add New..." → "Project"
- Import your GitHub repository
- Click "Deploy"
- After import, go to Settings → Environment Variables
- Add:
OPENROUTER_API_KEY=sk-or-v1-your-key-here - Click "Save" and "Redeploy"
Your app is now live on Vercel!
- Never commit
.env.local- it's in.gitignore - API keys are only loaded on the server (Next.js API routes)
- For Vercel, keys are securely stored in project settings
- Test files use environment variables for security
Example:
Input: Bihar is in India.
Output: Credibility Score: 100 / 100 Result: True information
Misinformation spreads quickly on the internet. This tool helps people verify information before believing or sharing it.
The goal is to make fact-checking simple and accessible for everyone.
This tool provides an AI-generated credibility estimate and should not be considered a perfect fact-checking system. Always verify important information using trusted sources.
- Real-time news verification
- Browser extension
- Image misinformation detection
- Social media integration
Contributions are welcome! Feel free to open issues or submit pull requests to improve the project.
If you like this project, consider giving it a star ⭐ on GitHub.