Skip to content

sannidhyasahoo/RabittAIProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧊 ICY - AI-Powered Influencer Outreach Platform

ISC License Node.js MongoDB Google Gemini

ICY is a comprehensive AI-powered platform that helps brands discover, analyze, and connect with relevant influencers across Instagram and YouTube. It leverages Google Gemini AI to provide intelligent insights, personalized outreach, and campaign management.

Features β€’ Quick Start β€’ Documentation β€’ API Reference β€’ Contributing


πŸ“‹ Table of Contents


🌟 Overview

ICY (Influencer Connection Yield) is an end-to-end influencer marketing platform designed to streamline the entire influencer outreach workflow. From discovering the perfect influencers for your brand to sending personalized outreach campaigns and tracking performance analytics, ICY handles it all with the power of AI.

Key Highlights

  • πŸ€– AI-Powered Analysis - Leverages Google Gemini Pro for intelligent profile analysis and content generation
  • πŸ“Š Smart Matching - Advanced brand alignment scoring using keyword matching and niche analysis
  • πŸ“§ Automated Outreach - Bulk email campaigns with personalized messaging
  • πŸ“ˆ Campaign Analytics - Real-time tracking and performance insights
  • πŸ”’ Secure Authentication - JWT-based authentication with session management
  • ⚑ Performance Optimized - Built-in caching, rate limiting, and performance monitoring

✨ Features

πŸ” Influencer Discovery

  • Advanced Search - Filter influencers by platform, niche, follower count, engagement rate, and location
  • Brand Alignment Scoring - AI-powered scoring based on keyword matching, follower ratios, and niche compatibility
  • Bulk Analysis - Analyze multiple influencers simultaneously with detailed insights
  • Real-time Dataset - Curated database of verified influencers with engagement metrics

πŸ€– AI-Powered Intelligence

Feature Description
Profile Analysis Deep-dive analysis of influencer authenticity, engagement quality, and audience demographics
Smart Outreach Generate personalized messages tailored to each influencer's style and your brand voice
Content Ideas Get creative content suggestions for influencer collaborations based on campaign goals
Authenticity Check Detect fake followers, engagement manipulation, and assess profile credibility
Campaign Strategy AI recommendations for budget allocation, timeline, and influencer selection
Image Analysis Brand safety checking and visual content compliance using Gemini Vision

πŸ“§ Email Campaign Management

  • Bulk Email Sending - Send personalized emails to multiple influencers with batch processing
  • Rate Limiting - Built-in rate limiting to prevent email throttling (50 emails/minute)
  • Delivery Tracking - Real-time tracking of email delivery status and analytics
  • Email Templates - Create and manage reusable message templates with variables
  • Campaign Logs - Detailed logs for debugging and audit purposes

πŸ“Š Analytics Dashboard

  • Campaign Performance - Track response rates, conversions, and ROI metrics
  • Influencer Insights - View historical performance data and engagement trends
  • Brand Health Metrics - Monitor brand alignment scores across campaigns
  • Export Reports - Generate detailed reports for stakeholders

🏒 Brand Profile Management

  • Profile Setup - Configure your brand details, target audience, and preferences
  • Niche Selection - Define your brand's categories and target influencer niches
  • Content Guidelines - Set brand voice, tone, and content requirements
  • Budget Configuration - Define influencer tier preferences based on budget

πŸ“ Message Templates

  • Template Library - Pre-built templates for different collaboration types
  • Custom Variables - Use placeholders for personalized messaging
  • Tone Variations - Templates for formal, casual, and creative communications
  • A/B Testing Support - Create multiple versions for testing

πŸ›  Technology Stack

Backend

Technology Purpose
Node.js Server runtime environment
Express.js Web application framework
MongoDB NoSQL database for data persistence
Nodemailer Email sending with SMTP support
JWT Secure authentication tokens
Google Gemini SDK AI/ML capabilities

Frontend

