Skip to Content
ChannelsGitHubGitHub — Channel Overview

GitHub — Channel Overview

This folder documents the GitHub source code channel for Leadmetrics: what existing platform infrastructure it connects to, the data model, and the full feature roadmap.

Researched on April 23, 2026.

Contents

  • current-implementation.md — Existing platform infrastructure GitHub integrates with
  • roadmap.md — Architecture design, DB models, OAuth flow, API routes, workers, and phased rollout
  • landing-page-sync.md[Live Apr 2026] Push landing page HTML to a GitHub repo from the landing page detail page

The Core Idea

GitHub is added as a new channel type using platform-level OAuth (same pattern as Facebook, Google, LinkedIn — one GitHub OAuth App registered by Leadmetrics, all tenants authenticate through it). Once connected, a repository is mapped to an existing Website or LandingPage channel via a ChannelSourceMap record. The platform then:

  1. Syncs source files — fetches HTML/JSX/TSX/markdown files and extracts semantic content (title, meta description, headings, structured data, body copy)
  2. Feeds the RAG pipeline — extracted content becomes context available to all AI agents (blog writer, content brief writer, landing page writer)
  3. Generates code-aware insights — an insight worker analyzes SEO gaps between actual page source and target keywords
  4. Executes optimization changes — a coding agent pulls the source, makes deep structural changes approved by the DM, and pushes back a PR
  5. Stays current — a GitHub push webhook triggers re-sync automatically on every deploy

Why This Matters

Today the platform generates content recommendations without knowing what already exists on the client’s live pages. The blog writer doesn’t know the current H1 on the pricing page. The site auditor produces a report but has no way to act on it. Connecting source code closes both gaps: agents write content that is coherent with what is already published, and recommendations can now become code changes — not just documents.

The full loop is: analyze → recommend → DM approves → coding agent edits → PR → merged → re-sync. Leadmetrics becomes the first marketing platform that doesn’t just tell you what to fix — it fixes it.

© 2026 Leadmetrics — Internal use only