Skip to content

Hitpragya/MailFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MailFlow

AI-powered email marketing automation platform for BFSI institutions
Automate campaigns with 6 specialized AI agents - from strategy to analytics

License: MIT JavaScript React

πŸ“‹ Overview

MailFlow is an enterprise-grade email marketing platform specifically designed for Banking, Financial Services & Insurance (BFSI) organizations in India. It uses 6 specialized AI agents to autonomously plan, create, validate, and execute email campaigns while maintaining complete regulatory compliance with RBI, SEBI, and IRDAI guidelines.

Why MailFlow?

  • πŸ€– 6 AI Agents - Planner, Content, Compliance, Approval, Executor, Analytics
  • πŸ“§ BFSI-Specific - Built for Indian financial services regulations
  • βš–οΈ Compliance-First - Real-time RBI/SEBI/IRDAI validation
  • πŸ“Š Advanced Analytics - Deep insights into campaign performance
  • πŸ” Human-in-Loop - Optional approval gates for complete control
  • πŸ’° Multi-Product Support - Term Life, Health Insurance, Mutual Funds, Loans, etc.

πŸš€ Features

Campaign Management

  • βœ… Multi-step campaign creation wizard
  • βœ… BFSI product templates (Insurance, Mutual Funds, Loans, etc.)
  • βœ… Target audience segmentation (Retail, HNI, SME, Professionals)
  • βœ… Campaign scheduling and automation

AI Agent Pipeline

Planner Agent β†’ Content Agent β†’ Compliance Agent β†’ Approval Gate β†’ Executor β†’ Analytics Agent
  1. Planner Agent 🧠

    • Develops campaign strategy
    • Creates email sequences
    • Plans send schedule
    • Estimates reach
  2. Content Agent ✍️

    • Generates compelling email copy
    • Creates personalized subject lines
    • Optimizes for engagement
    • A/B testing suggestions
  3. Compliance Agent πŸ›‘οΈ

    • Validates against RBI guidelines
    • Checks SEBI compliance
    • IRDAI insurance regulations
    • Flags regulatory risks
  4. Human Approval πŸ‘€

    • Review AI-generated content
    • Edit subject/body if needed
    • Final go/no-go decision
  5. Executor Agent πŸ“€

    • Sends to target audience
    • Manages list segmentation
    • Handles bounces
    • Tracks delivery
  6. Analytics Agent πŸ“Š

    • Calculates open rates
    • Tracks click-through rates
    • Measures conversions
    • Revenue attribution

Dashboard & Analytics

  • πŸ“Š Campaign performance metrics
  • πŸ“ˆ Historical trend analysis
  • πŸ‘₯ Audience engagement insights
  • πŸ’° ROI calculation and tracking
  • 🎯 AI-powered recommendations

πŸ—οΈ Architecture

MailFlow/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ Icon.jsx
β”‚   β”‚   β”œβ”€β”€ Sidebar.jsx
β”‚   β”‚   └── TopBar.jsx
β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”œβ”€β”€ Dashboard.jsx
β”‚   β”‚   β”œβ”€β”€ CreateCampaign.jsx
β”‚   β”‚   β”œβ”€β”€ AgentPipeline.jsx
β”‚   β”‚   β”œβ”€β”€ ApprovalPage.jsx
β”‚   β”‚   └── AnalyticsPage.jsx
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”œβ”€β”€ agents/
β”‚   β”‚   β”‚   β”œβ”€β”€ planner.js
β”‚   β”‚   β”‚   β”œβ”€β”€ content.js
β”‚   β”‚   β”‚   β”œβ”€β”€ compliance.js
β”‚   β”‚   β”‚   └── analytics.js
β”‚   β”‚   └── api.js
β”‚   β”œβ”€β”€ constants/
β”‚   β”‚   β”œβ”€β”€ colors.js
β”‚   β”‚   └── templates.js
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”œβ”€β”€ logger.js
β”‚   β”‚   └── validators.js
β”‚   └── App.jsx
β”œβ”€β”€ index.html
└── vite.config.js

πŸ”§ Tech Stack

Frontend:

  • React 18+ (UI framework)
  • Vite (build tool)
  • CSS-in-JS (inline styling)
  • Modern ES6+ JavaScript

AI/ML:

  • Claude API (Anthropic)
  • Multi-agent orchestration
  • Natural language processing

Infrastructure:

  • Node.js runtime
  • RESTful API architecture
  • Real-time logging

πŸ“¦ Installation

Prerequisites

  • Node.js 16+
  • npm or yarn
  • Anthropic API key

Quick Start

# Clone repository
git clone https://github.com/Hitpragya/MailFlow.git
cd MailFlow

# Install dependencies
npm install

# Setup environment variables
cp .env.example .env.local
# Edit .env.local and add your Anthropic API key
# VITE_ANTHROPIC_API_KEY=sk_...

# Start development server
npm run dev

Visit http://localhost:5173

Build for Production

npm run build      # Creates optimized build
npm run preview    # Preview production build locally

βš™οΈ Configuration

Environment Variables (.env.local)

# Anthropic Claude API
VITE_ANTHROPIC_API_KEY=sk_ant_...
VITE_CLAUDE_MODEL=claude-sonnet-4-20250514

# Email Service (optional)
VITE_SMTP_HOST=smtp.gmail.com
VITE_SMTP_PORT=587
VITE_SMTP_USER=your-email@gmail.com

# Analytics
VITE_ANALYTICS_ENABLED=true
VITE_LOG_LEVEL=info

🎯 Supported Products

Insurance:

  • Term Life Insurance
  • Health Insurance
  • General Insurance

Banking:

  • Home Loans
  • Personal Loans
  • Credit Cards
  • Demat Accounts

Investment:

  • Mutual Fund SIPs
  • Fixed Deposits
  • NPS Pension Plans
  • Government Securities

πŸ“Š API Reference

Create Campaign

POST /api/campaigns
{
  "name": "Q4 Term Life Insurance Push",
  "product": "Term Life Insurance",
  "goal": "Lead Generation",
  "audience": "Retail Investors"
}

Run Agent Pipeline

Agents execute automatically with proper logging and error handling.

Get Analytics

GET /api/campaigns/:id/analytics

πŸ” Compliance Features

  • βœ… RBI BFSI Guidelines
  • βœ… SEBI Advertising Code
  • βœ… IRDAI Insurance Regulations
  • βœ… Unsolicited Communication Rules
  • βœ… Data Privacy & Security

πŸ“– Documentation

🀝 Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

git checkout -b feature/your-feature
git commit -m "feat: describe your feature"
git push origin feature/your-feature

πŸ“„ License

MIT Β© 2026 Hitpragya Rastogi

πŸ†˜ Support

πŸŽ“ Learning Resources


Built with ❀️ for BFSI Excellence

Status: Production Ready Β· Version: 1.0.0 Β· Last Updated: May 2026

About

AI-powered multi-agent web application for automating end-to-end digital (email) marketing campaigns for SuperBFSI, an Indian BFSI service provider.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors