How raj-git07/e-mail-summariser-and-classifier works
This repository provides two email-intelligence workflows: a browser dashboard backed by FastAPI, and a local CLI that classifies Gmail messages and can summarize them. The web path covers OAuth, inbox retrieval, user-managed labels and stars, search, and on-demand summaries; the CLI path adds local classification and feedback-driven retraining. The graph preserves both modes and their shared external services. Some API and browser source is excerpted only, so edges for documented capabilities cite the README; unsampled implementation details are not inferred.
Main entry points: app.py CLI workflow · index.py FastAPI routes · script.js Dashboard behavior · email_summarizer.py CLI summary generation
Components 21
Web dashboard
- Dashboard interface
public/index.html - Dashboard behavior
public/script.js - Responsive styling
public/style.css - Account token storage
Web API
- FastAPI routes
api/index.py - Web inbox retrieval
api/index.py - Label and star updates
api/index.py - Web summary generation
api/index.py
Local CLI
- CLI workflow
app.py - Local Gmail access
gmail_integration.py - Email message model
email_fetcher.py - CLI summary generation
email_summarizer.py - Summary configuration
config.py
Classification and feedback
- Email classifier
email_classifier.py - Serialized classifier
email_classifier.joblib - Feedback management
email_classifier.py - Feedback records
email_feedback.json
Other components
- Email user
- Google OAuth
- Gmail API
- OpenRouter summaries
Connections 29
- Email user → Dashboard interface: uses
README.md - Dashboard interface → Dashboard behavior: drives
README.md - Dashboard interface → Responsive styling: styled by
README.md - Dashboard behavior → Account token storage: stores tokens
README.md - Dashboard behavior → FastAPI routes: requests
public/script.js - FastAPI routes → Dashboard interface: serves
api/index.py - Dashboard behavior → Google OAuth: redirects for login
README.md - Google OAuth → Dashboard behavior: returns credentials
README.md - FastAPI routes → Google OAuth: exchanges authorization
README.md - FastAPI routes → Web inbox retrieval: routes inbox requests
api/index.py - Web inbox retrieval → Gmail API: fetches messages
api/index.py - FastAPI routes → Label and star updates: routes label updates
api/index.py - Label and star updates → Gmail API: modifies labels
api/index.py - FastAPI routes → Web summary generation: routes summary requests
api/index.py - Web summary generation → OpenRouter summaries: requests summary
README.md - Email user → CLI workflow: runs
README.md - CLI workflow → Local Gmail access: authenticates and fetches
app.py - Local Gmail access → Gmail API: reads messages
README.md - Local Gmail access → Google OAuth: authenticates
README.md - CLI workflow → Email message model: constructs messages
app.py - CLI workflow → Email classifier: classifies messages
app.py - Email classifier → Serialized classifier: loads and saves
email_classifier.py - CLI workflow → Feedback management: loads training data
app.py - Feedback management → Feedback records: reads and writes
email_classifier.py - CLI workflow → Email classifier: re-trains
app.py - CLI workflow → CLI summary generation: summarizes selected mail
app.py - CLI summary generation → Email message model: formats message content
email_summarizer.py - CLI summary generation → Summary configuration: reads settings
email_summarizer.py - CLI summary generation → OpenRouter summaries: requests summary
email_summarizer.py