Truth-Guard is a web application that provides real-time trending news and fact-checked claims. Built with a modern React frontend and a Flask backend, it integrates a SQLite database to store news articles and categories. The platform allows users to explore trending topics, filter by categories, and view key statistics at a glance.
- Trending News: Displays the latest trending articles from the database.
- Category Filters: Filter news by categories such as Politics, Health, Tech, and Entertainment.
- Statistics Widgets: Shows key metrics like total trending news, verified claims, and category-wise counts.
- Responsive Design: Works on both desktop and mobile screens.
- API Integration: Frontend fetches data from backend API endpoints.
- Easy Deployment: Ready for hosting on platforms like Render or other free hosting services.
Truth-Guard/
├─ Backend/
│ ├─ app.py # Flask backend server
│ ├─ requirements.txt # Python dependencies
│ ├─ news.db # SQLite database
│ ├─ routes/
│ │ ├─ fetch_news.py
│ │ └─ verify_news.py
│ └─ utils/
│ ├─ fact_check.py
│ ├─ langchain_agent.py
│ └─ news_api.py
├─ database/
│ ├─ connection.py
│ ├─ database.py # Script to create DB and insert sample data
│ └─ news.db
└─ Frontend/
└─ react-app/
├─ package.json
├─ src/
│ ├─ App.js
│ ├─ pages/
│ │ ├─ Dashboard.jsx
│ │ ├─ Trending.jsx
│ │ └─ Verify.jsx
│ └─ components/
│ ├─ NewsCard.jsx
│ └─ StatsWidget.jsx
- Navigate to the backend folder:
cd Backend- Create a virtual environment and activate it:
python -m venv venv
# Windows
venv\Scripts\activate
# macOS/Linux
source venv/bin/activate- Install dependencies:
pip install -r requirements.txt- Run the Flask server:
python app.pyThe backend runs on http://127.0.0.1:5000/.
- Navigate to the frontend folder:
cd Frontend/react-app- Install dependencies:
npm install- Start the development server:
npm startThe frontend runs on http://localhost:3000/ and fetches data from the backend API.
GET /api/trending– Returns all trending news articles.GET /api/categories– Returns all available news categories.
- The project can be deployed on Render, Vercel, or other free hosting platforms.
- Ensure both frontend and backend are deployed and frontend points to the correct backend URL.
- Frontend: React, Tailwind CSS, Axios, React Router
- Backend: Flask, SQLite, Flask-CORS
- Tools: VS Code, Postman
- Integrate real-time news APIs for dynamic updates.
- Implement user authentication and personalized news feed.
- Enhance fact-checking using AI integrations.
- Add analytics dashboard for user activity.
MIT License © 2025
Uday Engineering Student & Developer

