Skip to content

StefanPapp/MailMind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MailMind

An intelligent email analytics application that connects to Gmail, analyzes communication patterns, ranks contacts by friendliness, and allows natural language queries over email history.

🎯 Features

  • Gmail Integration: Connect via MCP (Model Context Protocol) or OAuth 2.0
  • Data Analytics: Contact ranking, friendliness scoring, time-based trends
  • AI Query Interface: Natural language queries with RAG-powered responses
  • Export & Sharing: PDF, CSV, JSON exports with optional anonymization

πŸ—οΈ Architecture

The project follows a modular architecture with clear separation of concerns:

mailmind/
β”œβ”€β”€ backend/                 # FastAPI backend
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ core/           # Core configuration and utilities
β”‚   β”‚   β”œβ”€β”€ models/         # Database models
β”‚   β”‚   β”œβ”€β”€ services/       # Business logic services
β”‚   β”‚   β”œβ”€β”€ api/            # API routes
β”‚   β”‚   └── utils/          # Utility functions
β”‚   β”œβ”€β”€ tests/              # Backend tests
β”‚   └── requirements.txt    # Python dependencies
β”œβ”€β”€ frontend/               # React frontend (future)
β”œβ”€β”€ database/               # Database migrations and schemas
└── docs/                   # Documentation

πŸš€ Quick Start

Prerequisites

  • Python 3.9+
  • Node.js 16+ (for frontend)
  • Gmail API credentials

Backend Setup

  1. Clone and setup environment:

    cd backend
    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    pip install -r requirements.txt
  2. Configure environment:

    cp .env.example .env
    # Edit .env with your API keys and settings
  3. Run the application:

    uvicorn app.main:app --reload

Frontend Setup (Future)

cd frontend
npm install
npm start

πŸ”§ Configuration

Create a .env file in the backend directory:

# Database
DATABASE_URL=sqlite:///./mailmind.db

# Gmail API
GMAIL_CLIENT_ID=your_client_id
GMAIL_CLIENT_SECRET=your_client_secret

# OpenAI API
OPENAI_API_KEY=your_openai_key

# MCP Configuration
MCP_SERVER_URL=your_mcp_server_url

πŸ“Š Database Schema

The application uses SQLite with the following main entities:

  • Users
  • Emails
  • Contacts
  • Analytics
  • Queries

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

πŸ“ License

MIT License - see LICENSE file for details

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published