Explore the docs »
Report Bug
·
Request Feature
TruthGuardAI is a conceptual AI-driven tool designed to tackle the growing issue of misinformation and disinformation in the digital age. By leveraging advanced technologies like natural language processing (NLP) and machine learning, it aims to verify the accuracy of online content in real-time. The system would cross-reference claims with credible databases and fact-checking sources to identify false or misleading information. Additionally, it could detect language biases, evaluate sources' credibility, and provide users with alerts when they encounter potentially inaccurate content. TruthGuard AI might also offer transparency reports, explaining why certain information is flagged and providing evidence-based corrections. Ideally, it would integrate seamlessly into platforms like social media, news websites, or browsers, empowering users to make informed decisions about the content they consume and share. TruthGuard AI could play a crucial role in fostering a more informed and responsible online community by promoting digital literacy and reducing the spread of false information.
- Frontend: React + TypeScript (Vite), Tailwind CSS
- UI/Animation: Framer Motion, Lucide icons, React Three Fiber / drei (3D visuals)
- Data & Visualization: Chart.js / react-chartjs-2, wavesurfer.js (audio waveform), react-dropzone
- Backend: Node.js (
backend/server.js) - Data/Auth: Supabase
- Testing/CI: Vitest + React Testing Library, GitHub Actions (lint + test + build on every push/PR)
git clone https://github.com/bharat3645/TruthGuardAI.git
cd TruthGuardAI
npm install
npm run devOther useful scripts: npm run lint, npm test, npm run build.
Create a .env file in the project root with your own Supabase project credentials:
VITE_SUPABASE_URL=your-supabase-url
VITE_SUPABASE_ANON_KEY=your-supabase-anon-key
For the Node backend, see backend/example.env for the required variables.
This is an early-stage build — the frontend UI and a small Node backend exist, but the full fact-checking pipeline described above is still a work in progress.
This repo is tagged wip for a reason. Concretely, right now:
- Fake News Detection page (
/fakenews) does not call any machine-learning model. It runs a small set of hard-coded keyword/punctuation heuristics entirely client-side insrc/pages/FakeNewsDetection.tsx. The "Analyzing Content..." spinner is on a fixed timer, not real processing time. - Deepfake Detection page (
/deepfake) does not analyze the uploaded file at all. The confidence scores and "detected artifacts" shown are generated withMath.random()insrc/pages/DeepfakeDetection.tsx, weighted so results usually come back "authentic". This page exists to preview the results UI, not to detect anything. - The Node backend (
backend/server.js) exposes/api/fakenewsand/api/deepfakeroutes, but they proxy to a Flask service (FLASK_API_URL) that is not included in this repo and has no trained weights — the frontend also does not currently call this backend at all. - Both in-app pages now carry an explicit "prototype / simulated results" banner so this isn't
presented as real analysis to users. See
src/pages/About.tsxfor the same disclosure.
If you want to make the detection real, that means: standing up a model-serving backend (e.g. a
Flask/FastAPI service with actual trained weights), pointing FLASK_API_URL at it, and having the
two frontend detection pages call backend/server.js's /api/fakenews and /api/deepfake
routes instead of running the client-side placeholder logic. None of that exists in this repo yet.
An earlier commit accidentally tracked a .env file containing a live Supabase URL and anon key.
The file has since been removed from tracking (see git log), but that key is still visible in
this repository's git history and must be treated as compromised. If you are the project owner
and have not already rotated it in the Supabase dashboard, do that — deleting the file going
forward does not invalidate a key that was already pushed publicly.