Build a Modern Website in Hours with AI: V0, Copilot, LeadCMS
V0 by Vercel
GitHub Copilot
Next.js 15
Static Site Generation
AI Development

Build a Modern Website in Hours with AI: V0, Copilot, LeadCMS

Development
by LeadCMS TeamOct 27, 202517 min read

In 2025, building a professional website no longer takes weeks. With AI-assisted tools, you can create and run a modern website locally in hours. This guide documents the development workflow using nuzzl.co.uk as an example - a business website with multiple landing pages, service pages, and contact forms - built in approximately 6 hours using three AI-assisted tools that integrate effectively.

AI-Powered Site Development Stack

V0

Generates complete Next.js websites from prompts with professional design.

  • Natural language to code generation
  • Production-ready component library
  • Responsive design & accessibility
  • Instant visual feedback & iteration

GitHub Copilot

AI pair programmer that refactors code intelligently.

  • Context-aware architectural guidance
  • Intelligent content-code separation
  • Pattern recognition & best practices
  • Real-time refactoring assistance

LeadCMS

Headless CMS with developer-first approach.

  • API-first headless architecture
  • Developer-friendly SDK integration
  • Content versioning & collaboration
  • Build-time content synchronization

Step 1: V0 Site Generation

Generate your initial website foundation using V0's AI-powered interface creation. This phase establishes the visual design and component structure.

Generate Your Site Foundation with V0

Start by crafting a detailed prompt that describes your website vision to V0. The key is being specific about functionality, branding, and structure while letting V0 handle the technical implementation.

Example Prompt Used for Nuzzl:

"I need a new website for nuzzl.co.uk, the logo is attached. We should build a site using the logo colours. The website should make reference to the system we offer at www.tagpoint.co.uk, the odoo erp development and implementations, implementation and hosting services for leadcms.ai and we also provide outsourcing in the same way as www.duklas.com.

Nuzzl is based in the south west of england in a city called Plymouth. Many years of experience developing and implementing systems. We have a strong product portfolio backed by teams in Denmark and Sri Lanka."

Pro Tip: The final design was ready after just 3 refinement prompts. Start with a comprehensive initial prompt, then use follow-up prompts for specific adjustments rather than complete redesigns.

V0 Generated Assets:

  • Complete Next.js 15 project structure with proper routing
  • Responsive layout components (header, footer, navigation)
  • Hero section with compelling call-to-action elements
  • Service showcase cards with integrated icons
  • Contact form components with validation
  • Professional Tailwind CSS styling system
  • Production-ready shadcn/ui component library integration

Project Export Process:

  1. Review the generated design in V0's preview interface
  2. Click "Export" button in the V0 interface
  3. Select "Download as ZIP" for full project export
  4. Extract the ZIP file to your development directory

Reference: View the complete Nuzzl V0 project

Initialize Development Environment

Set up your local development environment and verify that all V0-generated components work correctly before adding LeadCMS integration.

# Extract and navigate to project directory
unzip nuzzl-website.zip
cd nuzzl-website

# Install all project dependencies
pnpm install

# Start development server
pnpm run dev

Environment Setup: Open the project in VS Code to activate GitHub Copilot integration. Copilot will automatically start providing intelligent suggestions based on your project context.

At this stage, you should have a fully functional website running locally at http://localhost:3000. Verify that all components render correctly and the responsive design works across different screen sizes.

Step 2: LeadCMS Integration

Transform your V0-generated static site into a content-managed architecture by integrating the LeadCMS SDK and separating content from presentation.

Prerequisites: This article assumes you have LeadCMS running locally or on a server. If you don't have LeadCMS set up yet, follow the Installation Guide first.

Integrate LeadCMS SDK

Transform your static V0-generated site into a dynamic, content-managed website by integrating the LeadCMS SDK. This step separates content from code, enabling non-technical team members to manage website content.

Install the LeadCMS SDK:

pnpm add -D @leadcms/sdk

