AI-powered invoice and receipt verification system for fraud prevention in Nigeria, built with the MERN stack.
# VeriDoc NG
**AI-Assisted Invoice and Receipt Risk Verification System for Fraud Prevention in Nigeria**
VeriDoc NG is a deployable MERN stack SaaS project designed for Nigerian SMEs, finance teams, schools, NGOs, cooperative groups, fintech operations, and compliance analysts who need a safer workflow before approving payments or releasing funds based on invoices or receipts.
The application does **not** claim to prove an invoice is genuine with 100% certainty. It performs **risk-based verification** by extracting document information, applying fraud-control rules, comparing against approved vendor records, identifying duplicates and suspicious patterns, and generating a clear analyst-friendly risk explanation.
## What is included
- MERN architecture: MongoDB, Express, React, Node.js
- Authentication with JWT
- Role-based access: Admin, Supervisor, Analyst
- Client-facing landing page
- Modern responsive dashboard UI
- Invoice/receipt upload flow
- OCR/text extraction service using Tesseract.js and PDF text extraction using pdf-parse
- Rule-based verification engine
- Risk scoring: Low, Medium, High
- AI risk explanation hook with OpenAI support and local fallback summary
- Vendor/account matching
- Duplicate invoice detection
- Missing field checks
- Suspicious date checks
- Similar invoice checks
- Verification history
- Supervisor review: approve, reject, escalate
- Audit trail logging
- Subscription plans and document usage limits
- Demo plan upgrade flow
- Seed data for testing
- Deployment-ready environment files
## Project structure
```txt
veridoc-ng/
backend/ Express API, MongoDB models, OCR, verification engine
client/ React + Vite + Tailwind frontend
docker-compose.yml
README.md
```
## Tech stack
### Frontend
- React
- Vite
- Tailwind CSS
- React Router
- Axios
- Lucide React
- Recharts
### Backend
- Node.js
- Express
- MongoDB + Mongoose
- JWT authentication
- Multer file upload
- Tesseract.js OCR
- pdf-parse
- OpenAI SDK optional …