Documentation

Muon Site Engine

Build ultra-premium, enterprise-grade SaaS and corporate websites using a 100% JSON-driven headless architecture. No React or CSS knowledge required.

Zero-Code Workflow

This package allows you to control the entire structure, content, and design of a production-ready website simply by editing two JSON files.


Installation & Setup

To generate a new website, you must have Node.js installed and authenticate with the GitHub Packages Registry.

1 Authenticate with GitHub Packages

To ensure that you can use the Muon Site Engine CLI generator from anywhere on your machine, you must authenticate globally. Follow these steps:

  1. Generate a Personal Access Token (PAT) with read:packages permissions on GitHub.
  2. Open your terminal (Terminal on Mac, or Command Prompt/PowerShell on Windows) and run the following commands to authenticate globally:
    npm config set //npm.pkg.github.com/:_authToken=YOUR_GITHUB_PAT_HERE
    npm config set @leoc1992:registry=https://npm.pkg.github.com/

Note: The above commands work seamlessly on both Mac and Windows. They automatically generate a global config file in your user directory:

  • Mac / Linux: Creates ~/.npmrc
  • Windows: Creates %USERPROFILE%\.npmrc (e.g., C:\Users\YourName\.npmrc)

This authenticates your entire system, allowing you to run the CLI from anywhere.

2 Scaffold your Website

Run the automated CLI tool to generate a fresh website project instantly:

npx @leoc1992/site-engine my-awesome-site
cd my-awesome-site
npm install
npm run dev

Your website is now running at http://localhost:5173


AI Generation Usage

The Muon Site Engine was designed from the ground up to be fully operable by AI agents like ChatGPT, Claude, and Cursor. Because the entire UI is controlled via JSON schemas, you can prompt an AI to instantly generate a highly polished, multi-page website in seconds without writing a single line of code.

Sample Prompt: Software Development Agency

Copy and paste this prompt into an AI coding assistant (like Cursor or Claude) inside your scaffolded project folder to generate an enterprise-grade corporate website:

I am building a website using the Muon Site Engine (a 100% JSON-driven React platform). I have scaffolded the project, which contains an `AI_INSTRUCTIONS.md` and `MUON_COMPONENTS_DOCS.html` file in the root directory.

**Your Task:**
1. READ the `AI_INSTRUCTIONS.md` and `MUON_COMPONENTS_DOCS.html` files to understand the engine architecture and available component schemas.
2. Rewrite `src/config.json` and `public/theme.json` to build a highly professional, enterprise-grade, multi-page corporate website for a Software Development Agency.

**My Business Details:**
- **Name:** Nexus Development Group
- **Vibe:** Ultra-modern, dark mode, sleek, and highly polished (Apple-like aesthetics).
- **Pages Required:**
  - Home: Cinematic hero (use background video or spline), features, testimonials, bento grid of services, and CTA.
  - About: Timeline of company history, team members, and stats.
  - Pricing: Comparison table of engagement models (Staff Augmentation vs Dedicated Team).
  - Contact: Map block, FAQ, and a Contact form.

**Requirements:**
- Do NOT write React/CSS code. Only edit the JSON files.
- Write high-converting, professional copywriting.
- Use advanced theming in `theme.json` (glassmorphism cards, custom typography).
- Enable Google Analytics tracking (Measurement ID: G-XXXXXXXXXX) in the SEO block.
- Use the `mega` menu for the header navigation.

Tips & Tricks for Highly Effective Prompts

To get the best results when generating sites with AI, ensure you include these crucial elements in your prompts:

  • 1.
    MANDATORY - Point to the Docs: You must tell the AI to read MUON_COMPONENTS_DOCS.html and AI_INSTRUCTIONS.md. If you don't, the AI will hallucinate a random JSON structure that the engine cannot render.
  • 2.
    Specify the Vibe & Theme: Instruct the AI to heavily modify theme.json. Tell it to use "frosted glassmorphism", "dark mode", or "vibrant gradients" to ensure it leverages the engine's design tokens.
  • 3.
    Demand Rich Components: The AI defaults to simple blocks (Hero, Features). Explicitly ask it to use advanced components like bento grids, 3D spline backgrounds, comparison tables, or marquee tickers to get an ultra-premium feel.
  • 4.
    Mention Multi-Page Routing: If you want more than a landing page, explicitly tell the AI to use the pages object (for Multi-Page routing) instead of just the root sections array.