Technology Purpose
HTML5/CSS3 Structure and styling
Vanilla JavaScript Interactive functionality
Custom UI Components Unified dashboard and modals
Responsive Design Mobile-friendly interface

DevOps & Tools

Technology Purpose
Docker Containerization
Nginx Reverse proxy and load balancing
PM2 Process management
Jest Testing framework

πŸ“ Project Structure

RabittAIProject/
β”œβ”€β”€ src/                          # Backend source code
β”‚   β”œβ”€β”€ config/                   # Configuration files
β”‚   β”‚   β”œβ”€β”€ database.js           # MongoDB connection setup
β”‚   β”‚   β”œβ”€β”€ dbInit.js             # Database initialization
β”‚   β”‚   └── systemTemplates.js    # Default message templates
β”‚   β”œβ”€β”€ middleware/               # Express middleware
β”‚   β”‚   β”œβ”€β”€ aiMiddleware.js       # AI request handling
β”‚   β”‚   β”œβ”€β”€ auth.js               # Authentication middleware
β”‚   β”‚   β”œβ”€β”€ errorHandler.js       # Error handling middleware
β”‚   β”‚   └── validation.js         # Input validation & rate limiting
β”‚   β”œβ”€β”€ models/                   # Database models & schemas
β”‚   β”œβ”€β”€ routes/                   # API route handlers
β”‚   β”‚   β”œβ”€β”€ aiRoutes.js           # AI feature endpoints
β”‚   β”‚   β”œβ”€β”€ analytics.js          # Analytics endpoints
β”‚   β”‚   β”œβ”€β”€ auth.js               # Authentication endpoints
β”‚   β”‚   β”œβ”€β”€ brand.js              # Brand profile endpoints
β”‚   β”‚   β”œβ”€β”€ campaigns.js          # Campaign management endpoints
β”‚   β”‚   β”œβ”€β”€ influencers.js        # Influencer data endpoints
β”‚   β”‚   └── messageTemplates.js   # Template management endpoints
β”‚   β”œβ”€β”€ services/                 # Business logic services
β”‚   β”‚   β”œβ”€β”€ AuthService.js        # Authentication logic
β”‚   β”‚   β”œβ”€β”€ BrandAlignmentService.js    # Alignment scoring
β”‚   β”‚   β”œβ”€β”€ DatabaseService.js    # Database operations
β”‚   β”‚   β”œβ”€β”€ EmailService.js       # Email sending logic
β”‚   β”‚   β”œβ”€β”€ EmailIntegrationService.js  # Advanced email features
β”‚   β”‚   β”œβ”€β”€ geminiService.js      # Google Gemini AI integration
β”‚   β”‚   β”œβ”€β”€ InfluencerDataService.js    # Influencer data management
β”‚   β”‚   β”œβ”€β”€ OptimizedDatabaseService.js # Performance-optimized queries
β”‚   β”‚   β”œβ”€β”€ PerformanceMonitoringService.js # System monitoring
β”‚   β”‚   └── repositories.js       # Data access layer
β”‚   β”œβ”€β”€ utils/                    # Utility functions
β”‚   β”‚   β”œβ”€β”€ ErrorHandler.js       # Enhanced error handling
β”‚   β”‚   β”œβ”€β”€ environmentValidator.js     # Environment validation
β”‚   β”‚   └── errors.js             # Custom error classes
β”‚   └── server.js                 # Main server entry point
β”œβ”€β”€ public/                       # Frontend static files
β”‚   β”œβ”€β”€ css/                      # Stylesheets
β”‚   β”‚   β”œβ”€β”€ styles.css            # Main styles
β”‚   β”‚   β”œβ”€β”€ aiStyles.css          # AI feature styles
β”‚   β”‚   β”œβ”€β”€ enhanced-ui.css       # Enhanced UI components
β”‚   β”‚   β”œβ”€β”€ unifiedDashboard.css  # Dashboard styles
β”‚   β”‚   └── ...                   # Other stylesheets
β”‚   β”œβ”€β”€ js/                       # JavaScript files
β”‚   β”‚   β”œβ”€β”€ app.js                # Main application
β”‚   β”‚   β”œβ”€β”€ aiFeatures.js         # AI feature handlers
β”‚   β”‚   β”œβ”€β”€ aiUI.js               # AI UI components
β”‚   β”‚   β”œβ”€β”€ analytics.js          # Analytics dashboard
β”‚   β”‚   β”œβ”€β”€ brand.js              # Brand management
β”‚   β”‚   β”œβ”€β”€ campaignManager.js    # Campaign management
β”‚   β”‚   β”œβ”€β”€ influencerDiscovery.js      # Discovery interface
β”‚   β”‚   β”œβ”€β”€ unifiedDashboard.js   # Unified AI dashboard
β”‚   β”‚   └── ...                   # Other scripts
β”‚   β”œβ”€β”€ index.html                # Main dashboard
β”‚   β”œβ”€β”€ analytics.html            # Analytics page
β”‚   β”œβ”€β”€ campaigns.html            # Campaigns page
β”‚   └── templates.html            # Templates page
β”œβ”€β”€ scripts/                      # Utility scripts
β”‚   β”œβ”€β”€ build-css.js              # CSS build script
β”‚   β”œβ”€β”€ build-js.js               # JS build script
β”‚   β”œβ”€β”€ deploy.js                 # Deployment script
β”‚   β”œβ”€β”€ health-check.js           # Health check utility
β”‚   └── ...                       # Other scripts
β”œβ”€β”€ tests/                        # Test files
β”‚   β”œβ”€β”€ api/                      # API tests
β”‚   β”œβ”€β”€ integration/              # Integration tests
β”‚   └── *.test.js                 # Unit tests
β”œβ”€β”€ docs/                         # Documentation
β”‚   β”œβ”€β”€ api-documentation.md      # API reference
β”‚   β”œβ”€β”€ brand-profile-setup.md    # Brand setup guide
β”‚   β”œβ”€β”€ database-setup.md         # Database configuration
β”‚   β”œβ”€β”€ email-outreach-setup.md   # Email setup guide
β”‚   └── user-guide.md             # User manual
β”œβ”€β”€ .env.example                  # Environment variables template
β”œβ”€β”€ Dockerfile                    # Docker configuration
β”œβ”€β”€ docker-compose.yml            # Docker Compose setup
β”œβ”€β”€ nginx.conf                    # Nginx configuration
β”œβ”€β”€ ecosystem.config.js           # PM2 configuration
└── package.json                  # Project dependencies

