How pratheek-achar/84teamwanderers works
Project Type & Purpose
• The project is a full-stack application with a primary focus on backend email processing (using Flask in Python) and a web-based dashboard (HTML templates) for monitoring and managing emails.
• It incorporates AI-based processing via Google Gemini API for textual analysis and communicates with an email server via IMAP/SMTP.
• Data persistence is provided by MongoDB to store incoming email data and related analytics.
Key Components
a. Email Ingestion & Processing:
• Email Polling Component: Illustrate how the system periodically polls an inbox using IMAP to fetch unread emails.
• Email Analyzer: Highlight the processing unit that categorizes emails (Technical, Billing, Complaint, General Inquiry), measures sentiment, assigns priority scores, and identifies language.
b. Email Forwarding & Response Generation:
• Auto-Response System: Show the component responsible for generating and sending personalized responses via SMTP.
• Department Forwarding: Represent how the system forwards emails to the appropriate department (Technical, Billing, etc.) based on classification.
c. Data Storage:
• MongoDB Database: Emphasize MongoDB as the central repository for storing emails, user interactions, and analytics data.
d. Web Interface / Dashboard:
• Flask Backend: Include the main application file (app.py) that acts as the server, hosting API endpoints and rendering HTML templates.
• Frontend UI Components: Illustrate the dashboard, analytics, and email details pages (using HTML templates under the “templates” folder) that provide the point-and-click management of emails.
• API Endpoints: Mark endpoints such as /api/weekly-report, /api/response-stats, and /api/email-details/<email_id>—these link the backend processing and the dashboard interface.
Relationships & Data Flow
1. Emails are fetched from the external IMAP server.
2. They are processed through the AI-driven analysis component.
3. Processed emails are stored in MongoDB.
4. Based on analysis, emails are either auto-responded to or forwarded to department-specific email addresses via SMTP.
5. The Flask web server retrieves the data from MongoDB to render the dashboard and analytics pages.
• Dependencies such as the connection between the application and external services (e.g., IMAP/SMTP for email, Google Gemini API for AI analysis, MongoDB for persistence).
Architectural Patterns & Technologies
• That the system uses a service-oriented design where distinct responsibilities (email ingestion, AI processing, database interactions, and web serving) are segregated.
• Annotations for key technologies: Python (core language), Flask (web framework), MongoDB (database), Google Gemini AI (third-party API for analysis), and standard web technologies (HTML/CSS with Tailwind/Bootstrap for UI).