File Structure

Once scaffolded, your project is highly minimized. You only need to care about the two highlighted JSON files.

my-awesome-site/
├── package.json
├── index.html
├── vite.config.js
├── public/
│   └── theme.json       <-- Edit this for Colors, Fonts, & Design
└── src/
    ├── config.json      <-- Edit this for Content & Layouts
    └── main.jsx         <-- Engine bootstrap (Do not edit)

Understanding config.json

The config.json file controls what appears on your website. It is divided into two main parts: the site metadata and the sections array.

{
  "site": {
    "title": "My Company",
    "seo": {
      "title": "My Company | Premium Services",
      "description": "We deliver excellence.",
      "keywords": ["saas", "enterprise"]
    }
  },
  "sections": [
    // Your website structural blocks go here
  ]
}

Multi-Page Routing

The engine natively supports React Router. If you want to build a multi-page website (instead of a Single-Page App), you can replace the sections array with a pages object mapping to different routes.

{
  "site": {
    "title": "My Company",
  },
  "pages": {
    "/": {
      "seo": { "title": "Home" },
      "sections": [
        { "id": "hero-1", "type": "hero", "content": {...} }
      ]
    },
    "/pricing": {
      "seo": { "title": "Pricing" },
      "sections": [
        { "id": "pricing-1", "type": "pricing", "content": {...} }
      ]
    }
  }
}

Note: You can link between these pages seamlessly in the Header's navLinks or CTA button href properties.

Managing Sections

The sections array in config.json dictates the exact visual order of blocks on your webpage. The engine renders this array sequentially.

Add

Insert a new JSON object into the array. Provide an id, type, and content.

Remove

Delete the JSON object entirely from the array. The component is instantly removed.

Reorder

Move the JSON object up or down within the array to change its physical position on the page.

"sections": [
  {
    "id": "header-1",
    "type": "header",
    "layout": "glass",
    "content": { ... }
  },
  {
    "id": "hero-1",
    "type": "hero",
    "layout": "split",
    "content": { ... }
  }
]

Theming & Design (theme.json)

The theme.json file acts as the universal design system for the website. The engine uses this to dynamically generate CSS variables and a custom Material UI theme.

1. Auto Dark & Light Mode

You can set the theme mode to "light", "dark", or "system". If set to system, the website will natively sync with the user's OS preference.

{
  "theme": {
    "mode": "system",
    "colors": {
      "primary": "#4f46e5",
      "secondary": "#ec4899"
    }
  }
}

2. Custom Font Uploads

You can bypass Google Fonts entirely by hosting your own fonts in the public/fonts/ directory and registering them in fontFaces.

{
  "typography": {
    "fontFaces": [
      {
        "fontFamily": "ClashDisplay",
        "url": "/fonts/ClashDisplay-Bold.woff2",
        "format": "woff2",
        "weight": 700
      }
    ],
    "fontFamilyHeading": "ClashDisplay, sans-serif"
  }
}

3. Glassmorphism Effects

You can switch the global card design from solid cards to frosted glass by using the glass variant.

{
  "shape": {
    "cardVariant": "glass",
    "glassBlur": "16px",
    "glassOpacity": 0.15
  }
}

4. Micro-Interactions

Enable physics-based interactions like magnetic buttons and a custom trailing cursor.

{
  "interactions": {
    "customCursor": true,
    "magneticButtons": true
  }
}

Component Reference

Every object in the sections array must specify a type. Below is the documentation for all available types and their configurable properties.

Header

"type": "header"

The top navigation bar. Includes a logo, navigation links, and a Call-To-Action (CTA) button. Automatically handles mobile responsiveness with a hamburger menu.