πŸš€ Quick Start

Prerequisites

  • Node.js 18.x or higher
  • MongoDB 6.x or higher (local or Atlas)
  • npm or yarn
  • Google Gemini API Key (for AI features)

Installation

  1. Clone the repository

    git clone https://github.com/your-username/RabittAIProject.git
    cd RabittAIProject
  2. Install dependencies

    npm install
  3. Set up environment variables

    cp .env.example .env

    Edit .env with your configuration:

    # Database
    MONGODB_URI=mongodb://localhost:27017/icy_database
    
    # Server
    PORT=3000
    NODE_ENV=development
    
    # Email (Mailtrap for testing)
    SMTP_HOST=sandbox.smtp.mailtrap.io
    SMTP_PORT=2525
    SMTP_USER=your_mailtrap_username
    SMTP_PASS=your_mailtrap_password
    
    # AI (Google Gemini)
    GEMINI_API_KEY=your_gemini_api_key
    
    # Security
    JWT_SECRET=your_jwt_secret
    SESSION_SECRET=your_session_secret
  4. Start MongoDB (if running locally)

    mongod
  5. Start the development server

    npm run dev
  6. Open the application Navigate to http://localhost:3000 in your browser.


βš™οΈ Configuration

Environment Variables

Variable Required Description Default
MONGODB_URI βœ… MongoDB connection string -
PORT ❌ Server port 3000
NODE_ENV ❌ Environment mode development
GEMINI_API_KEY ❌* Google Gemini API key -
SMTP_HOST ❌* SMTP server host -
SMTP_PORT ❌* SMTP server port -
SMTP_USER ❌* SMTP username -
SMTP_PASS ❌* SMTP password -
JWT_SECRET βœ… JWT signing secret -
SESSION_SECRET βœ… Session secret -
AI_RATE_LIMIT_REQUESTS ❌ AI requests per window 10
AI_RATE_LIMIT_WINDOW_MS ❌ AI rate limit window 60000