Configure Environment Variables:

Create a .env file in your project root with your LeadCMS instance credentials:

# LeadCMS Configuration
NEXT_PUBLIC_LEADCMS_URL=https://admin.nuzzl.co.uk
LEADCMS_API_KEY=your-secret-api-key-here
LEADCMS_DEFAULT_LANGUAGE=en
Security Best Practice

Never expose API keys publicly. The LEADCMS_API_KEY should NOT have the NEXT_PUBLIC_ prefix to keep it secure and only available server-side.

Add LeadCMS Automation Scripts:

Update your package.json to include automated content fetching:

Update your package.json scripts section:

{
  "scripts": {
    "fetch": "leadcms fetch",
    "prebuild": "leadcms fetch && leadcms generate-env",
    "predev": "pnpm run prebuild",
    "build": "next build",
    "dev": "next dev"
  }
}
Automated Workflow

The prebuild and predev scripts ensure content is automatically fetched before every build or development session, keeping your local content synchronized with the CMS.

Step 3: AI-Enhanced Refactoring with Copilot

Use GitHub Copilot with our comprehensive instructions file to intelligently refactor your codebase and implement content separation patterns.

Setup AI-Enhanced Development with Copilot Instructions

Download and use our comprehensive Copilot instructions file to enable context-aware AI assistance throughout your development process.

The Copilot Instructions Strategy:

Instead of explaining best practices in every prompt, use a Copilot instructions file that GitHub Copilot automatically reads and uses as context. This approach transforms your AI development workflow.

Download the Production-Ready Instructions File:

Rather than creating your own from scratch, download our battle-tested Copilot instructions that have been refined through real-world LeadCMS projects:

# Create the .github directory and download the instructions file
mkdir -p .github
curl -o .github/copilot-instructions.md https://raw.githubusercontent.com/LeadCMS/leadcms.ai.next/refs/heads/develop/.github/copilot-instructions.md

Benefits of Using Our Copilot Instructions:

Battle-Tested Patterns

Refined through multiple real-world LeadCMS projects, including complex static sites with advanced features.

Immediate Context

Copilot instantly understands LeadCMS architecture, MDX patterns, and static export requirements without explanation.

Complete Coverage

Covers all aspects from content modeling to deployment, giving you comprehensive AI assistance out of the box.

Zero Configuration

Download once and immediately benefit from expert-level AI guidance for your entire development workflow.

What's Included in Our Instructions File:

  • Static Site Generation: Complete output: "export" compatibility patterns
  • LeadCMS Integration: Content type design and SDK usage best practices
  • MDX Architecture: Content-inside-tags approach with proper component design
  • Media Management: Asset handling and version control workflows
  • Template System: Registration patterns and content type mapping
  • Validation Patterns: Build-time content validation and error handling
Essential Reading: Study the Instructions File

Before continuing, study the complete Copilot instructions file: .github/copilot-instructions.md

This battle-tested file contains the architectural patterns and development workflows that make this entire approach possible. Understanding these principles is essential for successful implementation.

The Architectural Challenge: From All-in-One to Separated Content

V0 generates sites where content and markup are tightly coupled - headlines, descriptions, and text are hardcoded directly in React components. To make content manageable through LeadCMS, we need to separate these concerns:

// ❌ V0 Pattern: Content mixed with markup
export function Hero() {
  return (
    <section>
      <h1>Transform Your Business with AI</h1>
      <p>We provide cutting-edge AI solutions...</p>
      <Button>Get Started Today</Button>
    </section>
  )
}

// ✅ LeadCMS Pattern: Content separated from markup
export function Hero({ content }) {
  return (
    <section>
      <h1>{content.title}</h1>
      <p>{content.description}</p>
      <Button href={content.ctaLink}>{content.ctaText}</Button>
    </section>
  )
}

With the instructions file providing context, here's the focused prompt used for the Nuzzl project to implement the content separation strategy:

Actual Production Prompt

"We have a website created in V0, and I would like to integrate it with LeadCMS to pull all the content from it and edit it there. We already have a LeadCMS instance available at https://admin.nuzzl.co.uk.

We will be using LeadCMS SDK to pull the data from CMS. Your task is to restructure the current site which has content and markup mixed together into a new more structured form compatible with LeadCMS.

Important requirements:

  1. We use pnpm as our package manager
  2. All text content should be moved to MDX/JSON files in .leadcms/content/
  3. No fallback content blocks in the code - if content doesn't exist in .leadcms/content/, the build should fail
  4. All sections should be customizable in the CMS rather than hardcoded in components
  5. Generate all MDX/JSON content files necessary to render the site as it currently appears

Please restructure the project accordingly, preserving the current site structure and pages while making all content editable in LeadCMS."

With the instructions file in place, Copilot instantly understands all the architectural patterns, content design principles, and development best practices without requiring detailed explanations in every prompt.

This context-aware approach enabled Copilot to:

  • Analyze the existing V0 project structure
  • Design appropriate content types and schemas
  • Create structured MDX components
  • Generate necessary content files with correct frontmatter

AI-Generated Project Architecture:

Copilot analyzed the existing V0 site structure and generated a content architecture. Here's what was created:

Content Directory Structure:

.leadcms/
  content/
    metadata.json       # Site-wide metadata and configuration
    header.json        # Navigation and branding elements
    footer.json        # Footer links and company information
    home.mdx           # Main landing page content
    privacy.mdx        # Privacy policy content
    terms.mdx          # Terms of service content

Generated MDX Component Library:

components/
  mdx/
    hero-section.tsx      # Dynamic hero sections with CTA integration
    service-grid.tsx      # Responsive service cards with icon support
    about-section.tsx     # Company information and team sections
    contact-section.tsx   # Contact forms with validation
    cta-section.tsx       # Call-to-action sections with analytics

AI-Generated MDX Content Example:

Here's a sample of the MDX content that Copilot generated, demonstrating the content-inside-tags approach and component usage:

---
title: Nuzzl - Where Technology Meets Business Excellence
slug: home
type: landing
---

<HeroSection title="Where Technology Meets Business Excellence" subtitle="Expert software development and ERP implementation services.">
  <CTAs primaryText="Our Services" primaryHref="#services" secondaryText="Contact" secondaryHref="/contact" />
</HeroSection>

<CTASection title="Ready to Transform Your Business?" buttonText="Get Started" buttonHref="/contact" />
Content Architecture Best Practice

This example demonstrates the key principle: use MDX frontmatter for metadata (title, slug, type, etc.) and MDX components for structured content. This approach separates configuration from presentation while maintaining content editability.

AI-Generated MDX Component Results

As part of the content separation process, Copilot automatically generated reusable MDX components that maintain consistent styling and functionality across different pages.

Generated Component Implementation:

interface HeroSectionProps {
  title: string
  subtitle: string
  children?: React.ReactNode
}

export function HeroSection({ title, subtitle, children }: HeroSectionProps) {
  return (
    <section className="hero">
      <h1>{title}</h1>
      <p>{subtitle}</p>
      {children}
    </section>
  )
}

interface CTAsSectionProps {
  primaryText: string
  primaryHref: string
  secondaryText: string
  secondaryHref: string
}

export function CTAs({ primaryText, primaryHref, secondaryText, secondaryHref }: CTAsSectionProps) {
  return (
    <div className="cta-buttons">
      <Button href={primaryHref}>{primaryText}</Button>
      <Button variant="outline" href={secondaryHref}>{secondaryText}</Button>
    </div>
  )
}

interface CTASectionProps {
  title: string
  buttonText: string
  buttonHref: string
}

export function CTASection({ title, buttonText, buttonHref }: CTASectionProps) {
  return (
    <section className="cta-section">
      <h2>{title}</h2>
      <Button href={buttonHref}>{buttonText}</Button>
    </section>
  )
}

