Skip to content

Ari1009/LexiSort

Repository files navigation

πŸš€ LexiSort - AI-Powered Email Intelligence Platform

LexiSort Logo

Transform your email experience with intelligent organization, smart replies, and seamless calendar integration

Next.js React TypeScript PostgreSQL License: MIT

Features β€’ AI Capabilities β€’ Getting Started β€’ Tech Stack β€’ Architecture β€’ Contributing


🌟 Overview

LexiSort is a revolutionary AI-powered email platform that transforms how you manage, organize, and interact with your emails. Built with cutting-edge technology and designed for modern professionals, LexiSort combines intelligent automation with a beautiful, intuitive interface to make email management effortless.

Why LexiSort?

  • πŸ€– AI-Powered Intelligence: Advanced machine learning for email categorization and smart replies
  • πŸ”’ Privacy-First Design: End-to-end encryption with zero-knowledge architecture
  • ⚑ Lightning Fast: Optimized performance with real-time synchronization
  • 🎨 Beautiful Interface: Modern, responsive design built with Once UI
  • πŸ”„ Seamless Integration: Works perfectly with your existing Gmail account
  • πŸ“Š Smart Analytics: Gain insights into your email patterns and productivity

πŸš€ Key Features

πŸ“§ Smart Inbox Organization

Smart Inbox

AI-powered inbox that automatically categorizes and prioritizes your emails:

  • Automatic email categorization by type and importance
  • Smart filtering to reduce inbox clutter
  • Intelligent sorting based on sender and content
  • Customizable organization rules

πŸ€– AI-Powered Smart Reply

Smart Reply

Generate contextually appropriate email replies with just one click:

  • One-click smart reply generation
  • Tone-matching responses
  • Context-aware suggestions
  • Professional formatting with proper etiquette

🏷️ Priority & Folder Filtering

Priority Filter

Advanced filtering system for better workflow management:

  • Priority-based email filtering (Urgent, High, Medium, Low)
  • Custom folder creation and management
  • Smart categorization by email type
  • Quick access to important communications

πŸ“ Intelligent Folder Management

Folder Management

Organize emails into intelligent folders that adapt to your workflow:

  • AI-suggested folder organization
  • Automatic email routing
  • Custom folder hierarchies
  • Smart tagging and labeling

πŸ“… Calendar Integration

Calendar

Seamlessly integrate your email with calendar events:

  • Email-to-calendar event creation
  • Meeting scheduling from emails
  • Calendar event reminders
  • Integrated time management

⏰ Event Management

Event Management

Transform email conversations into calendar events:

  • Automatic date/time detection from emails
  • One-click event creation
  • Meeting participant management
  • Event reminder integration

βš™οΈ User Customization

User Customization

Personalize your email experience:

  • Customizable interface themes
  • Personalized email templates
  • Adaptive learning preferences
  • User-specific AI training

🧠 AI Preferences & Insights

AI Preferences

Get intelligent insights about your email patterns:

  • Email pattern analysis
  • AI behavior customization
  • Communication style insights
  • Productivity recommendations

πŸ“Š Analytics & Insights

Analytics

Gain valuable insights into your email habits:

  • Email response time analytics
  • Communication pattern insights
  • Productivity metrics
  • Performance optimization suggestions

🎯 Perfect For

πŸ‘” Busy Professionals
Focus on high-priority communications without drowning in your inbox
πŸ‘₯ Team Leaders
Efficiently manage work communications with smart filters and AI organization
πŸ”’ Privacy-Conscious Users
Keep your email data secure with our privacy-first approach
⚑ Gmail Power Users
Take your Gmail experience to the next level with AI-powered features

πŸ› οΈ Tech Stack

Frontend

  • Next.js 15.3.0 - React framework with App Router
  • React 18.2.0 - UI library with hooks and concurrent features
  • TypeScript 5.0 - Type-safe JavaScript development
  • Once UI - Modern component library with design system
  • TailwindCSS - Utility-first CSS framework

