Skip to content

An AI-powered full-stack email generator with a React.js, Spring Boot and a Chrome extension that streamlines email drafting using the Gemini API. โš™๏ธ๐Ÿ“ฌ

Notifications You must be signed in to change notification settings

chinmaywali/EmailReplyGenerator_AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

โœจ AI-Powered Email Generator & Chrome Extension

๐Ÿš€ Overview

The AI-Powered Email Generator & Chrome Extension simplifies email writing by generating well-structured messages instantly.

This project includes:
โœ… A Full-Stack Web Application โ€“ Built with React.js (frontend) and Spring Boot (backend).
โœ… A Chrome Extension โ€“ Integrates with Gmail & Outlook for quick email drafting.
โœ… AI Assistance โ€“ Uses Gemini API to enhance email content generation.
โœ… PostMan - Tested using Postman for API validation.

With a clean UI and one-click email generation, this tool is designed for efficiency and convenience. ๐Ÿš€


๐Ÿ› ๏ธ Tech Stack

๐Ÿง‘โ€๐Ÿ’ป Backend (Spring Boot)

  • Spring Boot โ€“ RESTful API for email generation.
  • Spring Data JPA โ€“ For database interactions (future enhancement).
  • Maven โ€“ Dependency management.
  • Lombok โ€“ Reduces boilerplate code.
  • Gemini API โ€“ Assists in generating email content.
  • Postman โ€“ API testing and validation.

๐ŸŒ Frontend (React.js)

  • React 18 โ€“ For building the UI.
  • Vite โ€“ Faster development.
  • Axios โ€“ API communication.

๐Ÿงฉ Chrome Extension

  • JavaScript & HTML โ€“ Lightweight and responsive.
  • Axios โ€“ Backend communication.

๐ŸŽฏ Features

โœ… Instant Email Generation โ€“ Quickly draft emails.
โœ… Different Writing Styles โ€“ Formal, Casual, Professional, etc.
โœ… One-Click Copy & Paste โ€“ Seamless workflow integration.
โœ… Chrome Extension โ€“ Works directly inside Gmail & Outlook.
โœ… RESTful API Integration โ€“ Backend communication with React & Chrome extension.

๐Ÿ”น Web App Features

  • Simple UI for generating emails.
  • Copy & paste functionality.

๐Ÿ”น Chrome Extension Features

  • Works within Gmail & Outlook.
  • Pop-up UI for instant email generation.
  • Communicates with the backend via API.

๐Ÿ“‚ Project Structure

AI-Email-Generator/
|
โ”‚โ”€โ”€ backend/ (Spring Boot App)
โ”‚   โ”œโ”€โ”€ src/main/java/com/ai/emailgenerator/
โ”‚   โ”‚   โ”œโ”€โ”€ controllers/  # API Controllers
โ”‚   โ”‚   โ”œโ”€โ”€ services/  # Business Logic
โ”‚   โ”‚   โ”œโ”€โ”€ models/  # Entity Models
โ”‚   โ”‚   โ”œโ”€โ”€ repositories/  # Database Interactions
โ”‚   โ”‚   โ”œโ”€โ”€ EmailGeneratorApplication.java  # Main Application
โ”‚   โ”œโ”€โ”€ src/main/resources/application.properties
โ”‚   โ”œโ”€โ”€ pom.xml
|
โ”‚โ”€โ”€ frontend/ (React App)
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ EmailForm.js
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ EmailOutput.js
โ”‚   โ”‚   โ”œโ”€โ”€ App.js
โ”‚   โ”‚   โ”œโ”€โ”€ index.js
โ”‚   โ”œโ”€โ”€ package.json
|
โ”‚โ”€โ”€ chrome-extension/
โ”‚   โ”œโ”€โ”€ manifest.json  # Chrome extension config
โ”‚   โ”œโ”€โ”€ popup.html  # UI for extension
โ”‚   โ”œโ”€โ”€ popup.js  # Frontend logic
โ”‚   โ”œโ”€โ”€ background.js  # Background script
|
โ”‚โ”€โ”€ README.md
|
โ”‚โ”€โ”€ .gitignore

โš™๏ธ Setup Instructions

๐Ÿ’ป Backend Setup (Spring Boot)

1๏ธโƒฃ Clone the repository:

git clone https://github.com/chinmaywali/AI-Email-Generator.git

2๏ธโƒฃ Navigate to the backend folder:

cd backend

3๏ธโƒฃ Add your Gemini API Key in application.properties:

GEMINI_API_KEY=your_api_key_here

4๏ธโƒฃ Build and run the Spring Boot app:

mvn spring-boot:run

5๏ธโƒฃ The backend will be available at:

http://localhost:8080

๐ŸŽจ Frontend Setup (React)

1๏ธโƒฃ Open another terminal and navigate to the frontend folder:

cd frontend

2๏ธโƒฃ Install dependencies:

npm install

3๏ธโƒฃ Start the React app:

npm start

4๏ธโƒฃ The frontend will be available at:

http://localhost:3000

๐Ÿงฉ Chrome Extension Setup

1๏ธโƒฃ Navigate to the chrome-extension folder.

cd chrome-extension

2๏ธโƒฃ Open Chrome and go to:

chrome://extensions/

3๏ธโƒฃ Enable Developer Mode.
4๏ธโƒฃ Click Load Unpacked and select the chrome-extension folder.
5๏ธโƒฃ The extension will be added to Chrome.


๐Ÿ”— API Endpoints

๐Ÿ“Œ AI Email Generation API

Method Endpoint Description Request Body
POST /generate-email Generates an AI-powered email { "tone": "Professional", "message": "Follow-up on project" }

๐Ÿ“Œ Example API Requests & Responses

โžค Request (Generating an Email)

{
  "tone": "Formal",
  "message": "Request for rescheduling the meeting"
}

โžค Response

{
  "email": "Dear [Recipient], I hope this email finds you well. I would like to request a rescheduling of our upcoming meeting..."
}

๐Ÿ“ฎ Postman API Testing

To test the AI Email Generation API in Postman, follow these steps:

1๏ธโƒฃ Open Postman.
2๏ธโƒฃ Click on Import.
3๏ธโƒฃ Click Raw Text and paste the following POST request:

๐Ÿ“Œ AI Email Generation API (POST Request)

  • Endpoint: http://localhost:8090/api/email/generate
  • Method: POST
  • Headers:
    • Content-Type: application/json
  • Body (JSON):
{
    "emailContent": "Hey there, this is Jhon here. We connected at AWS Summit.. how is your startup going?",
    "tone": "Professional"
}
  • Response (Example):
{
    "emailContent": "Dear Jhon,\n\nIt was a pleasure connecting with you at the AWS Summit. Thank you for reaching out.\n\nRegarding your question, our startup is progressing well. We've been focusing on [mention a specific area of progress, e.g., developing our MVP, securing seed funding, onboarding new clients].\n\nI'd be happy to share more details when you have time. Perhaps we could schedule a brief call in the coming weeks?\n\nBest regards,\n[Your Name]"
}

4๏ธโƒฃ Click Send to test the API and get an AI-generated email response! โœ…

โœ… Available Postman Requests:

  • Generate Email โ€“ AI-generated emails based on user input.
  • Validate API Responses โ€“ Ensure smooth AI integration.

๐Ÿค Contributing

Contributions are welcome! Feel free to fork this repo and submit a pull request.


About

An AI-powered full-stack email generator with a React.js, Spring Boot and a Chrome extension that streamlines email drafting using the Gemini API. โš™๏ธ๐Ÿ“ฌ

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published