# Cafe Template

## Development

1. Start the dev server:
   ```bash
   cd seltrix-backend
   node scripts/template-dev-server.js cafe-template
   ```

2. Open http://localhost:3002 to preview

3. Edit components in `components/` folder - browser auto-refreshes

## Folder Structure

```
cafe-template/
├── manifest.json      # Template metadata
├── assets/            # Images, icons, fonts
├── components/        # HTML component files
└── previews/          # Component preview images
```

## Component Format

Each component should have:
- `data-component-type` on root element (e.g., Hero, Footer, CTA)
- `data-node` on editable elements
- `data-node-type` for field type (text, file, url, page_links, textarea, color)
- `data-node-label` for display label in editor

## Build & Import

```bash
# Build manifest from components
node scripts/build-template.js cafe-template

# Import to database
node scripts/import-template.js cafe-template
```
