Skip to content
This repository was archived by the owner on Dec 23, 2025. It is now read-only.

tecmie/leadmark.email

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

87 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Leadmark - AI-Powered Email Automation Platform

Postmark Challenge: Inbox Innovators - Transform any email address into an intelligent business automation engine

Leadmark converts your email inbox into a powerful AI assistant that handles customer inquiries, schedules meetings, and processes leads automatically using Postmark's inbound email parsing capabilities.

๐ŸŽฏ What It Does

Turn Email Into Your Most Powerful Business Tool:

  • โœ‰๏ธ Smart Email Responses: AI analyzes incoming emails and responds with contextual, business-specific information
  • ๐Ÿ“… Automatic Meeting Booking: Detects scheduling requests and books meetings directly in Google Calendar
  • ๐Ÿ“‹ Lead Qualification: Custom forms capture and qualify prospects automatically
  • ๐Ÿง  Business Context Aware: Upload documents (PDF/DOCX) to train your AI assistant about your business
  • โšก Real-time Processing: Instant responses powered by Postmark's webhook infrastructure

๐ŸŒŸ Key Features

๐Ÿค– AI-Powered Email Assistant

  • GPT-4 Integration: Contextual responses based on your business objectives
  • Document Intelligence: AI analyzes uploaded business documents for better responses
  • Custom Personas: Define specific AI assistant roles and behaviors
  • Conversation Memory: Maintains context across email threads

๐Ÿ“… Smart Meeting Scheduling

  • Google Calendar Integration: Automatic availability checking and booking
  • Conflict Detection: Prevents double-booking with intelligent scheduling
  • Time Zone Handling: Supports global meeting coordination
  • Meeting Confirmations: Automated calendar invites and confirmations

๐Ÿ“Š Dynamic Lead Capture

  • AI-Generated Forms: Creates custom contact forms based on your business
  • Real-time Processing: Form submissions trigger immediate email workflows
  • Lead Qualification: Automatically scores and categorizes prospects
  • CRM Integration: Structured data collection for business insights

๐Ÿ—๏ธ Architecture

Microservices Design

๐Ÿ“ง Postmark Inbound โ†’ ๐Ÿ”„ Processor API โ†’ ๐Ÿง  AI Engine โ†’ ๐Ÿ“ค Postmark Outbound
                          โ†“
                     ๐Ÿ“Š Web Dashboard โ† ๐Ÿ’พ Supabase Database

Tech Stack:

  • Frontend: Next.js 15, React 19, TypeScript, Tailwind CSS
  • Backend: Express.js, BullMQ, Redis
  • Database: Supabase (PostgreSQL) with real-time subscriptions
  • AI: OpenAI GPT-4 with function calling
  • Email: Postmark inbound/outbound processing
  • Calendar: Google Calendar API
  • Storage: Supabase Storage for document processing

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 18+
  • pnpm
  • Postmark account (free trial available)
  • Supabase account
  • OpenAI API key
  • Google Calendar API credentials (optional)

Installation

  1. Clone the repository
git clone https://github.com/tecmie/leadmark.git
cd leadmark
  1. Install dependencies
pnpm install
  1. Environment Setup

Create .env.local in apps/web/:

# Supabase
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key

# OpenAI
OPENAI_API_KEY=your_openai_api_key

# Google Calendar (optional)
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret

Create .env in apps/processor/:

# Postmark
POSTMARK_API_KEY=your_postmark_server_token

# Database
DATABASE_URL=your_supabase_database_url

# Redis
REDIS_URL=redis://localhost:6379

# OpenAI
OPENAI_API_KEY=your_openai_api_key
  1. Start the development servers
# Terminal 1 - Web app
pnpm dev

# Terminal 2 - Email processor (new terminal)
cd apps/processor
pnpm dev
  1. Configure Postmark Webhook
    • In your Postmark account, set up an inbound server
    • Point the webhook URL to: https://your-domain.com/api/postman
    • Configure your inbound email address (e.g., inbox@yourdomain.com)

๐ŸŽฌ Demo Workflow

1. Initial Setup

  1. Sign up and create your unique email address (e.g., yourname@leadmark.email)
  2. Define your AI assistant's objective and personality
  3. Upload business documents (PDFs, Word docs) for context
  4. Choose or customize a lead capture form template

2. Email Processing Flow

๐Ÿ“ง Customer sends email to yourname@leadmark.email
    โ†“
๐Ÿ”„ Postmark webhook triggers processor
    โ†“
๐Ÿง  AI analyzes email content + business context
    โ†“ 
๐Ÿ“… Detects meeting request โ†’ Books calendar appointment
    OR
๐Ÿ’ฌ Generates contextual business response
    โ†“
๐Ÿ“ค Sends professional reply via Postmark
    โ†“