Step 4: Sync Content to LeadCMS

After Copilot has restructured your content locally, you need to sync all the generated MDX and JSON files back to your LeadCMS instance to enable content management through the admin interface.

Review Generated Content

Before syncing to LeadCMS, review all locally generated content to ensure everything meets your requirements.

Key Areas to Review:

Content Types

Verify that content types (home, landing, doc, etc.) match your site structure and naming conventions.

Titles and Slugs

Check that page titles are clear and URL slugs follow your preferred format and SEO strategy.

Categories and Tags

Ensure categories and tags are consistent and follow your content organization strategy.

Content Quality

Review all generated text content for accuracy, tone, and alignment with your brand voice.

Review Your Generated Files:

# Explore your generated content structure
ls -la .leadcms/content/
tree .leadcms/content/  # If you have tree installed

Make any necessary adjustments to titles, slugs, categories, or content before proceeding to sync.

Sync Content to LeadCMS

Use the LeadCMS SDK to synchronize all your local content files to your LeadCMS instance.

Execute the Sync Command:

# Sync all local content to LeadCMS
pnpm exec leadcms push

What This Command Does:

  1. Content Type Management: Reads content types from both CMS and local system, creating any missing content types automatically

  2. Content Matching Logic:

    • By ID: If local content has an id that matches remote content, it's marked for update
    • By Slug/Title: If no ID match, tries to find content with the same slug or title for updating
    • New Content: If no matches found, creates new content records
  3. Smart Updates:

    • Compares updatedAt timestamps between local and remote content
    • Safe Update: If timestamps match, proceeds with update
    • Conflict Detection: If timestamps differ, suggests running leadcms pull first to resolve conflicts
  4. Metadata Processing:

    • Parses frontmatter from MDX files for metadata
    • Extracts content body from MDX and JSON files
    • Creates proper LeadCMS records with all attributes
Handling Conflicts

If you see conflict warnings during sync, resolve them safely:

# Pull latest changes from LeadCMS first
pnpm exec leadcms pull

# Resolve any conflicts in your local files
# Then push again
pnpm exec leadcms push

# Or override remote changes if you're certain (use carefully)
pnpm exec leadcms push --force

Commit Updated Metadata

After successful sync, LeadCMS will update your local files with additional metadata from the CMS.

Expected Changes:

Your local MDX files will now include additional frontmatter fields:

---
id: 42
createdAt: '2025-10-29T10:30:00.000Z'
updatedAt: '2025-10-29T10:30:00.000Z'
title: 'Your Page Title'
slug: 'your-page-slug'
type: 'home'
# ... other existing fields
---

Commit These Changes:

# Stage all updated files
git add .leadcms/content/

# Commit the metadata updates
git commit -m "Add LeadCMS metadata to content files after sync"
Sync Complete

🎉 Content Successfully Synced! Your content is now available in LeadCMS admin interface for easy editing by content managers.

Content Editing Workflows

With content synced to LeadCMS, you now have two powerful editing workflows available.

For Developers - Local Editing:

Continue editing content locally in VS Code with full AI assistance:

# Make changes to .leadcms/content/ files in VS Code
# Use Copilot for content suggestions and improvements
# Test changes locally with: pnpm run dev
# Sync changes back: pnpm exec leadcms push

For Content Editors - LeadCMS Admin UI:

Content editors can now manage content through the user-friendly LeadCMS admin interface:

  • No technical knowledge required - Edit content through web forms
  • Real-time preview - See changes as you type
  • Media management - Upload and organize images and files
  • Content workflows - Draft, review, and publish content
Content Editor Benefits

Content editors don't need VS Code, Git, or technical knowledge. They can focus purely on content while developers handle the technical architecture.

Build-Time Content Integration:

Your build process automatically pulls the latest content from LeadCMS:

# Content is automatically fetched during builds
pnpm run build  # Pulls latest content from LeadCMS before building

