Live Demo: authcorp.vercel.app
AuthCorp is a next-generation forensic document verification platform that uses AI vision, blockchain anchoring, and multi-detector forensic analysis to detect forged, tampered, and AI-generated documents in real time.
Built as a Final Year B.Tech Project.
| Feature | Description |
|---|---|
| π AI Forensic Analysis | GPT-4o-mini Vision analyses every uploaded document β returns authenticity score, heatmap regions, metadata clues |
| πΈ Live AR Document Scanner | WebRTC camera feed + live frame capture + instant AI analysis with AR overlay boxes |
| π Blockchain Anchoring | Anchors document SHA-256 hash to Ethereum/Polygon via Infura β creates tamper-evident timestamp proof |
| πΊοΈ Tampering Heatmap | Visual grid showing suspicious regions color-coded by type (text modification, copy-move, compression anomaly) |
| π Metadata Forensics | EXIF data extraction, editing software detection, font inconsistency analysis |
| π€ AI Forensic Assistant | OpenAI GPT-3.5-turbo powered chat with full document context awareness |
| π‘οΈ Risk Intelligence | Sanctions screening, fraud pattern detection, risk scoring with evidence trail |
| π Real-time Dashboard | Live deepfake counter, authenticity rate, recent activity feed |
| π Secure Auth | JWT sessions + Google OAuth 2.0 |
| π¨ Threat Simulation | Test the system with simulated attack scenarios |
Frontend: Next.js 14 Β· React 18 Β· TypeScript Β· Tailwind CSS Β· Framer Motion
AI: OpenAI GPT-4o-mini Vision Β· GPT-3.5-turbo
Blockchain: Ethereum + Polygon via Infura JSON-RPC
Auth: JWT Β· Google OAuth 2.0
Database: PostgreSQL (Neon) Β· Redis (Upstash)
Deployment: Vercel (serverless)
Camera: WebRTC Β· HTML5 Canvas API
git clone https://github.com/YOUR_USERNAME/authcorp.git
cd authcorp
npm installcp .env.local .env.local.bakEdit .env.local with your API keys:
# Security (generate with: node -e "console.log(require('crypto').randomBytes(64).toString('hex'))")
JWT_SECRET=your_64_char_secret
ENCRYPTION_KEY=your_32_char_key
SESSION_SECRET=your_random_secret
# Google OAuth β console.cloud.google.com
NEXT_PUBLIC_GOOGLE_CLIENT_ID=your_client_id.apps.googleusercontent.com
# OpenAI β platform.openai.com (free $5 credit)
OPENAI_API_KEY=sk-your_key
# Infura/MetaMask β developer.metamask.io (free tier)
ETHEREUM_RPC_URL=https://mainnet.infura.io/v3/YOUR_PROJECT_ID
POLYGON_RPC_URL=https://polygon-mainnet.infura.io/v3/YOUR_PROJECT_ID
# Database β neon.tech (free tier)
DATABASE_URL=postgresql://user:pass@host/authcorp?sslmode=require
# Redis β upstash.com (free tier)
REDIS_URL=rediss://default:password@host.upstash.io:6379
# Feature flags
ENABLE_BLOCKCHAIN_ANCHORING=true
ENABLE_AI_ASSISTANT=true
ENABLE_REAL_TIME_MONITORING=true
NODE_ENV=development
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_API_URL=http://localhost:3000/apinpm run devDemo credentials: admin@authcorp.com / admin123
| Service | URL | Free Tier |
|---|---|---|
| OpenAI | platform.openai.com | $5 free credit |
| Google OAuth | console.cloud.google.com | Free forever |
| Infura (Blockchain) | developer.metamask.io | 3M requests/month |
| Neon (PostgreSQL) | neon.tech | 512MB free |
| Upstash (Redis) | upstash.com | 500k commands/month |
authcorp/
βββ src/
β βββ app/
β β βββ api/
β β β βββ assistant/ask/ # AI assistant (OpenAI GPT-3.5)
β β β βββ auth/ # Login, logout, Google OAuth
β β β βββ blockchain/ # Blockchain anchoring (Infura)
β β β βββ documents/
β β β βββ analyze/ # Document analysis pipeline
β β β βββ vision-analyze/ # GPT-4o-mini Vision API
β β βββ ar-forensics/ # Live document scanner page
β β βββ login/ # Auth page
β β βββ page.tsx # Main dashboard
β βββ components/
β β βββ forensics-provider.tsx # Global analysis state
β β βββ forensic-analysis.tsx # Forensic tabs (Overview/Heatmap/Metadata/Text)
β β βββ risk-intelligence.tsx # Risk screening
β β βββ dashboard.tsx # Main dashboard
β β βββ document-upload.tsx # Upload interface
β β βββ futuristic-features.tsx # AR Scanner, Blockchain, AI Assistant
β β βββ header.tsx # Live stats header
β βββ lib/
β βββ blockchain-config.ts # Network definitions
β βββ document-classifier.ts # Document type detection
β βββ security.ts # JWT, encryption, audit logging
β βββ ai-detection.ts # AI detection engine
βββ services/ # Python microservices (Docker)
β βββ detectors/ela/ # Error Level Analysis
β βββ detectors/metadata/ # EXIF metadata analysis
β βββ detectors/quantization/ # DCT quantization analysis
β βββ fusion/ # Multi-detector result fusion
β βββ ingest/ # File ingestion service
β βββ ocr/ # Tesseract OCR
β βββ risk/ # Risk intelligence service
βββ sql/init.sql # PostgreSQL schema
βββ docker-compose.yml # Full stack Docker setup
βββ vercel.json # Vercel deployment config
User uploads document
β
FileReader converts to base64
β
GPT-4o-mini Vision API analyses image
β
Returns: authenticity score, document type,
heatmap regions, metadata clues,
extracted text, reasoning
β
Results displayed across 5 tabs:
Overview Β· Heatmap Β· Metadata Β· Text Analysis Β· Comparison
β
If score < 60% β Deepfake counter increments
If blocked β Security alert shown
β
Optional: Anchor SHA-256 hash to blockchain
AuthCorp uses a witness-based anchoring approach:
- SHA-256 hash of document computed client-side
eth_blockNumbercalled on Infura to get latest blocketh_getBlockByNumberfetches block hash and timestamp- Deterministic anchor ID created:
SHA256(network:docHash:blockHash) - Block number verifiable on Etherscan / Polygonscan
This proves the document existed and was verified at a specific point in time without storing any personal data on-chain.
Add all environment variables in Vercel β Project β Settings β Environment Variables, then deploy.
| Role | Password | |
|---|---|---|
| Admin | admin@authcorp.com | admin123 |
| Investigator | investigator@authcorp.com | investigator123 |
| Analyst | analyst@authcorp.com | analyst123 |
Or use Continue with Google (after Google OAuth setup).
MIT License β Built for educational purposes as a B.Tech Final Year Project.