IntelliMail is a modern, full-stack AI-powered email client built with cutting-edge technologies. This application provides an intelligent email management experience with AI-driven features, clean UI design, and seamless integrations with popular email providers.
- π€ AI-Powered Email Assistant: GPT-4 integration for intelligent email composition and responses
- π Advanced Search: Vector-based search with RAG (Retrieval Augmented Generation) for contextual email discovery
- π§ Multi-Provider Support: Gmail and Outlook integration with OAuth2 authentication
- β‘ Real-time Sync: Automatic email synchronization and threading
- π³ Subscription Management: Stripe-powered premium features and billing
- β¨οΈ Keyboard Shortcuts: Efficient navigation with customizable hotkeys
- π¨ Modern UI: Beautiful, responsive interface with dark/light theme support
- π± Mobile Responsive: Optimized experience across all devices
- Next.js 15 - React framework with App Router
- React 19 - Latest React with concurrent features
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first CSS framework
- shadcn/ui - High-quality React components
- Framer Motion - Smooth animations and transitions
- React Query - Server state management
- Jotai - Atomic state management
- tRPC - End-to-end typesafe APIs
- Prisma ORM - Type-safe database client
- PostgreSQL - Robust relational database
- Clerk - Authentication and user management
- Stripe - Payment processing and subscriptions
- OpenAI GPT-4 - Advanced language model for email assistance
- Orama - Full-text search with vector capabilities
- AI SDK - Streamlined AI integration
- Vector Embeddings - Semantic search and context understanding
- Gmail API - Google email service integration
- Nylas - Unified email API platform
- OAuth2 - Secure authentication flow
- Webhooks - Real-time email synchronization
- Vercel - Serverless deployment platform
- Docker - Containerized development environment
- ESLint & Prettier - Code quality and formatting
- Husky - Git hooks for quality assurance
- Node.js 18.17.0 or higher
- PostgreSQL database
- Gmail API credentials
- OpenAI API key
- Stripe account (for payments)
- Clerk account (for authentication)
git clone https://github.com/yourusername/intellimail.git
cd intellimail
npm install
Create a .env.local
file in the root directory:
# Database
DATABASE_URL="postgresql://username:password@localhost:5432/intellimail"
# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
CLERK_SECRET_KEY=your_clerk_secret_key
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
# OpenAI
OPENAI_API_KEY=your_openai_api_key
# Gmail API
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
# Stripe
STRIPE_SECRET_KEY=your_stripe_secret_key
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key
STRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret
# App Configuration
NEXT_PUBLIC_URL=http://localhost:3000
# Start PostgreSQL database
npm run db:start
# Run database migrations
npm run db:migrate
# Generate Prisma client
npm run db:generate
npm run dev
Open http://localhost:3000 to view the application.
intellimail/
βββ prisma/ # Database schema and migrations
β βββ schema.prisma # Prisma database schema
β βββ migrations/ # Database migration files
βββ public/ # Static assets
βββ src/
β βββ app/ # Next.js App Router pages
β β βββ api/ # API routes
β β βββ mail/ # Email client interface
β β βββ (auth)/ # Authentication pages
β βββ components/ # Reusable UI components
β βββ lib/ # Utility functions and integrations
β βββ server/ # Server-side code (tRPC, database)
β βββ trpc/ # tRPC client configuration
βββ package.json
βββ README.md
- Smart Composition: AI-powered email drafting with context awareness
- Intelligent Responses: Automated response suggestions based on email content
- Context Search: Vector-based search through email history for relevant information
- Natural Language Processing: Understanding and categorization of email content
- Multi-Account Support: Connect multiple Gmail and Outlook accounts
- Thread Organization: Automatic email threading and conversation management
- Labels & Filters: Smart categorization and filtering options
- Search & Discovery: Advanced search with full-text and semantic capabilities
- Keyboard Navigation: Vim-style shortcuts and custom hotkey support
- Responsive Design: Optimized for desktop, tablet, and mobile devices
- Theme Customization: Light and dark mode with system preference detection
- Real-time Updates: Live email synchronization and notifications
- Freemium Model: Basic features available for free users
- Premium Features: Advanced AI capabilities and increased account limits
- Stripe Integration: Secure payment processing and subscription management
- Usage Tracking: Monitor API usage and feature access
POST /api/auth/callback/gmail
- Gmail OAuth callbackPOST /api/auth/callback/nylas
- Nylas OAuth callback
GET /api/gmail/emails
- Fetch Gmail messagesPOST /api/completion
- AI email completionPOST /api/chat
- AI chat interface
GET /api/accounts
- List connected accountsPOST /api/accounts
- Add new email accountDELETE /api/accounts/delete
- Remove email account
POST /api/stripe/checkout
- Create checkout sessionPOST /api/stripe/webhook
- Handle Stripe webhooks
The application uses PostgreSQL with Prisma ORM. Key models include:
- User: User accounts and authentication
- Account: Connected email accounts
- Thread: Email conversation threads
- Email: Individual email messages
- EmailAddress: Email address entities
- StripeSubscription: Subscription and billing information
- Connect your GitHub repository to Vercel
- Configure environment variables in Vercel dashboard
- Deploy automatically on push to main branch
Use a managed PostgreSQL service like:
- Neon Database
- Supabase
- Railway
- PlanetScale (with MySQL adapter)
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue on GitHub
- Email: support@intellimail.dev
- Documentation: docs.intellimail.dev
Built with β€οΈ using Next.js, AI, and modern web technologies.