Skip to content

21-07-2025

Compare
Choose a tag to compare
@fulleni fulleni released this 21 Jul 18:22
· 115 commits to main since this release

✨ SendGrid Integration & Configuration Refinements

This release marks a significant upgrade to our email capabilities by migrating from an in-memory solution to SendGrid for sending real transactional emails. To support this major feature, we have also refactored our application configuration and environment variable handling to be more robust, maintainable, and secure.

✨ Transactional Email via SendGrid

  • Email Service Migration: The API's email service has been migrated to use SendGrid, enabling the application to send real transactional emails, such as One-Time Passwords (OTPs), for the first time.
  • New Environment Configuration: New environment variables (SENDGRID_API_KEY, DEFAULT_SENDER_EMAIL, OTP_TEMPLATE_ID) have been introduced to configure the SendGrid integration. The .env.example and documentation have been updated accordingly.
  • Auth Service Integration: The AuthService has been updated to use the new email service, passing the configured sender email and template ID for sending OTPs.

🔧 Configuration & Code Quality Improvements

  • Robust Environment Variable Handling: A new helper method now centralizes the logic for retrieving required environment variables. This reduces boilerplate code and ensures the application fails fast if a critical variable is missing.
  • Refined API Client Setup: The SendGrid API client initialization has been improved by separating the base URL from the version path, making the configuration clearer and more flexible.
  • Code Cleanup: General code cleanup was performed across several files, including removing obsolete in-memory email code and applying formatting adjustments for better readability.