Nicolai Ort 22ef2521f5
All checks were successful
Build Latest image / build-container (push) Successful in 45s
Build release images / build-container (push) Successful in 46s
chore: bump version to 1.2.6
2025-05-26 19:10:20 +02:00
2024-12-11 19:07:14 +01:00
2024-12-18 17:59:40 +01:00
2024-12-11 19:07:14 +01:00
2023-02-01 13:31:31 +01:00
2025-03-27 10:20:15 +01:00
2023-02-07 10:34:05 +01:00
2024-12-11 19:07:14 +01:00
2025-03-27 10:03:18 +01:00
2021-03-01 16:13:03 +00:00
2025-05-26 19:10:20 +02:00
2024-12-11 19:07:14 +01:00

📧 Email Microservice

A modern email microservice built with Hono and TypeScript, supporting multiple languages and HTML/Text email templates.

Features

  • 🌐 Multi-language support (English & German)
  • 📝 HTML and Text email templates
  • 📚 OpenAPI/Swagger documentation
  • High-performance with Bun runtime
  • 🔄 Queue-based email processing
  • 🎨 Handlebars templating

🚀 Quick Start

# Install dependencies
bun install

# Start development server
bun dev

📖 API Documentation

Swagger UI is available at: /swagger

🔍 Example API Calls

Send Welcome Email

curl -X POST http://localhost:3000/api/v1/email \
  -H "Content-Type: application/json" \
  -d '{
    "to": "user@example.com",
    "templateName": "welcome",
    "language": "en",
    "data": {
      "name": "John Doe",
      "barcode_content": "0123456789",
      "link": "https://portal.lauf-fuer-kaya.de/"
    }
  }'

Send Password Reset Email

curl -X POST http://localhost:3000/api/v1/email \
  -H "Content-Type: application/json" \
  -d '{
    "to": "user@example.com",
    "templateName": "password-reset",
    "language": "de",
    "data": {
      "token": "123465789"
    }
  }'

Check Queue Status

curl http://localhost:3000/api/v1/email/status

📝 Environment Variables

SMTP_HOST=localhost
SMTP_PORT=587
SMTP_USER="project.1"
SMTP_PASS="secret.1"
EMAIL_FROM="noreply@lauf-fuer-kaya.de"
EMAIL_REPLYTO="info@lauf-fuer-kaya.de"
REDIS_URL=redis://localhost:6379
FRONTEND_URL="https://run.lauf-fuer-kaya.de"
AUTHKEY=""
EVENT_DATE="23.05.2025"
EVENT_NAME="Lauf für Kaya! 2025"

🛠️ Development

The project uses:

  • 🏃‍♂️ Bun for runtime and package management
  • 🌐 Hono for the web framework
  • 📚 Zod for validation
  • 📧 Nodemailer for email sending
  • 📑 Handlebars for templating
  • 📊 BullMQ for queue management

📦 Available Templates

Welcome Email

  • Languages: 🇬🇧 English, 🇩🇪 German
  • Variables: name, link, barcode_content

Password Reset

  • Languages: 🇬🇧 English, 🇩🇪 German
  • Variables: token
Description
Handles mail generation and sending (pw reset, welcome mail, etc)
Readme CC-BY-NC-SA-4.0 1.5 MiB
Release 0.1.2 Latest
2021-04-16 16:14:43 +00:00
Languages
HTML 79.4%
TypeScript 20.4%
Dockerfile 0.2%