AI Context: Include exactly ONE header at the very top of the sections array for site navigation.

Available Layouts: "default", "sticky", "glass", "centered"

Overrides: Explicitly set "background": "var(--token-color-paper)" or a hex code to override transparency.

{
  "id": "main-header",
  "type": "header",
  "layout": "glass",
  "background": "var(--token-color-paper)",
  "content": {
    "logoText": "MyBrand",
    "logoImage": "/logo.png",
    "navLinks": [
      { "label": "Features", "href": "#features" },
      { "label": "Pricing", "href": "#pricing" }
    ],
    "ctaButton": { "label": "Login", "href": "/login", "variant": "outlined" }
  }
}

Hero

"type": "hero"

The main landing section at the top of a webpage. High impact, designed to grab attention immediately.

AI Context: Use this as the very first section of the homepage (after the header) to introduce the core value proposition and drive a primary call to action.

Available Layouts: "split" (Text left, image right), "center" (Text centered)

Backgrounds: "mesh", "grid", or color tokens.

{
  "id": "hero-1",
  "type": "hero",
  "layout": "split",
  "background": "mesh",
  "content": {
    "badge": "New Release 2.0",
    "title": "Build Faster",
    "subtitle": "The ultimate tool for developers.",
    "primaryCta": { "label": "Start Free Trial", "href": "#pricing" },
    "secondaryCta": { "label": "Read Docs", "href": "#docs" },
    "image": "https://images.unsplash.com/photo-xxx"
  }
}

About

"type": "about"

Introduce your company, mission, or vision.

AI Context: Use this section when you need a split layout (image on one side, text/mission/vision on the other) with optional statistics.

Available Layouts: "split", "default"

{
  "id": "about-1",
  "type": "about",
  "layout": "split",
  "content": {
    "title": "Our Mission",
    "description": "We are dedicated to building the future of the web.",
    "image": "https://images.unsplash.com/photo-xxx",
    "stats": [
      { "value": "10+", "label": "Years Experience" },
      { "value": "500+", "label": "Clients" }
    ]
  }
}

Features

"type": "features"

Displays a list of product features, value propositions, or services.

AI Context: Use this extensively to highlight product capabilities in a grid of 3 or 4 columns. It's the bread-and-butter of SaaS landing pages.

Available Layouts: "grid" (Standard cards), "bento" (Asymmetrical grid), "tabs" (Interactive left/right)

{
  "id": "features-1",
  "type": "features",
  "layout": "bento",
  "content": {
    "title": "Why Choose Us",
    "subtitle": "Everything you need to succeed.",
    "items": [
      {
        "icon": "cloud", // Lucide-react icon name
        "title": "Cloud Sync",
        "description": "Always backed up securely."
      }
    ]
  }
}

Clients

"type": "clients"

Display logos of companies you have worked with to establish trust.

AI Context: Place this immediately after the hero section (or bottom of page) to provide social proof.

Available Layouts: "grid", "marquee" (infinite horizontal scroll)

{
  "id": "clients-1",
  "type": "clients",
  "layout": "marquee",
  "content": {
    "title": "Trusted by industry leaders",
    "logos": [
      { "name": "Company A", "image": "/logo-a.png" },
      { "name": "Company B", "image": "/logo-b.png" }
    ]
  }
}

Pricing

"type": "pricing"

Displays subscription tiers or service packages.

AI Context: Use this to display standard 3-tier SaaS pricing models.

Available Layouts: "cards"

{
  "id": "pricing-1",
  "type": "pricing",
  "layout": "cards",
  "content": {
    "title": "Simple Pricing",
    "plans": [
      {
        "name": "Pro",
        "price": "$29",
        "period": "/mo",
        "popular": true, // Elevates and highlights this card
        "features": ["Feature A", "Feature B"],
        "cta": "Buy Now"
      }
    ]
  }
}

Stats

"type": "stats"

Highlight numerical achievements, user counts, or operational metrics.

AI Context: Great for building credibility right above the footer or below the features section.

Available Layouts: "grid"

