Shopnex
Concepts

Tenancy

Single-shop and multi-shop modes.

Shopnex is always multi-tenant underneath: every tenant table has a shop_id. TENANCY_MODE only changes how the shop is resolved.

single (default)multi
Storefrontdefault shopshop from request host (shop_domains)
Admindefault shopsession's active shop, else the user's first shop
New usersinvited from Admin → Staffinvited, or create their own shop
  • Shops are Better Auth organizations (shops, shop_members, shop_invitations).
  • Switching from single to multi needs no data migration: add rows to shop_domains and set TENANCY_MODE=multi.
  • In multi mode, outbound webhooks to private or loopback addresses are blocked (SSRF protection). Single mode allows them, e.g. n8n on localhost.