# Email Verifier Pro

> Enterprise-grade email verification platform with 90-95% accuracy. Desktop application with PHP backend API.

[![Version](https://img.shields.io/badge/version-1.0.0-blue.svg)](https://emailverifier.pro)
[![PHP](https://img.shields.io/badge/PHP-8.1+-8892BF.svg)](https://php.net)
[![Electron](https://img.shields.io/badge/Electron-28+-47848F.svg)](https://electronjs.org)
[![License](https://img.shields.io/badge/license-Commercial-orange.svg)](LICENSE)

---

## Features

### Email Verification Engine
- **Syntax Validation** - RFC 5322 compliant with Unicode/IDN support
- **DNS Verification** - MX, A, AAAA, SPF, DKIM, DMARC record checking
- **SMTP Verification** - Direct server handshake with retry logic
- **Catch-All Detection** - Identify domains that accept all emails
- **Spamtrap Detection** - Advanced pattern matching with 200+ role accounts
- **Disposable Detection** - 500+ temporary email providers
- **Free Provider Detection** - 200+ free email services (Gmail, Yahoo, Outlook, etc.)
- **Typo Detection** - Common domain typo correction
- **Gibberish Detection** - Entropy analysis for random usernames
- **Multi-layered Scoring** - Deliverability, risk, confidence scores

### Desktop Application
- Modern dark/light theme UI
- Single and bulk email verification
- Real-time progress tracking
- Drag-and-drop file import (TXT, CSV)
- Export to CSV, TXT, JSON, XLSX
- Multi-threaded worker processing
- Real-time log console
- License key management
- Auto-update system
- Cross-platform (Windows, macOS, Linux)

### Backend API
- RESTful API with JWT authentication
- License management system
- Rate limiting per client
- Bulk verification with batch processing
- Comprehensive activity logging
- Admin dashboard endpoints
- cPanel/LiteSpeed/Apache compatible
- Shared hosting optimized

---

## Quick Start

### 1. Backend Setup
```bash
# Upload php-backend/ to your web server
# Import database/schema.sql and database/seed_data.sql
# Edit php-backend/config/config.php with your settings
```

### 2. Desktop App
```bash
cd electron-app
npm install
npm run build:renderer
npm run build:win    # Windows
npm run build:mac    # macOS
npm run build:linux  # Linux
```

### 3. Activate License
Open the desktop app, enter your license key in Settings > License.

---

## Project Structure

```
email-verifier/
├── database/               # MySQL schema and seed data
│   ├── schema.sql          # Database structure
│   └── seed_data.sql       # Initial data
│
├── php-backend/            # PHP 8+ API
│   ├── api/                # API endpoints
│   │   ├── index.php       # Main entry point
│   │   └── router.php      # URL router
│   ├── config/             # Configuration
│   │   └── config.php      # Main config
│   ├── lib/                # Core libraries
│   │   ├── Database.php    # PDO MySQL manager
│   │   ├── Response.php    # API response helper
│   │   └── VerifierEngine.php  # Verification engine
│   └── middleware/         # Auth middleware
│       └── Auth.php        # Authentication
│
├── electron-app/           # Desktop application
│   ├── src/
│   │   ├── main/           # Main process
│   │   │   ├── main.js     # Entry point
│   │   │   └── preload.js  # IPC bridge
│   │   ├── renderer/       # React UI
│   │   │   ├── index.html
│   │   │   ├── index.js
│   │   │   ├── App.js
│   │   │   ├── components/ # UI components
│   │   │   └── pages/      # Page views
│   │   ├── workers/        # Background workers
│   │   │   └── verifier.worker.js
│   │   └── shared/         # Shared utilities
│   ├── assets/             # Icons, images
│   ├── build/              # Build output
│   ├── package.json
│   └── webpack.config.js
│
├── docs/                   # Documentation
│   ├── API_DOCUMENTATION.md
│   ├── INSTALLATION_GUIDE.md
│   └── CPANEL_DEPLOYMENT.md
│
└── README.md
```

---

## Verification Statuses

| Status | Description | Color |
|--------|-------------|-------|
| **VALID** | Email is deliverable | Green |
| **INVALID** | Email is undeliverable | Red |
| **RISKY** | Has risk factors | Yellow |
| **SPAMTRAP** | Likely spamtrap | Dark Red |
| **CATCH_ALL** | Domain accepts all | Purple |
| **DISPOSABLE** | Temporary email | Pink |
| **FREE_PROVIDER** | Free email service | Blue |
| **UNKNOWN** | Cannot determine | Gray |

---

## API Endpoints

### Public
- `GET /api/v1/health` - Health check
- `POST /api/v1/license/validate` - Validate license
- `POST /api/v1/auth/login` - Admin login

### Authenticated (API Key + License Key)
- `POST /api/v1/verify/single` - Single email verification
- `POST /api/v1/verify/bulk` - Bulk verification
- `GET /api/v1/verify/status/{batchId}` - Check batch status
- `GET /api/v1/verify/results/{batchId}` - Get results
- `GET /api/v1/verify/export/{batchId}` - Export results
- `GET /api/v1/license/info` - License info
- `GET /api/v1/stats/usage` - Usage statistics

### Admin (JWT Required)
- `GET /api/v1/admin/dashboard` - Dashboard stats
- `GET /api/v1/admin/licenses` - List licenses
- `POST /api/v1/admin/licenses` - Create license
- `GET /api/v1/admin/logs` - Activity logs
- `GET /api/v1/admin/disposable-domains` - List disposable domains

Full API documentation: [docs/API_DOCUMENTATION.md](docs/API_DOCUMENTATION.md)

---

## System Requirements

### Backend
- PHP 8.1+ with PDO, mbstring, openssl, json, curl
- MySQL 8.0+ or MariaDB 10.5+
- Apache 2.4+ with mod_rewrite OR LiteSpeed OR Nginx
- 512MB RAM, 1GB disk space

### Desktop App
- Windows 10/11, macOS 11+, or Linux
- 4GB RAM, 500MB disk space
- Internet connection

---

## Deployment

### cPanel / Shared Hosting
See [docs/CPANEL_DEPLOYMENT.md](docs/CPANEL_DEPLOYMENT.md) for detailed instructions.

Quick steps:
1. Upload `php-backend/` files to `public_html/api/`
2. Create MySQL database and user in cPanel
3. Import `database/schema.sql` and `database/seed_data.sql` via phpMyAdmin
4. Edit `config/config.php` with database credentials
5. Set folder permissions (logs/, cache/, uploads/ to 777)

### VPS / Dedicated
See [docs/INSTALLATION_GUIDE.md](docs/INSTALLATION_GUIDE.md) for full instructions.

---

## Configuration

### Backend (config/config.php)
```php
$_CONFIG['database'] = [
    'host' => 'localhost',
    'name' => 'email_verifier_pro',
    'user' => 'evp_user',
    'password' => 'secure_password',
];
```

### Desktop App (Settings)
- API Base URL
- Max Workers (1-16)
- SMTP Timeout
- Verification checks to enable
- Theme (Dark/Light)

---

## Built With

- **Frontend:** Electron 28, React 18, Webpack 5
- **Backend:** PHP 8.1+, PDO MySQL
- **Database:** MySQL 8.0+
- **Styling:** CSS Variables, no framework dependency

---

## Security

- JWT authentication for admin endpoints
- API key + License key dual authentication
- Rate limiting per license
- Input validation and sanitization
- Prepared SQL statements (PDO)
- CORS configuration
- Security headers (X-Frame-Options, CSP, etc.)
- License validation with machine fingerprinting

---

## Support

- **Email:** support@emailverifier.pro
- **Documentation:** https://docs.emailverifier.pro
- **Status Page:** https://status.emailverifier.pro

---

## License

Commercial License - All rights reserved.

---

Copyright 2024 Email Verifier Pro
