> ## Documentation Index
> Fetch the complete documentation index at: https://docs.joinmarkt.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Theme Builder

> Visual builder publish path and theme APIs for stores.

# Theme Builder

Sellers customize the live storefront in the dashboard. Developers who need full control should read the [Themes](/storefront/introduction) tab and the **Theme Development** section under Store Setup.

***

## Two modes

| Mode               | Who        | What                                             |
| ------------------ | ---------- | ------------------------------------------------ |
| **Visual Builder** | Sellers    | Sections, copy, hero image, layout — Vite themes |
| **Code**           | Developers | Full file tree, ZIP import — Vite or Nunjucks    |

Custom theme authors: start at [Build a Custom Theme](/storefront/custom-themes).

***

## Seller flow

1. Open **Themes** / **Visual Builder** for the active store
2. Edit sections (hero, products, features, …)
3. Preview in the device frame (real iframe + theme assets)
4. **Publish** → new storefront revision goes live

***

## Developer entry points

| Goal                          | Doc                                                  |
| ----------------------------- | ---------------------------------------------------- |
| Show products on homepage     | [Homepage](/storefront/homepage)                     |
| Tags / shortcodes / embed buy | [Shortcodes & Tags](/storefront/shortcodes)          |
| Nunjucks context & filters    | [Nunjucks Theme API](/storefront/nunjucks)           |
| React / Vite template         | [Vite Storefront](/storefront/vite)                  |
| File layout                   | [Template Structure](/storefront/template-structure) |

***

## Seller session APIs (dashboard)

These require an authenticated seller session — **not** for public themes:

| Area              | Notes                                |
| ----------------- | ------------------------------------ |
| Builder / pages   | Visual document + page CRUD          |
| Themes            | `/api/themes`, apply/use under store |
| Media             | Uploads for hero/product images      |
| Packs             | Theme pack import                    |
| Storefront config | Active engine / revision             |

Public themes use subdomain catalog + checkout APIs only.

***

## Publish rules

* Vite build → artifacts + `StorefrontArtifact` rows
* Live HTML from published revision
* Assets under `/markt-theme-assets/live/{revision}/`
* Preview must use a **real iframe URL** + dist files — never flatten React to a static HTML snapshot
* CSP must allow the dashboard origin to embed the preview

Repo references: `docs/STOREFRONT-ARCHITECTURE.md`, `docs/PRODUCTION-WORKFLOW.md`.
