SimpLABS · stage 3 of the site-build pipeline

SimpL Web Compiler / SimpLWC

Consumes a SimpLTheme export bundle and compiles it into a deployable Next.js site — real App Router + RSC, mega menus, URL-matched to the client's current site, analytics carried over, forms wired. Outputs a repo ready for Vercel (noindex until OMJCC sign-off).

SimpLCSSimpLThemeSimpLWCVercel · noindexOMJCC

Compile a bundle

POST /api/compile
legacy-url
form-provider

Compile pipeline

  1. 01
    url-matchreal

    crawls the client's current site (robots.txt → sitemap → shallow crawl), maps new routes onto its URLs, writes legacyPath + 301 redirects (→ output next.config), diff-reports unmatched legacy URLs

  2. 02
    analyticsreal

    scrapes the live site for GA4 / GTM / Search Console + Bing verification / Meta Pixel, merges with intake.tracking (bundle wins, mismatch flagged), bakes the result into the output's app/layout.tsx

  3. 03
    emit-appreal

    emits a full Next.js repo: vendors theme/, app/[[...slug]] catch-all re-renders the theme Renderer per route, generateMetadata + per-page JSON-LD, generator <meta>, noindex, fontPair → Google Fonts, redirects, analytics, build configs

  4. 04
    formsstub

    flags themes with inline home-page forms + the missing provider; site-wide form wiring is TODO (provider name TBD — Frank's call)

  5. 05
    finalizereal

    writes COMPILE_REPORT.json; with --verify runs npm install + next build inside the emitted repo, fails the pipeline if it doesn't compile

The contract

The export-bundle shape SimpLWC is built against. Source of truth — SimpLTheme's export conforms to it later.

  • docs/SIMPLWC_HANDOFF.md — the spec
  • docs/CONTRACT.md — open questions / what to reconcile
  • lib/contract/bundle.ts — TypeScript shape
  • lib/contract/schema.ts — runtime validators (zod)

CLI

Same pipeline as the panel above. Output lands in ./builds/<client>.

npm run compile -- <dir | .zip | git-url#ref> \
  [outDir] [--force] [--verify] [--legacy-url=…] [--form-provider=…]

4 of 5 stages are real — see CLAUDE.md for what's left.