Skip to content

krrishexe/ReachInbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ReachInbox

Server

This is a server application built with Node.js and Express. It uses various packages such as nodemailer for sending emails, openai for AI functionalities, googleapis for Google APIs, and axios for HTTP requests and bullMQ to process queues.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

You need to have Node.js and npm installed on your machine. You can download Node.js from here and npm is included in the installation.

Installing

  1. Clone the repository to your local machine
git clone https://github.com/krrishexe/ReachInbox-Assignment
  1. Navigate to the root directory of the project directory :
cd server
  1. Run npm install to install all the dependencies
  2. Create a .env file in the root directory with same IDs as in .env.example file and fill in the required details.

Running the server

  1. To start the server, run the following command in your terminal
npm start

This will start the server at localhost:5000 (or whatever port you have specified).

  1. To start the worker.ts file, run the following command in your terminal
nodemon src/worker.ts
  1. To start the redis server, run the following command in your terminal
docker run -itd -p 6379:6379 redis

Built with

  • Node.js
  • Express.js
  • Nodemailer
  • OpenAI
  • Google APIs
  • Axios
  • bullMQ
  • Zod (for validation)

API Endpoints

For Google's OAuth2.0:

  • /api/mail/user/:email - GET request to send an email
  • /api/mail/drafts/:email - GET request to view drafts mail.
  • /api/mail/drafts/:email - GET request to view drafts mail.
  • api/mail/read/:email/message/:message - GET request to read a specific email(using id).
  • api/mail/list/:email - GET request to get a list of top 10 mails.
  • api/mail/list/:email - GET request to get a list of top 10 mails.
  • api/mail/readdata/:id - POST request to send a single mail for particular ID. format :
  • api/mail/sendmulti/:id - POST request to send multiple mails to multiple users simulataneously for particular ID. format :

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published