This is a Gmail Clone application designed to replicate core functionalities of email management. The application is built with a React + Tailwind CSS frontend and a Node.js + Express backend with MongoDB for data storage. The project uses Redux for state management and JSON Web Tokens (JWT) for authentication.
Authentication:
register
: Allows users to register a new account.login
: Authenticates users and issues JWT.logout
: Invalidates the user session.Email Management:
createEmail
: Allows users to create and send emails.deleteEmail
: Enables users to delete emails by ID.getAllEmail
: Retrieves inbox emails for a user.getSentEmail
: Fetches emails sent by a user.Middleware:
isAuthenticated
: Validates JWT tokens to secure endpoints.git clone https://github.com/Rahul65911/Gmail-Clone.git
cd Gmail-Clone
cd frontend
npm install
cd backend
npm install
Create a .env
file in the backend
directory with the following:
PORT=8080
MONGO_URI=your-mongodb-connection-string
SECRET_KEY=your-jwt-secret-key
cd frontend
npm run dev
cd backend
npm start
/api/v1/auth/register
: Register a new user./api/v1/auth/login
: Login and receive a JWT token./api/v1/auth/logout
: Logout the user./api/v1/email/create
: Create a new email./api/v1/email/:id
: Delete an email by ID./api/v1/email/getallemails
: Retrieve inbox emails for the logged-in user./api/v1/email/getsentemails
: Retrieve sent emails for the logged-in user.This project is licensed under the MIT License. See the LICENSE file for details.