Skip to content

Webshop - Overview

Purpose

The Webshop is the core application of the Atraxion platform. It handles all customer-facing e-commerce functionality, administration, and integrates with other islands and external services.

Scope

Included in Webshop

Feature Description
Multi-tenancy White-label webshops with custom domains
Product Catalog Tyres, wheels, accessories display and search
Cart & Checkout Shopping cart, checkout flow, order creation
Customer Management B2B/B2C customers, registration, authentication
Order Management Order lifecycle, status tracking
Payments Pay.nl integration
Shipping Transsmart integration for shipping costs
Notifications Email system with templates
Loyalty Arteel integration (abstract)
Coupons Discount codes with various award types
Admin Full backoffice for all management
EDI B2B order processing via XML
ERP Sync Communication with Odoo via middleware

NOT in Webshop (Other Islands)

Feature Island
Stock import from suppliers Stock Import
Export to platforms (Tyre24, Autodoc) Platform Export
Vehicle data management Vehicle Data
Odoo communication logic ERP Middleware

Multi-Tenant Architecture

Tenant Concept

A Tenant is a customer of Atraxion who has their own white-label webshop.

  • Atraxion is the main tenant (B2B wholesale)
  • Other tenants are resellers with their own customers
  • Each tenant has their own subdomain: [name].tyrecloud.be

What's Shared (Master Data)

Managed by Super Admin, visible to all tenants (with visibility rules):

  • Products (tyres, wheels, accessories)
  • Vehicles (brands, models, specs)
  • Brands, categories, types

What's Tenant-Specific

Each tenant has their own:

  • Customers
  • Orders
  • Pricing (own prices on top of base prices)
  • Logo and branding
  • EDI clients
  • Loyalty configuration
  • Coupon codes
  • Visibility rules (which products/vehicles they can see)

Tenant Hierarchy

Super Admin (Atraxion IT)
    │
    ├── Atraxion Tenant (main wholesale)
    │   ├── Tenant Owner (Atraxion staff)
    │   ├── Tenant Admins
    │   └── Customers (B2B garages, dealers)
    │
    ├── Reseller Tenant A
    │   ├── Tenant Owner
    │   ├── Tenant Admins
    │   └── Customers
    │
    └── Reseller Tenant B
        ├── Tenant Owner
        ├── Tenant Admins
        └── Customers

User Roles

Super Admin

  • Full access to all tenants
  • Manages master data (products, vehicles)
  • Creates and configures tenants
  • Manages email templates (content layer)
  • Sets visibility rules per tenant

Tenant Owner

  • Full access within their tenant
  • Manages own customers
  • Manages own pricing
  • Manages EDI clients
  • Configures loyalty and coupons
  • Views orders and invoices
  • Manages branding (logo)

Tenant Admin

  • Subset of Tenant Owner permissions
  • Configurable per admin by Tenant Owner
  • Role-based access control

Customer

  • End user of the webshop
  • Can browse products, place orders
  • Has own account with order history
  • May require approval (B2B flow)

Integration Points

Incoming (Other Islands → Webshop)

From Data Method
Stock Import Stock levels per article REST API
Vehicle Data Vehicle specs, product mappings REST API
Platform Export Orders from platforms REST API

Outgoing (Webshop → Other Islands)

To Data Method
ERP Middleware New customers, orders REST API
ERP Middleware Get invoices, payment status REST API
Vehicle Data Request vehicle info REST API

External Services

Service Purpose Library
Pay.nl Payment processing atraxion/paynl-client
Transsmart Shipping cost calculation atraxion/transsmart-client
Arteel Loyalty points atraxion/arteel-client

Database Design

Multi-Tenant Strategy

Shared database with tenant_id column:

-- Tenant-specific tables
customers (id, tenant_id, email, ...)
orders (id, tenant_id, customer_id, ...)
edi_clients (id, tenant_id, customer_id, ...)

-- Shared tables (no tenant_id)
articles (id, ean, mpn, ...)
vehicles (id, brand_id, model_id, ...)
article_brands (id, name, ...)

Tenant Resolution

  1. Request comes in for acme.tyrecloud.be
  2. Middleware extracts subdomain: acme
  3. Lookup tenant by domain
  4. Set tenant in request context
  5. Doctrine filter automatically applies tenant_id to queries

Visibility Rules

Products and vehicles are shared but visibility is per tenant:

-- Tenant can see specific brands
tenant_visible_brands (tenant_id, brand_id)

-- Tenant can see specific categories
tenant_visible_categories (tenant_id, category_id)

-- Tenant can see specific vehicles
tenant_visible_vehicle_brands (tenant_id, vehicle_brand_id)

Feature Overview

Detailed documentation for each feature:

  1. Tenants - Multi-tenancy and white-labeling
  2. Products - Product catalog and sibling detection
  3. Customers - Customer management and registration
  4. Cart & Checkout - Shopping flow
  5. Orders - Order processing
  6. Payments - Pay.nl integration
  7. Shipping - Transsmart integration
  8. Notifications - Email system
  9. Loyalty - Arteel integration
  10. Coupons - Discount system
  11. Admin - Backoffice
  12. EDI - B2B orders
  13. Returns / RMA - Return lookup, submission, and notifications
  14. Order Documents + Virus Scan - Tokenized portal, scan lifecycle, infected alerts

Key Improvements Over Current System

Area Current New
Architecture Monolith Clean architecture
Testing Minimal Full BDD coverage
Multi-tenancy Implicit Explicit with Doctrine filters
Product siblings Not shown on detail page Shown with color/size swatches
EDI management CLI only Full admin interface
Customer registration Fixed rules Tenant-configurable
Code quality Mixed legacy PSR-12, typed, analyzed