Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rithick574/e-mails-open-tracking-system-mailchimp-hono.js-bun.js

A lightweight, privacy-focused email tracking system built with Bun and Hono. Track email opens and engagement with a minimal footprint.
https://github.com/rithick574/e-mails-open-tracking-system-mailchimp-hono.js-bun.js

bunjs honojs mongoose ts

Last synced: 14 days ago
JSON representation

A lightweight, privacy-focused email tracking system built with Bun and Hono. Track email opens and engagement with a minimal footprint.

Awesome Lists containing this project

README

        

# MailTracker 📧

A lightweight, privacy-focused email tracking system built with Bun and Hono. Track email opens and engagement with a minimal footprint.

![License](https://img.shields.io/badge/license-MIT-blue.svg)
![Bun](https://img.shields.io/badge/Bun-1.0.21-black)
![TypeScript](https://img.shields.io/badge/TypeScript-5.0.0-blue)

## Features 🚀

- **Real-time Email Tracking**: Monitor when recipients open your emails
- **IP-based Analytics**: Track unique opens with IP detection
- **High Performance**: Built on Bun runtime for maximum efficiency
- **Privacy First**: Minimal tracking pixel (1x1) with secure handling
- **RESTful API**: Simple integration with existing email systems
- **MongoDB Integration**: Reliable data storage and retrieval

## API Endpoints 🛣️

- `POST /api/send-mail` - Send tracked emails
- `GET /track/track-mail/:id` - Tracking pixel endpoint
- `GET /status/mail-status` - Check email engagement stats

## Quick Start 🏃‍♂️

```bash
# Clone the repository
git clone https://github.com/Rithick574/E-Mails-Open-Tracking-System-Mailchimp

# Install dependencies
bun install

# Configure environment variables
cp .env

# Start the server
bun run dev
```

## Environment Variables 🔐

```env
MONGODB_URI=your_mongodb_uri
PORT=3000
BASE_URL=http://localhost:3000
[email protected]
SMTP_PASSWORD=hono@123
```

## Usage Example 💡

```typescript
// Send a tracked email
const response = await fetch('http://your-domain/api/send-mail', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
to: '[email protected]',
subject: 'Hello World',
html: '

Your email content here

'
})
});
```

## Technical Stack 🛠️

- **Runtime**: Bun
- **Framework**: Hono
- **Database**: MongoDB
- **Language**: TypeScript

## Performance ⚡

- Sub-millisecond tracking response time
- Minimal memory footprint
- Efficient IP detection and logging
- Optimized database queries

## Security Features 🔒

- IP address anonymization
- Rate limiting
- CORS protection
- Etag support
- Secure headers

## Contributing 🤝

Contributions are welcome! Please feel free to submit a Pull Request.

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

## License 📝

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Acknowledgments 🙏

- Built with [Bun](https://bun.sh)
- Powered by [Hono](https://honojs.dev)
- Inspired by modern email tracking needs

---

Made with ❤️ by Rithick