Inspiration

We've all faced the dread of staring at a blank composer, trying to write the perfect outreach, sales pitch, or formal complaint. While general AI chat interfaces exist, they often output generic text littered with placeholders like [Insert Employer Here] or require tedious prompt engineering.

Furthermore, during fast-paced workflows, accidentally reloading the browser page means losing your entire draft. We built Ethrix Mail Gen to solve this—an elegant, lightning-fast AI email studio that respects user context, avoids lazy brackets, and ensures your workflow is fully persistent.

What it does

Ethrix Mail Gen is a premium AI-powered email copywriting studio that generates production-ready business and professional emails in seconds.

Key features include:

  • Zero Placeholders: Generates realistic, context-aware details based on your input instead of brackets.
  • Frictionless Design: Centralized system key config allows users to start generating immediately without setup.
  • Draft Persistence: Auto-saves your inputs, selected configurations, and last generated draft to localStorage so a page refresh never ruins your progress.
  • Granular Controls: Toggle customized subject lines, tastefully integrated emojis, call-to-actions, and professional signatures utilizing the sender's name.
  • Quick Templates: One-click top category strip (Sales, Apology, Follow-up, etc.) that pre-fills optimal email tone and context.

How we built it

  • Core Tech: Engineered with vanilla HTML, JavaScript, and TailwindCSS (for the landing page) alongside custom Vanilla CSS for the dashboard.
  • AI Engine: Integrated directly with Google's latest Gemini API (using gemini-2.5-flash).
  • Typing Engine: Custom character-chunk streaming algorithm rendering 80 characters per 5ms for near-instant rendering.
  • Design System: A sleek dark/light design incorporating glassmorphism, responsive split panels, and neon pulse highlights.

Challenges we ran into

  • Reasoning Token Truncation: During testing, our emails were cutting off mid-sentence. We discovered that the Gemini API counts internal reasoning/thinking tokens against the maxOutputTokens limit. We resolved this by optimizing our API parameters and increasing the limit to 8000 tokens, allowing the model to think fully and output complete signature blocks.
  • Browser Script Caching: Live changes were being ignored by browsers caching the script files. We fixed this by implementing version-based cache busting query parameters (?v=1.2) on our script tags.

Accomplishments that we're proud of

  • Achieving a high-speed render where standard emails stream fully in under 0.4 seconds.
  • Building a robust, seamless data persistence system that recovers your entire workspace configuration and generated content on refresh.
  • Crafting dynamic prompts that write realistic emails without hallucinating fake companies or rigid developer skills.

What we learned

  • How Google Gemini's reasoning processes consume output token allocations.
  • The value of building lightweight vanilla JS solutions for high-performance visual animations instead of heavy frameworks.

What's next for Ethrix mail gen

  • Mail Client Integration: Connect directly with Gmail and Outlook APIs for one-click drafts.
  • Recipient Persona Profiles: Storing recipient tone preferences and history to personalize follow-ups even further.
  • Browser Extension: A Chrome extension to bring Ethrix composer functionality directly to web mail clients.

Built With

Share this project:

Updates

Submission history