A comprehensive SaaS platform that provides AI-powered marketing agents to help businesses create, optimize, and manage their marketing content. The platform features multiple specialized AI agents for various marketing tasks, integrated with WhatsApp API, and includes a credit-based subscription system.
- Marketing Strategy Agent 🎯 - Get personalized marketing strategies with step-by-step guidance from an AI marketing consultant
- Marketing Calendar Agent 📅 - Create organized content calendars with strategic timing and themes
- Post Ideas Agent 💡 - Generate creative and engaging social media post concepts
- Post Text & Scripts Agent ✍️ - Write compelling copy scripts for your content
- Image Generation Agent 🎨 - Create stunning visuals and graphics for marketing campaigns
- SEO Optimization Agent 🔍 - Optimize content and profiles for better search engine visibility
- User Dashboard - Manage agents, projects, credits, and usage analytics
- Admin Dashboard - User management, subscription management, credit logs, and reports
- Credit System - Flexible credit-based usage with multiple purchase options
- Subscription Plans - Monthly and annual subscription options
- Project Management - Organize and track your marketing projects
- WhatsApp Integration - Connect with WhatsApp API for messaging
- Multi-language Support - Internationalization (i18n) support
- Dark Mode - Theme switching with light/dark mode support
- Responsive Design - Modern, mobile-friendly UI built with Tailwind CSS
- Next.js 14 - React framework with App Router
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first CSS framework
- Radix UI - Accessible component primitives
- Framer Motion - Animation library
- React Hook Form - Form management
- Zod - Schema validation
- Next.js API Routes - Serverless API endpoints
- Prisma - Type-safe ORM
- PostgreSQL - Relational database
- Supabase - Authentication and backend services
- Stripe - Payment processing and subscription management
- OpenAI - AI-powered content generation
- WhatsApp API - Messaging integration
- i18next - Internationalization
- React Markdown - Markdown rendering
- Recharts - Data visualization
- Date-fns - Date manipulation
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher)
- npm or yarn or pnpm
- PostgreSQL database
- Stripe account (for payments)
- Supabase account (for authentication)
- OpenAI API key (for AI features)
-
Clone the repository
git clone https://github.com/Yupsecous/AI-Agent-Lovable.git cd AI-Agent-Lovable -
Install dependencies
npm install # or yarn install # or pnpm install
-
Set up environment variables
Create a
.env.localfile in the root directory with the following variables:# Database DATABASE_URL="postgresql://user:password@localhost:5432/dbname" DIRECT_URL="postgresql://user:password@localhost:5432/dbname" # Supabase NEXT_PUBLIC_SUPABASE_URL="your-supabase-url" NEXT_PUBLIC_SUPABASE_ANON_KEY="your-supabase-anon-key" SUPABASE_SERVICE_ROLE_KEY="your-supabase-service-role-key" # Stripe STRIPE_SECRET_KEY="your-stripe-secret-key" NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY="your-stripe-publishable-key" STRIPE_WEBHOOK_SECRET="your-stripe-webhook-secret" # OpenAI OPENAI_API_KEY="your-openai-api-key" # Next.js NEXTAUTH_URL="http://localhost:3000" NEXTAUTH_SECRET="your-nextauth-secret"
-
Set up the database
# Generate Prisma Client npm run postinstall # Push schema to database npm run db:push
-
Run the development server
npm run dev
The application will be available at http://localhost:3000
AI-Agent-Lovable/
├── prisma/
│ └── schema.prisma # Database schema
├── public/ # Static assets
│ └── assets/
│ └── images/
├── src/
│ ├── app/ # Next.js App Router
│ │ ├── (auth)/ # Authentication routes
│ │ ├── (dashboard)/ # Dashboard routes
│ │ │ ├── admin/ # Admin dashboard
│ │ │ └── user/ # User dashboard
│ │ ├── (home)/ # Home page
│ │ └── api/ # API routes
│ ├── components/ # React components
│ │ ├── agents/ # AI agent components
│ │ ├── auth/ # Authentication components
│ │ ├── layout/ # Layout components
│ │ └── ui/ # UI components
│ ├── core/ # Core business logic
│ │ ├── admin/ # Admin functions
│ │ ├── agent/ # Agent logic
│ │ ├── auth/ # Authentication
│ │ ├── subscription/ # Subscription management
│ │ └── transaction/ # Transaction handling
│ ├── features/ # Feature modules
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Utilities and helpers
│ │ ├── i18n/ # Internationalization
│ │ ├── supabase/ # Supabase client setup
│ │ └── utils/ # Utility functions
│ └── contexts/ # React contexts
└── package.json
The application uses PostgreSQL with Prisma ORM. Key models include:
- profile - User profiles with roles, credits, and subscriptions
- projects - User marketing projects
- subscriptions - Subscription records
- credit_purchases - Credit purchase history
- tasks_log - Agent task execution logs
- whatsapp_messages - WhatsApp message history
- admin_activity_logs - Admin activity tracking
npm run dev- Start development server on port 3000npm run build- Build the application for productionnpm run start- Start production servernpm run lint- Run TypeScript type checking and ESLintnpm run postinstall- Generate Prisma Clientnpm run db:push- Push Prisma schema to databasenpm run db:pull- Pull database schema to Prisma
The application uses Supabase for authentication. Users can:
- Sign up with email and password
- Sign in to their accounts
- Manage their profiles and settings
Stripe integration handles:
- Credit purchases (100, 200, 400 credit packs)
- Subscription plans (Monthly Essential, Annual Professional)
- Webhook handling for payment events
Each agent is designed for specific marketing tasks:
- Marketing Strategy - Comprehensive marketing strategy development
- Marketing Calendar - Content calendar creation and scheduling
- Post Ideas - Creative post concept generation
- Post Text - Copywriting and script generation
- Image Generation - AI-powered image creation
- SEO Optimization - Content and profile optimization
The platform supports multiple languages through i18next. Supported languages include:
- English (US/GB)
- Spanish
- French
- German
- Portuguese
Built with Radix UI and Tailwind CSS, the platform includes:
- Accessible form components
- Modal dialogs
- Data tables
- Charts and visualizations
- Toast notifications
- Theme switching
This project is private and proprietary.
This is a private project. For questions or support, please contact the repository owner.
For issues, questions, or feature requests, please open an issue in the repository.
Built with ❤️ using Next.js, TypeScript, and modern web technologies.