FactGuard is a sophisticated full-stack application designed to combat misinformation by analyzing headlines and news articles using advanced AI models. It provides users with an immediate credibility assessment, highlighting potential bias, factual inaccuracies, and logical fallacies in a clean, journalistic interface.
FactGuard serves as a "digital news desk" where users can submit articles for verification. The system uses a multi-layered AI approach to cross-reference claims and analyze tone, returning a "Verdict" (Verified, Uncertain, or Fake) along with a confidence score and detailed breakdown.
- Multi-Model AI Analysis: Robust backend that attempts analysis via multiple LLMs (Llama 3.3, GPT-OSS, Nemotron) to ensure availability and accuracy even during high traffic or rate limits.
- Journalistic "Wizard" Interface: A step-by-step editorial workflow (Draft → Review → Report) designed to mimic a professional newsroom environment.
- Detailed Credibility Reports:
- Verdict Badges: Clear visual indicators of article truthfulness.
- Confidence Gauge: Quantitative scoring of the AI's certainty.
- Flagged Issues: Specific highlighting of clickbait titles, logical fallacies, or lack of citations.
- Thematic Design:
- Typography: Merriweather (Serif) headers for an authoritative editorial feel, paired with Inter (Sans) for readability.
- Dark/Light Mode: "Late Night Desk" (Dark) vs. "Newspaper" (Light) themes.
- Paper Textures: Subtle grain and grid patterns to enhance the investigative aesthetic.
- Framework: React + Vite
- Language: TypeScript
- Styling: Tailwind CSS
- UI Components: shadcn/ui (Radix Primitives)
- State Management: TanStack Query (for API state)
- Icons: Lucide React
- Runtime: Node.js
- Framework: Express.js
- AI Integration: OpenRouter API (Aggregating Llama 3, Mistral, etc.)
- Validation: Zod
- Node.js (v18+)
- npm or bun
- An OpenRouter API Key (for the backend)
-
Clone the repository
git clone https://github.com/your-username/veritas-ai-dashboard.git cd veritas-ai-dashboard -
Install dependencies
Root (Frontend):
npm install
Server (Backend):
cd server npm install -
Environment Setup Create a
.envfile in the server directory:OPENROUTER_API_KEY=your_openrouter_api_key_here PORT=3001
This is a full-stack application requiring both the frontend and backend to run simultaneously.
-
Start the Backend Server
cd server npm run dev # Runs on http://localhost:3001
-
Start the Frontend Development Server (in a new terminal)
# From project root npm run dev # Runs on http://localhost:8080
-
Open your browser to
http://localhost:8080to start investigating articles.
The backend (server/llm.ts) implements a robust fallback mechanism. If the primary model is rate-limited (429) or unavailable:
- Primary:
meta-llama/llama-3.3-70b-instruct - Fallback 1:
openai/gpt-oss-120b - Fallback 2:
nvidia/nemotron-nano-9b-v2 - Fallback 3:
stepfun/step-3.5-flash
This ensures high reliability for verifications without requiring expensive enterprise plans.
├── src/
│ ├── components/ # React UI components (Dashboard, Input, Badge)
│ ├── hooks/ # Custom React hooks (use-analysis)
│ ├── pages/ # Page layouts (Index, NotFound)
│ └── lib/ # Utilities and API clients
├── server/
│ ├── index.ts # Express server entry point
│ ├── llm.ts # AI model interaction logic
│ └── prompt.ts # System prompts for analysis
└── public/ # Static assets
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.