{
  "id": "stats-1",
  "type": "stats",
  "layout": "grid",
  "content": {
    "title": "By the numbers",
    "items": [
      { "value": "10M+", "label": "Active Users" },
      { "value": "99.9%", "label": "Uptime" }
    ]
  }
}

Team

"type": "team"

Introduce your team members, founders, or board of directors.

AI Context: Standard grid layout for an "About Us" page or agency site to show the faces behind the company.

Available Layouts: "grid"

{
  "id": "team-1",
  "type": "team",
  "layout": "grid",
  "content": {
    "title": "Meet the Team",
    "members": [
      {
        "name": "Alice Smith",
        "role": "CEO",
        "image": "https://images.unsplash.com/photo-xxx",
        "social": { "twitter": "#", "linkedin": "#" }
      }
    ]
  }
}

Testimonials

"type": "testimonials"

Social proof and client reviews.

AI Context: Include this to build trust. Marquee layout is best for SaaS, grid is best for agencies.

Available Layouts: "grid", "carousel", "marquee"

{
  "id": "testimonials-1",
  "type": "testimonials",
  "layout": "marquee",
  "content": {
    "title": "Loved by thousands",
    "items": [
      {
        "quote": "This product changed my life completely.",
        "author": "Jane Doe",
        "role": "CEO, Startup"
      }
    ]
  }
}

Timeline

"type": "timeline"

Display a chronological company history, roadmap, or process steps.

AI Context: Use for "How it works" steps (1, 2, 3) or company history.

Available Layouts: "vertical"

{
  "id": "timeline-1",
  "type": "timeline",
  "layout": "vertical",
  "content": {
    "title": "Our Journey",
    "events": [
      {
        "year": "2024",
        "title": "Company Founded",
        "description": "Started in a garage."
      }
    ]
  }
}

Articles

"type": "articles"

Display a blog feed, recent news articles, or press releases.

AI Context: Great for adding a "Latest News" section near the bottom of a homepage.

Available Layouts: "grid", "list"

{
  "id": "articles-1",
  "type": "articles",
  "layout": "grid",
  "content": {
    "title": "Latest News",
    "posts": [
      {
        "title": "Understanding the Cloud",
        "excerpt": "A brief guide to...",
        "date": "Oct 12, 2026",
        "image": "https://images.unsplash.com/...",
        "link": "/blog/cloud"
      }
    ]
  }
}

FAQ

"type": "faq"

Frequently Asked Questions using accessible, expandable accordions.

AI Context: Include this to address common objections before a CTA.

Available Layouts: "default" (Stacked list), "grid" (2-column layout)

{
  "id": "faq-1",
  "type": "faq",
  "layout": "default",
  "content": {
    "title": "Common Questions",
    "items": [
      {
        "question": "How do I sign up?",
        "answer": "Click the button in the header."
      }
    ]
  }
}

CTA (Call To Action)

"type": "cta"

High-conversion block intended to drive users to sign up or contact sales, typically placed just before the footer.

AI Context: The ultimate conversion point. Use right above the footer or Newsletter block.

Available Layouts: "default", "split"

{
  "id": "cta-1",
  "type": "cta",
  "layout": "default",
  "background": "gradient",
  "content": {
    "title": "Ready to get started?",
    "subtitle": "Join thousands of users today.",
    "primaryCta": { "label": "Start Trial", "href": "/signup" }
  }
}

Newsletter

"type": "newsletter"

Email capture form block for lead generation.

AI Context: Use this block if the user specifically mentions lead capture, subscriptions, or mailing lists.

Available Layouts: "center"

{
  "id": "newsletter-1",
  "type": "newsletter",
  "layout": "center",
  "content": {
    "title": "Subscribe to our Newsletter",
    "subtitle": "Get weekly updates and tips.",
    "buttonLabel": "Subscribe"
  }
}

Contact

"type": "contact"

Displays contact information and a functional contact form UI.

AI Context: Typically used on a dedicated /contact page.

Available Layouts: "split", "center"

