Skip to content

Dhruv35M/smart-mail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

smartMail - AI Reply

smartMail is an AI-powered email reply generator that helps users quickly generate replies to their emails using a Spring Boot backend and a React frontend. The backend API utilizes AI models to craft the replies, while the frontend provides a user-friendly interface.

Project Setup

This project consists of two main parts:

  • Backend (Spring Boot): The server-side application that handles the API requests for email reply generation.
  • Frontend (React): The client-side application that interacts with the user and communicates with the backend API.

Prerequisites

Ensure you have the following installed on your machine:

  • Java (for Spring Boot backend)
  • Node.js and npm (for React frontend)
  • Maven (for Spring Boot)

Backend Setup

The backend is built using Spring Boot and exposes a REST API that accepts POST requests.

API Endpoint

  • URL: http://localhost:8080/api/email/generate

  • Method: POST

  • Request Body:

    {
      "emailContent": "Hi, would you like ...",
      "tone": "friendly" (optional)
    }
  • Response:

    {
      "reply": "Thank you for your email. I will get back to you shortly..."
    }

Running the Backend

  1. Navigate to the backend directory:

    cd backend
  2. Build and run the Spring Boot application:

    ./mvnw spring-boot:run
  3. The backend will be running on http://localhost:8080.

Frontend Setup

The frontend is built using React and runs on the default Vite development server.

Running the Backend

  1. Navigate to the frontend directory:

    cd frontend
  2. Install the required dependencies:

    npm install
  3. Start the development server:

    npm run dev
  4. The frontend will be accessible at http://localhost:5173/.

How it works

  1. The frontend sends a POST request to the backend API with the email content as input.
  2. The backend processes the input, generates a reply using AI models, and returns the response.
  3. The frontend displays the generated reply to the user.

Example Usage

  1. Enter an email content in the frontend interface.
  2. The frontend sends the input to the backend API.
  3. The backend returns a generated reply, and the frontend displays it.

Development Notes

  • Make sure both the frontend and backend servers are running at the same time for the system to function properly.
  • The backend server listens on port 8080 and the frontend on port 5173 (Vite default).

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

smartMail is an AI-powered email reply generator that helps users quickly generate replies to their emails using a Spring Boot backend and a React frontend.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors