Skip to content

Bundle Responsibilities ​

Logidav is organized into 14 bundles, each with a distinct responsibility. This page documents what each bundle does, its key components, and how it connects to the rest of the system.

AppBundle ​

The main application bundle. Contains the core business logic, Symfony console commands, entities, and services that power the order-to-shipment pipeline.

Commands (Command/) ​

Commands are organized by business domain in subdirectories:

SubdirectoryRoleExample CommandsPath
Sale/Order import and lifecycle managementmenzzo:v2:sales, menzzo:v2:sales:updatesrc/AppBundle/Command/Sale/
Product/Product catalog synchronizationmenzzo:v2:productssrc/AppBundle/Command/Product/
Stock/Stock level synchronizationStock sync commandssrc/AppBundle/Command/Stock/
Refund/Refund and return processingRefund workflow commandssrc/AppBundle/Command/Refund/
Queue/Queue management and processingQueue processor commandssrc/AppBundle/Command/Queue/
V2/Magento V2 API commandsV2 sales/product commandssrc/AppBundle/Command/V2/
Chronopost/ChronoPost carrier operationsLabel generation, trackingsrc/AppBundle/Command/Chronopost/
Brt/BRT carrier operationsBRT shipping commandssrc/AppBundle/Command/Brt/
Gls/GLS carrier operationsGLS shipping commandssrc/AppBundle/Command/Gls/
Idf/Ile-de-France delivery operationsIDF appointment schedulingsrc/AppBundle/Command/Idf/
Meduse/Meduse back-office syncMeduse data importsrc/AppBundle/Command/Meduse/
SaleSav/After-sale service (SAV)SAV workflow commandssrc/AppBundle/Command/SaleSav/
Statistic/Reporting and statisticsData aggregation commandssrc/AppBundle/Command/Statistic/

All critical commands use LockableTrait to prevent concurrent execution of the same cronjob.

Key Services ​

ServiceRole
SaleServiceOrder import, creation, and update -- the central orchestrator for the sales pipeline
ProductQtyLogServiceStock mutation journaling -- logs every inventory change with source tracking
SaleProductAvailabilityServiceAvailability calculation and estimated delivery date computation

Key Entities ​

EntityDescription
SaleAn order (maps to a Magento order)
SaleProductA line item within an order
ProductA product from the catalog
SaleLogAudit log of events on an order
QueueA queued task for asynchronous processing

Services are declared in src/AppBundle/Resources/config/services.yml with dependency injection.


CoreBundle ​

The infrastructure backbone of Logidav. CoreBundle provides all shared services, API clients, transport adapters, and utilities that other bundles depend on. It is the hub through which Logidav communicates with every external system.

API Clients (Api/) ​

CoreBundle hosts 22+ API clients in src/CoreBundle/Api/, organized by integration domain:

CategoryClientExternal System
CarriersChronoPostApiChronoPost shipping (labels, tracking)
BrtApiBRT carrier integration
GlsApiGLS carrier integration
GeodisApiGeodis carrier integration
TruskApiTrusk heavy-item delivery
SdenApiSDEN carrier integration
TamdisApiTamdis carrier integration
CoteCosyApiCoteCosy delivery service
PaymentStripeApiStripe payment processing
HipayApiHipay payment gateway
KlarnaApiKlarna buy-now-pay-later
ScalapayApiScalapay installment payments
AlmaApiAlma payment in installments
AlfyApiAlfy payment/fraud service
E-commerceMenzzoApiMagento SOAP API (legacy V1)
MenzzoApiV2Magento REST API (V2)
V2/SaleApiMagento V2 sales endpoints
V2/ProductApiMagento V2 product endpoints
V2/AttributeApiMagento V2 attribute endpoints
TranslationGoogleTranslateApiGoogle Translate service
DeelpTranslateApiDeepL translation service
AIOpenAiOpenAI API integration
ReviewsTrustpilotApiTrustpilot review management
ReviewsApiGeneric review API
CRMSellsyConnectSellsy CRM/invoicing

Infrastructure Services (Services/) ​

ServiceRole
RabbitMqServiceMessage broker adapter -- publishes and consumes RabbitMQ messages
LogServiceCentralized logging service for all bundles
MailerServiceEmail dispatch service
ShipmentServiceShipping label generation and carrier routing
ShippingServiceShipping rate calculation and carrier selection
SystemAlertServiceOperator alerting for critical failures
ChatwootServiceChatwoot live-chat integration
PaylineServicePayline payment processing
PdfServicePDF document generation
ZplToPdfServiceZPL label to PDF conversion
ConsoleServiceConsole output and command utilities
MeduseServiceMeduse back-office data sync
IdfServiceIle-de-France delivery scheduling
TransactionalServiceTransaction management utilities

CoreBundle Connection Diagram ​

View diagram source
graph LR
    CORE[CoreBundle<br/><small>API Clients & Services</small>]

    subgraph Carriers
        CP[ChronoPost]
        BRT[BRT]
        GLS[GLS]
        GEO[Geodis]
        TRUSK[Trusk]
        SDEN[SDEN]
    end

    subgraph Payments
        STR[Stripe]
        HIP[Hipay]
        KLR[Klarna]
        SCA[Scalapay]
        ALMA[Alma]
        PL[Payline]
    end

    subgraph E-Commerce
        MAG1[Magento V1<br/><small>SOAP</small>]
        MAG2[Magento V2<br/><small>REST</small>]
    end

    subgraph External Services
        GT[Google Translate]
        DL[DeepL]
        OAI[OpenAI]
        TP[Trustpilot]
        SEL[Sellsy]
        CW[Chatwoot]
    end

    CORE -->|labels, tracking| CP
    CORE -->|labels, tracking| BRT
    CORE -->|labels, tracking| GLS
    CORE -->|labels, tracking| GEO
    CORE -->|heavy delivery| TRUSK
    CORE -->|shipping| SDEN

    CORE -->|charges| STR
    CORE -->|charges| HIP
    CORE -->|installments| KLR
    CORE -->|installments| SCA
    CORE -->|installments| ALMA
    CORE -->|payments| PL

    CORE -->|SOAP calls| MAG1
    CORE -->|REST calls| MAG2

    CORE -->|translation| GT
    CORE -->|translation| DL
    CORE -->|AI| OAI
    CORE -->|reviews| TP
    CORE -->|invoicing| SEL
    CORE -->|chat| CW

Diagram

TIP

CoreBundle is stateless infrastructure -- it never owns business logic. Business workflows live in AppBundle, ErpBundle, or the integration bundles. CoreBundle just provides the transport layer.


EventBundle ​

EventBundle implements the domain event system that decouples business logic from side effects. When a significant business action occurs (order created, product shipped, stock changed), an event is dispatched and subscribers react independently.

Domain Events ​

Logidav defines 19 domain events in src/EventBundle/Events/, grouped by domain:

Sale Events ​

Event ClassWhen It FiresTypical Side Effects
AfterSaleCreatedEventNew order imported into LogidavStock reservation, notification dispatch
AfterSaleUpdatedEventOrder data changes (status, address, etc.)Status sync to Magento, log entry
AfterSaleCanceledEventOrder is canceledStock release, refund trigger, marketplace notification
AfterSaleAddressUpdateEventShipping/billing address modifiedCarrier label regeneration, Magento sync

SaleProduct Events ​

Event ClassWhen It FiresTypical Side Effects
AfterSaleProductCreatedFromSaleEventLine item created during order importStock decrement, availability recalculation
AfterSaleProductUpdatedFromSaleEventLine item updated from Magento syncPrice/qty adjustment, log entry
AfterSaleProductCanceledEventLine item canceledStock release, partial refund
SaleProductChangedEventAny field change on a line itemAudit log, dependent recalculations
SaleProductQtyChangedEventQuantity changes on a line itemStock adjustment, availability update
SaleProductSwitchEventProduct substitution on a line itemStock swap, notification

Shipping Events ​

Event ClassWhen It FiresTypical Side Effects
SaleProductsPreShippedEventProducts marked as ready to shipLabel generation trigger
SaleProductsShippedEventProducts physically shippedTracking sync to Magento/marketplaces
SaleProductsAfterTicketPrintedEventShipping label printedStatus update, scan readiness
SaleProductsPreShippedTicketPrintedEventPre-ship label printedWarehouse workflow update
SaleProductsIdfAppointmentFixedEventIDF delivery appointment confirmedCustomer notification, carrier scheduling

Product Events ​

Event ClassWhen It FiresTypical Side Effects
ProductAvailabilityChangedEventProduct availability status changesMarketplace stock sync, storefront update
ProductPriceChangedEventProduct price modifiedMarketplace price sync, margin recalculation
ProductAutoEndEventProduct auto-disabled (end of life)Marketplace delisting, catalog update

Calculation Events ​

Event ClassWhen It FiresTypical Side Effects
CalculateSaleProductShippingAmountEventShipping cost needs recalculationShipping amount update on line item

Event Subscribers ​

EventBundle also contains infrastructure subscribers in src/EventBundle/EventSubscriber/:

SubscriberPurpose
CorsSubscriberCORS header management for API responses
DataBaseSubscriberDatabase connection management and error handling
ExceptionSubscriberGlobal exception handling and error formatting
LoginSubscriberUser login audit logging
RequestSubscriberRequest preprocessing and validation
SessionIdleHandlerSession timeout management
SwitchUserSubscriberUser impersonation audit logging

