Next-Generation Intelligent Email & Calendar Orchestration Engine
Overview β’ Architecture β’ Features β’ Tech Stack β’ Engineering β’ Roadmap
MailMind AI was engineered to solve the chronic problem of "Cognitive Load in Communication." Modern professionals spend over 28% of their workday managing emails. MailMind AI transforms the inbox from a passive data silo into an active, AI-orchestrated command center.
- Problem Statement: Inbox overload leads to missed opportunities, delayed responses, and decision fatigue.
- The Mission: To build a low-latency, privacy-first AI layer that sits atop Gmail, distilling complex threads into actionable intelligence and synchronizing communication with scheduling.
- Business Value: Increases executive productivity by automating 60% of routine email triage and scheduling tasks.
The application follows a Decoupled Client-Server Architecture optimized for high-throughput AI operations and real-time synchronization.
graph TD
User((User)) -->|React + Framer Motion| Frontend[Frontend SPA - Vite]
Frontend -->|JWT Auth| Gateway[Express API Gateway]
Gateway -->|OAuth 2.0| GmailAPI[Google Gmail API]
Gateway -->|Calendar Scopes| CalAPI[Google Calendar API]
Gateway -->|Inference| AI[AI Engine - Gemma 2 via OpenAIs]
Gateway -->|Persistence| DB[(MongoDB Atlas)]
subgraph "Intelligent Processing"
AI -->|Summarization| Gateway
AI -->|Intent Extraction| Gateway
AI -->|Meeting Detection| Gateway
end
This project was developed using a rigorous Agile Methodology, divided into three distinct 2-week sprints.
- Sprint 1 (Infrastructure & Security): Focused on the OAuth 2.0 handshake, secure token storage, and the "Premium Brutalist" design system.
- Sprint 2 (AI Orchestration): Integration of the LLM layer, context-window management, and the proprietary "Schedule Recognition" engine.
- Sprint 3 (Performance & Polish): Solving the "Rendering Paradox" on mobile, implementing backdrop-blur optimizations, and stabilizing background polling.
- Iteration Strategy: Used daily "Virtual Standups" (self-led) and weekly retrospective analysis to pivot UI/UX decisions based on performance benchmarks on low-end devices.
- Summarization: Uses chain-of-thought prompting to condense long threads into 3 critical bullet points.
- Intent Recognition: Detects if an email requires a meeting, a professional reply, or just an acknowledgment.
- Automatically parses physical addresses, Zoom links, and time slots from unstructured email bodies.
- Generates Google Calendar event payloads with 100% ISO-8601 date accuracy.
- Mobile: Dedicated tab-based navigation with background polling protection (prevents DOM crashes during refreshes).
- Tablet: Side-by-side folder switching and AI assistant drawer.
- Desktop: Full-width brutalist workspace with magnetic interactions.
- Complete Gmail folder support: Inbox, Starred, Sent, and Trash with real-time status syncing.
| Layer | Technology |
|---|---|
| Frontend | React 18, Vite, TypeScript, Framer Motion, Tailwind CSS, Lucide React |
| Backend | Node.js, Express, OpenAis (Gemma 2 27B), JWT |
| Database | MongoDB Atlas (NoSQL for flexible AI log storage) |
| APIs | Google OAuth2, Gmail API v1, Google Calendar API v3 |
| Performance | TanStack Query (Caching), Custom Background Polling Engine |
| Tools | VS Code, Vercel,Render, Git, MongoDB Compass, Google Cloud Console |
mail-mind-ai/
βββ backend/
β βββ config/ # Google OAuth & Database initializers
β βββ controllers/ # Core logic: AI extraction, Gmail proxying, Calendar logic
β βββ middleware/ # Auth guards, Rate limiters, Error handlers
β βββ models/ # MongoDB schemas for User profiles & AI history
β βββ utils/ # HTML stripping, Date parsing, Token refreshers
βββ frontend/
βββ src/
β βββ components/ # Atomic UI components (Navbar, Hero, Modals)
β βββ hooks/ # Custom React hooks for device detection & sounds
β βββ pages/ # Dashboard (Main logic hub) & Landing Page
β βββ store/ # State management (Context API / Local)
- Why Vite instead of CRA?: Reduced cold-start time from 15s to <500ms and significantly faster HMR for rapid UI iteration.
- LLM Choice (Gemma 2 27B): Chosen for its superior reasoning-to-latency ratio, ensuring that email summaries are generated in under 2 seconds.
- Security Posture: Implemented Helmet.js for secure headers, CORS white-listing, and a rate-limiting firewall to prevent API abuse.
- Mobile Stability: Solved the
removeChildDOM crash by gating state updates during Framer Motion animationsβa common pitfall in complex React apps.
- Responsive Integrity: Verified across 300px (Mobile S) to 2560px (Ultra-Wide).
- Performance: Optimized for the Samsung M11 (entry-level device) by disabling heavy filters and animations on low-performance hardware.
- Date Robustness: 100+ edge cases tested for AI date parsing (e.g., "Next Tuesday at 4", "10/05/2026").
- Successfully integrated a production-grade Google OAuth flow with sensitive scopes.
- Engineered a custom "Premium Brutalist" CSS system using Tailwind variables.
- Implemented a seamless AI history logging system that tracks 100+ daily summaries.
- Multi-Agent Support: Assign different AI personalities for different email folders.
- Offline Cache: Use Service Workers to allow reading cached summaries without internet.
- Vector Search: Integrate Pinecone/RAG to search across all emails using natural language.
Developed with Precision by VARA
"Transforming Information Overload into Actionable Clarity."