CoddexaBUILD

AI-Powered Websites · 6-Phase Pipeline · Live in Minutes

◈ CoddexaBUILD — Site Factory V3 Pipeline
Entry Point
Business Intake Submitted
Boss completes the form and clicks BUILD. A job is created instantly with a unique ID. Pipeline starts in background.
Input Fields
business_name * subdomain * niche / industry address / city language reference_site (URL) phone description features[ ] checkboxes
Job Created
job_id (hex 8 chars) status: running intake.json saved to disk
Phase A Reasoning Agent — Business Intelligence phase_id: reasoning
Step 1 — Reference Fetch
HTTP Download
Firecrawl / raw HTTP
Downloads reference site HTML. Timeout 10s. Extracts first 3000 chars of text content for style context.
Output
reference_text (3000 chars)
Step 2 — Business Analysis
DeepSeek V3 — Structured Inference
deepseek-chat
Analyzes business context against reference site style. Infers voice, location metadata, niche type, and complete build directives. Returns structured JSON.
Output → intake_structured.json
voice: name, tagline, tone location: city, country, postcode niche_meta: type, schema_org audit_priorities: platforms[ ] build_directives: structure, features, style, color_mood
Gate 1 Boss Reviews Reasoning Output status: waiting_approval · timeout: 30 min
Human Approval Checkpoint
Review: Business Voice & Build Directives
Boss reviews the inferred business profile. Can edit critical fields (tagline, tone, color mood, site structure) and trigger re-inference. Pipeline is paused until approval.
Actions
POST /approve-reasoning → pipeline continues POST /edit-reasoning → re-runs DeepSeek with corrections POST /cancel → job cancelled
Phase B Deep Research — Business Online Presence phase_id: research
Research Agent
Discovery — Contacts, Socials, Reviews
deep_research.py
Discovers the business's online footprint: Google Business listing, social media profiles, existing website URL, sample reviews. Builds the scrape target list for Phase C.
Output → research.json
business_name, address, phone, hours social_media: instagram, facebook website: existing URL photos_found[ ] (URLs) reviews_sample[ ] scrape_priorities[ ]
Phase C Scraping Agent — Data Collection phase_id: scraping · parallel + sequential
⟳ Parallel — 4 independent data sources
Source 1
Google Business
Apify · compass/google-maps-reviews-scraper
50 reviews. Place info: rating, hours, address. Timeout 90s.
Output
google_business.json google_reviews.json
Source 2
Instagram
Apify · apify/instagram-scraper
30 posts. Profile info, captions, image URLs. Timeout 120s.
Output
instagram.json
Source 3
Facebook Page
Apify · apify/facebook-pages-scraper
Page info, about text, cover photo. Timeout 30s.
Output
facebook.json
Source 4
Existing Website
Firecrawl API
Full markdown content + screenshot. Timeout 60s.
Output
existing_site.json
Sequential — after parallel sources complete
Photo Download
HTTP download
Downloads all discovered photo URLs. Max 30 photos. 30s timeout per photo. Skips files under 10KB. Saves to scraped/photos/.
Output
scraped/photos/ (image files) photos_manifest.json (metadata) scrape_summary.json
Phase D Compiler Agent — Content Curation & Copywriting phase_id: compile · model: Claude Opus 4.7
Compiler
Claude Opus 4.7 — Photo + Review + Copy
claude-opus-4-7 → claude-sonnet-4-6 (fallback)
Reads all scraped data. Scores photos by source weight and size. Uses LLM to select the 12 best reviews (min 4★, 80+ chars, max 24 months old, mix of types). Generates premium copy for every section of the site.
Photo Scoring
size ≥ 10KB filter google_business weight ×3 instagram weight ×2 existing_site weight ×1 top 12 selected
Output → compiled.json
selected_photos[12] + slot_suggested selected_reviews[12] + featured flag hero_tagline, hero_subtitle about_story, CTA, meta_description schema_org (Restaurant/Hotel/Store…) build_directives finalized
Gate 2 Boss Reviews Compiled Content status: waiting_approval · timeout: 2h
Human Approval Checkpoint
Review: Photos, Reviews, Copy, Build Directives
Boss reviews the compiled content on the approve.html page. Can edit compiled.json directly (swap photos, change copy, adjust directives). Approval unlocks the 60-minute build phase.
Actions
POST /approve-compile → build starts PUT /compiled → edit content, re-review POST /cancel → job cancelled
Phase E Builder Agent — Astro Site Generation phase_id: build · timeout: 60 min
Builder
Claude Code Subprocess — Astro Build
claude-code (subprocess invocation)
Invokes Claude Code as a subprocess with a 200+ line build prompt. Claude Code has full filesystem access to the site directory and executes pnpm build at the end.
4 sequential steps
1
Prepare Site Directory
Copy coddexa-base Astro template → site/. Remove dist/, node_modules/, .git. Write intake.json. Copy photos/ → site/public/images/.
2
pnpm install --frozen-lockfile
Install Astro dependencies. Timeout 2 min. Must succeed before Claude Code starts.
3
Claude Code: Design tokens → Content injection → Astro build
Extracts design tokens from reference site (colors, fonts, radius). Injects compiled.json into Astro components. Integrates photos into gallery. Builds niche-specific sections. Runs pnpm run build → dist/. Timeout 60 min.
4
Preview Deploy
Copy dist/ → /var/www/coddexa-build-preview/{job_id}/. Telegram: "Build complete, preview ready at /sfv3/jobs/{id}".
Output
site/dist/ (Astro static build) logs/{job_id}-build.log
Phase F Deployer Agent — DNS · Nginx · SSL · Lighthouse phase_id: deploy · 7 steps
7 sequential deployment steps
1
Porkbun DNS — A-record
POST to Porkbun API: create A-record {slug}.build.coddexa.media → 178.104.210.200. Skips if record already correct. Timeout 30s.
2
DNS Propagation Wait
nslookup poll loop. Max 60s. Continues even if timeout (certbot will retry).
3
Nginx HTTP Config
Write /etc/nginx/sites-available/{fqdn} (HTTP only, for certbot challenge). sudo nginx -t + reload.
4
Copy dist/ → Web Root
rsync site/dist/ → /var/www/coddexa-sites/{slug}.build/. Site is now LIVE on HTTP.
5
Certbot SSL (Let's Encrypt)
sudo certbot --nginx -d {fqdn}. Auto-updates nginx config to HTTPS redirect + SSL termination. Timeout 120s. Site is now LIVE on HTTPS.
6
Verification (4 checks)
① curl -I {url} → 200 OK? ② nslookup DNS → resolves to 178.104.210.200? ③ SSL cert file exists? ④ npx lighthouse --output json → perf / a11y / best-practices / SEO scores.
7
Telegram Notification
✅ Live URL + Lighthouse scores. Or ⚠️ with issues list. complete event pushed to SSE stream.
Output
deployment.json lighthouse.json live_url stored in job dict
Output
Site Live — https://{slug}.build.coddexa.media
Static Astro site live with SSL, custom subdomain on build.coddexa.media. Full content from scraped sources. Lighthouse verified. Telegram notification sent.
Final State
status: complete live_url: https://{slug}.build.coddexa.media ssl: true (Let's Encrypt) lighthouse.perf lighthouse.a11y lighthouse.seo completed_at timestamp all job files on disk → jobs/{id}/
Phase Agent LLM / Tool API / Binary Timeout Output File
A Reasoning DeepSeek V3 (deepseek-chat) api.deepseek.com + HTTP 30s LLM · 10s ref-fetch intake_structured.json
B Deep Research Web research search / scrape APIs variable research.json
C Scraper Apify (3 actors) + Firecrawl + HTTP api.apify.com · api.firecrawl.dev 30–120s / source scraped/ directory
D Compiler Claude Opus 4.7 → Sonnet 4.6 api.anthropic.com 120s LLM compiled.json
E Builder Claude Code (subprocess) claude binary · pnpm · astro 3600s total site/dist/
F Deployer Porkbun API + certbot + nginx + Lighthouse porkbun.com · Let's Encrypt · npx lighthouse 120s certbot · 90s lighthouse deployment.json
Gate After Phase Timeout Boss Can On Timeout
Gate 1 Phase A — Reasoning 30 min Approve · Edit fields + re-run DeepSeek · Cancel Job cancelled with error event
Gate 2 Phase D — Compile 2 hours Approve · Edit compiled.json · Cancel Job cancelled with error event
Disk · /opt/coddexa-build/jobs/{job_id}/
intake.json intake_structured.json  ← Phase A research.json  ← Phase B scraped/  ← Phase C scraped/google_business.json scraped/google_reviews.json scraped/instagram.json scraped/existing_site.json scraped/photos/ + photos_manifest.json compiled.json  ← Phase D site/ (Astro project)  ← Phase E site/intake.json site/public/images/ site/dist/ (built output) deployment.json  ← Phase F lighthouse.json  ← Phase F
DeepSeek V3
Claude / Anthropic
Apify
Firecrawl
Infrastructure (DNS · Nginx · SSL)
Approval gate / human checkpoint