*Required for full functionality

Feature Availability

The application validates environment configuration on startup and will indicate which features are available:

βœ… AI Features: Available
βœ… Email Services: Available

πŸ“‘ API Reference

Base URL

http://localhost:3000/api

Authentication Endpoints

Method Endpoint Description
POST /auth/login User login
POST /auth/register User registration
GET /auth/verify Verify JWT token

Influencer Endpoints

Method Endpoint Description
GET /influencers Get all influencers with pagination
GET /influencers/search Search influencers with filters
GET /influencers/:id Get specific influencer
POST /influencers/alignment Calculate brand alignment scores

Brand Endpoints

Method Endpoint Description
GET /brand/profile Get brand profile
POST /brand/profile Create/update brand profile
GET /brand/recommendations Get AI recommendations

Campaign Endpoints

Method Endpoint Description
GET /campaigns Get all campaigns
POST /campaigns Create new campaign
GET /campaigns/:id Get campaign details
PUT /campaigns/:id Update campaign
DELETE /campaigns/:id Delete campaign
POST /campaigns/:id/send Send campaign emails
GET /campaigns/:id/status Get email delivery status

AI Endpoints

Method Endpoint Description
POST /ai/analyze-profile Analyze influencer profile
POST /ai/generate-outreach Generate outreach messages
POST /ai/content-ideas Generate content ideas
POST /ai/check-authenticity Check influencer authenticity
POST /ai/match-influencers Smart influencer matching
POST /ai/campaign-strategy Generate campaign strategy
POST /ai/analyze-image Analyze image content
POST /ai/enhanced-alignment AI-enhanced alignment scores
POST /ai/bulk-analysis Bulk influencer analysis
GET /ai/status Check AI service status

Template Endpoints

Method Endpoint Description
GET /templates Get all templates
POST /templates Create template
PUT /templates/:id Update template
DELETE /templates/:id Delete template

Analytics Endpoints

Method Endpoint Description
GET /analytics/dashboard Get dashboard metrics
GET /analytics/campaign/:id Get campaign analytics
GET /analytics/performance Get performance metrics

Health Endpoints

Method Endpoint Description
GET /health Basic health check
GET /health/detailed Detailed system health

For detailed API documentation, see docs/api-documentation.md.


🎨 Frontend Features

Unified AI Dashboard

A comprehensive interface that combines all AI-powered features in one place:

  • Influencer discovery with real-time filtering
  • AI-powered analysis with one-click insights
  • Brand alignment scoring visualization
  • Campaign creation workflow

Key UI Components

  • Brand Profile Setup - Step-by-step brand configuration wizard
  • Influencer Discovery - Advanced search with filter sidebar
  • Campaign Manager - Create, manage, and track campaigns
  • Message Templates - Template editor with variable support
  • Analytics Dashboard - Visual charts and metrics

Navigation

  • πŸ“Š Dashboard - Main overview and quick actions
  • πŸ“‹ Campaigns - Campaign management
  • πŸ“ˆ Analytics - Performance tracking
  • πŸ“ Templates - Message template management

πŸ€– AI Capabilities

Profile Analysis

The AI analyzes influencer profiles to provide:

  • Engagement Quality Score - Assessment of genuine engagement vs. artificial
  • Audience Demographics Prediction - Estimated audience breakdown
  • Content Style Analysis - Tone, frequency, and quality assessment
  • Brand Safety Rating - Risk assessment for brand partnerships

Smart Outreach Generation

