Skip to content

Latest commit

Β 

History

History
91 lines (63 loc) Β· 1.68 KB

File metadata and controls

91 lines (63 loc) Β· 1.68 KB

AI Email Writer

AI-powered Chrome Extension that generates contextual email replies directly inside Gmail using a cloud-deployed Spring Boot backend integrated with Google Gemini API.


🌐 Live Backend

πŸ”— https://ai-email-writer-crn8.onrender.com


πŸ“Œ Project Overview

AI Email Writer is a full-stack application that:

  • Injects an "AI Reply" button inside Gmail
  • Generates professional email responses using AI
  • Communicates with a secure cloud-deployed Spring Boot backend
  • Uses environment-based configuration for API security
  • Is fully Dockerized and deployed on Render

πŸ— System Architecture

The request flow works as follows:

  1. Gmail UI (Chrome Extension)
  2. Content Script (DOM Injection + Fetch API)
  3. Spring Boot REST API (Hosted on Render)
  4. Google Gemini API
  5. AI-generated email response returned to Gmail

πŸ›  Tech Stack

Frontend (Chrome Extension)

  • JavaScript
  • Chrome Manifest V3
  • DOM Manipulation
  • MutationObserver
  • Fetch API

Backend

  • Spring Boot 3
  • Maven
  • REST APIs
  • Google Gemini API
  • CORS Configuration
  • Environment Variables

Deployment

  • Render (Cloud Deployment)
  • GitHub

πŸ” Security Implementation

  • API keys stored securely using environment variables
  • No secrets committed to GitHub
  • Backend-only AI API communication
  • CORS configured for secure cross-origin access
  • Dynamic port binding for cloud environments:i API ↓ Generated Email Response

πŸ§ͺ API Endpoints

πŸ”Ή Health Check

Response

{
  "status": "UP",
  "service": "AI Email Writer Backend"
}

POST /api/email/generate
{
  "emailContent": "Test email",
  "tone": "professional"
}
Generated AI reply text