# Getting Started

This page highlights the **shop-specific** directories and files in a VARIO Cloud app. For the general app structure, see the [VARIO App Framework](https://github.com/vario-software/vario-app-framework) and [VARIO App Demo](https://github.com/vario-software/vario-app-demo).

## Shop-Specific Layout

```
my-shop-app/
├── api/
│   ├── routes/
│   │   ├── article.js                # Article lookup endpoints
│   │   ├── webhooks.js               # ERP webhook handlers
│   │   └── cronWebhooks.js           # Cron/scheduled webhook handlers
│   └── services/
│       ├── inbound/
│       │   ├── order/                # Order import (fetch → transform → import)
│       │   │   ├── index.js
│       │   │   ├── fetch.js
│       │   │   ├── transform.js
│       │   │   └── import.js
│       │   ├── product/              # Product import (optional)
│       │   └── multiPartImporter.js
│       ├── outbound/
│       │   ├── article/              # Product sync (fetch → transform → import)
│       │   │   ├── index.js
│       │   │   ├── fetch.js
│       │   │   ├── transform.js
│       │   │   └── import.js
│       │   ├── article-stock/        # Stock sync
│       │   ├── article-price/        # Price sync
│       │   ├── article-media/        # Image sync
│       │   ├── order-status/         # Order status sync
│       │   └── outbound.js           # Queue processor
│       ├── maintenance/
│       │   ├── install/
│       │   │   └── migrations/
│       │   │       └── 1/
│       │   │           ├── index.js            # Migration logic
│       │   │           └── static/
│       │   │               └── erp/
│       │   │                   └── eav-groups/  # EAV group JSON files
│       │   ├── queue.js              # Queue read/write helpers
│       │   ├── salesChannelParameter.js  # Per-channel config helpers
│       │   └── context.js            # setSalesChannel helper
│       └── platform/                 # Platform API client
│           └── client.js
├── ui/                               # Frontend (channel config UI)
└── manifest.json
```

## Key Conventions

**Inbound services** follow a `fetch → transform → import` pattern:

* `index.js` — orchestrates the flow and creates the MultiPart Import
* `fetch.js` — retrieves data from the external platform API
* `transform.js` — maps platform data to the VARIO import format
* `import.js` — sends the transformed data to the ERP via MultiPart Import

**Outbound services** follow a `fetch → transform → import` pattern:

* `index.js` — orchestrates the flow
* `fetch.js` — retrieves article/stock/price data from the ERP via VQL
* `transform.js` — maps ERP data to the platform's API format
* `import.js` — sends the transformed data to the platform API

**Migrations** in `maintenance/install/migrations/<version>/` run during app installation. They set up sales channels, EAV groups, webhooks, and default parameters. See [Core Concepts](https://developer.vario-software.de/guides/onlineshops-and-marketplaces-app/core-concepts).

**EAV group definitions** are stored as JSON files under `static/erp/eav-groups/` and loaded by the migration script.
