Skip to content

A full-stack application designed to provide a centralized interface for connecting to, syncing, and processing emails from multiple IMAP accounts. The application securely stores user credentials, syncs email data to a dedicated database, and provides a clean user interface for managing accounts and viewing emails.

Notifications You must be signed in to change notification settings

priyanshutariyal02/Email-Processing-and-Analytics-Platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Email Processing and Analytics Platform

Overview

This is a robust, full-stack application designed to provide a centralized interface for connecting to, syncing, and processing emails from multiple IMAP accounts. The application securely stores user credentials, syncs email data to a dedicated database, and provides a clean user interface for managing accounts and viewing emails.

Features Implemented (Current Version)

  • Secure User Authentication: Full registration and login system using JWT (JSON Web Tokens) for secure, stateless sessions.
  • Encrypted Credential Storage: User email account passwords are encrypted using AES-256 before being stored in the database.
  • Email Account Management (CRUD):
    • Users can add new IMAP email accounts.
    • Users can view a list of all their added accounts.
    • Users can delete their saved accounts with a confirmation step.
  • Live IMAP Connection Testing: Ability to test the connection to an email account in real-time to verify credentials.
  • Mailbox (Folder) Discovery: Fetches and displays the complete folder structure of a connected email account.
  • Incremental Email Syncing:
    • Performs an initial bulk sync of a selected mailbox.
    • Subsequent syncs are incremental, fetching only new emails to ensure speed and efficiency.
    • Saves all parsed email data (sender, subject, date, body, etc.) to a MongoDB database.
  • Paginated Email Viewer: A clean UI to browse through thousands of synced emails with "Next" and "Previous" page controls.
  • Email Detail View: A modal view to read the full, formatted HTML content of any synced email.

Tech Stack

  • Backend: Node.js, NestJS, Mongoose, Passport.js (for JWT), node-imap, mailparser
  • Frontend: React.js, Vite, TypeScript, Tailwind CSS, Axios, React Router
  • Database: MongoDB

Setup and Installation

Backend

  1. Navigate to the email-processor-backend directory.

  2. Install dependencies:
    npm install

  3. Create a .env file in the root of the backend project and add the following variables:

   # A secure, random string for signing JWTs
   JWT_SECRET=YOUR_VERY_SECRET_KEY

   # A 64-character hex string (crypto.randomBytes(32).toString('hex'))
   ENCRYPTION_KEY=YOUR_ENCRYPTION_KEY

   # A 32-character hex string (crypto.randomBytes(16).toString('hex'))
   ENCRYPTION_IV=YOUR_ENCRYPTION_IV

   # Your MongoDB connection string (e.g., from MongoDB Atlas)
   DATABASE_URL=mongodb+srv://...
  1. Run the development server:
   npm run start:dev

The backend will be running at http://localhost:8080.

Frontend

  1. Navigate to the email-processor-frontend directory.

  2. Install dependencies:
    npm install

  3. Run the development server:
    npm run dev

    The frontend will be running at http://localhost:5173.

About

A full-stack application designed to provide a centralized interface for connecting to, syncing, and processing emails from multiple IMAP accounts. The application securely stores user credentials, syncs email data to a dedicated database, and provides a clean user interface for managing accounts and viewing emails.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published