Fake News Detector is a full-stack web app that detects whether a news article or statement is real or fake using a trained Machine Learning model.
This project integrates:
- Frontend: React (Vite)
- Backend: Node.js + Express
- ML Service: Python (Flask/FastAPI)
- Database: MongoDB Atlas
and supports authentication, history tracking, and AI-powered fake news detection — deployed fully on Vercel and Render.
- ⚛️ React + Vite
- 🌈 Tailwind / Material UI (if used)
- 🔗 Axios for API requests
- ☁️ Deployed on Vercel
- 🧠 Node.js + Express.js
- 🔒 JWT Authentication
- 🗄️ MongoDB Atlas (Mongoose ORM)
- ☁️ Deployed on Render
- 🐍 Python (Flask / FastAPI)
- 🤖 Scikit-learn / TensorFlow model
- 🧮 NLP-based classification
- ☁️ Deployed on Render
[Frontend - React (Vercel)]
│
▼
[Backend - Node/Express (Render)]
│
▼
[ML Service - Python (Render)]
│
▼
[ML Model Prediction]1️⃣ User enters or pastes a news headline or text.
2️⃣ Frontend sends a POST request to the Backend API.
3️⃣ Backend forwards the request to the Python ML microservice.
4️⃣ ML service predicts whether the news is Real or Fake.
5️⃣ Backend sends the response back to the frontend.
6️⃣ If logged in, the prediction is stored in the user’s history.
| Feature | Description |
|---|---|
| 🔐 User Authentication | Login / Signup using JWT |
| 🧾 News History | Stores all checked articles per user |
| ❌ Delete History | Option to clear saved results |
| 🧠 AI/ML Detection | Detects Fake vs Real news |
| ⚡ Quick Check | Check without logging in |
| 🌐 Cloud Deployment | Fully hosted on Vercel & Render |
git clone https://github.com/anuragrajpoott/fake_news_detector.git
cd fake_news_detectorcd frontend
npm install
npm run devCreate a .env file in /frontend:
VITE_BACKEND_URL=https://your-backend.onrender.comcd backend
npm install
npm run devCreate a .env file in /backend:
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_secret_key
ML_API_URL=https://your-mlservice.onrender.com/predictcd mlservice
python -m venv venv
venv\Scripts\activate # For Windows
# or
source venv/bin/activate # For macOS/Linux
pip install -r requirements.txt
python pythonapp.pyThe ML service runs locally at:
http://localhost:5002| Service | URL |
|---|---|
| 🖥️ Frontend | Vercel Deployment |
| ⚙️ Backend | Render Backend |
| 🤖 ML API | Render ML Service |
Input:
“The government has announced a new scheme to provide free Wi-Fi across rural areas.”
Output:
✅ Real News (Confidence: 0.82)
- Login Page
- News Check Page
- History Page
(Replace these placeholders with your actual screenshots)
- 🧩 Deep Learning model (BERT / LSTM)
- 🌍 Multi-language fake news detection
- 📱 Mobile responsive UI
- 🔊 Voice input support
- 📊 Advanced analytics dashboard
| Name | Role |
|---|---|
| Anurag Rajpoot | Full Stack Developer |
| Nandini | ML Engineer |
| Khushi | Frontend Developer |
| Shubhanshu | Backend Developer |
This project demonstrates the fusion of AI and Web Technologies to combat misinformation online.
By combining Machine Learning with the MERN Stack, we deliver a fast, intelligent, and user-friendly platform for detecting fake news in real time.
This project is licensed under the MIT License — feel free to use and modify it.
⭐ If you like this project, don’t forget to star the repo!
👉 https://github.com/anuragrajpoott/fake_news_detector