A modern web application that generates professional emails using AI and sends them to multiple recipients instantly. Built with React, TypeScript, and Express.js.
- AI-Powered Email Generation: Generate professional emails using Groq's LLM API
- Multi-Recipient Support: Send emails to multiple recipients at once
- Real-time Email Editing: Edit generated emails before sending
- Modern UI/UX: Beautiful interface with smooth animations using Framer Motion
- Toast Notifications: Real-time feedback for user actions
- Email Validation: Built-in email address validation
- Responsive Design: Works seamlessly on desktop and mobile devices
- React 18 - Modern React with hooks
- TypeScript - Type-safe development
- Vite - Fast build tool and dev server
- Tailwind CSS - Utility-first CSS framework
- Framer Motion - Smooth animations and transitions
- Lucide React - Beautiful icons
- Node.js - JavaScript runtime
- Express.js - Web framework
- Nodemailer - Email sending functionality
- Axios - HTTP client for API calls
- CORS - Cross-origin resource sharing
- dotenv - Environment variable management
- Groq API - AI-powered email content generation
- Node.js (v16 or higher)
- npm or yarn
- Groq API key
- Email service credentials (Gmail, Outlook, etc.)
-
Clone the repository
git clone <repository-url> cd cloudmail
-
Install dependencies
# Install backend dependencies cd server npm install # Install frontend dependencies cd ../client npm install
-
Environment Configuration
Create a
.envfile in theserverdirectory:GROQ_API_KEY=your_groq_api_key_here EMAIL_USER=your_email@gmail.com EMAIL_PASS=your_email_app_password ORIGIN=http://localhost:5173
Create a
.envfile in theclientdirectory:VITE_URL=http://localhost:3001
-
Start the development servers
# Start backend server (from server directory) npm start # Start frontend server (from client directory, in a new terminal) npm run dev
-
Access the application
- Frontend: http://localhost:5173
- Backend API: http://localhost:3001
For Gmail:
- Enable 2-factor authentication
- Generate an App Password
- Use the App Password in
EMAIL_PASS
For other providers, check their documentation for SMTP settings.
- Sign up at Groq Console
- Generate an API key
- Add the key to your
.envfile
-
Generate Email Content
- Enter a prompt describing the email you want to generate
- Click "Generate Email" to create content using AI
- Review and edit the generated content if needed
-
Send Email
- Enter recipient email addresses (comma-separated for multiple recipients)
- Click "Send Email" to deliver the message
- Receive confirmation via toast notification
cloudmail/
├── client/ # React frontend
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── hooks/ # Custom React hooks
│ │ ├── types/ # TypeScript type definitions
│ │ └── App.tsx # Main application component
│ ├── package.json
│ └── vite.config.ts
├── server/ # Express backend
│ ├── server.js # Main server file
│ ├── package.json
│ └── .env # Environment variables
└── README.md
Generate email content using Groq API.
Request Body:
{
"prompt": "Write a professional email to schedule a meeting"
}Response:
{
"email": "Generated email content..."
}Send email to recipients.
Request Body:
{
"recipients": "user1@example.com, user2@example.com",
"emailBody": "Email content to send"
}Response:
{
"message": "Email sent successfully"
}Frontend (client directory):
npm run dev- Start development servernpm run build- Build for productionnpm run lint- Run ESLintnpm run preview- Preview production build
Backend (server directory):
npm run dev- Start development servernpm start- Start production server
The project uses:
- ESLint for code linting
- TypeScript for type safety
- Prettier for code formatting (via Tailwind CSS)
- Build the project:
npm run build - Deploy the
distfolder to your hosting service (Vercel, Netlify, etc.)
- Set up environment variables on your hosting platform
- Deploy to services like Heroku, Railway, or DigitalOcean
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Commit your changes:
git commit -am 'Add feature' - Push to the branch:
git push origin feature-name - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue with detailed information
- Include error messages and steps to reproduce
- Groq for AI-powered email generation
- Framer Motion for smooth animations
- Tailwind CSS for styling
- Lucide for beautiful icons