Skip to content
tubban1Public

About

๐Ÿš€ ๅคš็งŸๆˆทๅ…จ่‡ชๅŠจๅŒ–้—ญ็Žฏๅปบ็ซ™ไธŽไบ‘ๅŸบ็ก€่ฎพๆ–ฝ็”Ÿๆˆๅผ UI ็ณป็ปŸ | Automated Multi-Tenant Generative UI & Infrastructure Delivery Engine (Next.js 14, OpenAI, Neon DB, Vercel & GoDaddy APIs)

Resources

Stars

112 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

76 Commits

Folders and files

Repository files navigation

 โ–ˆโ–ˆโ•—      โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ•—   โ–ˆโ–ˆโ•—
 โ–ˆโ–ˆโ•‘      โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ• โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ•‘
 โ–ˆโ–ˆโ•‘      โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ•”โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•‘
 โ–ˆโ–ˆโ•‘      โ–ˆโ–ˆโ•”โ•โ•โ•  โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•  โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘
 โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘ โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ•‘
 โ•šโ•โ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•โ•โ•šโ•โ•  โ•šโ•โ•โ•šโ•โ•โ•โ•โ•โ•  โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•โ•โ•šโ•โ•  โ•šโ•โ•โ•โ•

LeadGen โ€” Autonomous Multi-Tenant Infrastructure & DDD Architecture

Autonomous Multi-Tenant Website Builder & Infrastructure Deployment Pipeline

๐Ÿ‡บ๐Ÿ‡ธ English โ€ข ๐Ÿ‡จ๐Ÿ‡ณ ไธญๆ–‡ๆ–‡ๆกฃ


License: MIT Python Version Next.js OpenAI Neon Postgres Vercel API GoDaddy DNS Build Status


๐Ÿ’ก What is LeadGen?

LeadGen is a zero-friction, fully autonomous multi-tenant website builder and cloud deployment orchestration system. It bridges the gap between merchant lead discovery, LLM-powered Generative UI synthesis, dynamic Vercel custom domain mounting, and automated GoDaddy DNS record injectionโ€”achieving 100% closed-loop execution without human intervention.

๐Ÿš€ Zero Rigid Templates: LeadGen dynamically synthesizes bespoke CSS color tokens (primary, secondary, accent), typography, and component variants (bento-hero, price-list-table, bento-masonry) for every single merchant based on real business context and industry domain patterns!


โšก Core Key Features

๐Ÿค– 1. Multi-Agent Orchestration Pipeline

  • Lead Discovery & Scraping: Automatic Google Maps enrichment for ratings, reviews, opening hours, and contact details.
  • LLM Design Synthesizer: Generates localized, bilingual (DE/FR) JSON schemas matching Site_Config.md.
  • Autonomous DNS & Hosting: Automated Vercel domain mounting and GoDaddy DNS injection.

๐ŸŽจ 2. Generative UI Architecture

  • No Hardcoded Templates: Inspired by v0 and Webstudio, layouts and visual styles (bento-modern, editorial, luxury-minimal, neo-artisan) are synthesized at runtime.
  • Dynamic Variant Rendering: Components morph between Bento Grid, Minimalist Luxury, and Swiss Menu/Price Tables based on site configs.

๐Ÿ›๏ธ 3. Domain-Driven Database (DDD)

  • Strict 4-Table Relational Schema: Decoupled Neon Postgres architecture (leads, lead_enrichments, site_configs, deployments).
  • Unified Analytical View: v_leads_full for instant state aggregation and zero-latency querying.

๐ŸŒ 4. Bulletproof Infrastructure Loop

  • Vercel API Integration: Custom domain mounting with real-time verification status retrieval (mounted / pending).
  • GoDaddy Automated DNS: Injects Vercel TXT ownership tokens (vc-domain-verify=...) and specialized CNAME targets (4486e1c3ac91a3bb.vercel-dns-017.com).

๐Ÿ› ๏ธ Architecture & Workflow

graph TD
    A[๐Ÿ” Merchant Discovery / Scraping] -->|Scraped Metadata & Reviews| B(๐Ÿค– Lead Enrichment Agent)
    B -->|Structured Lead Object| C(๐ŸŽจ AI Design Synthesizer / Website Builder)
    C -->|Site Config JSON Schema| D[(๐Ÿ—„๏ธ Neon PostgreSQL DDD Schema)]
    D -->|Deploy Lead Credentials| E(๐Ÿš€ Vercel Agent)
    E -->|Request Domain Mount & Fetch TXT Token| F[โ˜๏ธ Vercel Custom Domains API]
    F -->|Return TXT Verification Token & CNAME| G(๐ŸŒ GoDaddy DNS Agent)
    G -->|Inject TXT & Specialized CNAME Node| H[๐Ÿ“ก GoDaddy DNS API]
    H -->|Trigger Verification Check| E
    E -->|Domain Fully Active & Live| I[โœ… 100% Live Merchant Site]
Loading

๐Ÿ“ฆ Database Schema (DDD Architecture)

