A modern, intelligent email management application built with React.js that integrates with Gmail API, featuring AI-powered categorization, priority classification, smart search, and email summarization.
New to the project? Start here:
- QUICK_START.md - 5-minute quick setup guide
- SETUP_GUIDE.md - Complete detailed setup instructions
- Node.js (v18 or higher) - Download
- Python (v3.8 or higher) - Download
- Google Gemini API Key - Get one here
npm installCreate .env.local in the root directory:
VITE_GEMINI_API_KEY=your_gemini_api_key_here
VITE_EMAIL_INTELLIGENCE_API_BASE=http://localhost:8000
# Optional: Gmail Proxy Service (Redis cache for faster performance)
# Set to http://localhost:3001 to enable, or leave empty to disable
# Requires Redis and Proxy Service to be running (see SETUP_GUIDE.md)
VITE_GMAIL_PROXY_URL=http://localhost:3001cd email-intel-service
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
python train_priority_model.py # First time onlyTerminal 1 (AI Service):
cd email-intel-service
source venv/bin/activate
python -m uvicorn main:app --reload --host 0.0.0.0 --port 8000Terminal 2 (Redis - Optional but Recommended):
# macOS: brew services start redis
# Linux: sudo systemctl start redis
# Or Docker: docker run -d -p 6379:6379 redis:7-alpineTerminal 3 (Proxy Service - Optional, requires Redis):
cd gmail-proxy-service
npm install # First time only
npm startTerminal 4 (Frontend):
npm run devNote: Redis and Proxy Service are optional. The app works with just AI Service and Frontend, but Redis cache provides 10-50x faster performance. See REDIS_CACHE_SETUP.md for details.
Navigate to: http://localhost:5173
# Create .env file with VITE_GEMINI_API_KEY
docker-compose up --buildThis will start all services:
- Frontend (port 5173)
- AI Service (port 8000)
- Proxy Service (port 3001) - Redis cache
- Redis (port 6379) - Cache storage
Access at: http://localhost:5173
- SETUP_GUIDE.md - Complete setup instructions with troubleshooting
- QUICK_START.md - Quick 5-minute setup guide
- PROJECT_SUMMARY.md - Complete project overview and features
- FUNCTIONS_REFERENCE.md - All functions documented
- ENVIRONMENT_VARIABLES.md - Complete environment variables reference
- REDIS_CACHE_SETUP.md - Redis cache setup and usage guide
- REDIS_CACHE_EXAMPLES.md - How Redis cache helps with examples
- π€ AI-Powered Classification: Automatic priority (High/Medium/Low) and category labeling
- π§ Gmail Integration: Full OAuth 2.0 integration with Gmail API
- π AI Search: Natural language search queries
- π Email Summarization: One-line AI summaries for each email
- β‘ Performance: IndexedDB caching, incremental sync (90%+ API reduction)
- π Redis Cache: Server-side caching for 10-50x faster responses (optional)
- π¨ Modern UI: Gmail-like interface with dark/light themes
- π± Responsive: Works on desktop and mobile
- π Background Sync: Automatic 30-second sync
- πΎ Offline Support: Works with cached data
- Frontend: React 19 + Vite (Port 5173)
- AI Service: Python FastAPI microservice (Port 8000)
- Proxy Service: Node.js Express with Redis caching (Port 3001, optional)
- Cache: Redis (Port 6379, optional) + IndexedDB (browser)
- AI: DistilBERT model + Google Gemini API
- Storage: IndexedDB (browser) + localStorage
- APIs: Gmail API, Gemini API
ββββββββββββ ββββββββββββββββ ββββββββ ββββββββββββ
β Frontend βββββββΆβ Proxy ServiceβββββββΆβRedis β βGmail API β
β (5173) β β (3001) β β(6379)β β β
ββββββββββββ ββββββββββββββββ ββββββββ ββββββββββββ
β β β
βββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββ
(fallback to direct Gmail API)
ββββββββββββ
βAI Serviceβ
β (8000) β
ββββββββββββ
Note: Proxy Service and Redis are optional. The app works without them but with better performance when enabled.
# Frontend development
npm run dev
# Build for production
npm run build
# Preview production build
npm run previewMailflow-AI/
βββ src/ # React frontend
βββ email-intel-service/ # Python AI microservice
βββ gmail-proxy-service/ # Node.js Redis proxy service (optional)
βββ .env.local # Environment variables (create this)
βββ package.json # Node.js dependencies
βββ docker-compose.yml # Docker configuration (includes Redis + Proxy)
βββ README.md # This file
See SETUP_GUIDE.md for detailed troubleshooting guide.
Common issues:
- Port conflicts: Change ports in commands or .env files
- API errors: Check your Gemini API key
- Connection errors: Ensure services are running
- Redis/Proxy issues: See REDIS_CACHE_SETUP.md for troubleshooting
This project is for educational/demonstration purposes.
- Google Gmail API
- Google Gemini API
- Hugging Face Transformers
- React Community
For detailed setup instructions, see SETUP_GUIDE.md