An AI-powered full-stack application that generates professional email replies using Google Gemini API. The project consists of three components: a Spring Boot backend, a React frontend, and a Chrome Extension for seamless Gmail integration.
Email-AI-Reply-Generator/
├── email-writter-sb/ # Spring Boot backend (REST API)
├── email-writer-react/ # React frontend (Vite + Material UI)
└── hello-world-ext/ # Chrome Extension for Gmail
- 🤖 AI-Powered Replies — Generate context-aware email responses using Google Gemini API
- 🎭 Tone Selection — Choose from tones like Professional, Friendly, Casual, and more
- 🌐 Web Interface — Clean React UI to paste emails and generate replies instantly
- 🔌 Chrome Extension — Adds an "AI Reply" button directly inside Gmail
- ⚡ Fast REST API — Spring Boot backend handles AI communication efficiently
| Layer | Technology |
|---|---|
| Backend | Java 17, Spring Boot, Maven |
| Frontend | React (Vite), Material UI, Axios |
| Chrome Extension | JavaScript, Chrome Extension API, Gmail DOM |
| AI Model | Google Gemini API |
Before getting started, make sure you have:
- Java JDK 17+
- Maven
- Node.js 16+
- npm
- A Google Gemini API Key
- Google Chrome (for the extension)
git clone https://github.com/navdeep03-03/Email-AI-Reply-Generator.git
cd Email-AI-Reply-Generatorcd email-writter-sbCreate an application.properties file (or update the existing one) inside src/main/resources/:
gemini.api.key=your-gemini-api-key
gemini.api.url=https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent
server.port=8080Build and run the backend:
mvn clean install
mvn spring-boot:runThe API will be available at http://localhost:8080.
POST /api/email/generate
Content-Type: application/json
{
"emailContent": "Original email text here...",
"tone": "professional"
}
cd ../email-writer-react
npm install
npm run devThe app will be available at http://localhost:5173.
Note: Ensure the backend is running before using the frontend. Update the API base URL in the frontend config if needed.
cd ../hello-world-extLoad the extension in Chrome:
- Open Chrome and navigate to
chrome://extensions/ - Enable Developer mode (toggle in the top-right corner)
- Click "Load unpacked"
- Select the
hello-world-extfolder - The extension is now installed ✅
Using the extension:
- Open Gmail in Chrome
- Open any email and click Reply
- An "AI Reply" button will appear in the reply toolbar
- Click it — the AI-generated reply will be inserted automatically
email-writter-sb/
└── src/main/java/com/email/emailWritter/
├── EmailGeneratorController.java # REST controller
└── EmailGeneratorService.java # Gemini API integration
email-writer-react/
└── src/
├── App.jsx # Main UI component
└── main.jsx # React entry point
hello-world-ext/
├── manifest.json # Extension configuration
└── content.js # Gmail DOM injection script
User pastes email (React UI or Gmail Extension)
↓
React/Extension sends POST request to Spring Boot API
↓
Spring Boot calls Google Gemini API with email + tone
↓
Gemini generates a context-aware reply
↓
Reply is returned and displayed to the user
| Component | Recommended Platform |
|---|---|
| Spring Boot Backend | Render / Railway / AWS |
| React Frontend | Netlify / Vercel |
| Chrome Extension | Chrome Web Store (or load unpacked locally) |
Remember to update the API endpoint in the frontend and extension to point to your deployed backend URL.
Contributions are welcome! Feel free to:
- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature) - Commit your changes (
git commit -m 'Add your feature') - Push to the branch (
git push origin feature/your-feature) - Open a Pull Request
This project is open source. See the LICENSE file for details.
Navdeep — @navdeep03-03 Rashi -@rashi-gupta-08