## Export Formats

Yando supports four export formats, accessible from the toolbar on any board:

### PNG (Image)

Exports the board as a PNG image. Smart cropping ensures the image is tightly fitted:

- **Template boards**: Cropped to zone boundaries with padding
- **Non-template boards**: Cropped to the object bounding box with padding
- Hidden sticky notes are excluded from the export

### PDF (Document)

Exports the board as a multi-page PDF document containing:

- A cropped image of the board canvas
- A text summary of all objects organized by zone
- Hidden sticky notes are excluded

### Markdown

Exports board content as a structured markdown file:

- A **legend** at the top: what each zone category on the board means, and what each sticky-note colour means
- Objects grouped by zone, in the template's order — every zone is listed, including empty ones
- Zone headings include the category (e.g. *Revenue Streams · Finance*), followed by the zone's prompt
- Sticky notes are labelled with their meaning (e.g. *[Sticky Note · decision]*)
- Hidden sticky notes are excluded
- Useful for feeding board content to AI tools: the export says what every zone and colour means, not just what things are called

### JSON (Data)

Exports the complete board data as a JSON file:

- Board metadata (title, description, template, canvas dimensions)
- A `legend`: `zone_categories` (the categories used on the board and what they mean) and `note_colors` (what each sticky-note colour means)
- Every zone with its `category`, `category_label`, `category_meaning` and `prompt` (the zone's description), plus its objects
- All objects with full properties (position, size, rotation, data); sticky notes also carry `color_meaning` (idea, decision, concern, action, question — or `null` for other colours)
- Can be re-imported to create a new board

## Import from JSON

### Creating a New Board from JSON

1. Go to **Boards** and click **New Board**
2. Upload a JSON file in the import section
3. Preview shows the title, template, and object count
4. Optionally change the title, description, or template
5. Click **Create Board**

The import process:

- Generates fresh UUIDs for the board and all objects (security measure)
- Sets the current user as the owner
- Matches zones by name (exact, then ignoring case); if a zone's name doesn't match, its `category` is used when the template has exactly one zone of that category
- Validates the JSON schema, object types, and required fields (each object needs only `type` and `data`)
- Places sticky notes for you: a note keeps its position when it lies inside its zone (so exports come back exactly as they were); a note without a position, with one outside its zone, or on top of another imported note goes in the next free spot in its zone. Notes outside zones go below the board's content when they have no position or would land on another note. The import tells you how many notes it placed, and which zone names in the file the board's template doesn't have (their notes are added outside the zones)
- Uses atomic transactions (all-or-nothing)
- Lays text boxes placed in a zone out inside that zone, below its name and prompt. If a zone has more text than fits even at the smallest size, the text is kept in full but shown cut off at the bottom of the zone with a **+N lines** marker — click it to read the rest — and the import tells you which zones overflowed. Exports always contain the full text

### Importing to an Existing Board

You can add objects from a JSON file to an existing board:

1. Open the board canvas
2. Click the **Import** button in the toolbar
3. Select a JSON file
4. Objects are added without modifying existing content

This is useful for the LLM workflow:

1. Export your board to JSON
2. Feed the JSON to an LLM for analysis or enhancement
3. Import the LLM's output back to the same board

### JSON Schema

The expected JSON structure:

```json
{
  "board": {
    "title": "My Board",
    "description": "Optional description",
    "template": "Business Model Canvas",
    "canvas_width": 3200,
    "canvas_height": 1800
  },
  "zones": {
    "Revenue Streams": {
      "zone": {
        "name": "Revenue Streams",
        "category": "finance",
        "prompt": "How will this make money?"
      },
      "objects": [
        {
          "type": "sticky_note",
          "x": 100,
          "y": 200,
          "width": 200,
          "height": 150,
          "data": {
            "text": "Note content",
            "color": "#FFE584"
          }
        }
      ]
    }
  },
  "unzoned_objects": []
}
```

The `zone` block is optional on import (only `objects` is needed); exports also include the category label and meaning, and a `legend`.

Object types: `sticky_note`, `text_box`, `shape`

For shapes, the `data` object includes a `shapeType` field: `rectangle`, `circle`, `triangle`, or `line`.

## Export Visibility

Hidden sticky notes (those toggled to hidden on the canvas) are excluded from **all** export formats:

- PNG: Not rendered in the image
- PDF: Not in the image or the text summary
- Markdown: Not included in the text output
- JSON: Hidden notes are still included in JSON exports (they carry a hidden flag)