Generate personalized messages with:

  • Tone Variations - Formal, casual, or creative options
  • Brand Voice Adaptation - Messages that match your brand personality
  • Context Awareness - References to influencer's recent content
  • Campaign-Specific Messaging - Tailored for product launches, events, etc.

Content Ideas

AI-generated collaboration ideas including:

  • Content formats (posts, reels, stories)
  • Themes and concepts
  • Hashtag suggestions
  • Posting schedule recommendations

Authenticity Detection

The AI checks for:

  • Suspicious follower growth patterns
  • Engagement rate anomalies
  • Comment quality analysis
  • Fake follower indicators

πŸ“§ Email Integration

Supported Email Providers

  • Mailtrap (recommended for testing)
  • SendGrid
  • Mailgun
  • Custom SMTP

Email Features

  • HTML email templates with branding
  • Personalization variables
  • Delivery tracking webhooks
  • Bounce handling
  • Rate limiting (50 emails/minute)

Configuration

See docs/email-outreach-setup.md for detailed email setup instructions.


πŸ§ͺ Testing

Run All Tests

npm test

Test Categories

# Unit tests
npm run test:unit

# Integration tests
npm run test:integration

# API tests
npm run test:api

# Full validation (all tests + linting)
npm run validate

# Watch mode
npm run test:watch

# Coverage report
npm run test:coverage

Test Coverage

Tests cover:

  • Brand Alignment Service
  • Email Service
  • Influencer Data Service
  • Authentication
  • Database operations
  • Error handling
  • Performance metrics

🚒 Deployment

Using Docker

# Build and run with Docker Compose
docker-compose up -d

# View logs
docker-compose logs -f

Using PM2

# Start with PM2
npm run start:prod

# Or directly with PM2
pm2 start ecosystem.config.js

Environment Setup

  1. Set NODE_ENV=production
  2. Use a production MongoDB instance (Atlas recommended)
  3. Configure production SMTP credentials
  4. Set strong JWT and session secrets
  5. Enable HTTPS with SSL certificates

Nginx Configuration

The included nginx.conf provides:

  • Reverse proxy setup
  • SSL/TLS configuration
  • Gzip compression
  • Caching headers
  • Rate limiting

πŸ”§ Troubleshooting

Common Issues

MongoDB Connection Failed

❌ Database connection failed
  • Ensure MongoDB is running
  • Check MONGODB_URI is correct
  • Verify network connectivity

AI Features Not Working

❌ AI Features: Disabled
  • Check GEMINI_API_KEY is set correctly
  • Verify API key is valid and has quota

Email Sending Failed

Email delivery failed
  • Verify SMTP credentials
  • Check rate limits
  • Ensure email addresses are valid

Health Check

# Check system health
npm run health-check

Logs

# View application logs
npm run logs

πŸ“š Documentation

Document Description
API Documentation Complete API reference
Brand Profile Setup Guide to configuring brand profiles
Database Setup MongoDB configuration guide
Email Outreach Setup Email integration guide
User Guide End-user manual

πŸ“œ Available Scripts

Script Description
npm start Start production server
npm run start:prod Start in production mode
npm run dev Start development server with hot reload
npm run build Build CSS and JS assets
npm run build:prod Production build with optimization
npm run test Run test suite
npm run test:all Run all tests including integration
npm run validate Full validation check
npm run health-check Run health check script
npm run deploy Deploy with pre-flight checks
npm run deploy:quick Quick deploy skipping tests
npm run performance:report Generate performance report

🀝 Contributing

Contributions are welcome! Please follow these steps:

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

Development Guidelines

  • Follow the existing code style
  • Write tests for new features
  • Update documentation as needed
  • Ensure all tests pass before submitting

πŸ“„ License

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


πŸ™ Acknowledgments

  • Google Gemini for AI capabilities
  • MongoDB for database solutions
  • Express.js for the web framework
  • All contributors who have helped improve this project

Built with ❀️ by the ICY Team

⬆ Back to Top

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors