Getting started¶
From a clean Shopware 6 install to a working marketplace — Base only, no cluster. ~20 minutes.
Prerequisites
- Shopware 6.6 or 6.7, CLI access (
bin/console), and the usual Shopware build toolchain. - The
flyokai/*composer packages available (private repository). See the framework's composer repositories guide for the repo entries. - Write access to
var/marketplace/for the OAuth signing keypair.
1. Install the Base plugin¶
composer require flyokai/sw-marketplace
php bin/console plugin:refresh
php bin/console plugin:install --activate FlyokaiMarketplace
On install the plugin:
- Creates the marketplace data-plane tables (
flyokai_seller,flyokai_seller_offer,flyokai_purchase_order, …) in Shopware's MySQL, idempotently via the declarative schema (marketplace:local:schema:apply). - Creates the identity-plane tables:
flyokai_userplus the OAuth client / token tables and the mail outbox. - Generates an RSA signing keypair at
var/marketplace/oauth.id_rsa{,.pub}. - Mounts the admin Vue modules and the
/flyok-portal/*REST endpoints. - Registers DAL extensions on
product,order_line_itemandorder_delivery.
Re-running plugin:update re-applies the schema; it's idempotent.
2. Create the first operator + OAuth client¶
# Portal OAuth client (password grant). Prints id + secret ONCE — save them.
php bin/console marketplace:oauth:client:create
# First operator user (UUIDv7 PK, argon2id password)
php bin/console marketplace:user:create \
--username admin --email admin@example.com --role admin --password '…'
The OAuth client is what the seller-portal SPA uses to exchange a seller's credentials for a portal JWT. See Seller portal → Authentication.
3. Create a seller¶
php bin/console marketplace:seller:create \
--username seller1 --email seller1@example.com --password '…'
This provisions a flyokai_user (if needed) and a flyokai_seller bound to it.
The seller can now log in to the portal.
4. Verify the backend¶
php bin/console marketplace:ping
# Backend: Flyokai\Marketplace\Service\LocalMarketplaceBackend
# OK: 1 seller(s) total, 1 returned on this page
marketplace:ping round-trips a ListSellers request through the active
MarketplaceBackend. On Base
that's LocalMarketplaceBackend (in-process). The same command reports
RemoteMarketplaceBackend once you go remote.
5. Point the seller portal at Shopware¶
The portal is a Vue 3 SPA distributed separately. Configure its .env with the
client credentials from step 2:
VITE_FLYOKAI_URL=https://shop.example
VITE_PLATFORM_URL=https://shop.example
VITE_OAUTH_CLIENT_ID=<from marketplace:oauth:client:create>
VITE_OAUTH_CLIENT_SECRET=<from marketplace:oauth:client:create>
Then set the matching browser origin in Shopware admin so CORS lets the SPA in:
Settings → Plugins → FlyokaiMarketplace → Seller portal → Seller portal CORS origin
Default is http://localhost:5173 (the dev origin). In production set it to the
deployed portal origin. See Configuration → Seller portal.
6. Enable the storefront experience¶
The marketplace is on per sales channel. By default marketplaceEnabled is
true, so seller offers, the "Other sellers" buy-box widget and marketplace
pricing are live. To turn it off for a channel, flip:
Settings → Plugins → FlyokaiMarketplace → Marketplace → Enable marketplace logic
Choose a price display mode and a shipping mode while you're there.
7. First end-to-end check¶
# Seller creates an offer in the portal, an operator approves it (admin), then:
php bin/console marketplace:smoketest:checkout # exercises the cart → PO path
php bin/console marketplace:mail:smoke # sends a test mail through the backend
If the offer doesn't appear on the storefront, it's almost always pending
approval — see Sellers & offers → Approval and
the autoApproveOffers setting.
Where to go next¶
- Architecture — how the pieces fit, and the Base/Remote seam.
- Domain model — sellers, offers, POs, statements, payouts.
- Cart & checkout — the buy-box and the cart pipeline.
- Configuration — every system-config key.
- CLI commands — the full
marketplace:*reference. - Outgrowing in-process? Going remote.