This project is unlicensed and open-source. I don’t have much time, so I’m inviting you to continue this beautiful piece of art.
A high-performance email processing system built on Cloudflare Workers, designed for handling enterprise-scale email operations.
-
Email Processing
- High-performance email routing and handling
- Attachment processing with R2 storage
- Thread detection and management
- Smart categorization and filtering
-
Search & Analytics
- Full-text search with Redis
- Real-time analytics processing
- Custom metrics and reporting
- Thread analysis and insights
-
Storage & Caching
- Multi-tiered caching system
- Distributed storage with R2
- Redis-based metadata storage
- Efficient data indexing
-
Background Processing
- Async job scheduling
- Task prioritization
- Retry mechanisms
- Dead letter queue handling
-
Security & Monitoring
- JWT authentication
- Rate limiting
- Request validation
- Error tracking and logging
- Node.js (v18.0.0 or higher)
- npm (v8.0.0 or higher)
- Cloudflare Workers account
- Upstash Redis account
- MongoDB instance
- Clone the repository
git clone https://github.com/bezata/blockchainml-mailworker.git
cd blockchainml-mailworker
- Install dependencies
npm install
- Configure environment variables
cp .env.example .env
# Edit .env with your configuration
- Set up Cloudflare Worker
npm run setup-worker
Start the development server:
npm run dev
Code quality checks:
# Lint code
npm run lint
# Format code
npm run format
# Type check
npm run type-check
# Run all validations
npm run validate
Deploy to staging:
npm run deploy:staging
Deploy to production:
npm run deploy
src/
├── api/ # API routes and handlers
├── config/ # Configuration files
├── db/ # Database models and repositories
├── jobs/ # Background jobs
├── monitoring/ # Monitoring and metrics
├── services/ # Core services
│ ├── cache/ # Caching implementation
│ ├── email/ # Email processing
│ ├── search/ # Search functionality
│ └── storage/ # Storage management
├── types/ # TypeScript types
└── utils/ # Utility functions
name = "blockchainml-mailworker"
main = "src/index.ts"
compatibility_date = "2024-10-29"
NODE_ENV=development
API_VERSION=v1
MONGODB_URI=your_mongodb_uri
UPSTASH_REDIS_REST_URL=your_redis_url
API documentation is available at /docs
when running the development server. The documentation is generated using Swagger UI and includes:
- Endpoint descriptions
- Request/response schemas
- Authentication requirements
- Example requests
Monitor your worker using:
-
Cloudflare Dashboard
- Real-time analytics
- Error tracking
- Performance metrics
-
Custom Metrics
- Email processing stats
- Queue metrics
- Cache performance
- JWT-based authentication
- Rate limiting per IP/user
- Request validation
- SQL injection prevention
- XSS protection
- CORS configuration
- Fork the repository
- Create your feature branch
git checkout -b feature/AmazingFeature
- Commit your changes
git commit -m 'Add some AmazingFeature'
- Push to the branch
git push origin feature/AmazingFeature
- Open a Pull Request
This project is private and proprietary. Unauthorized copying, modification, or distribution is strictly prohibited.
For support, contact:
- Email: [email protected]
- Slack: #mail-worker-support
- Machine Learning integration for email classification
- Blockchain-based email verification
- Advanced analytics dashboard
- Multi-region deployment
- Real-time collaboration features
- Cloudflare Workers team
- Upstash team
- MongoDB team
- Open source community
- Ensure proper configuration before deployment
- Regular monitoring of worker performance
- Keep dependencies updated
- Follow security best practices
Built with ❤️ by the BlockchainML Team