Backend & API

  • Next.js API Routes - Serverless API endpoints
  • Prisma ORM - Type-safe database client
  • BetterAuth - Modern authentication solution
  • Gmail API - Email integration and management

Database & Storage

  • PostgreSQL 15 - Primary relational database
  • Redis - Caching and session management
  • Qdrant Vector DB - Vector storage for AI embeddings
  • Prisma Migrations - Database schema management

AI & Machine Learning

  • OpenRouter API - LLM integration for smart features
  • Vector Embeddings - Semantic search and similarity
  • Email Categorization - AI-powered organization
  • Smart Reply Generation - Context-aware responses
  • Priority Detection - Intelligent email prioritization

DevOps & Infrastructure

  • Docker Compose - Local development environment
  • Environment Variables - Secure configuration management
  • GitHub Actions - CI/CD pipeline (configurable)

πŸ—οΈ Architecture

LexiSort/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/                          # Next.js App Router
β”‚   β”‚   β”œβ”€β”€ (auth)/                   # Authentication pages
β”‚   β”‚   β”‚   β”œβ”€β”€ login/               # Login interface
β”‚   β”‚   β”‚   └── register/            # Registration interface
β”‚   β”‚   β”œβ”€β”€ (main)/                  # Main application
β”‚   β”‚   β”‚   β”œβ”€β”€ inbox/               # Email inbox views
β”‚   β”‚   β”‚   β”œβ”€β”€ calendar/            # Calendar integration
β”‚   β”‚   β”‚   β”œβ”€β”€ contacts/            # Contact management
β”‚   β”‚   β”‚   └── profile/             # User settings
β”‚   β”‚   β”œβ”€β”€ (dev)/                   # Development tools
β”‚   β”‚   β”‚   └── ai/                  # AI processing utilities
β”‚   β”‚   β”œβ”€β”€ api/                     # API routes
β”‚   β”‚   β”‚   β”œβ”€β”€ auth/                # Authentication endpoints
β”‚   β”‚   β”‚   β”œβ”€β”€ inbox/               # Email management
β”‚   β”‚   β”‚   β”œβ”€β”€ smart-reply/         # AI reply generation
β”‚   β”‚   β”‚   └── sync/                # Background synchronization
β”‚   β”‚   └── globals.css              # Global styles
β”‚   β”œβ”€β”€ components/                  # Reusable UI components
β”‚   β”‚   └── Boxes/                   # Layout components
β”‚   β”œβ”€β”€ libs/                        # Core libraries
β”‚   β”‚   β”œβ”€β”€ auth/                    # Authentication utilities
β”‚   β”‚   β”œβ”€β”€ db.ts                    # Database configuration
β”‚   β”‚   β”œβ”€β”€ env.ts                   # Environment variables
β”‚   β”‚   └── utils/                   # Utility functions
β”‚   └── once-ui/                     # Design system components
β”œβ”€β”€ prisma/                          # Database schema
β”‚   └── schema.prisma               # Prisma schema definition
β”œβ”€β”€ public/                          # Static assets
β”‚   └── images/                      # Images and logos
└── docker-compose.yml              # Development environment

πŸš€ Getting Started

Prerequisites

  • Node.js 18+ or Bun 1.0+
  • Docker and Docker Compose
  • Git

Quick Start with Docker (Recommended)

# Clone the repository
git clone https://github.com/your-username/lexisort.git
cd lexisort

# Start all services
docker compose up -d

# Install dependencies
bun install

# Set up environment variables
cp .env.example .env.local

# Run database migrations
bunx prisma db push

# Start development server
bun run dev

Manual Setup

# Clone the repository
git clone https://github.com/your-username/lexisort.git
cd lexisort

# Install dependencies
npm install

# Set up environment variables
cp .env.example .env.local

