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. ๐
- 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.
- React 18 โ For building the UI.
- Vite โ Faster development.
- Axios โ API communication.
- JavaScript & HTML โ Lightweight and responsive.
- Axios โ Backend communication.
โ
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.
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
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
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
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.
Method | Endpoint | Description | Request Body |
---|---|---|---|
POST | /generate-email |
Generates an AI-powered email | { "tone": "Professional", "message": "Follow-up on project" } |
{
"tone": "Formal",
"message": "Request for rescheduling the meeting"
}
{
"email": "Dear [Recipient], I hope this email finds you well. I would like to request a rescheduling of our upcoming meeting..."
}
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:
- 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.
Contributions are welcome! Feel free to fork this repo and submit a pull request.