Contains legacy code, update code and use this as reference.
A full-featured desktop and web application for managing, sending, and tracking email campaigns with email view tracking and unsubscribe management. Built with Electron + React for desktop and PHP for backend APIs.
- Campaign Management: Create, schedule, pause, and monitor email campaigns
- Contact Lists: Organize contacts into mailing lists and groups
- Email Composition: Rich-text editor with template variables for personalized emails
- Tracking: Monitor email opens and click-throughs with automatic logging
- Unsubscribe Handling: Automatic tracking and management of unsubscribe requests
- File Attachments: Attach files to campaigns and merge individual files per recipient
- Subscription Plans: Support for trial and paid tier limits (10 and 20 emails/day)
- Mac Address Validation: Detect suspicious multi-device access attempts
- Admin Dashboard: Manage users, subscriptions, and monitor campaigns
server/ - PHP backend APIs and admin panel
├── api/ - API endpoints for client requests
├── src/ - Core functions (database, auth, user/subscription management)
└── dashboard.php - Admin control panel
whiz/ - Electron + React desktop application
├── public/ - Electron main process, email sending logic
├── src/ - React components and shared config
└── package.json- Dependencies and app metadata
-
Requirements:
- PHP 7.0+
- MySQL 5.7+
- Node.js 12+ (for testing)
-
Database Setup:
CREATE DATABASE whiz;
-
Configuration (use environment variables):
export DB_HOST=localhost export DB_USER=root export DB_PASS=your_password export DB_NAME=whiz export ADMIN_EMAIL=admin@example.com export ADMIN_PASSWORD=your_secure_password
-
Initialize Database Schema: Create tables for
users,contacts, andcampaigns(schema provided on request). -
Run PHP Server:
cd server php -S localhost:8000
-
Install Dependencies:
cd whiz npm install -
Configure API Endpoint (create/update
.envfile):REACT_APP_API_BASE_URL=http://localhost:8000/api REACT_APP_SUPPORT_EMAIL=support@example.com REACT_APP_APP_NAME=YourAppName
-
Development Mode:
npm run electron-dev
-
Build for Production:
npm run build npm run dist
All sensitive and deployment-specific values use environment variables. Key variables:
| Variable | Default | Purpose |
|---|---|---|
DB_HOST |
localhost |
MySQL host |
DB_USER |
root |
MySQL user |
DB_PASS |
change-me |
MySQL password |
DB_NAME |
whiz |
Database name |
ADMIN_EMAIL |
admin@example.com |
Admin login email |
ADMIN_PASSWORD |
change-me |
Admin login password |
REACT_APP_API_BASE_URL |
http://localhost:8000/api |
Backend API endpoint |
REACT_APP_SUPPORT_EMAIL |
support@example.com |
Support contact email |
REACT_APP_APP_NAME |
Whiz |
Application display name |
All endpoints require proper authentication and respond with JSON. Key endpoints:
POST /api/verifyuser.php- Verify user email and subscriptionPOST /api/addmac.php- Register device MAC addressPOST /api/getdata.php- Sync tracking and unsubscribe dataPOST /api/uploadfile.php- Upload campaign attachmentsGET /api/unsubscribe.php?u=USER_ID&c=CAMPAIGN_ID&e=EMAIL_ID- Handle unsubscribeGET /api/getimage.php?u=USER_ID&c=CAMPAIGN_ID&e=EMAIL_ID- Track email opens
id,email,plan(trial/paid),status(allowed/revoked/expired)macid(comma-separated for multi-device detection)track(JSON array of open events),unsub(JSON array of unsubscribe events)
id,email,subscribe(boolean),group(array)- Organized into custom mailing lists/groups
id_,name,subject,emails(array of recipients)status(draft/active/paused/done/later),template(final HTML)- Tracking and delivery metadata
- Never commit credentials - Always use environment variables for secrets
- HTTPS in production - API endpoints must use HTTPS
- Validate input - All user input is validated server-side
- Database backups - Regularly back up your tracking data
- MAC validation - Prevents unauthorized multi-device access; adjust logic for your use case
- Admin credentials - Change default admin password immediately
- Email headers - Tracking pixels and unsubscribe links are automatically appended; ensure compliance with email regulations (CAN-SPAM, GDPR, etc.)
- Frontend: React 16, react-uwp (Windows UWP design), ag-grid
- Desktop: Electron 7, electron-db for local storage
- Backend: PHP, MySQL, Nodemailer (for SMTP)
- Build: Create React App, electron-builder
/whiz/src/components/- React UI components/whiz/src/config/appConfig.js- Centralized configuration/whiz/public/electron.js- Electron main process & email sender/server/api/- REST API endpoints/server/src/- Shared backend functions
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Commit changes (
git commit -am 'Add my feature') - Push to the branch (
git push origin feature/my-feature) - Open a pull request
"Database connection failed"
- Check
DB_HOST,DB_USER,DB_PASSenvironment variables - Verify MySQL is running
- Ensure the database exists
"Email sending fails"
- Verify SMTP settings in the app (host, port, SSL)
- Check email account credentials
- Verify daily send limit hasn't been reached
"Tracking not working"
- Confirm server APIs are running
- Check firewall/proxy blocking tracking requests
- Verify
REACT_APP_API_BASE_URLis correct
This project is provided as-is. Modify and use according to your needs.
Last Updated: December 2025