Introduction

This section provides an overview of how to get started with the Website Builder, a Next.js based tool for creating websites through an intuitive drag-and-drop interface.

Website Builder

Welcome to Website Builder, a powerful and flexible Next.js website creation tool designed to simplify the process of creating high-quality, comprehensive websites. Built with React, Tailwind CSS, and JavaScript.

The Website Builder enables developers and designers to create modern, responsive websites without writing extensive code. It utilizes a component-based architecture where pre-built sections, headers, and footers can be combined to create complete pages.

This tool is built on top of Next.js, leveraging its server-side rendering capabilities, static site generation, and component-based architecture to create high-performance websites that are SEO-friendly and fast-loading.

Project Architecture

Understanding the structure of the Website Builder project will help you navigate the codebase and make effective contributions.

The Website Builder is organized into several key directories:

  • components/builder: Contains all draggable components used in the builder interface
  • components/ui: Reusable UI components that make up the interface
  • store: State management using Zustand for tracking the builder state
  • utils: Helper functions for DOM manipulation, export functionality, and more
  • pages: Next.js pages for different views of the application

Components

The Website Builder provides a variety of pre-built components to help you create your website quickly and efficiently.

Header Components

Header components are the top sections of your website that typically contain the logo, navigation menu, and call-to-action buttons.

Learn more about Headers →

Section Components

Section components are the building blocks of your website. They include hero sections, feature sections, testimonial sections, and more.

Feature Section

Feature 1
Feature 2
Feature 3

Learn more about Sections →

Footer Components

Footer components are the bottom sections of your website that typically contain links, contact information, and copyright notices.

Logo

© 2023 Your Company

Learn more about Footers →

Builder

The Website Builder provides a powerful interface for creating websites through an intuitive drag-and-drop interface.

State Management

The Website Builder uses Zustand for state management. This provides a simple and efficient way to manage the state of the builder interface.

// Example state structure
{
  components: [],
  selectedComponent: null,
  pages: [],
  currentPage: 'home',
  addComponent: (component) => { ... },
  removeComponent: (id) => { ... },
  selectComponent: (id) => { ... },
  updateComponent: (id, props) => { ... },
}

Learn more about State Management →

Drag and Drop

The Website Builder uses React DnD for drag and drop functionality. This allows users to drag components from the sidebar onto the canvas, and rearrange components within the canvas.

Learn more about Drag and Drop →

Export

The Website Builder allows you to export your website as a complete Next.js project. This includes all the components, pages, and configuration files needed to run your website.

// Example export structure
my-website/
  ├── components/
  │   ├── Header.js
  │   ├── Footer.js
  │   └── sections/
  │       ├── HeroSection.js
  │       └── FeatureSection.js
  ├── pages/
  │   ├── index.js
  │   ├── about.js
  │   └── contact.js
  ├── styles/
  │   └── globals.css
  └── package.json

Learn more about Export →

© 2023 Website Builder Documentation. All rights reserved.