EmailHawk ๐ฆ
A production-ready email validation service built with Node.js and Bun that helps you verify email addresses in real-time.
๐ Quick Start
API Endpoint
POST https://api.emailhawk.dev/verify
Example Request
curl -X POST https://api.emailhawk.dev/verify \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"email": "ahmed@rupt.dev"}'
Example Response
{
"status": "valid",
"regexp": true,
"gibberish": false,
"disposable": false,
"webmail": false,
"mx_records": true,
"smtp_server": true,
"smtp_check": true,
"accept_all": false,
"block": false,
"domain": "rupt.dev"
}โจ Features
EmailHawk performs comprehensive email validation through multiple checks:
- โ SMTP Verification - Validates email addresses by connecting to the mail server
- ๐ฎ MX Record Checks - Verifies that the domain has valid mail exchange records
- ๐ฒ Gibberish Detection - Identifies random or nonsensical email addresses
- ๐ซ Disposable Email Detection - Checks against multiple lists of temporary email providers
- ๐ง Webmail Detection - Identifies popular webmail providers (Gmail, Yahoo, Outlook, etc.)
- ๐ฏ Catch-All Detection - Coming soon! Identifies domains that accept all email addresses
๐ About
EmailHawk is a comprehensive, self-hosted email validation solution built from the ground up to be developer-friendly, fast, and easy to deploy.
Why EmailHawk?
We created EmailHawk to address two major pain points in the email validation landscape:
-
Fragmented Solutions - Most email validation services are locked behind paywalls and buried within bloated SaaS platforms offering dozens of unrelated features. Finding, understanding, and integrating these services is unnecessarily complex.
-
Need for Simplicity - We needed a single, dedicated product that is:
- โ Easy to host
- โ Quick to build
- โ Fast to get started
- โ Fully functional out of the box
- โ Built with modern Node.js tooling
EmailHawk is our answer: a focused, production-ready email validation service that you can run anywhere.
๐๏ธ Architecture
EmailHawk is a monorepo consisting of three main components:
emailhawk/
โโโ api/ # Backend API (Express + MongoDB)
โโโ app/ # Dashboard UI (React)
โโโ marketing/ # Landing page (React)
Components
| Component | Description | Tech Stack |
|---|---|---|
| API | RESTful backend service handling email validation, authentication, and billing | Express, MongoDB, Passport, Stripe |
| App | User dashboard for managing projects, API keys, and viewing usage analytics | React, TypeScript, Vite |
| Marketing | Public-facing landing page with product information and pricing | React, TypeScript, Vite |
๐ฏ Additional Features
- ๐ Authentication & Authorization - Secure user management with Bearer tokens and API keys
- ๐ Usage Analytics - Track validation requests with detailed metrics and activity logs
- ๐ณ Billing Integration - Built-in Stripe integration for subscription management
- ๐ฏ Project Management - Organize API keys and usage by project
- ๐ Dashboard UI - Beautiful, responsive interface for monitoring and management
- ๐ณ Docker Ready - Production-ready Docker configurations included
- โ Test Coverage - Comprehensive test suites for core functionality
๐ Prerequisites
๐ ๏ธ Installation
Quick Start
- Clone the repository
git clone https://github.com/yourusername/emailhawk.git
cd emailhawk- Install dependencies for all components
# Install API dependencies cd api bun install # Install app dependencies cd ../app bun install # Install marketing dependencies cd ../marketing bun install
- Set up environment variables
Create .env files in each directory:
api/.env
PORT=8006 MONGODB_URI=mongodb://localhost:27017/emailhawk STRIPE_SECRET_KEY=your_stripe_secret_key STRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret
app/.env
API_URL=http://localhost:8006
marketing/.env
API_URL=http://localhost:8006
๐ Running the Project
Development Mode
Run each component in separate terminal windows:
Terminal 1 - API:
cd api bun run dev # API runs on http://localhost:8006
Terminal 2 - Dashboard App:
cd app bun run dev # App runs on http://localhost:5173
Terminal 3 - Marketing Site:
cd marketing bun run dev # Marketing site runs on http://localhost:5174
Production Build
Build all components for production:
# Build API (if needed - TypeScript compilation) cd api bun run index.ts # Build app cd ../app bun run build # Build marketing cd ../marketing bun run build
๐ณ Docker Deployment
API Docker Deployment
cd api # Build the Docker image docker build -t emailhawk-api . # Run the container docker run -p 8006:8006 \ -e MONGODB_URI=your_mongo_connection_string \ -e PORT=8006 \ emailhawk-api
Or use with environment file:
docker run -p 8006:8006 --env-file .env emailhawk-api
Docker Compose (Coming Soon)
A complete docker-compose.yml configuration for running all services together will be added soon.
๐งช Testing
Each component includes test suites:
# Run API tests cd api bun test # Run app tests (if available) cd app bun test # Run marketing tests (if available) cd marketing bun test
๐ API Documentation
Authentication
EmailHawk supports two authentication methods:
- Bearer Token - For user authentication
- API Key - For programmatic access
For complete API documentation and more examples, see API Documentation.
๐ Project Structure
emailhawk/
โโโ api/ # Backend API
โ โโโ controllers/ # Request handlers
โ โโโ db/ # Database configuration
โ โ โโโ mongo/ # MongoDB schemas
โ โโโ middlewares/ # Express middlewares
โ โโโ models/ # Data models
โ โโโ routes/ # API routes
โ โโโ tests/ # Test suites
โ โโโ types/ # TypeScript definitions
โ โโโ Dockerfile # Docker configuration
โ โโโ index.ts # Entry point
โ
โโโ app/ # Dashboard application
โ โโโ src/
โ โโโ components/ # React components
โ โโโ pages/ # Page components
โ โโโ models/ # Frontend models
โ โโโ utils/ # Utility functions
โ
โโโ marketing/ # Marketing website
โ โโโ src/
โ โโโ components/ # React components
โ โโโ utils/ # Utility functions
โ
โโโ README.md # This file
๐ค Contributing
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Development Guidelines
- Write tests for new features
- Follow existing code style and conventions
- Update documentation as needed
- Ensure all tests pass before submitting PR
๐ Bug Reports
Found a bug? Please open an issue with:
- A clear description of the problem
- Steps to reproduce
- Expected vs actual behavior
- Your environment (OS, Bun version, etc.)
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
Built with:
- Bun - Fast JavaScript runtime
- Express - Web framework
- MongoDB - Database
- React - UI framework
- TypeScript - Type safety
- Stripe - Payment processing
๐ฌ Contact & Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Maintained with โค๏ธ by Rupt
โญ Star us on GitHub if you find this project helpful!