---
title: Concepts
description: Core PageWeave concepts — websites, pages, versions, themes, and more.
section: Overview
order: 3
---

# Core Concepts

Understanding PageWeave's architecture and data model.

## Websites

A website is the top-level entity. Each website has:

- **Subdomain** — auto-generated (e.g., `my-site.pageweave.site`)
- **Custom domains** — optional, verified via CNAME
- **Status** — `draft` or `published`
- **Theme** — daisyUI theme applied to all pages
- **Language** — BCP 47 tag (e.g., `en`, `de`)

### Draft vs Published

- **Draft sites**: Edits apply directly. Agent iterates freely. No review gate.
- **Published sites**: Agent edits create **pending versions**. User must approve before going live.

## Pages

Pages are versioned HTML content at URL paths:

- **Path** — URL anchor (e.g., `/`, `/about`, `/contact`)
- **Versions** — every edit creates a new version
- **Title** — page title for `<title>` and metadata
- **HTML content** — raw HTML body
- **Metadata** — description, og_title, og_image (JSONB)

### Versioning

Every edit creates a new version with:

- Sequential version number
- Timestamp
- Published status (nil = draft, set = published)
- Rollback reference

## Components

### Header & Footer

Instance-based HTML components with versioning. A website can have multiple header or footer instances. The **default** instance is used on all pages.

Each instance supports versioning (same model as pages). The default is set per website via `default_header_id` / `default_footer_id`.

### HTML Head

Instance-based `<head>` content with versioning — meta tags, tracking scripts, analytics, favicons. Uses the same instance model as header/footer. The default instance is set via `default_html_head_id`.

## Themes

daisyUI 5 + Tailwind CSS v4 theme system:

- **Built-in themes** — 35+ themes (nord, sunset, dark, etc.)
- **Custom themes** — OKLCH colors with `[data-theme="name"]` selector
- **Instant changes** — CSS variables update, no re-render needed

## Assets

File uploads with automatic optimization:

- **Images** — WebP + AVIF variants generated
- **Fonts** — WOFF2, TTF, OTF supported
- **Documents** — PDF, DOCX, XLSX, PPTX
- **UUID-based URLs** — prevents enumeration
- **Size limits** — 5MB images, 2.5MB fonts, 10MB other

### Image Rendering

Images are automatically enhanced at render time:

- **Responsive srcset** — size variants (320w, 640w, 1024w) injected automatically
- **Width/height attributes** — auto-injected from asset metadata to prevent layout shift (CLS)
- **Lazy loading** — images below the fold get `loading="lazy"` automatically

Use standard `<img src="...">` without `srcset`. If you need CSS-controlled sizing (e.g., `class="w-full"`, `class="h-8"`), add `data-no-dimensions` to skip auto-injection of width/height and avoid aspect-ratio distortion.

## Forms

Versioned form builder:

- Email notifications
- Webhook integration
- Spam protection (Altcha)
- Submission management

## Tables

Structured data per website with three access methods:

- **MCP tools** — Full CRUD for tables and rows (`create_table`, `list_table_rows`, etc.)
- **Liquid templating** — `site.tables.slug` in page HTML with filtering, ordering, and pagination
- **Public JSON API** — `GET /t/{table_id}` on the website's domain. No auth required. Supports filtering, sorting, search, and pagination.

Each table has a schema with typed fields (`string`, `text`, `number`, `boolean`, `datetime`). Rows auto-generate slugs from a configured `display_column_key`.

**Full documentation:** [Data Tables](/docs/tables)

## Domains

Custom domain management:

- CNAME verification
- Automatic SSL via on-demand TLS
- DNS propagation checking
