Skip to content

terter21002/AI-Magnet-Lead-Gen

Repository files navigation

🧲 AI-Driven Lead Magnet Generator

A powerful SaaS platform that uses OpenAI GPT-4 to automatically generate interactive lead magnets from natural language prompts. Create calculators, quizzes, assessments, checklists, multi-step forms, and document gates in minutes, not hours.

Next.js React TypeScript Tailwind CSS Prisma OpenAI

✨ Features

🤖 AI-Powered Generation

  • Natural Language to Code: Describe your magnet in plain English, get fully functional tools
  • 6 Magnet Types: Calculators, Quizzes, Assessments, Checklists, Multi-step Forms, Documents
  • Smart Styling: AI generates appropriate colors, themes, and layouts
  • Mathematical Security: Uses mathjs for safe expression evaluation

🎯 Magnet Types & Capabilities

Type Description Use Cases
🧮 Calculators Interactive mathematical tools ROI, Mortgage, BMI, Investment, Pricing
❓ Quizzes Personality tests with scoring Lead qualification, Product matching, Skill assessment
📊 Assessments Knowledge tests with correct answers Training evaluation, Certification, Performance review
✅ Checklists Progress tracking tools SEO audits, Onboarding, Process validation
📋 Multi-step Forms Typeform-style lead capture Customer surveys, Lead qualification, Data collection
📄 Documents Gated file downloads Templates, Guides, Whitepapers, Resources

🎨 Advanced Customization

  • Visual Builders: Drag-and-drop editors for each magnet type
  • Real-time Preview: See changes instantly as you build
  • Custom Styling: Colors, fonts, themes, branding
  • Gating Strategies: No-gate, Gate-before, Gate-after-output
  • Lead Forms: Multiple form templates with customizable fields

🌐 Embedding & Distribution

  • Web Components: Modern <magnet-widget> for seamless embedding
  • Standalone Pages: Direct shareable URLs (/p/[slug])
  • Responsive Design: Works perfectly on all devices
  • Cross-Origin: Proper CORS configuration for external websites

📈 Lead Management & Analytics

  • Comprehensive Lead Capture: Contact info + detailed responses
  • Analytics Dashboard: Conversion tracking, performance metrics
  • Lead Export: Download leads in various formats
  • Multi-step Tracking: Track completion rates across form steps
  • Real-time Notifications: Instant lead alerts

💳 Subscription & Billing

  • Stripe Integration: Secure payment processing
  • Multiple Plans: Free, Pro, Enterprise tiers
  • Usage Tracking: Monitor magnet creation and lead limits
  • Webhook Handling: Automatic subscription status updates
  • Trial Periods: Free trials with automatic conversion

🏗️ Tech Stack

Frontend

  • Next.js 15 - React framework with App Router
  • React 19 - Latest React with concurrent features
  • TypeScript 5 - Type-safe development
  • Tailwind CSS 4 - Utility-first styling
  • Clerk - Authentication and user management

Backend

  • Next.js API Routes - Serverless backend functions
  • Prisma ORM - Type-safe database operations
  • PostgreSQL - Robust relational database
  • OpenAI GPT-4 - AI-powered magnet generation
  • mathjs - Safe mathematical expression evaluation

Integrations

  • Stripe - Payment processing and subscriptions
  • Clerk - User authentication and management
  • OpenAI - AI-powered content generation
  • Vercel - Deployment and hosting platform

🔒 Security Features

  • Safe Expression Evaluation: Uses mathjs instead of eval()
  • Input Sanitization: All user inputs are properly sanitized
  • CORS Protection: Configurable cross-origin policies
  • Authentication: Secure user authentication with Clerk
  • Rate Limiting: API rate limiting to prevent abuse
  • SQL Injection Protection: Prisma ORM prevents SQL injection

📊 Performance

  • Server-Side Rendering: Fast initial page loads
  • Static Generation: Pre-built pages for better SEO
  • Code Splitting: Automatic code splitting for faster loading
  • Image Optimization: Automatic image optimization
  • Caching: Intelligent caching strategies

📄 License

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

About

A powerful SaaS platform that uses OpenAI GPT-4 to automatically generate interactive lead magnets from natural language prompts. Create calculators, quizzes, assessments, checklists, multi-step forms, and document gates in minutes, not hours.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors