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:
| Subdirectory | Role | Example Commands | Path |
|---|---|---|---|
Sale/ | Order import and lifecycle management | menzzo:v2:sales, menzzo:v2:sales:update | src/AppBundle/Command/Sale/ |
Product/ | Product catalog synchronization | menzzo:v2:products | src/AppBundle/Command/Product/ |
Stock/ | Stock level synchronization | Stock sync commands | src/AppBundle/Command/Stock/ |
Refund/ | Refund and return processing | Refund workflow commands | src/AppBundle/Command/Refund/ |
Queue/ | Queue management and processing | Queue processor commands | src/AppBundle/Command/Queue/ |
V2/ | Magento V2 API commands | V2 sales/product commands | src/AppBundle/Command/V2/ |
Chronopost/ | ChronoPost carrier operations | Label generation, tracking | src/AppBundle/Command/Chronopost/ |
Brt/ | BRT carrier operations | BRT shipping commands | src/AppBundle/Command/Brt/ |
Gls/ | GLS carrier operations | GLS shipping commands | src/AppBundle/Command/Gls/ |
Idf/ | Ile-de-France delivery operations | IDF appointment scheduling | src/AppBundle/Command/Idf/ |
Meduse/ | Meduse back-office sync | Meduse data import | src/AppBundle/Command/Meduse/ |
SaleSav/ | After-sale service (SAV) | SAV workflow commands | src/AppBundle/Command/SaleSav/ |
Statistic/ | Reporting and statistics | Data aggregation commands | src/AppBundle/Command/Statistic/ |
All critical commands use LockableTrait to prevent concurrent execution of the same cronjob.
Key Services
| Service | Role |
|---|---|
SaleService | Order import, creation, and update -- the central orchestrator for the sales pipeline |
ProductQtyLogService | Stock mutation journaling -- logs every inventory change with source tracking |
SaleProductAvailabilityService | Availability calculation and estimated delivery date computation |
Key Entities
| Entity | Description |
|---|---|
Sale | An order (maps to a Magento order) |
SaleProduct | A line item within an order |
Product | A product from the catalog |
SaleLog | Audit log of events on an order |
Queue | A 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:
| Category | Client | External System |
|---|---|---|
| Carriers | ChronoPostApi | ChronoPost shipping (labels, tracking) |
BrtApi | BRT carrier integration | |
GlsApi | GLS carrier integration | |
GeodisApi | Geodis carrier integration | |
TruskApi | Trusk heavy-item delivery | |
SdenApi | SDEN carrier integration | |
TamdisApi | Tamdis carrier integration | |
CoteCosyApi | CoteCosy delivery service | |
| Payment | StripeApi | Stripe payment processing |
HipayApi | Hipay payment gateway | |
KlarnaApi | Klarna buy-now-pay-later | |
ScalapayApi | Scalapay installment payments | |
AlmaApi | Alma payment in installments | |
AlfyApi | Alfy payment/fraud service | |
| E-commerce | MenzzoApi | Magento SOAP API (legacy V1) |
MenzzoApiV2 | Magento REST API (V2) | |
V2/SaleApi | Magento V2 sales endpoints | |
V2/ProductApi | Magento V2 product endpoints | |
V2/AttributeApi | Magento V2 attribute endpoints | |
| Translation | GoogleTranslateApi | Google Translate service |
DeelpTranslateApi | DeepL translation service | |
| AI | OpenAi | OpenAI API integration |
| Reviews | TrustpilotApi | Trustpilot review management |
ReviewsApi | Generic review API | |
| CRM | SellsyConnect | Sellsy CRM/invoicing |
Infrastructure Services (Services/)
| Service | Role |
|---|---|
RabbitMqService | Message broker adapter -- publishes and consumes RabbitMQ messages |
LogService | Centralized logging service for all bundles |
MailerService | Email dispatch service |
ShipmentService | Shipping label generation and carrier routing |
ShippingService | Shipping rate calculation and carrier selection |
SystemAlertService | Operator alerting for critical failures |
ChatwootService | Chatwoot live-chat integration |
PaylineService | Payline payment processing |
PdfService | PDF document generation |
ZplToPdfService | ZPL label to PDF conversion |
ConsoleService | Console output and command utilities |
MeduseService | Meduse back-office data sync |
IdfService | Ile-de-France delivery scheduling |
TransactionalService | Transaction management utilities |
CoreBundle Connection Diagram
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 Class | When It Fires | Typical Side Effects |
|---|---|---|
AfterSaleCreatedEvent | New order imported into Logidav | Stock reservation, notification dispatch |
AfterSaleUpdatedEvent | Order data changes (status, address, etc.) | Status sync to Magento, log entry |
AfterSaleCanceledEvent | Order is canceled | Stock release, refund trigger, marketplace notification |
AfterSaleAddressUpdateEvent | Shipping/billing address modified | Carrier label regeneration, Magento sync |
SaleProduct Events
| Event Class | When It Fires | Typical Side Effects |
|---|---|---|
AfterSaleProductCreatedFromSaleEvent | Line item created during order import | Stock decrement, availability recalculation |
AfterSaleProductUpdatedFromSaleEvent | Line item updated from Magento sync | Price/qty adjustment, log entry |
AfterSaleProductCanceledEvent | Line item canceled | Stock release, partial refund |
SaleProductChangedEvent | Any field change on a line item | Audit log, dependent recalculations |
SaleProductQtyChangedEvent | Quantity changes on a line item | Stock adjustment, availability update |
SaleProductSwitchEvent | Product substitution on a line item | Stock swap, notification |
Shipping Events
| Event Class | When It Fires | Typical Side Effects |
|---|---|---|
SaleProductsPreShippedEvent | Products marked as ready to ship | Label generation trigger |
SaleProductsShippedEvent | Products physically shipped | Tracking sync to Magento/marketplaces |
SaleProductsAfterTicketPrintedEvent | Shipping label printed | Status update, scan readiness |
SaleProductsPreShippedTicketPrintedEvent | Pre-ship label printed | Warehouse workflow update |
SaleProductsIdfAppointmentFixedEvent | IDF delivery appointment confirmed | Customer notification, carrier scheduling |
Product Events
| Event Class | When It Fires | Typical Side Effects |
|---|---|---|
ProductAvailabilityChangedEvent | Product availability status changes | Marketplace stock sync, storefront update |
ProductPriceChangedEvent | Product price modified | Marketplace price sync, margin recalculation |
ProductAutoEndEvent | Product auto-disabled (end of life) | Marketplace delisting, catalog update |
Calculation Events
| Event Class | When It Fires | Typical Side Effects |
|---|---|---|
CalculateSaleProductShippingAmountEvent | Shipping cost needs recalculation | Shipping amount update on line item |
Event Subscribers
EventBundle also contains infrastructure subscribers in src/EventBundle/EventSubscriber/:
| Subscriber | Purpose |
|---|---|
CorsSubscriber | CORS header management for API responses |
DataBaseSubscriber | Database connection management and error handling |
ExceptionSubscriber | Global exception handling and error formatting |
LoginSubscriber | User login audit logging |
RequestSubscriber | Request preprocessing and validation |
SessionIdleHandler | Session timeout management |
SwitchUserSubscriber | User impersonation audit logging |
Event Flow Diagram
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/
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/.
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
SessionIdleHandlerin EventBundle) - User impersonation for admin operations
Located in src/UserBundle/.
Naming Conventions
All bundles follow consistent naming patterns:
| Suffix | Role | Example |
|---|---|---|
*Command.php | Symfony console command | ImportSalesCommand |
*Service.php | Stateless business logic | SaleService, ShipmentService |
*Controller.php | HTTP endpoint | SaleController |
*Repository.php | Doctrine query logic | SaleRepository |
*Api.php | External API client | StripeApi, BrtApi |
*Event.php | Domain event class | AfterSaleCreatedEvent |
*Subscriber.php | Event subscriber | CorsSubscriber |