# Or manually fetch latest content
pnpm exec leadcms pull
Preview Environments

Coming Soon: Live preview servers can be configured so content editors can see changes instantly without site redeployment. We'll cover this advanced setup in a future article.

Step 5: Local Development and Preview

With your content synced to LeadCMS and available for editing, it's time to run your AI-built website locally and see the complete workflow in action.

Start Local Development Server

Run your website locally to preview the complete AI-generated site with LeadCMS content integration.

Start the Development Server:

# Ensure content is fetched and environment is ready
pnpm run fetch

# Start the development server
pnpm run dev

What You'll See:

Your website will be available at http://localhost:3000 with:

  • Dynamic Content: All content loaded from LeadCMS
  • AI-Generated Components: V0-created components with LeadCMS integration
  • Interactive Features: Forms, navigation, and responsive design
  • Hot Reload: Real-time updates as you make changes
  • Professional Styling: Tailwind CSS and shadcn/ui components
Development Complete

🎉 Congratulations! You've successfully built a modern website using AI tools. Your site is now running locally with:

  • V0-generated UI components and layouts
  • Copilot-assisted content separation and architecture
  • LeadCMS-powered content management
  • Professional styling and responsive design

Preview and Test Your Website

Explore your locally running website to verify all features work correctly.

Making Content Changes:

  1. Edit content in your LeadCMS admin interface
  2. Fetch updates with pnpm run fetch
  3. See changes reflected immediately in your local site
Development Workflow

Perfect Development Loop: Make content changes in LeadCMS → Run pnpm run fetch → Preview updates locally → Iterate quickly with AI assistance from Copilot

Conclusion and Next Steps

This guide demonstrated how AI-assisted development tools transform modern web development workflows. By combining V0 for rapid UI generation, GitHub Copilot for intelligent code assistance, and LeadCMS for headless content management, we built a complete local development environment in just 6 hours total - a process that traditionally would take days or weeks.

The key to success lies in understanding how each tool complements the others: V0 provides the architectural foundation, Copilot enhances development velocity through contextual assistance, and LeadCMS enables clean separation of content from presentation logic.

Your website is now running locally and ready for:

  • Content management through LeadCMS admin interface
  • Rapid development iterations with AI assistance
  • Easy content updates with immediate preview
  • Professional, responsive design that works across devices

Development Resources

Essential Tools and Documentation:

  • Copilot Instructions File - Essential reading: Complete architectural patterns, component design principles, and development best practices.

  • LeadCMS SDK - SDK documentation, deployment guides, and community examples for headless CMS integration.

  • V0 Platform - AI-powered UI generation platform with comprehensive component libraries and examples.

  • Project Example - Complete Nuzzl project implementation demonstrating all concepts and patterns.

  • Next.js Documentation - Framework documentation covering static generation, routing, and deployment strategies.

Taking Your Website from Local to Production-Ready

Your local development environment is just the beginning! While you now have a fully functional website running locally, there are several exciting enhancements that can transform it into a production-ready powerhouse:

Enhanced Content Features

Blog systems, case studies, team profiles, and dynamic portfolio sections that grow with your business.

Advanced Interactions

Contact forms, search functionality, and interactive components that engage your visitors.

Global Reach

Multi-language support and internationalization to serve customers worldwide.

Production Deployment

Secure hosting, automated deployments, and performance optimization for live websites.

The good news? These enhancements follow the same AI-assisted workflow you've just learned. Each step builds naturally on your existing foundation, and you're never starting from scratch.

Even better news? You don't have to tackle this alone.

Ready to Go Production? We're Here to Help

Whether you want to implement these features yourself or have our experienced team handle the technical complexity, we've got you covered.

Our team specializes in exactly what you've just experienced - using AI tools, modern frameworks, and headless CMS architecture to build websites efficiently. We can help you take the next steps at whatever pace works for your project and budget.


This guide documents the local development workflow using the AI-powered development stack, completed in approximately 6 hours of development time.