Skip to content

an nextjs application which fetches all your emails and classify them in different categories

License

Notifications You must be signed in to change notification settings

Naresh-chandanbatve/email-manager

Repository files navigation

logo

Email Manager

An awsome website to mannage all your emails

contributors last update forks stars open issues license


📔 Table of Contents

🌟 About the Project

📷 Screenshots

screenshot

👾 Tech Stack

Client
Server
DevOps

🎯 Features

  • Secure google sign in with NextAuth
  • Fetching all your emails
  • Classifying emails in different catagories (pending)

🔑 Environment Variables

To run this project, you will need to add the following environment variables to your .env file

GOOGLE_CLIENT_ID

GOOGLE_CLIENT_SECRET

NEXTAUTH_SECRET

NEXTAUTH_URL

REDIRECT_URI

REFRESH_TOKEN

NEXT_PUBLIC_APP_DOMAIN

🧰 Installation

🏃 Run Locally

Clone the project

  git clone https://github.com/Naresh-chandanbatve/email-manager.git

Go to the project directory

  cd email-manager

Install dependencies

  npm install

Start the server

  npm run dev

🐳 Run the Docker Image

You can also run the Docker Image to get started easily. get the Docker Image by running the following command

  docker pull nareshchandanbatve/email-manager:latest

Run the docker image by running the following command

  docker run -p 3000:3000 --env-file ./.env nareshchandanbatve/email-manager:latest

📃 Note:

you must have the .env file with all the environment variables listed above

🛠️ Recreate the Infrastructure on AWS using Terraform

prerequisites:

  • you must have the aws IAM account with required permissions
  • you must have Terraform installed on your machine

All the Terraform code is available in /terraform directory so go to /terraform directory

Add all the environment variables listed above in the variables.tf file as shown in the varaibles.example.tf file

Then run the following command to intialize terraform

  terraform init

Then run the following command it may prompt errors, fix them if any.

  terraform plan

Then run and type 'yes' when prompted.

  terraform apply

Now you have your infrastructure ready with docker image of this application running on the ec2 server.

AWS Resources that will be created:

  • EC2 instance
  • Custom VPC
  • Security Group with allowing all ingress and egress port (warning: It can be security vulnerability, I am allowing all ports for development only allow only ports that are needed for production)
  • Subnet
  • Internet Gateway
  • Routing Table

👋 Contributing

Contributions are always welcome!

See CONRIBUTING.md for ways to get started.

📜 Code of Conduct

Please read the Code of Conduct

⚠️ License

Distributed under the MIT License. See LICENSE.txt for more information.

🤝 Contact

Naresh Chandanbatve - @Nareshchandanb1 - chandanbatven@gmail.com

Project Link: https://github.com/Naresh-chandanbatve/email-manager