{
  "id": "contact-1",
  "type": "contact",
  "layout": "split",
  "content": {
    "title": "Get in Touch",
    "email": "[email protected]",
    "phone": "+1 234 567 8900",
    "address": "123 Main St, City"
  }
}

Bento Grids

"type": "bento"

Create asymmetrical "Apple-style" layouts using colSpan and rowSpan.

AI Context: Extremely popular modern design trend. Use this instead of standard grids if the user asks for a "modern Apple-like feel".

{
  "id": "bento-1",
  "type": "bento",
  "layout": { "columns": 3 },
  "content": {
    "blocks": [
      { "title": "Large Feature", "colSpan": 2, "rowSpan": 2 },
      { "title": "Small Stat", "colSpan": 1, "rowSpan": 1 }
    ]
  }
}

Comparison Tables

"type": "comparison"

Build SaaS feature matrices (Us vs Them, Free vs Pro) with sticky headers.

AI Context: Use this below the Pricing section for deep-dive feature comparisons.

{
  "id": "comparison-1",
  "type": "comparison",
  "content": {
    "columns": [{ "title": "Feature" }, { "title": "Pro" }],
    "rows": [
      { "label": "API Access", "values": [true] }
    ]
  }
}

Content Tabs

"type": "tabs"

Interactive switchers for grouping use-cases without long scrolling.

AI Context: Excellent for pages with "Solutions for X, Y, Z" to avoid overwhelming the user.

{
  "id": "tabs-1",
  "type": "tabs",
  "content": {
    "tabs": [
      { "label": "Developers", "title": "Built for Code", "image": "/dev.jpg" },
      { "label": "Designers", "title": "Pixel Perfect", "image": "/design.jpg" }
    ]
  }
}

Interactive Maps

"type": "map"

Easily embed Google Maps or OpenStreetMap iframes in a styled glass container.

AI Context: Use on local business websites or Contact pages to show physical locations.

{
  "id": "map-1",
  "type": "map",
  "content": {
    "title": "Visit Us",
    "embedUrl": "https://www.google.com/maps/embed?..."
  }
}

Infinite Marquees

"type": "marquee"

Seamless looping tickers for logos, keywords, or stock prices.

AI Context: Use this as a dynamic divider between large sections, or for client logos.

{
  "id": "marquee-1",
  "type": "marquee",
  "content": {
    "speed": "fast",
    "direction": "left",
    "items": [
      { "image": "/logo1.png" },
      { "text": "BREAKING NEWS" }
    ]
  }
}

3D WebGL (Spline)

"type": "spline"

Embed interactive 3D Spline experiences alongside your text.

AI Context: Add a massive wow factor to landing pages. Use this in a split layout next to a Hero or Feature block.

{
  "id": "spline-1",
  "type": "spline",
  "content": {
    "title": "Interactive 3D",
    "splineUrl": "https://my.spline.design/xxxx/"
  }
}

🎬 Global Video Modals

Any button in the entire engine can trigger a cinematic, full-screen YouTube Lightbox Modal without writing a single line of JavaScript. Just set the button's href to #video-YOUTUBE_ID.

{
  "label": "Watch Trailer",
  "href": "#video-dQw4w9WgXcQ"
}

Forms & Integrations

The contact and newsletter components support out-of-the-box data capture via Web3Forms or generic webhooks (like Zapier, Make, or your own custom API).

1. Web3Forms (Email Delivery)

Web3Forms allows you to receive form submissions directly to your email without any backend server. Simply get a free Access Key from their website.

{
  "type": "contact",
  "content": {
    "title": "Contact Us",
    "formIntegration": {
      "provider": "web3forms",
      "accessKey": "YOUR_WEB3FORMS_ACCESS_KEY"
    }
  }
}

2. Generic Webhooks (Zapier / Custom APIs)

If you want to send data to Zapier, Make.com, or your own database, use the webhook provider. The engine will send a POST request with the JSON payload.

{
  "type": "newsletter",
  "content": {
    "title": "Subscribe",
    "formIntegration": {
      "provider": "webhook",
      "endpoint": "https://hooks.zapier.com/hooks/catch/123456/"
    }
  }
}

