AIrisMail is a smart email assistant that helps users generate professional, context-aware email replies using AI. The project consists of three main components:
- email-writer-ext: A browser extension that integrates with Gmail to provide AI-powered reply suggestions directly in the compose window.
- email-writer-react: A React web application for generating email replies using the AI backend.
- email-writer-sb: A Spring Boot backend service that communicates with the Gemini AI API to generate email replies.
- AI-Powered Email Reply Generation: Generate professional, casual, or friendly replies based on the original email content.
- Gmail Integration: Use the browser extension to generate replies directly in Gmail.
- Web Interface: Use the React app to generate replies from any device.
- Fast & Secure: Backend powered by Spring Boot and Gemini AI API.
[Browser Extension] ⬌ [Spring Boot Backend] ⬌ [React Vite Frontend]
- email-writer-ext: Injects an "AI Reply" button into Gmail's compose window. On click, it sends the email content to the backend and inserts the generated reply.
- email-writer-react: Provides a web UI for users to input email content and select tone, then displays the generated reply.
- email-writer-sb: Exposes a REST API endpoint (
/api/email/generate) that receives email content and tone, builds a prompt, calls Gemini AI, and returns the generated reply.
- npm or yarn
- Java 17+ (for Spring Boot)
- Maven (for Spring Boot)
- Chrome or Chromium-based browser (for extension)
- Navigate to the backend directory:
cd email-writer-sb - Configure API Keys:
- Copy .env.example to .env and set your Gemini API key and URL.
- Alternatively, set gemini.api.url and gemini.api.key in application.properties.
- Build and run the backend:
The backend will start on http://localhost:8080.
./mvnw spring-boot:run
- Navigate to the React app directory:
cd email-writer-react - Install dependencies:
cd email-writer-react - Start the development server:
cd email-writer-react
The app will be available at http://localhost:5173 (default Vite port).
Follow the steps below to set up and use the browser extension:
-
Navigate to the
email-writer-extdirectory on your local machine.cd email-writer-ext -
Load the extension in Google Chrome:
- Open Chrome and go to:
chrome://extensions/ - Enable Developer mode (toggle switch in the top-right corner).
- Click on "Load unpacked".
- Select the
email-writer-extfolder.
- Open Chrome and go to:
- Open Gmail in your browser.
- Click on Compose to start writing a new email.
- You will see an "AI Reply" button in the compose toolbar.
- Click the button to generate a smart AI-powered response to the email you're replying to.
Make sure the backend server and Gemini AI integration are properly running for full functionality.
- Enter the original email content in the input box.
- Optionally, select a tone:
- Professional
- Casual
- Friendly
- Click "Generate Reply".
- Copy the generated reply to your clipboard.
- Open Gmail and compose or reply to an email.
- Click the "AI Reply" button in the Gmail compose toolbar.
- The AI-generated reply will be inserted automatically into the compose box.
Set the following environment variables or application.properties:
gemini.api.url=YOUR_GEMINI_API_ENDPOINT
gemini.api.key=YOUR_GEMINI_API_KEYBy default, the frontend expects the backend at http://localhost:8080. Update the API URL in src/App.jsx if needed.
The extension sends requests to http://localhost:8080/api/email/generate. Update the URL in content.js if your backend runs elsewhere.
- Backend: Java, Spring Boot, Maven
- Frontend: React, Vite, Material UI, Axios
- Extension: Vanilla JS, MutationObserver, Gmail DOM integration