Production-ready Email Validator web application with Next.js 14, TypeScript, and Tailwind CSS.
npx create-next-app@latest . --typescript --tailwind --eslint --app --src-dir --no-gitnpm install zustand zod react-hook-form @hookform/resolvers framer-motion lucide-react
npx shadcn@latest init -d
npx shadcn@latest add button input card tabs progress badge toast skeleton switch label textareasrc/
├── app/ # Next.js App Router pages
├── components/ # React components
├── lib/ # Utilities and validators
├── hooks/ # Custom React hooks
├── stores/ # Zustand stores
└── types/ # TypeScript types
- File:
src/lib/data/disposable-domains.ts - Contains list of temporary/throwaway email domains
- Used to detect disposable emails
- File:
src/lib/data/free-providers.ts - Contains Gmail, Yahoo, Outlook, etc.
- Used to identify free email providers
- File:
src/lib/data/role-emails.ts - Contains admin, support, info, etc.
- Used to detect role-based emails
- File:
src/lib/data/common-typos.ts - Maps typos to correct domains
- gmial.com → gmail.com
- RFC 5322 compliant regex
- Check email format
- Validate local part and domain
- Check domain exists
- DNS lookup for domain
- MX record lookup
- Return mail server records
- Check against disposable domains list
- Return isDisposable status
- Check email prefix against role list
- Return role type if detected
- Check domain against common typos
- Suggest correction if found
- Check if domain is free provider
- Return provider name
- Combine all validators
- Calculate score (0-100)
- Determine deliverability and risk
interface ValidationResult {
email: string;
isValid: boolean;
score: number;
checks: ValidationChecks;
deliverability: DeliverabilityStatus;
risk: RiskLevel;
timestamp: string;
}- Header with navigation
- Footer with links
- Theme toggle (dark/light)
- EmailValidator (main input)
- ValidationResult (detailed display)
- BulkValidator (multi-email)
- ValidationHistory (localStorage)
- ScoreIndicator (circular gauge)
- Single email validation
- Real-time validation
- Detailed results display
- CSV/TXT upload
- Multi-email paste
- Progress tracking
- Export results
- API endpoint documentation
- Request/response examples
- Rate limit info
- Recent validations
- Clear history option
- Re-validate option
- Accept email in body
- Return ValidationResult
- Rate limited
- Accept email array
- Return ValidationResult array
- Rate limited
- Return API status
- Version info
- useEmailValidator
- useDebounce
- useLocalStorage
- validation-store (current validation)
- history-store (validation history)
npm run buildmust pass- No TypeScript errors
- No console errors
- Mobile-first approach
- Test all breakpoints
- ARIA labels
- Keyboard navigation
- Color contrast
- Navigate to home page
- Enter email in input field
- View real-time validation results
- See detailed breakdown of checks
- Copy results or view score
- Navigate to /bulk
- Upload CSV/TXT or paste emails
- Click "Validate All"
- Monitor progress
- Export results as CSV/JSON
# Single validation
curl -X POST https://your-domain/api/validate \
-H "Content-Type: application/json" \
-d '{"email": "test@example.com"}'
# Bulk validation
curl -X POST https://your-domain/api/validate-bulk \
-H "Content-Type: application/json" \
-d '{"emails": ["test1@example.com", "test2@example.com"]}'- Project setup complete
- All data files created
- Core validators working
- UI components built
- All pages functional
- API routes working
- Dark/light mode working
- Mobile responsive
- Build passes
- Pushed to GitHub