๐Ÿ“Š Updates dashboard with conversation history

3. Real Business Examples

Customer Inquiry:

From: client@company.com
Subject: Web Development Services

Hi, I'm looking for a web development team to build 
an e-commerce platform. What's your process and pricing?

AI Response (auto-generated):

Hi there!

Thanks for reaching out about web development services. 
I'd be happy to help with your e-commerce platform.

Our development process includes:
- Discovery & requirements gathering
- UI/UX design phase
- Development & testing
- Launch & ongoing support

For e-commerce projects, we typically work with Shopify 
or custom solutions depending on your needs.

I'd love to schedule a call to discuss your project in detail. 
Are you available this week for a 30-minute consultation?

Best regards,
[Your Name]

Meeting Scheduling:

From: prospect@business.com
Subject: Schedule a Demo

Can we set up a demo call sometime next week?

AI Response + Calendar Booking:

Absolutely! I've checked my calendar and have these times available:

โ€ข Tuesday, June 4th at 2:00 PM EST
โ€ข Wednesday, June 5th at 10:00 AM EST  
โ€ข Thursday, June 6th at 3:00 PM EST

Just reply with your preferred time and I'll send a calendar invite.

Looking forward to showing you what we can do!

๐Ÿ“ Project Structure

leadmark/
โ”œโ”€โ”€ apps/
โ”‚   โ”œโ”€โ”€ processor/          # Email processing backend
โ”‚   โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ api/        # Postmark webhook handlers
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ services/   # AI, calendar, database services
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ events/     # BullMQ job processing
โ”‚   โ”‚   โ””โ”€โ”€ package.json
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ web/               # Next.js frontend dashboard
โ”‚       โ”œโ”€โ”€ app/           # App router pages
โ”‚       โ”œโ”€โ”€ components/    # Reusable UI components
โ”‚       โ”œโ”€โ”€ actions/       # Server actions
โ”‚       โ””โ”€โ”€ package.json
โ”‚
โ”œโ”€โ”€ packages/
โ”‚   โ””โ”€โ”€ types/            # Shared TypeScript definitions
โ”‚
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ package.json

๐Ÿ”Œ Postmark Integration Details

Inbound Email Processing

  • Webhook Endpoint: /api/postman
  • Validation: Mailbox ownership and sender verification
  • Processing: Async job queue with BullMQ for scalability
  • Features: Full email parsing including attachments, headers, and metadata

Outbound Email Sending

  • Rich Responses: HTML + Plain text formatting
  • Thread Management: Maintains conversation context
  • Professional Formatting: Branded email signatures and styling

๐ŸŽฏ Business Impact

For Small Businesses

  • 24/7 Customer Service: Never miss an inquiry, even outside business hours
  • Professional Image: Consistent, well-written responses build credibility
  • Time Savings: Automate 80%+ of routine email responses
  • Lead Generation: Convert more prospects with immediate, helpful responses

For Freelancers & Consultants

  • Streamlined Booking: Clients can schedule meetings without back-and-forth
  • Consistent Branding: Professional responses reflect your expertise
  • Scalability: Handle more inquiries without hiring support staff

๐Ÿ† Hackathon Highlights

Innovation in Email Processing

  • Beyond Basic Parsing: Combines Postmark's infrastructure with advanced AI
  • Production Ready: Enterprise-grade architecture with proper error handling
  • Real Business Value: Solves actual problems faced by small businesses

Technical Excellence

  • Type Safety: Full TypeScript implementation
  • Modern Stack: Latest React, Next.js, and Node.js technologies
  • Scalable Design: Microservices architecture with event-driven processing
  • Real-time Features: Live dashboard updates and instant email processing

๐Ÿ”ฎ Future Enhancements

  • ๐Ÿ“ฑ Mobile App: iOS/Android apps for on-the-go management
  • ๐Ÿ”— CRM Integrations: Connect with Salesforce, HubSpot, Pipedrive
  • ๐Ÿ“ˆ Analytics Dashboard: Email performance and response analytics
  • ๐ŸŒ Multi-language Support: AI responses in multiple languages
  • ๐Ÿ”’ Enterprise Features: Team management, advanced security, custom domains

๐Ÿ“ธ Screenshots

Dashboard Overview

Email conversations, meeting scheduling, and lead management in one place

AI Assistant Configuration

Custom business objectives and document upload for context

Real-time Email Processing

Watch emails arrive and responses sent automatically


๐Ÿค Contributing

This project was built for the Postmark Challenge: Inbox Innovators.

Built with โค๏ธ for the Postmark community

Team

  • Lead Developer: Tecmie Leadmark Team
  • Challenge: Postmark Inbox Innovators 2024
  • Demo: [Live Demo URL]
  • Video: [Demo Video URL]

Transform your email from a time sink into your most powerful business automation tool with Leadmark.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •