Skip to content

ricardotech/adturbo-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 

Repository files navigation

AdTurbo API - Ads AI

A RESTful API for AdTurbo, an SaaS platform that simplifies ads traffic management, optimization, and automation.

Overview

This API provides the backend services needed for AdFlow to interact with Meta Ads. It handles authentication, campaign management, analytics, and automation through the Meta Marketing API.

Key Features

  • OAuth 2.0 integration with Meta platforms
  • Campaign monitoring and management
  • Automated rules engine for campaign optimization
  • Performance analytics and insights
  • Creative management and A/B testing
  • Webhook handlers for real-time updates

Technical Requirements

Prerequisites

  • Node.js 18+
  • PostgreSQL 16+
  • Redis 6+
  • TypeORM

Architecture

The API follows a modular architecture:

  • Auth Module: OAuth flow and token management
  • Ad Accounts Module: Management of advertising accounts
  • Campaigns Module: Campaign CRUD operations
  • Analytics Module: Performance metrics and reporting
  • Automation Module: Rules engine and automated actions
  • Creative Module: Ad creative management and generation

Authentication

The API implements Meta's OAuth 2.0 flow for secure authentication:

  1. Users authorize AdFlow to access their Meta Ads accounts
  2. Secure token storage and management
  3. Automatic token refresh
  4. JWT-based authentication for client applications

API Endpoints

Authentication

  • GET /auth/meta: Initiates Meta OAuth flow
  • GET /auth/meta/callback: OAuth callback handler
  • POST /auth/refresh: Refresh access tokens
  • GET /auth/status: Check authentication status

Ad Accounts

  • GET /accounts: List connected ad accounts
  • GET /accounts/:id: Get account details
  • POST /accounts/:id/sync: Sync account data

Campaigns

  • GET /campaigns: List campaigns
  • GET /campaigns/:id: Get campaign details
  • POST /campaigns: Create new campaign
  • PUT /campaigns/:id: Update campaign
  • POST /campaigns/:id/duplicate: Duplicate campaign
  • PUT /campaigns/:id/status: Update campaign status

Ad Sets & Ads

  • GET /adsets: List ad sets
  • GET /ads: List ads
  • GET /ads/:id: Get ad details
  • POST /ads: Create new ad
  • PUT /ads/:id: Update ad

Analytics

  • GET /analytics/performance: Get performance metrics
  • GET /analytics/insights: Get campaign insights
  • GET /analytics/reports: Generate custom reports

Automation

  • GET /automation/rules: List automation rules
  • POST /automation/rules: Create automation rule
  • GET /automation/logs: Get automation logs
  • POST /automation/actions/execute: Execute manual action

Creatives

  • GET /creatives: List ad creatives
  • POST /creatives: Create new creative
  • POST /creatives/generate: Generate creative variations with AI

Required Meta API Permissions

  • ads_management: For creating/updating campaigns
  • ads_read: For reading campaign data
  • business_management: For account access
  • pages_read_engagement: For Page integration

Webhooks

The API supports Meta webhooks for real-time updates:

  • Campaign status changes
  • Performance threshold notifications
  • Budget consumption alerts

Database Schema

Primary entities in the database:

  • users: User accounts
  • accounts: Meta account connections
  • ad_accounts: Advertising accounts
  • campaigns: Ad campaigns
  • ad_sets: Sets of ads
  • ads: Individual ads
  • creatives: Ad creatives
  • metrics: Performance metrics
  • automation_rules: Automation rule configurations
  • automation_logs: Automation execution logs

Core Features

Campaign Management

  • Unified Dashboard: Single view for Meta Ads and Google Ads campaigns
  • Performance Metrics: Real-time ROAS, CPC, CTR, and conversion tracking
  • Campaign Automation: Rules-based optimization for budget allocation
  • Alert System: Notification when campaigns under/over perform set thresholds

AI-Powered Optimization

  • Performance Prediction: Early identification of high-potential ad creatives
  • Budget Allocation: Smart suggestions for redistribution based on ROAS
  • A/B Testing: Automated test creation and statistical analysis
  • Audience Insights: AI-driven audience segmentation recommendations

Creative Management

  • Ad Variation Generator: Create multiple ad versions with a single click
  • Copy Wizard: AI-generated ad copy based on high-performing patterns
  • Creative Library: Organized repository of all ad creatives with performance metrics
  • Performance Analysis: Identify which visual and copy elements drive conversions

Reporting & Analytics

  • Customizable Reports: Build and schedule reports with drag-and-drop simplicity
  • Multi-channel Attribution: Track customer journey across platforms
  • Export Options: PDF, CSV, and direct integration with Google Sheets
  • Benchmark Comparisons: Compare performance against industry standards

AI Solutions

Copy Generation

The platform uses advanced natural language processing to:

  • Analyze high-converting ad copies across industries
  • Generate variations with different psychological triggers (urgency, scarcity, etc.)
  • Optimize headlines and descriptions based on audience response
  • Adapt messaging to match campaign objectives

Performance Prediction

Our prediction engine leverages machine learning to:

  • Forecast campaign performance based on historical data
  • Identify underperforming ads before they waste significant budget
  • Suggest optimal audience segments for specific offerings
  • Predict seasonal trends and recommend proactive adjustments

Insight Generation

The AI insight system automatically:

  • Identifies patterns in successful campaigns
  • Generates actionable recommendations in plain language
  • Highlights anomalies and opportunities
  • Explains the "why" behind performance changes

Future Roadmap

Q3 2025

  • TikTok Ads integration
  • Advanced creative analysis (visual element recognition)
  • Enhanced mobile experience
  • Custom automation templates

Q4 2025

  • LinkedIn and Pinterest Ads integration
  • Collaborative workspace for agencies
  • Marketplace for ad templates
  • Advanced funnel analytics

2026

  • Predictive budget planning
  • Competitive intelligence features
  • Custom ML models per account
  • Native video creation tools
  • Cross-platform audience synchronization

Scalability Considerations

  • Microservices architecture for feature isolation
  • Horizontal scaling for API processing
  • Data warehousing solution for analytics at scale
  • Background job processing for report generation

Community & Support

  • Knowledge base with step-by-step tutorials
  • Community forum for strategy sharing
  • Weekly webinars on platform features
  • Priority support for Pro and Enterprise plans

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published