External Service Integrations
Relevant source files
The following files were used as context for generating this wiki page:
FusionOps serves as an internal control plane for building and deploying PPC and affiliate landing pages. To achieve this, it integrates with several external infrastructure providers and third-party services, primarily focusing on Cloudflare for compute, storage, and networking, and Neon for relational data persistence.
The integration strategy emphasizes automation through scripts and GitHub Actions, ensuring that landing pages, tracking pixels, and API workers are consistently deployed across a distributed environment. This architecture allows the system to manage large-scale campaign tracking and lead handling with minimal manual intervention.
Sources: CLAUDE.md:10-14, INFRASTRUCTURE_SETUP.md:1-5
Cloudflare Infrastructure Integrations
Cloudflare is the primary infrastructure provider for FusionOps, hosting the frontend, backend workers, and various database instances.
Cloudflare Pages (Frontend)
The web application and generated landing pages are deployed to Cloudflare Pages. The integration supports "Direct Upload" flows where files are hashed (using MD5) and uploaded via JWT tokens to ensure only modified assets are transferred.
This diagram illustrates the "Direct Upload" flow used to synchronize local build artifacts with the Cloudflare Pages platform.
Sources: utils/deployers/cf-pages.js:10-18, utils/deployers/cf-pages.js:142-260
Cloudflare Workers (Compute)
FusionOps utilizes multiple specialized Workers to handle different aspects of the system.
| Worker Name | Internal ID | Purpose |
|---|---|---|
| API Worker | lp-factory-api | Campaign CRUD, template management, R2 storage handling |
| Pixel Worker | lp-factory-pixel | First-party tracking (t.{domain}/e) for clicks and conversions |
| Callback Worker | fusionops-callback-worker | Lead notification and webhook callback handling |
| CF Proxy | lp-cors-proxy | CORS proxy for external API requests |
Sources: CLAUDE.md:43-70, PRODUCTION_STATUS.md:15-32
Cloudflare D1 (Serverless SQLite)
The system integrates with Cloudflare D1 for distributed SQL storage. Three primary production instances are maintained:
- fusionops-main-new-v2: Stores core data including 24 tables for settings, sites, templates, and deployment history.
- fusionops-pixel-new-v2: Dedicated to tracking analytics and pixel events.
- fusionops-callback-new-v2: Stores lead callback data.
Sources: PRODUCTION_STATUS.md:36-58, scripts/setup-infrastructure.js:29-33
Neon Postgres Integration
Neon Postgres provides an optional but critical relational database layer for dashboard data that requires advanced features not present in D1, such as specific JSONB operations or different regional consistency.
Data Flow and Connection
The integration utilizes the @neondatabase/serverless driver. The system is designed to handle multiple projects (e.g., fusionops-main) and verifies connectivity via a debug script that queries the information_schema.
This sequence shows how the dashboard and setup scripts interact with Neon to manage landing page configurations.
Sources: debug-connections.js:80-112, INFRASTRUCTURE_SETUP.md:144-150, scripts/setup-infrastructure.js:259-286
Tables Managed in Neon
| Table Name | Description | Key Fields |
|---|---|---|
settings | Key-value store for application configuration | key, value (JSONB) |
sites | Configuration for generated landing pages | id, data (JSONB) |
deploy_history | Log of all deployment attempts to external targets | site_id, target, url, status |
Sources: scripts/setup-infrastructure.js:264-285, INFRASTRUCTURE_SETUP.md:175-195
Model Context Protocol (MCP) Integrations
FusionOps integrates with external "Hermes" agents and other intelligence tools via the Model Context Protocol.
FBIS MCP Server
The FBIS (FusionOps Ban Intelligence System) MCP server is a Python-based integration that provides tools for:
- Risk Analysis: Account isolation scoring and proxy pool intelligence.
- Pixel Monitoring: Querying event data from the Pixel D1 database.
- Auto-Pause: Implementing automated rules to pause campaigns based on risk scores (e.g., score ≥ 80).
Sources: CLAUDE.md:72-78, HERMES_FBIS_AUDIT.txt:12-42
Shared Service MCPs
The system connects to external MCP endpoints defined in configuration:
- bolt_shared:
http://mcp.fusions.dev/mcp - context7:
https://mcp.context7.com/mcp
Sources: CLAUDE.md:86-89
Third-Party API Service Map
FusionOps integrates with specific advertising and management APIs to coordinate campaign deployments.
| Service | Category | Integration Method | Purpose |
|---|---|---|---|
| LeadsGate | Affiliate Network | Form injection / Redirects | Post-form submission handling and redirection |
| Voluum | Tracking | script injection | Campaign tracking via dtpCallback.js and Click IDs |
| Google Ads | Advertising | gtag injection | Conversion tracking and conversion ID capture |
| Sentry | Monitoring | @sentry/react | Error tracking and logging for the dashboard |
Sources: CLAUDE.md:91, utils/deployers/cf-pages.js:315-325, scripts/setup-infrastructure.js:315-325
Summary of Integration Components
The External Service Integration layer of FusionOps is characterized by its heavy reliance on Cloudflare's ecosystem for both compute and storage, supplemented by Neon for complex relational data. The architecture is unified through a centralized GitHub Actions pipeline that orchestrates infrastructure setup, code deployment, and tracking script injection across these various services.
Sources: INFRASTRUCTURE_SETUP.md:10-38, scripts/setup-infrastructure.js:464-478