MailMerger Frontend is a React + TypeScript web application built with Vite, designed as the user interface for the MailMerger system. It allows users to automate, compose, and manage email campaigns, templates, and resume uploads, integrating tightly with a backend API.
- Features
- Demo
- Prerequisites
- Installation
- Configuration
- Running the Frontend
- Connecting to the Backend
- Backend Repository
- Usage Guide
- Project Structure
- ESLint & Code Quality
- Contributing
- User Authentication: Supports both email/password and Google OAuth2 login and signup.
- Email Dashboard: Central dashboard to access core features and manage user sessions.
- Email Writing & Queueing: Compose emails, queue them for sending, and manage the queue.
- Email Templates: Create, manage, and delete reusable email templates.
- Resume Upload: Upload PDF resumes (max 5MB) to the backend for processing.
- Token Management: Automatic JWT and refresh token handling to keep sessions valid.
The frontend lets users create templates and send personalized emails using saved data.
This page allows composing an email, selecting a saved template, filling template fields, and sending or queuing the email.
This page allows creating and saving dynamic templates with custom keys for personalization.
- Node.js (>= 16.x)
- npm (>= 8.x) or yarn
- Access to a running MailMerger backend server with REST API endpoints.
- The backend URL is configured via environment variables.
-
Clone the repository:
git clone https://github.com/manas-1404/MailMerger-frontend.git cd MailMerger-frontend -
Install dependencies:
npm install # or yarn install
Create a .env file in the root of the project and set the backend server URL:
VITE_BACKEND_URL=https://your-backend-server.com
This variable is required for API calls. All authentication and data requests in the frontend will use this base URL.
Start the development server:
npm run dev
# or
yarn devThe app will be available at http://localhost:5173 (default Vite port).
- Ensure the backend server is running and accessible at the URL specified in your
.envfile. - The backend must expose the following endpoints (examples):
/api/auth/loginand/api/auth/signupfor user authentication/api/oauth/gmail-authorizefor Google OAuth2/api/storage/upload-filefor resume uploads/api/templates/get-all-templatesfor email templates/api/auth/refresh-jwt-tokenand/api/auth/renew-refresh-and-jwt-tokenfor token management
See the src/api/ directory for details on API integration.
The backend code for this project is available at: @manas-1404/MailMerger-backend
Please refer to the backend repository for API documentation, setup instructions, and all server-side logic.
-
Sign Up / Log In:
- Standard login requires email and password.
- Alternatively, click "Sign in with Google" for OAuth2 authentication.
-
Dashboard Navigation:
- After login, access the dashboard with options to:
- Write and queue emails
- Create/manage templates
- Upload resumes (PDF only, max 5MB)
- Send emails from the queue
- After login, access the dashboard with options to:
-
Uploading a Resume:
- Navigate to "Upload Resume" in the navigation bar.
- Select a PDF file and submit. Only PDF format is accepted; max size is enforced.
-
Email Queue and Templates:
- Create templates for reuse.
- Manage your email queue before sending.
- Templates are fetched and managed via secured backend endpoints.
-
Token Handling:
- JWT and refresh tokens are stored in localStorage.
- Tokens are automatically refreshed via backend endpoints (
/api/auth/refresh-jwt-token).
src/api/– All backend API integrationscomponents/– Reusable UI components (NavBar, UploadFileCard, etc.)routes/– Page-level React components (Dashboard, Login, Signup, etc.)types/– TypeScript type definitionsmain.tsx– App entry point and router setup
.env– Environment configuration for backend URL
- Codebase uses TypeScript and ESLint with recommended and type-checked rules.
- See
eslint.config.jsfor configuration. - Additional plugins for React and DOM can be added for stricter linting.
Contributions are welcome! Please fork the repository, create a feature branch, and submit a pull request. Ensure code is formatted and passes linting.
Backend Setup
The backend server must be running and configured for JWT/OAuth authentication. For setup instructions, refer to the backend repository and ensure the required endpoints are exposed and CORS is configured to allow requests from your frontend domain.
Contact
For questions or support, please open an issue on GitHub or reach out to the repository owner.