The system enforces a decoupled Domain-Driven Design schema across Neon Serverless PostgreSQL:

 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
 โ”‚      leads      โ”‚โ”€โ”€โ”€โ”€โ”€โ”€<โ”‚ lead_enrichmentsโ”‚โ”€โ”€โ”€โ”€โ”€โ”€<โ”‚  site_configs   โ”‚โ”€โ”€โ”€โ”€โ”€โ”€<โ”‚   deployments   โ”‚
 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
 โ”‚ id (PK)         โ”‚       โ”‚ id (PK)         โ”‚       โ”‚ id (PK)         โ”‚       โ”‚ id (PK)         โ”‚
 โ”‚ name, city      โ”‚       โ”‚ lead_id (FK)    โ”‚       โ”‚ lead_id (FK)    โ”‚       โ”‚ lead_id (FK)    โ”‚
 โ”‚ category, phone โ”‚       โ”‚ google_rating   โ”‚       โ”‚ site_config JSONโ”‚       โ”‚ subdomain       โ”‚
 โ”‚ subdomain       โ”‚       โ”‚ reviews_json    โ”‚       โ”‚ admin_pass      โ”‚       โ”‚ cname_target    โ”‚
 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ› ๏ธ Production Toolkits & CLI Scripts

CLI Command Description Status / Purpose
python tools/provision_single_merchant.py <subdomain> 1-by-1 Merchant Provisioner: Runs scraping, LLM UI synthesis, Vercel mount, and GoDaddy DNS injection synchronously. ๐ŸŸข Production Ready
python tools/rebuild_all_site_configs.py Batch UI Design Refresh: Executes LLM Generative UI Engine across all 14 database merchants. ๐ŸŽจ Generative Synthesizer
python tools/deploy_all_merchants_bulletproof.py Full Fleet DNS Deployment: Bulk mounts Vercel subdomains and configures GoDaddy DNS records idempotently. ๐Ÿš€ Fleet Automation
python tools/inspect_vercel_real_domain.py <subdomain> Vercel Payload Auditor: Inspects Vercel custom domain configuration & authoritative CNAME target nodes. ๐Ÿ” Diagnostics Tool

๐Ÿ“ Directory Layout

swiss-leadgen/
โ”œโ”€โ”€ agents/
โ”‚   โ”œโ”€โ”€ website_builder.py     # LLM Generative UI & Design Synthesizer Engine
โ”‚   โ”œโ”€โ”€ vercel_agent.py        # Vercel Custom Domain Mounting & Verification Agent
โ”‚   โ”œโ”€โ”€ godaddy_agent.py       # GoDaddy Auto DNS Record Injector Agent
โ”‚   โ”œโ”€โ”€ lead_enrichment.py     # Google Maps Ratings & Reviews Scraper Agent
โ”‚   โ””โ”€โ”€ deploy_agent.py        # Pipeline Orchestrator & Multi-Agent Coordinator
โ”œโ”€โ”€ multi_tenant_site/         # Next.js 14 Multi-Tenant App Router Platform
โ”‚   โ””โ”€โ”€ src/app/site/[domain]/
โ”‚       โ””โ”€โ”€ TenantClientView.tsx # Dynamic Component Renderer (Generative UI)
โ”œโ”€โ”€ docs/
โ”‚   โ”œโ”€โ”€ Workflow.md            # Multi-Tenant Deployment Workflow Standard
โ”‚   โ””โ”€โ”€ Site_Config.md         # Standard Site Config JSON Schema Spec
โ”œโ”€โ”€ tools/                     # Standardized CLI Automation Scripts
โ”œโ”€โ”€ crm.py                     # Neon PostgreSQL Database Access Layer (DDD)
โ””โ”€โ”€ requirements.txt           # Python Dependencies

โšก Quick Start

1. Environment Setup

Copy .env.example to .env and fill in your API credentials:

cp .env.example .env
DATABASE_URL=postgresql://user:password@neon-db-url/neondb?sslmode=require
OPENAI_API_KEY=sk-proj-...
VERCEL_TOKEN=...
VERCEL_PROJECT_ID=...
VERCEL_TEAM_ID=...
GODADDY_API_KEY=...
GODADDY_API_SECRET=...

2. Install Dependencies & Build Frontend

# Install Python dependencies
pip install -r requirements.txt

# Build Next.js Multi-Tenant Application
cd multi_tenant_site && npm install && npm run build && cd ..

3. Provision a Merchant End-to-End

python tools/provision_single_merchant.py backerei-muller.tubban.com

๐Ÿ“– Key Documentation References


๐Ÿค Contributing & License

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

Distributed under the MIT License. See LICENSE for more information.

Built with โค๏ธ by the LeadGen Engineering Team. Powered by Next.js, OpenAI, Neon PostgreSQL, Vercel, and GoDaddy.

About

๐Ÿš€ ๅคš็งŸๆˆทๅ…จ่‡ชๅŠจๅŒ–้—ญ็Žฏๅปบ็ซ™ไธŽไบ‘ๅŸบ็ก€่ฎพๆ–ฝ็”Ÿๆˆๅผ UI ็ณป็ปŸ | Automated Multi-Tenant Generative UI & Infrastructure Delivery Engine (Next.js 14, OpenAI, Neon DB, Vercel & GoDaddy APIs)

Resources

Stars

112 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages