{"id":30838676,"url":"https://github.com/literalkrishu/ai-powered-email-assistant","last_synced_at":"2026-04-03T23:36:44.902Z","repository":{"id":313238573,"uuid":"1050422022","full_name":"LiteralKrishu/AI-Powered-Email-Assistant","owner":"LiteralKrishu","description":"AI-Powered-Email-Assistant is designed to help support teams manage hundreds (or thousands) of daily emails efficiently. It automatically retrieves support emails, analyzes sentiment, assigns priority, extracts key details, and generates context-aware replies using LLMs.","archived":false,"fork":false,"pushed_at":"2025-09-04T17:54:57.000Z","size":27,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-04T19:32:56.989Z","etag":null,"topics":["docker","docker-compose","faiss","fastapi","huggingface","nodejs","postgresql","python-3","rag","reactjs","recharts","tailwindcss","uvicorn"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LiteralKrishu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-04T12:10:30.000Z","updated_at":"2025-09-04T17:55:37.000Z","dependencies_parsed_at":"2025-09-04T19:32:59.966Z","dependency_job_id":"0432d798-0a7d-4874-b350-d38de1479e55","html_url":"https://github.com/LiteralKrishu/AI-Powered-Email-Assistant","commit_stats":null,"previous_names":["literalkrishu/ai-powered-email-assistant"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/LiteralKrishu/AI-Powered-Email-Assistant","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiteralKrishu%2FAI-Powered-Email-Assistant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiteralKrishu%2FAI-Powered-Email-Assistant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiteralKrishu%2FAI-Powered-Email-Assistant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiteralKrishu%2FAI-Powered-Email-Assistant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LiteralKrishu","download_url":"https://codeload.github.com/LiteralKrishu/AI-Powered-Email-Assistant/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiteralKrishu%2FAI-Powered-Email-Assistant/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273941526,"owners_count":25195104,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","faiss","fastapi","huggingface","nodejs","postgresql","python-3","rag","reactjs","recharts","tailwindcss","uvicorn"],"created_at":"2025-09-06T18:05:23.512Z","updated_at":"2025-12-30T19:50:19.053Z","avatar_url":"https://github.com/LiteralKrishu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📧 AI-Powered-Email-Assistant\n\n\u003e 🤖 Intelligent email management system for modern organizations.  \n\u003e Fetches, categorizes, prioritizes, and drafts AI-powered responses to customer support emails.  \n\n![Build](https://img.shields.io/badge/build-MVP-informational?style=flat-square)\n![Tech Stack](https://img.shields.io/badge/stack-FastAPI%2C%20React%2C%20Postgres-blue?style=flat-square)\n![License](https://img.shields.io/badge/license-MIT-green?style=flat-square)\n\n---\n\n## 🚀 Project Objective\n\n**AI-Powered-Email-Assistant** is designed to help support teams manage **hundreds (or thousands) of daily emails** efficiently.  \nIt automatically **retrieves support emails, analyzes sentiment, assigns priority, extracts key details, and generates context-aware replies** using LLMs.  \n\nThis ensures **faster, empathetic, and accurate responses**, reducing manual effort while boosting customer satisfaction.\n\n---\n\n## 🧱 Architecture \u0026 Workflow\n\n```text\n     ┌ ───────────────────── ┐\n     │     Email Server      │\n     │ (Gmail/Outlook/IMAP)  │\n     └ ───────────────────── ┘\n                 │\n     ┌───────────▼───────────┐\n     │ Email Retrieval Layer │\n     │ (IMAP/Gmail API)      │\n     └───────────┬───────────┘\n                 │\n             Raw Emails\n                 │\n     ┌───────────▼───────────┐\n     │ Preprocessing \u0026 NLP   │\n     │ - Filtering           │\n     │ - Sentiment Analysis  │\n     │ - Priority Detection  │\n     │ - Info Extraction     │\n     └───────────┬───────────┘\n                 │\n     ┌───────────▼───────────┐\n     │ AI Response Generator │\n     │ - Context Embedding   │\n     │ - RAG (Knowledge Base)│\n     │ - LLM Draft Replies   │\n     └───────────┬───────────┘\n                 │\n     ┌───────────▼───────────┐\n     │ Database (Postgres)   │\n     │ Emails + Metadata     │\n     └───────────┬───────────┘\n                 │\n     ┌───────────▼───────────┐\n     │ Dashboard (React/Next)│\n     │ - Email List + Details│\n     │ - Analytics \u0026 Stats   │\n     │ - Draft Reply Review  │\n     └───────────────────────┘\n```\n\n---\n\n## 📦 Tech Stack\n\n| Layer       | Technology                           |\n|-------------|---------------------------------------|\n| Backend     | Python, FastAPI, Uvicorn             |\n| NLP / AI    | Hugging Face (DistilBERT, RoBERTa), OpenAI GPT, FAISS for RAG |\n| Database    | PostgreSQL                           |\n| Frontend    | React / Next.js, TailwindCSS, Recharts |\n| Deployment  | Docker, docker-compose               |\n\n---\n\n## 🗂 Project Phases \u0026 Deliverables\n\n### Phase 1: Planning \u0026 Setup\n- Define requirements  \n- Setup repo, `.env`, base project structure  \n📁 Deliverables:  \n`README.md`, base FastAPI app, frontend scaffold\n\n---\n\n### Phase 2: Email Retrieval \u0026 Storage\n- Connect to Gmail/Outlook IMAP API  \n- Filter subjects: *Support, Query, Request, Help*  \n- Store raw + metadata in PostgreSQL  \n📁 Deliverables:  \n`/backend/email_service.py`, database schema\n\n---\n\n### Phase 3: NLP Processing\n- Sentiment classification (Positive/Negative/Neutral)  \n- Urgency detection (keywords: *immediately, critical, cannot access*)  \n- Information extraction (phone, product, requirements)  \n📁 Deliverables:  \n`/backend/nlp_pipeline.py`, test data runs\n\n---\n\n### Phase 4: AI-Powered Responses\n- RAG layer for contextual replies (knowledge base + embeddings)  \n- LLM draft reply generation (empathetic + product-aware)  \n📁 Deliverables:  \n`/backend/ai_responder.py`, OpenAI integration\n\n---\n\n### Phase 5: Dashboard Development\n- List emails (sortable by priority)  \n- Email detail view (raw + extracted info + AI draft)  \n- Analytics: total emails, sentiment breakdown, pending vs resolved  \n📁 Deliverables:  \n`/frontend/pages/*.tsx`, `Recharts` graphs\n\n---\n\n### Phase 6: Final Integration \u0026 Testing\n- SMTP/Gmail API for sending replies  \n- Docker-compose setup for full stack  \n📁 Deliverables:  \nWorking end-to-end MVP  \n\n---\n\n## ⚙️ Setup Instructions\n\n### Backend Setup\n1. Navigate to project:\n   ```bash\n   cd AI-Powered-Email-Assistant\n   ```\n2. Create virtual environment:\n   ```bash\n   python -m venv venv\n   ```\n3. Activate environment:\n   - Windows: `venv\\Scripts\\activate`  \n   - macOS/Linux: `source venv/bin/activate`  \n4. Install dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n5. Update `.env` with actual credentials.  \n6. Run app:\n   ```bash\n   uvicorn app.main:app --reload\n   ```\n\n### Frontend Setup\n1. Navigate to frontend:\n   ```bash\n   cd frontend\n   ```\n2. Install dependencies:\n   ```bash\n   npm install\n   ```\n3. Install Recharts:\n   ```bash\n   npm install recharts\n   ```\n4. Start dev server:\n   ```bash\n   npm run dev\n   ```\n\n### Docker Setup (Optional)\n1. Update `.env` with credentials.  \n2. Run:\n   ```bash\n   docker-compose up\n   ```\n\n---\n\n## 🌐 Access the Application\n- Backend API → [http://localhost:8000](http://localhost:8000)  \n- Frontend → [http://localhost:3000](http://localhost:3000)  \n- API Docs → [http://localhost:8000/docs](http://localhost:8000/docs)  \n\n---\n\n## ⚠️ Notes\n- Enable **IMAP** and generate an **App Password** for Gmail.  \n- Requires **OpenAI API key** (or custom LLM endpoint).  \n- Ensure **PostgreSQL** is running and accessible.  \n\n---\n\n## 📧 Example Email Flow\n\n**Raw Email**  \n```\nFrom: diana@client.co  \nSubject: URGENT - General query about subscription\nBody: Hi team, I am unable to log into my account since yesterday. Please fix this immediately. My phone number is 9876543210.  \n```\n\n**Extracted Info**  \n- Sender: `diana@client.co`  \n- Subject: \"URGENT - General query about subscription\"  \n- Sentiment: Negative  \n- Priority: Urgent  \n- Phone: 9876543210  \n- Requirement: Account recovery  \n\n**AI Draft Response**  \n```\nHi [Customer Name],\n\nI understand how frustrating it must be to be locked out of your account, and I sincerely apologize for the inconvenience.  \nOur support team is already looking into this issue, and we will help restore your account access as quickly as possible.  \n\nI will personally ensure this case is treated with top priority. Meanwhile, could you please confirm the last login attempt (date/time) for verification?  \n\nThank you for your patience.  \n\nBest regards,  \n[Your Support Team]  \n```\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliteralkrishu%2Fai-powered-email-assistant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliteralkrishu%2Fai-powered-email-assistant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliteralkrishu%2Fai-powered-email-assistant/lists"}