AI-Powered Article Analysis Tool – Verify facts, detect bias, and get insights with TrueLensAI's backend API and Chrome extension.
- Article Analysis: Extract and analyze web content using Google Gemini AI
- Fact-Checking: Optional integration with Serper.dev for real-time verification
- Chrome Extension: Seamless browser integration with MV3 manifest
- User Authentication: Secure Firebase-based auth and user profiles
- Chat Interface: Interactive AI conversations about analyzed content
- Inaccuracy Reporting: Community-driven content moderation
- Responsive UI: Built with Tailwind CSS for modern design
- Node.js – Runtime environment
- Express.js – Web framework for API
- Firebase Admin SDK – Authentication and database
- Google Generative AI – AI-powered content analysis
- Serper.dev – Fact-checking API (optional)
- TypeScript – Type-safe JavaScript
- Chrome Extension API – Browser integration
- Webpack – Module bundler
- Tailwind CSS – Utility-first CSS framework
- ESLint – Code linting
- Stylelint – CSS linting
- Prettier – Code formatting
- Node.js (v16+)
- npm or yarn
- Google Chrome browser
- Firebase project
- Google Cloud API key
-
Clone the repository
git clone https://github.com/sohamm-76/TrueLensAI.git cd TrueLensAI -
Install dependencies
npm install cd backend && npm install cd ../extension && npm install
-
Configure environment
- Copy
backend/env.exampletobackend/.env - Fill in your API keys:
FIREBASE_PROJECT_IDGOOGLE_GENERATIVE_AI_API_KEYSERPER_API_KEY(optional)
- Copy
-
Add Firebase credentials
- Place your Firebase service account JSON at
backend/firebase-key.json - Or set
FIREBASE_SERVICE_ACCOUNT_PATHin.env
- Place your Firebase service account JSON at
-
Start the backend
npm run backend:start
Server runs at
http://localhost:5000
-
Build the extension
npm run build
-
Load in Chrome
- Open
chrome://extensions - Enable "Developer mode"
- Click "Load unpacked"
- Select
extension/dist
- Open
-
Configure OAuth
- In
extension/dist/manifest.json, replaceoauth2.client_idwith your Google OAuth client ID
- In
-
Update Firebase config (optional)
- Edit
extension/dist/firebase-config.jsonfor your Firebase project
- Edit
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /health |
Health check | No |
| POST | /api/analyze |
Analyze article content | Yes |
| POST | /api/chat |
AI chat about content | Yes |
| POST | /api/report-inaccuracy |
Report content issues | Yes |
| GET | /api/user/history |
User analysis history | Yes |
| GET | /api/user/profile |
User profile data | Yes |
- Never commit secrets:
.envfiles andfirebase-key.jsonare gitignored - Regenerate keys: If exposed, immediately revoke and regenerate API keys
- Environment variables: Use production-grade secret management
- HTTPS: Always use secure connections in production
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Gemini for AI capabilities
- Firebase for backend infrastructure
- Chrome Extension community for best practices
Made with ❤️ for transparent and accurate information