A minimalistic, AI-powered email client that revolutionizes email management
π Live Demo β’ π Documentation β’ π Report Bug β’ π‘ Request Feature
I developed IntelliMail as a cutting-edge AI-powered email client that transforms how users interact with their email. This full-stack application combines modern web technologies with advanced AI capabilities to create an intelligent, efficient, and user-friendly email management experience.
π€ AI-Driven Intelligence - Built-in AI assistant powered by OpenAI GPT models for smart email composition, summarization, and responses
π Advanced RAG Search - Sophisticated Retrieval Augmented Generation using Orama for lightning-fast, context-aware email search
π§ Universal Integration - Seamless connectivity with Gmail, Office365, and other major email providers via Aurinko API
β‘ Real-time Sync - Live email synchronization with intelligent threading and organization
π³ Premium Subscriptions - Integrated Stripe payment system for advanced features and premium tiers
π¨ Modern UI/UX - Sleek, responsive interface with dark mode support and keyboard-first navigation
- Smart Email Composition - AI-assisted writing with auto-completion and suggestions
- Intelligent Summarization - Automatically generate concise summaries of long email threads
- Context-Aware Responses - AI-generated reply suggestions based on email content and history
- Advanced Search - Natural language search queries powered by embeddings and RAG technology
- Multi-Provider Support - Gmail, Office365, and other IMAP/SMTP providers
- Real-time Synchronization - Instant email updates across all devices
- Smart Threading - Intelligent conversation grouping and organization
- Advanced Filtering - Custom labels, categories, and automated sorting
- Attachment Handling - Secure file management and preview capabilities
- Clerk Integration - Secure user authentication and session management
- OAuth 2.0 - Safe email provider connections without storing passwords
- Data Encryption - End-to-end encryption for sensitive email data
- Privacy Controls - Granular permissions and data access controls
- Subscription Management - Stripe-powered payment processing
- Usage Analytics - Detailed insights into email patterns and productivity
- Priority Support - Enhanced customer service for premium users
- Advanced AI Models - Access to latest GPT models and features
- Next.js 14 - React framework with App Router
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first styling
- Radix UI - Accessible component primitives
- Framer Motion - Smooth animations
- React Query - Server state management
- Prisma - Type-safe database ORM
- PostgreSQL - Robust relational database
- tRPC - End-to-end typesafe APIs
- Zod - Schema validation
- OpenAI API - GPT models for AI capabilities
- Orama - Full-text search engine
- @xenova/transformers - Client-side ML models
- Vector Embeddings - Semantic search capabilities
- Aurinko API - Email provider integration
- Clerk - Authentication and user management
- Stripe - Payment processing
- Vercel - Deployment and hosting
graph TB
A[Next.js Frontend] --> B[tRPC API Layer]
B --> C[Prisma ORM]
C --> D[PostgreSQL Database]
B --> E[OpenAI API]
B --> F[Aurinko Email API]
B --> G[Stripe API]
B --> H[Orama Search Engine]
A --> I[Clerk Auth]
J[Email Providers] --> F
K[Vector Embeddings] --> H
E --> K
- Frontend Layer - Next.js app with server-side rendering and client-side interactions
- API Layer - tRPC endpoints for type-safe client-server communication
- Database Layer - Prisma ORM with PostgreSQL for data persistence
- AI Layer - OpenAI integration for intelligent features
- Email Integration - Aurinko API for multi-provider email access
- Search Engine - Orama with vector embeddings for semantic search
- Authentication - Clerk for secure user management
- Payment Processing - Stripe for subscription management
- Node.js 18.0 or higher
- PostgreSQL database
- Git for version control
git clone https://github.com/insertfahim/intellimail.git
cd intellimailnpm install
# or
yarn install
# or
pnpm installCreate a .env.local file in the root directory:
# Database
DATABASE_URL="postgresql://username:password@localhost:5432/intellimail"
# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY="pk_test_..."
CLERK_SECRET_KEY="sk_test_..."
NEXT_PUBLIC_CLERK_SIGN_IN_URL="/sign-in"
NEXT_PUBLIC_CLERK_SIGN_UP_URL="/sign-up"
# OpenAI
OPENAI_API_KEY="sk-..."
# Aurinko Email API
AURINKO_CLIENT_ID="your_aurinko_client_id"
AURINKO_CLIENT_SECRET="your_aurinko_client_secret"
AURINKO_SIGNING_SECRET="your_aurinko_signing_secret"
# Nylas
NYLAS_CLIENT_ID="your_nylas_client_id"
NYLAS_API_KEY="your_nylas_api_key"
GRAVATAR_API_KEY="your_gravatar_api_key"
# Stripe
STRIPE_SECRET_KEY="sk_test_..."
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY="pk_test_..."
STRIPE_PRICE_ID="price_..."
STRIPE_WEBHOOK_SECRET="whsec_..."
# App Configuration
NEXT_PUBLIC_URL="http://localhost:3001"# Generate Prisma client
npx prisma generate
# Run database migrations
npx prisma db push
# (Optional) Open Prisma Studio
npx prisma studionpm run devVisit http://localhost:3001 to see the application.
- Sign Up/Sign In - Create an account or log in with existing credentials
- Connect Email Account - Link your Gmail or Office365 account via OAuth
- Browse Emails - Navigate through your inbox with threaded conversations
- Use AI Features - Ask the AI assistant to help compose emails or summarize threads
# Email composition
"Help me write a professional email to decline a meeting"
# Email search
"Find all emails from John about the project proposal"
# Email summarization
"Summarize this email thread for me"
Cmd/Ctrl + K- Open command paletteG + I- Go to inboxG + S- Go to sent emailsC- Compose new emailR- Reply to email/- Search emails
intellimail/
βββ src/
β βββ app/ # Next.js app directory
β β βββ (auth)/ # Authentication routes
β β βββ api/ # API routes
β β βββ mail/ # Main email interface
β β βββ components/ # Shared components
β βββ components/ # UI components
β β βββ ui/ # Reusable UI primitives
β βββ hooks/ # Custom React hooks
β βββ lib/ # Utility functions
β β βββ aurinko.ts # Email API integration
β β βββ embeddings.ts # AI embeddings
β β βββ orama.ts # Search engine
β β βββ stripe.ts # Payment processing
β βββ server/ # Server-side code
β β βββ api/ # tRPC routers
β βββ styles/ # Global styles
βββ prisma/ # Database schema
βββ public/ # Static assets
βββ package.json # Dependencies
-
Connect Repository
vercel --prod
-
Environment Variables
- Add all environment variables in Vercel dashboard
- Update URLs to production domains
-
Database
- Use Vercel Postgres or external PostgreSQL provider
- Run migrations on production database
# Dockerfile included in repository
docker build -t intellimail .
docker run -p 3000:3000 intellimail# Build the application
npm run build
# Start production server
npm run start- TypeScript - Use strict typing throughout
- ESLint - Follow configured linting rules
- Prettier - Maintain consistent code formatting
- Component Structure - Use functional components with hooks
# Run type checking
npm run type-check
# Run linting
npm run lint
# Format code
npm run format# Create migration
npx prisma migrate dev --name migration_name
# Reset database
npx prisma migrate reset
# Deploy migrations
npx prisma migrate deployI welcome contributions to make IntelliMail even better! Here's how you can help:
- Fork the repository
- Create a feature branch -
git checkout -b feature/amazing-feature - Make your changes - Follow the development guidelines
- Test thoroughly - Ensure everything works as expected
- Commit changes -
git commit -m 'Add amazing feature' - Push to branch -
git push origin feature/amazing-feature - Open a Pull Request
- π Clear descriptions - Explain what your changes do
- π§ͺ Test coverage - Include tests for new features
- π Documentation - Update docs for significant changes
- π¨ Code style - Follow existing patterns and conventions
- π Bug reports - Include reproduction steps and environment details
# Install dependencies
npm install
# Start development server
npm run dev
# Run in turbo mode
npm run dev --turboI built IntelliMail using these excellent tools and services:
- Next.js - The React framework for production
- OpenAI - AI models and API
- Clerk - Authentication infrastructure
- Stripe - Payment processing platform
- Aurinko - Email API integration
- Vercel - Deployment and hosting
- Radix UI - Unstyled, accessible components
- Tailwind CSS - Utility-first CSS framework
I'd love to hear from you! Whether you have questions, feedback, or just want to connect:
- Email: faahim06@gmail.com
- GitHub: @insertfahim
- Issues: Report a bug or request a feature
This project is licensed under the MIT License - see the LICENSE file for details.
Built with β€οΈ by Fahim
If you found this project helpful, please consider giving it a βοΈ!