# Configure your environment variables
# (See Environment Variables section below)

# Set up the database
npx prisma db push

# Start development server
npm run dev

Environment Variables

Create a .env.local file with the following variables:

# Database
DATABASE_URL="postgresql://username:password@localhost:5432/lexisort"

# Redis
REDIS_URL="redis://localhost:6381"

# Authentication
NEXTAUTH_SECRET="your-secret-key"
NEXTAUTH_URL="http://localhost:3000"

# Gmail API
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"

# AI Services
OPENROUTER_API_KEY="your-openrouter-api-key"

# Vector Database
QDRANT_URL="http://localhost:6333"

Gmail API Setup

  1. Create Google Cloud Project

  2. Enable Gmail API

    • Navigate to APIs & Services β†’ Library
    • Search for "Gmail API" and enable it
  3. Configure OAuth Consent Screen

    • Go to APIs & Services β†’ OAuth consent screen
    • Set user type to "External"
    • Add required scopes:
      https://www.googleapis.com/auth/gmail.readonly
      https://www.googleapis.com/auth/gmail.modify
      
  4. Create OAuth Credentials

    • Go to APIs & Services β†’ Credentials
    • Create OAuth 2.0 Client ID
    • Add authorized redirect URI: http://localhost:3000/api/auth/callback/google
  5. Update Environment Variables

    • Add your client ID and secret to .env.local

πŸ”’ Security Features

Zero-Knowledge Architecture

  • Client-Side Encryption: All sensitive data encrypted before server storage
  • User-Controlled Keys: Only you can decrypt your email content
  • Data Isolation: Emails remain secure even in case of server breach
  • Zero Server Access: Server never sees unencrypted email content

Encrypted Data

  • βœ… Email body content
  • βœ… Email subject lines
  • βœ… Email snippets and previews
  • βœ… Sender and recipient information
  • βœ… AI metadata and preferences

Compliance Ready

  • GDPR - Data protection and privacy compliance
  • CCPA - California consumer privacy compliance
  • HIPAA - Healthcare data protection (with proper configuration)

πŸ“Š Performance & Scalability

Optimizations

  • Background Syncing: Real-time email synchronization
  • Intelligent Caching: Redis-based caching for fast responses
  • Vector Search: Efficient semantic search with Qdrant
  • Lazy Loading: On-demand component and data loading
  • CDN Integration: Fast static asset delivery

Monitoring

  • Performance Metrics: Response time and throughput monitoring
  • Error Tracking: Comprehensive error logging and alerting
  • User Analytics: Privacy-respecting usage analytics
  • Health Checks: Automated system health monitoring

🀝 Contributing

We welcome contributions from the community! Here's how you can help:

Development Setup

# Fork and clone the repository
git clone https://github.com/your-username/lexisort.git
cd lexisort

# Create a feature branch
git checkout -b feature/amazing-feature

# Install dependencies
npm install

# Start development environment
docker compose up -d
npm run dev

# Make your changes and test
npm run test
npm run lint

# Commit and push
git commit -m 'Add amazing feature'
git push origin feature/amazing-feature

# Create a Pull Request

Contribution Guidelines

  1. Code Style: Follow TypeScript and ESLint guidelines
  2. Testing: Add tests for new features
  3. Documentation: Update docs for API changes
  4. Security: Follow security best practices
  5. Performance: Consider impact on performance

Areas for Contribution

  • πŸ› Bug Fixes: Help improve stability
  • ✨ New Features: Add innovative capabilities
  • πŸ“š Documentation: Improve guides and examples
  • 🎨 UI/UX: Enhance user experience
  • πŸ”§ DevOps: Improve deployment and monitoring
  • 🌐 Internationalization: Add language support

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

  • Next.js Team - For the amazing React framework
  • Prisma Team - For the excellent ORM
  • OpenRouter - For AI capabilities
  • Gmail API - For email integration

About

Ai powered email app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages