> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.swellsystem.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Workspace Templates and Blueprints

# Workspace Templates and Blueprints

## Page Templates

Page templates are defined in `config/workspace.php`:

```php
'page_templates' => [
    'blank' => [
        'title' => 'Untitled',
        'blocks' => [],
    ],
    'meeting_notes' => [
        'title' => 'Meeting Notes',
        'blocks' => [
            ['type' => 'heading_1', 'content' => ['text' => 'Meeting Notes']],
            ['type' => 'paragraph', 'content' => ['text' => '']],
            // ...
        ],
    ],
],
```

Each block has:

- `type` – Block type (paragraph, heading_1, to_do, etc.)
- `content` – Block content (e.g. `['text' => '']`, `['text' => '', 'checked' => false]`)

## Adding Custom Templates

1. Edit `config/workspace.php`
2. Add a new key under `page_templates` with `title` and `blocks`
3. Use block types from `App\Models\WorkspaceBlock` (e.g. `TYPE_PARAGRAPH`, `TYPE_HEADING_1`)

## Blueprint Integration

Blueprints (marketplace templates) can be used to create workspace pages. When a blueprint includes workspace blocks, the import process creates pages with the `template_key` set for tracking.

The API `GET /workspace/templates` returns templates from config. Blueprint-derived templates appear when the blueprint system is configured to register them under `workspace.page_templates`.

## Template Block Types

Supported block types for templates:

- `paragraph`, `heading_1`, `heading_2`, `heading_3`
- `bulleted_list_item`, `numbered_list_item`, `to_do`
- `code`, `quote`, `callout`
- `divider`, `image`, `table`, `toggle`
- `bookmark`, `embed`, `columns`, `date`
- `table_of_contents`, `synced_block`
- `module_projects`, `module_tasks`, `module_companies`, `module_contacts`