Rich Media Backgrounds

Any major section (like hero or features) supports a backgroundMedia object to inject looping videos, interactive 3D Spline scenes, or WebGL shaders natively behind your content.

1. Cinematic Video Backgrounds

Set the type to video to autoplay an mp4 or webm silently behind the text.

{
  "type": "hero",
  "backgroundMedia": {
    "type": "video",
    "url": "/assets/my-cinematic-bg.mp4",
    "opacity": 0.5,
    "overlayColor": "#000000"
  },
  "content": {
    "title": "Welcome to the Future"
  }
}

2. Interactive 3D (Spline & WebGL)

Set the type to iframe to seamlessly embed a 3D scene from Spline. The engine automatically handles pointer-events so it doesn't block scrolling.

{
  "type": "hero",
  "backgroundMedia": {
    "type": "iframe",
    "url": "https://my.spline.design/your-scene-url/",
    "opacity": 1.0,
    "overlayColor": "transparent"
  }
}

3. Lottie Animations

Set the type to lottie to natively parse and play lightweight JSON vector animations.

{
  "type": "hero",
  "backgroundMedia": {
    "type": "lottie",
    "url": "/assets/hero-animation.json",
    "opacity": 0.8
  }
}

4. Parallax Scrolling Depth

You can add "parallax": true to any background media to instantly enable hardware-accelerated scroll depth effects powered by Framer Motion.

{
  "type": "features",
  "backgroundMedia": {
    "type": "video",
    "url": "/assets/stars-bg.mp4",
    "parallax": true
  }
}


Architecture & SEO

The engine goes beyond UI components, providing deep infrastructural layers for SEO, Internationalization, and Next.js support.

1. i18n Multi-Language

Define a global i18n dictionary in your config. Use the {{t:key}} syntax in any text field to dynamically interpolate translations based on the active locale.

{
  "i18n": {
    "defaultLocale": "en",
    "translations": {
      "en": { "hero_title": "Welcome" },
      "fr": { "hero_title": "Bienvenue" }
    }
  },
  "sections": [
    {
      "type": "hero",
      "content": { "title": "{{t:hero_title}}" }
    }
  ]
}

2. Dynamic OpenGraph & SEO

Define an seo block in your config. The engine will dynamically inject `<title>` and `<meta>` tags into the document head for social sharing, as well as auto-inject Google Analytics if you provide a googleTagId.

AI Context: ALWAYS proactively ask the user if they want Google Analytics. If yes, instruct them to provide their Measurement ID (G-XXXX) and inject it here.

{
  "seo": {
    "title": "Muon Site Engine",
    "description": "The best platform.",
    "ogImage": "https://mysite.com/og.jpg",
    "googleTagId": "G-XXXXXXXXXX"
  }
}

3. A/B Testing Engine

Run split tests without external tools. Define abTests and the engine will roll a weighted dice, save the cohort to localStorage, and patch the JSON config on the fly.

{
  "abTests": {
    "hero_cta": {
      "weights": [50, 50],
      "variants": [
        { "sections": [ { "type": "hero", "content": { "title": "Buy Now" } } ] },
        { "sections": [ { "type": "hero", "content": { "title": "Start Free" } } ] }
      ]
    }
  }
}

4. Next.js Adapter

Building a Next.js App Router project? We export a dedicated NextEngineProvider that uses the "use client" directive to safely wrap the engine and bypass SSR hydration mismatches.


Future Enhancements Coming Soon

We are constantly evolving the Muon Site Engine to be the most powerful, highly-customizable JSON-driven platform on the web. Below is our comprehensive roadmap for upcoming features.

CMS Integration

  • Contentful/Sanity Connectors: Direct fetch support for headless CMS content.
  • Blog Engines: Markdown/MDX parser integration for long-form content.

E-Commerce Ready

  • Stripe Integration: Native buy buttons and pricing table checkout links.
  • Product Grids: Specialized components for displaying SKUs, prices, and reviews.
  • Slide-Out Cart: Global context cart drawer for multi-page shopping.