Marketing Email API

Marketing Email API Screenshot
Water Quality Report App is a full-stack web application that provides real-time water quality reports by scraping data from the Environmental Working Group (EWG) database and delivering detailed contamination analysis via automated email campaigns. The system accepts user email addresses and ZIP codes through embeddable forms, fetches live water utility data, and sends comprehensive reports highlighting contaminant levels, health guidelines, and potential health effects through Klaviyo email marketing integration.

The application features a sophisticated multi-platform integration ecosystem with ready-to-deploy solutions for WordPress (complete plugin with shortcode support), Shopify (theme sections and blocks), and universal JavaScript embedding for any website. The core data engine utilizes real-time web scraping of EWG's tap water database using Axios and Cheerio to extract contaminant information, detection levels compared to health guidelines, and detailed explanations of potential health effects. The email automation system leverages Klaviyo's API to create customer profiles and trigger detailed water quality reports with structured data for up to 10 contaminants per location.

Built with Express.js and ES6 modules, the backend provides RESTful API endpoints with comprehensive CORS configuration for cross-domain embedding capabilities. The architecture includes dedicated utility modules for EWG data fetching and Klaviyo event tracking, ensuring clean separation of concerns and maintainable code structure. The system supports both HTTP and HTTPS protocols with SSL certificate integration, making it suitable for deployment across various hosting environments. The embeddable widget uses protocol-relative URLs and vanilla JavaScript for maximum compatibility, while the WordPress plugin provides admin configuration panels and automatic script loading optimization. The Shopify integration includes native theme editor support with metafield configuration and Liquid template compatibility, allowing seamless integration into e-commerce workflows for water quality awareness and customer engagement.