A modern full-stack application for generating professional emails using AI.
Built with Spring Boot (backend) and React (frontend), integrated with Google's Gemini API for intelligent email composition.
- AI-Powered Email Generation – Generate contextually relevant emails using Google Gemini API
- React Frontend – Responsive and intuitive UI
- Spring Boot Backend – Scalable backend with reactive WebFlux programming
- Real-time Processing – Asynchronous email generation using reactive streams
- Customizable Templates – Create, save, and reuse email templates
- User-Friendly Interface – Simple form inputs for quick email generation
- Java: 24 (Preview version – ensure you have the appropriate JDK installed)
- Node.js: 16.x or later
- npm: 8.x or later
- Maven: 3.8.x or later
- Google Gemini API Key: Obtain from Google AI Studio
git clone https://github.com/nihirborkar17/Repliznen.git
cd Repliznen/email-generatorCreate src/main/resources/application.yml with the following content:
spring:
application:
name: email-generator
gemini:
api:
key: YOUR_GEMINI_API_KEY
url: https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContentBuild and run backend:
mvn clean install
mvn spring-boot:runBackend will run at: http://localhost:8080
cd frontend
npm installCreate .env file in frontend/ with:
REACT_APP_API_URL=http://localhost:8080Start frontend:
npm startFrontend available at: http://localhost:3000
- Open browser and visit: http://localhost:3000
- Fill in the form:
- Recipient email address
- Subject
- Key points
- Tone (formal, casual, etc.)
- Click Generate Email
- Review and edit the generated email
- Copy or send the email directly from the UI
-
POST
/api/generate-email– Generate an email
Sample Request Body:{ "recipient": "john@example.com", "subject": "Project Update", "keyPoints": ["Project completed ahead of schedule", "Under budget"], "tone": "professional" } -
GET
/api/templates– Retrieve all saved email templates -
POST
/api/templates– Save a new template -
PUT
/api/templates/{id}– Update an existing template -
DELETE
/api/templates/{id}– Delete a template
email-generator/
├── src/
│ ├── main/
│ │ ├── java/com/nenz/emailgenerator/
│ │ │ ├── controller/ # REST controllers
│ │ │ ├── service/ # Business logic
│ │ │ ├── model/ # Data models
│ │ │ ├── config/ # Configuration classes
│ │ │ └── EmailGeneratorApplication.java # Main class
│ │ └── resources/
│ │ ├── application.yml # Configuration
│ │ └── static/ # Static resources
│ └── test/ # Test classes
├── frontend/ # React frontend
│ ├── public/
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── services/ # API services
│ │ ├── hooks/ # Custom hooks
│ │ └── App.js # Main App component
│ └── package.json
└── pom.xml # Maven configuration
Customize src/main/resources/application.yml:
server:
port: 8080
spring:
webflux:
base-path: /api
gemini:
api:
url: https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent
timeout: 30smvn testcd frontend
npm test- Fork the repository
- Create your feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push branch:
git push origin feature/amazing-feature - Open a Pull Request
MIT License – see the LICENSE file for details.
- Spring Boot – Backend framework
- React – Frontend library
- Google Gemini – AI-powered email generation
For issues or questions, please open an issue on the GitHub Repository.