Event Flow Diagram ​

View diagram source
flowchart LR
    subgraph Triggers
        CMD[Console Command]
        CTRL[Controller]
        QPROC[Queue Processor]
    end

    subgraph EventBundle
        DISP[Event Dispatcher]
        EVT[Domain Event]
        SUB1[Subscriber A]
        SUB2[Subscriber B]
        SUB3[Subscriber C]
    end

    subgraph Side Effects
        DB[(Database Update)]
        API[External API Call]
        Q[Queue Task]
        LOG[Audit Log]
    end

    CMD -->|business action| DISP
    CTRL -->|business action| DISP
    QPROC -->|business action| DISP
    DISP -->|dispatch| EVT
    EVT --> SUB1
    EVT --> SUB2
    EVT --> SUB3
    SUB1 --> DB
    SUB2 --> API
    SUB3 --> Q
    SUB1 --> LOG

Diagram

INFO

Events are synchronous -- subscribers execute in the same request/process as the trigger. For truly asynchronous processing, subscribers can enqueue tasks to the Queue System instead of performing heavy work inline.


Supplier Bundles ​

Logidav integrates with multiple suppliers through dedicated bundles. Each wraps vendor-specific APIs, import/export pipelines, and queue processors.

BigbuyBundle ​

Purpose: Bigbuy dropship supplier integration.

  • Product import from Bigbuy catalog
  • Stock level synchronization
  • Order forwarding for dropship fulfillment
  • Located in src/BigbuyBundle/

VidaxlBundle ​

Purpose: Vidaxl supplier catalog synchronization.

  • Product catalog import and updates
  • Price and availability sync
  • Located in src/VidaxlBundle/

AsirGroupBundle ​

Purpose: AsirGroup pallet management and internal stock operations.

  • Pallet-level inventory management
  • Barcode scanning workflows
  • Internal stock movements
  • Located in src/AsirGroupBundle/

TIP

There is also an AsirGroupModeBundle that provides mode-specific configuration for AsirGroup operations.

CmpBundle ​

Purpose: Comparison platform integration.

  • Product feed generation for comparison shopping engines
  • Price and availability export
  • Located in src/CmpBundle/

NotioBundle ​

Purpose: Notio supplier integration.

  • Supplier catalog synchronization
  • Stock and pricing updates
  • Located in src/NotioBundle/

MauroFerrettiSRLBundle ​

Purpose: Mauro Ferretti supplier integration.

  • Supplier-specific product import
  • Catalog synchronization
  • Located in src/MauroFerrettiSRLBundle/

ErpBundle ​

ErpBundle encapsulates marketplace-specific business workflows and ERP logic. It handles the domain-specific operations that go beyond simple CRUD.

Key responsibilities:

  • Marketplace integration workflows -- OAuth flows, order routing, return handling per marketplace
  • Shopping feed synchronization -- product data export to marketplaces (Amazon, Cdiscount, ManoMano)
  • Channel-specific services -- business rules that vary by sales channel
  • Doctrine repositories -- complex query logic for reporting and data aggregation
  • Controllers -- web interface endpoints for ERP operations

Located in src/ErpBundle/ with services organized in Services/ subdirectories by domain.


MeduseBundle ​

MeduseBundle manages synchronization with the Meduse inventory and back-office system.

Key responsibilities:

  • Queue processors -- processes tasks queued for Meduse synchronization
  • Inventory sync -- bidirectional stock level synchronization
  • Data import/export -- transfers orders, products, and operational data between Logidav and Meduse
  • Queue repositories -- SQL-backed queue management for Meduse-specific tasks

Located in src/MeduseBundle/.

WARNING

The meduse:queue:processor --action=runQueues command is the primary entry point for consuming Meduse queue tasks. It must run continuously in production. See Queue Model for details.


UserBundle ​

UserBundle provides authentication and user management, built on top of FOSUserBundle.

  • User entity and role management
  • Login/logout flows
  • Session handling (with SessionIdleHandler in EventBundle)
  • User impersonation for admin operations

Located in src/UserBundle/.


Naming Conventions ​

All bundles follow consistent naming patterns:

SuffixRoleExample
*Command.phpSymfony console commandImportSalesCommand
*Service.phpStateless business logicSaleService, ShipmentService
*Controller.phpHTTP endpointSaleController
*Repository.phpDoctrine query logicSaleRepository
*Api.phpExternal API clientStripeApi, BrtApi
*Event.phpDomain event classAfterSaleCreatedEvent
*Subscriber.phpEvent subscriberCorsSubscriber

Internal developer documentation for Menzzo systems.