Skip to content

upstackpilot0710/email-campaign-automation-saas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Email Marketing Platform

A comprehensive B2B email marketing SaaS platform designed specifically for Australian local service providers. Find targeted leads from our extensive database of Australian businesses, create AI-powered personalized email campaigns, and track engagement metrics—all while maintaining strict compliance with unsubscribe lists and sending quotas.

🚀 Features

Lead Discovery & Management

  • Extensive Business Database: Access to 120k+ Australian businesses with detailed company information
  • Advanced Filtering: Filter leads by city, industry, and other criteria to create targeted prospect lists
  • Lead Collections: Save and organize your filtered leads into reusable collections
  • Real-time Search: Fast, responsive search through the business database

AI-Powered Campaign Creation

  • Personalized Email Generation: AI creates unique, tailored emails for each prospect based on their business profile and your service offering
  • Campaign Management: Create, edit, and manage multiple email campaigns
  • Content Customization: Review and edit AI-generated content before sending
  • Batch Processing: Efficiently generate emails for large prospect lists

Email Delivery & Tracking

  • Reliable Sending: Integration with Resend and AWS SES for high deliverability
  • Engagement Analytics: Track delivery, open rates, clicks, and bounces in real-time
  • Quota Management: Monthly sending limits with clear usage tracking
  • Suppression Lists: Automatic management of unsubscribes and bounces

User Experience

  • Modern Dashboard: Clean, intuitive interface built with Next.js and Tailwind CSS
  • Responsive Design: Works seamlessly on desktop and mobile devices
  • Authentication: Secure user management with Clerk authentication
  • Data Tables: High-performance tables powered by AG Grid for managing large datasets

🛠️ Technology Stack

Frontend

  • Next.js 14 - React framework with App Router
  • React 18 - UI library
  • TypeScript - Type-safe JavaScript
  • Tailwind CSS - Utility-first CSS framework
  • Shadcn/ui - Component library based on Radix UI
  • AG Grid - High-performance data tables

Backend & Database

  • PostgreSQL - Primary database
  • Drizzle ORM - Type-safe database operations
  • Supabase - Database hosting and real-time features
  • Inngest - Background job processing and email generation

Services & Integrations

  • Clerk - User authentication and session management
  • Resend - Email delivery service
  • AWS SES - Backup email service
  • OpenAI GPT - AI content generation
  • Vercel - Deployment platform

📋 Prerequisites

  • Node.js 22.x or later
  • PostgreSQL database (Supabase recommended)
  • Clerk account for authentication
  • Resend account for email delivery
  • OpenAI API key for AI features

🚀 Getting Started

  1. Clone the repository

    git clone https://github.com/upstackpilot0710/email-campaign-automation-saas.git
    cd email-campaign-automation-saas
  2. Install dependencies

    npm install
  3. Set up environment variables

    Create a .env.local file in the root directory with the following variables:

    # Database
    DATABASE_URL=your_supabase_database_url
    DIRECT_URL=your_supabase_direct_url
    
    # Authentication
    NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
    CLERK_SECRET_KEY=your_clerk_secret_key
    
    # Email Services
    RESEND_API_KEY=your_resend_api_key
    AWS_SES_ACCESS_KEY_ID=your_aws_access_key
    AWS_SES_SECRET_ACCESS_KEY=your_aws_secret_key
    AWS_SES_REGION=your_aws_region
    
    # AI
    OPENAI_API_KEY=your_openai_api_key
    
    # Inngest
    INNGEST_SIGNING_KEY=your_inngest_signing_key
    INNGEST_EVENT_KEY=your_inngest_event_key
  4. Set up the database

    # Generate database schema
    npm run db:generate
    
    # Push schema to database
    npm run db:push
    
    # Run migrations
    npm run db:migrate
    
    # (Optional) Seed with sample data
    npm run db:seed
  5. Start the development server

    npm run dev
  6. Open your browser

    Navigate to http://localhost:3000 to see the application.

📊 Database Architecture

The platform uses a dual-database architecture for optimal performance:

  • User Database: Handles authentication, campaigns, and user-specific data
  • Production Database: Contains the extensive business leads database (120k+ companies)

Recent migration consolidated collections data into the production database for better performance and simpler architecture.

🔧 Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm start - Start production server
  • npm run lint - Run ESLint
  • npm run db:generate - Generate Drizzle schema
  • npm run db:push - Push schema changes to database
  • npm run db:migrate - Run database migrations
  • npm run db:studio - Open Drizzle Studio
  • npm run db:seed - Seed database with sample data

📁 Project Structure

src/
├── app/                    # Next.js app router pages
│   ├── (auth)/            # Authentication pages
│   ├── (dashboard)/       # Dashboard pages
│   │   ├── campaigns/     # Campaign management
│   │   ├── collections/   # Lead collections
│   │   ├── leads/         # Lead discovery
│   │   └── analytics/     # Analytics dashboard
│   └── api/               # API routes
├── components/            # Reusable UI components
├── lib/                   # Utility functions and configurations
│   ├── db/               # Database configuration
│   ├── auth/             # Authentication utilities
│   ├── email/            # Email service integrations
│   └── services/         # Business logic services
├── hooks/                 # Custom React hooks
└── inngest/              # Background job functions

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📝 License

This project is private and proprietary. All rights reserved.

📞 Support

For support or questions, please contact the development team or create an issue in the repository.

🔄 Recent Updates

  • Collections Migration Complete: Moved collections to single production database for better performance
  • 🔄 AI Generation Stability: Ongoing improvements to email generation reliability
  • 📧 Campaign Sending Logic: Implementation in progress for queue-based email sending
  • 📊 Analytics Dashboard: Static placeholders ready for dynamic data integration

Built with ❤️ for Australian local service providers

About

A full-stack email marketing SaaS platform enabling businesses to create, manage, and automate email campaigns. The system includes tools for campaign scheduling, template management, subscriber lists, and marketing analytics. Built with a modern web stack, it provides a scalable foundation for self-hosted email marketing services or SaaS products.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors