This mode runs the Next.js frontend with mock data. No Docker, no Python services needed.
npm installcp .env.local .env.local.bak # backup
# Edit .env.local and fill in the values below- Go to https://platform.openai.com → Sign up
- API Keys → Create new secret key
- Add to
.env.local:OPENAI_API_KEY=sk-your_key_here
- Go to https://console.cloud.google.com
- Create project → APIs & Services → Credentials
- Create Credentials → OAuth 2.0 Client ID
- Application type: Web app
- Authorized JavaScript origins:
http://localhost:3000 - Authorized redirect URIs:
http://localhost:3000/api/auth/google - Add to
.env.local:NEXT_PUBLIC_GOOGLE_CLIENT_ID=your_client_id.apps.googleusercontent.com
- Go to https://infura.io → Sign up (free tier)
- Create new project → Copy Project ID
- Add to
.env.local:ETHEREUM_RPC_URL=https://mainnet.infura.io/v3/YOUR_PROJECT_ID POLYGON_RPC_URL=https://polygon-mainnet.infura.io/v3/YOUR_PROJECT_ID
Run this in terminal:
node -e "console.log('JWT_SECRET=' + require('crypto').randomBytes(64).toString('hex'))"
node -e "console.log('ENCRYPTION_KEY=' + require('crypto').randomBytes(16).toString('hex') + '0000000000000000')"
node -e "console.log('SESSION_SECRET=' + require('crypto').randomBytes(32).toString('hex'))"Paste the output into .env.local.
npm run devDemo login credentials:
- Email:
admin@authcorp.com/ Password:admin123 - Or use Google OAuth if configured
Requires Docker Desktop.
# Copy env file
cp .env.local .env
# Start everything
docker-compose up -d
# Check logs
docker-compose logs -f frontendServices will be available at:
| Service | Port |
|---|---|
| Frontend | http://localhost:3000 |
| Auth Service | http://localhost:8009 |
| Ingest Service | http://localhost:8001 |
| ELA Detector | http://localhost:8002 |
| Metadata Detector | http://localhost:8003 (mapped from 8004 in compose) |
| Quantization Detector | http://localhost:8004 (mapped from 8003 in compose) |
| Fusion Service | http://localhost:8005 |
| OCR Service | http://localhost:8006 |
| Risk Service | http://localhost:8007 |
| Report Service | http://localhost:8008 |
| Grafana | http://localhost:3001 (admin/authcorp123) |
| Prometheus | http://localhost:9090 |
Browser → Next.js Frontend (port 3000)
↓
Next.js API Routes (/api/*)
↓ (optional — for full stack)
┌─────────────────────────────────┐
│ Python Microservices │
│ ├── Ingest (8001) │
│ ├── ELA Detector (8002) │
│ ├── Metadata Detector (8003) │
│ ├── Quantization (8004) │
│ ├── OCR Service (8005→8006) │
│ ├── Fusion Service (8006→8005) │
│ ├── Risk Intelligence (8007) │
│ ├── Report Generator (8008) │
│ └── Auth Service (8009) │
└─────────────────────────────────┘
↓
PostgreSQL (5432) + Redis (6379)
Authcorp-main/
├── src/
│ ├── app/ # Next.js pages + API routes
│ │ ├── api/
│ │ │ ├── assistant/ask/ # AI assistant (OpenAI-powered)
│ │ │ ├── auth/ # Login, logout, Google OAuth
│ │ │ ├── blockchain/ # Anchoring (Infura)
│ │ │ ├── documents/ # Document analysis
│ │ │ └── threats/ # Threat simulation
│ │ ├── ai-assistant/ # AI chat page
│ │ ├── blockchain/ # Blockchain anchoring page
│ │ ├── monitoring/ # System monitoring page
│ │ └── threat-simulation/ # Threat simulator page
│ ├── components/ # React components
│ └── lib/ # Utilities (security, DB, etc.)
├── services/
│ ├── auth/ # Python auth service
│ ├── detectors/
│ │ ├── ela/ # Error Level Analysis
│ │ ├── metadata/ # EXIF metadata analysis
│ │ └── quantization/ # DCT quantization analysis
│ ├── fusion/ # Multi-detector result fusion
│ ├── ingest/ # File upload & queue
│ ├── ocr/ # Tesseract OCR
│ ├── report/ # PDF report generator
│ └── risk/ # Risk intelligence & screening
├── sql/ # PostgreSQL schema
├── .env.local # Your environment config (git-ignored)
└── docker-compose.yml # Full stack Docker setup