AI-Powered Email Intelligence Platform
Transform your inbox from passive storage into intelligent productivity infrastructure.
๐ Live Demo ยท ๐ Docs ยท ๐ Report Bug ยท โจ Request Feature
Mail-IQ is a production-grade AI Email Intelligence SaaS platform that transforms how you interact with your inbox. Unlike traditional email clients that simply display messages chronologically, Mail-IQ uses advanced AI to:
- ๐ Analyze every email for priority, sentiment, and key data
- ๐ Extract deadlines, meetings, and action items automatically
- ๐ค Generate smart replies, summaries, and labels using LLMs
- ๐ Visualize your email patterns with a rich analytics dashboard
- โ Convert emails into actionable tasks on a Kanban board
- ๐ Alert you proactively before critical deadlines are missed
"Never Miss What Truly Matters" โ Mail-IQ acts as your personal AI email chief-of-staff.
|
|
|
|
|
|
|
|
graph TB
subgraph Frontend["Frontend (React + Vite + TypeScript)"]
UI[UI Components<br/>Tailwind + Framer Motion]
Hooks[Custom Hooks<br/>useMailIQ / useAI / useGmail]
Store[State Management<br/>React State + Context]
end
subgraph AI["AI Layer"]
Gemini[Google Gemini 1.5 Pro]
GPT[OpenAI GPT-4o]
ONNX[ONNX Runtime<br/>On-device inference]
end
subgraph Backend["Backend (Supabase BaaS)"]
Auth[Supabase Auth<br/>Google OAuth]
DB[(PostgreSQL<br/>Neon)]
RT[Realtime<br/>WebSockets]
Storage[File Storage]
end
subgraph Gmail["Gmail Integration"]
OAuth[Gmail OAuth 2.0]
API[Gmail API v1]
end
UI --> Hooks
Hooks --> Store
Hooks --> AI
Hooks --> Backend
Hooks --> Gmail
Gmail --> OAuth
Gmail --> API
AI --> Gemini
AI --> GPT
AI --> ONNX
Backend --> Auth
Backend --> DB
Backend --> RT
Backend --> Storage
erDiagram
USERS {
uuid id PK
string email
string name
string avatar_url
string gmail_token
string preferred_ai_model
timestamp created_at
}
EMAILS {
uuid id PK
uuid user_id FK
string gmail_message_id
string subject
string sender
string sender_email
text body
text preview
string folder
boolean read
boolean starred
string category
string priority
string sentiment
timestamp email_timestamp
timestamp created_at
}
TASKS {
uuid id PK
uuid user_id FK
uuid email_id FK
string title
text description
string status
string priority
date due_date
timestamp created_at
}
LABELS {
uuid id PK
uuid user_id FK
string name
string color
}
NOTIFICATIONS {
uuid id PK
uuid user_id FK
uuid email_id FK
string title
text message
string category
boolean read
timestamp created_at
}
AI_ACTIVITY {
uuid id PK
uuid user_id FK
uuid email_id FK
string action_type
jsonb result
timestamp created_at
}
USERS ||--o{ EMAILS : "has"
USERS ||--o{ TASKS : "has"
USERS ||--o{ LABELS : "creates"
USERS ||--o{ NOTIFICATIONS : "receives"
EMAILS ||--o{ TASKS : "generates"
EMAILS ||--o{ AI_ACTIVITY : "triggers"
Mail-IQ/
โโโ public/
โ โโโ models/ # ONNX models for on-device inference
โโโ src/
โ โโโ components/
โ โ โโโ Sidebar.jsx
โ โ โโโ ProtectedRoute.jsx
โ โ โโโ ...
โ โโโ context/
โ โ โโโ AuthContext.jsx # Firebase/Supabase auth context
โ โโโ hooks/
โ โ โโโ useEmails.js
โ โ โโโ useAI.js
โ โ โโโ useGmail.js
โ โโโ lib/
โ โ โโโ supabase.js # Supabase client
โ โ โโโ gemini.js # AI client
โ โโโ pages/
โ โ โโโ LoginPage.jsx
โ โ โโโ DashboardPage.jsx
โ โ โโโ UploadPage.jsx
โ โ โโโ SavedProjectsPage.jsx
โ โโโ styles/
โ โ โโโ index.css
โ โโโ workers/
โ โ โโโ emailWorker.js # Web worker for background processing
โ โโโ App.jsx
โ โโโ main.jsx
โโโ .env.example
โโโ .gitignore
โโโ index.html
โโโ package.json
โโโ vite.config.js
โโโ README.md
- Node.js 18+
- npm or pnpm
- Supabase account (free tier works)
- Google Cloud Console project (for Gmail OAuth)
- Gemini API key (optional, for AI features)
# 1. Clone the repository
git clone https://github.com/Devengoyal885/Mail-IQ.git
cd Mail-IQ
# 2. Install dependencies
npm install
# 3. Set up environment variables
cp .env.example .env
# Edit .env with your credentials (see Environment Variables section)
# 4. Start development server
npm run devVisit http://localhost:5173 ๐
Create a .env file based on .env.example:
# โโ Supabase โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
# โโ Gmail OAuth โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
VITE_GMAIL_CLIENT_ID=your_google_oauth_client_id.apps.googleusercontent.com
VITE_GMAIL_REDIRECT_URI=http://localhost:5173/auth/callback
# โโ AI APIs โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
VITE_GEMINI_API_KEY=your_gemini_api_key
VITE_OPENAI_API_KEY=your_openai_api_key # Optional
# โโ App Config โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
VITE_APP_URL=http://localhost:5173
VITE_APP_NAME=Mail-IQCaution
Never commit your .env file to version control! The .gitignore is configured to exclude it. Always use .env.example as the template.
Mail-IQ uses Gmail API v1 with OAuth 2.0 scopes:
gmail.readonlyโ Read emailsgmail.modifyโ Archive, label, mark readgmail.composeโ Send and reply
| Feature | Model | Avg Latency |
|---|---|---|
| Email Summary | Gemini 1.5 Flash | ~800ms |
| Smart Reply | Gemini 1.5 Pro | ~1.2s |
| Priority Detection | On-device ONNX | ~50ms |
| Deadline Extraction | Gemini 1.5 Flash | ~600ms |
| Sentiment Analysis | On-device ONNX | ~30ms |
| Translation | Gemini 1.5 Pro | ~1.5s |
// Subscribe to new emails
const channel = supabase
.channel('emails')
.on('postgres_changes', { event: 'INSERT', schema: 'public', table: 'emails' }, (payload) => {
// Handle new email
})
.subscribe();npm install -g vercel
vercel --prodSet environment variables in Vercel Dashboard โ Project Settings โ Environment Variables.
npm run build
# Upload dist/ folder to Netlify, or connect GitHub repo# Build command
npm run build
# Start command
npm run preview-- Run in Neon SQL editor
CREATE TABLE users (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
email TEXT UNIQUE NOT NULL,
name TEXT,
created_at TIMESTAMPTZ DEFAULT NOW()
);
CREATE TABLE emails (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
user_id UUID REFERENCES users(id) ON DELETE CASCADE,
subject TEXT NOT NULL,
sender TEXT,
sender_email TEXT,
body TEXT,
folder TEXT DEFAULT 'inbox',
read BOOLEAN DEFAULT FALSE,
starred BOOLEAN DEFAULT FALSE,
priority TEXT,
sentiment TEXT,
email_timestamp TIMESTAMPTZ,
created_at TIMESTAMPTZ DEFAULT NOW()
);
-- Enable Row Level Security
ALTER TABLE emails ENABLE ROW LEVEL SECURITY;
CREATE POLICY "Users can only see their own emails" ON emails
FOR ALL USING (auth.uid() = user_id);Mail-IQ follows security-first architecture:
| Layer | Implementation |
|---|---|
| Authentication | Supabase Auth + Google OAuth 2.0 |
| Authorization | Row Level Security (RLS) on all tables |
| API Security | Rate limiting + input validation |
| Data Privacy | User-isolated data, no cross-user access |
| Secrets | Environment variables only, never in code |
| XSS Protection | React's built-in escaping + CSP headers |
| SQL Injection | Parameterized queries via Supabase client |
- Gmail OAuth integration
- AI email summarization
- Deadline extraction & alerts
- Priority detection
- Task extraction
- Kanban board
- Analytics dashboard
- AI chat assistant
- Smart compose
- Dark/light theme
- Outlook / Microsoft 365 integration
- Mobile app (React Native)
- Voice commands (Web Speech API)
- PWA with offline support
- Real-time WebSocket sync
- Collaborative inbox (team accounts)
- Team management dashboard
- Custom AI fine-tuning
- SSO (SAML 2.0)
- Admin analytics panel
- Workflow automation
- Zapier / Make integration
- Fully autonomous email agent
- Auto-response with approval flow
- Meeting scheduling via email
- Multi-inbox management
- Personal AI email assistant
Contributions are welcome! Please read our Contributing Guide and Code of Conduct.
# Fork the repository, then:
git checkout -b feat/your-amazing-feature
git commit -m 'feat: add amazing feature'
git push origin feat/your-amazing-feature
# Open a Pull RequestSee CONTRIBUTING.md for detailed guidelines.
| View | Description |
|---|---|
| Inbox | Three-panel layout with AI extraction chips |
| Dashboard | Analytics with Recharts visualizations |
| AI Panel | Summary, smart reply, task extraction, translation |
| Tasks | Kanban board from email action items |
| Search | Natural language search with filters |
| AI Chat | Conversational inbox assistant |
This repository contains the actual MailIQ source code, architecture, backend integrations, AI workflows, and production-ready implementation currently under active development.
MailIQ was designed as a real-world AI-powered email intelligence platform with features such as:
- AI Email Categorization
- Smart Priority Detection
- Deadline & Action Item Extraction
- Email Summarization
- Unified Communication Intelligence
- User Authentication & Personalization
- Analytics Dashboard
- Productivity Insights
Deploying MailIQ as a fully functional SaaS product requires ongoing infrastructure and operational costs, including:
- AI Model API Usage
- Authentication Services
- Database Hosting
- Email Processing Infrastructure
- Cloud Storage
- Monitoring & Security Services
As a student-built project, maintaining these production services continuously is currently not financially feasible.
To showcase the concept, design, workflow, and user experience of MailIQ, a separate demo prototype has been created.
๐ Live Demo: https://mailiq.netlify.app/
๐ Demo Repository: https://github.com/Devengoyal885/MailIQ-demo
The demo illustrates the intended functionality and user interface but does not include all production integrations and paid infrastructure required for real-world deployment.
The goal is to launch MailIQ as a fully hosted platform once sufficient resources, sponsorship, partnerships, or funding become available.
Until then, this repository serves as the primary development repository containing the actual implementation and ongoing research behind the project.
Deven Goyal Full Stack AI Engineer ๐ Portfolio ยท ๐ป GitHub ยท ๐ผ LinkedIn |
This project is licensed under the MIT License โ see LICENSE for details.
MIT License โ Copyright (c) 2024 Deven Goyal
Permission is hereby granted, free of charge, to any person obtaining a copy...
Made with โค๏ธ by Deven Goyal
โญ Star this project if it helped you!
Mail-IQ โ Never Miss What Truly Matters
