How zamalali/inboxhero works
Main Components
• User Interface:
• Streamlit frontend (the entry point is src/app.py). This is where the user interacts with the app and triggers operations like email prioritization, reply detection, and interactive chat.
• Email Ingestion and Integration:
• A component that connects to Gmail via the Gmail API. This module authenticates using the client_secret.json (which must be uploaded when running the app) and retrieves emails.
• Email Processing Module:
• NLP and Summarization Engine:
• Integration with Langchain and ChatGroq. This engine handles summarization of email bodies and the generation of draft responses.
• Attachment Processing Module:
• There is support for Microsoft attachments like PDFs, DOCX, and Excel files. This module reads, parses, and summarizes attachments.
• Utilities and Helper Functions:
• Library of utility functions found under src/utils (attachment.py, tool.py, utils.py). These are used to modularize operations like email processing, attachment reading, and other non-UI logic.
• External Services and Configurations:
• External configuration management (.env file for API keys) and the dependencies setup (requirements.txt). Also note external API integration with both Gmail and Groq.
Relationships and Interactions
• Communications from the Email Processing component to the NLP and Summarization Engine (Langchain/ChatGroq), indicating that email contents are sent for summarization and draft generation.
Architectural Choices and Design Principles
• The design is modular and separates the concerns between UI (Streamlit), backend processing (email and attachment processing), and external integrations (Gmail API and Langchain/ChatGroq).
• That the utilities—grouped under src/utils—make it easier to maintain and extend the functionality, fitting a clean separation of concerns.
• While the project isn’t built in a full-blown layered architecture (like traditional MVC), it still distinctly separates user interface from business logic and third-party API integrations.