AI-powered email assistant with intelligent reply generation using Gemini AI.
- Frontend Application: mailgenius.vercel.com
- Backend API:
https://mailgenius.onrender.com
(Rate-limited)
- AI-powered email reply generation using Gemini Flash 2.0
- Multiple tone options (Formal, Friendly, Professional, etc.)
- REST API endpoints for integration
- Rate limiting (100 requests/minute)
- Spring Data JPA & Hibernate persistence
- Docker container support
- Request validation and error handling
- Cross-origin resource sharing (CORS) enabled
- Backend: Spring Boot 3.2.0, Java 21, Hibernate 6.4
- AI Integration: Google Gemini 2.0 Flash
- Build Tools: Maven 3.9.6, Docker 24.0
- Hosting: Vercel (Frontend), Render (Backend)
- Java 21
- Maven 3.9+
- Gemini API key
- Docker (optional)
git clone https://github.com/your-username/mail-genius.git
cd mail-genius
GEMINI_API_KEY=your_gemini_api_key_here
mvn spring-boot:run
docker build -t mail-genius .
docker run -p 8080:8080 mail-genius
This application offers an API endpoint to generate email replies based on input parameters such as the message content and the desired tone. It is particularly helpful for automating professional or custom email responses.
Endpoint:
POST /generate
The request body should include the following parameters in JSON format:
- message (string): The content or context of the email to which the reply is being generated.
- tone (string): The desired tone of the reply (e.g., Professional, Casual, etc.).
{
"message": "Request for project deadline extension",
"tone": "Professional"
}
@RestController
@RequestMapping("/api/email")
@CrossOrigin(origins = "*")
public class EmailGeneratorController {
private final EmailGeneratorService emailGeneratorService;
@PostMapping("/generate")
public ResponseEntity<String> generateEmail(@RequestBody EmailRequest emailRequest) {
String response = emailGeneratorService.generateEmail(emailRequest);
return ResponseEntity.ok(response);
}
}