Contact
Let's work together
B2B Product Data Export Platform

B2B Product Data Export Platform

Internal B2B web application automating the export of promotional product catalogs - CSV generation with docs and direct synchronization via PrestaShop WebService API for resellers.

2013 - 2016
~3 years (active development 2013-2015, maintenance until 2016)
Senior Software Engineer (~93% of application code)
PHP 5mynd-framework (custom MVC)MySQLApacheBootstrap 2jQuery 1.8jQuery UIDynatreePrestaShop WebService APIZend_MailSimpleTestSVN (Subversion)OVH Dedicated ServersLinux (cron, PID)

Lines of Code

28,794

PHP, JavaScript, CSS

Source Files

111

Application files (excl. framework)

Database Tables

36

30 read + 6 read/write

Supported Languages

5

FR, EN, DE, IT, ES

Presentation

Project definition and scope

The B2B Product Data Export Platform (internal name: `europeansourcing_export`) is an internal web application developed for European Sourcing (trade name: EuropeanTool), a major player in the promotional products industry based in Agen and Bordeaux, France.

This application is the product data export module of the European Sourcing platform. It enables resellers (promotional product distributors) to export supplier product catalogs to their own systems - either as CSV files (with images) or through direct synchronization via the PrestaShop WebService API.

The system manages the complete lifecycle from export request to delivery: authentication, validation, billing, batch execution, progress monitoring, and automatic email notification at every step.

Domain

Promotional products & textiles - sourcing, distribution, B2B e-commerce

Target Users

B2B resellers (promotional product distributors) subscribed to European Sourcing, and the EuropeanTool commercial & technical team (administrators)

Functional Scope
CSV Export with ZIP & Images
PrestaShop WebService Sync
Reseller Quota Management
Billing & Validation Workflow
Parallel Export Processing
Real-Time Process Monitoring
Category Mapping (ES ↔ PrestaShop)
Multi-Step Email Notifications
Multi-Language Product Data (5 languages)
Architecture Overview
MVC monolithic architecture with CLI batch processing and PrestaShop API integration
File Type Distribution

Objectives, Context, Stakes & Risks

Strategic vision and operational constraints

Objectives
  • Enable subscribed resellers to export product data (data + docs) from selected suppliers as CSV or via PrestaShop WebService
  • Automate catalog synchronization between the European Sourcing database and reseller PrestaShop shops
  • Manage a quota system to control export volumes per reseller
  • Provide a complete validation workflow: request → confirmation → billing → execution → email delivery
  • Support parallel execution of up to 6 simultaneous exports with robust process management (PID, kill, zombie detection)
Export Lifecycle (State Machine)
Complete export lifecycle: from request to delivery with error recovery and zombie detection
Context

The project is part of a larger European Sourcing ecosystem comprising 15+ interconnected applications: the main platform, extranet, reseller front-end, translation module, supplier back-office, API, and many others.

The application relies on a custom PHP MVC framework (mynd-framework) and uses the shared `europeansourcing` MySQL database hosted on OVH dedicated servers. The architecture follows a classic monolithic PHP pattern with CLI scripts for background batch processing.

An internal DokuWiki hosted on `wikidev.es-recette.com` served as shared technical documentation. The `es_export` page specifically documents this module, signed by Jose DA COSTA on 2016/11/03.

Stakes
  • Revenue generation - exports are a billed service. The workflow explicitly includes invoice sending before triggering execution
  • B2B client satisfaction - export quality and reliability directly impacts resellers' ability to populate their online shops
  • Data volume - the system handles up to 500,000 product references with docs
  • Multi-language support - exports manage 5 languages (FR, EN, DE, IT, ES)
Risks

Performance

Exports manipulate large data volumes (docs + CSV). Memory limit set to unlimited (-1) with explicit memory error handling

Concurrency & Deadlocks

Maximum 6 parallel exports, 3 per IP server, 1 per PrestaShop URL - designed to prevent MySQL deadlocks

Zombie Processes

Detection mechanism via /proc/PID automatically resets stuck exports to "asked" status with "zombie" label

Security

Authentication using MD5 (without salt), shell command execution (exec) from PHP code for process management

Database Schema (Export Tables)
Entity-relationship diagram of the 6 export-specific tables (read/write) linked to shared product and reseller tables

Implementation Phases

Concrete actions and personal contributions

Project Progress Timeline
Phase 1
Phase 1 - CSV Export
~2013
  • Developed the product data export module in CSV format from scratch
  • Implemented automatic ZIP generation containing CSV data and a separate ZIP for product docs
  • Built the complete workflow: request → admin validation → batch execution → email delivery with download links
  • Designed the dual authentication system (resellers via Contact + administrators via Extranet)
Phase 2
Phase 2 - CSV PrestaShop Format
~2013-2014
  • Added a second CSV export format specifically structured for PrestaShop import
  • Created the dedicated CSV_Prestashop class with PrestaShop-compatible field mapping
  • First exports generated on February 14, 2014 (export-akor-csv)
Phase 3
Phase 3 - PrestaShop WebService Integration
~2014
  • Integrated the PrestaShop WebService API for direct product synchronization
  • Implemented full CRUD operations: products, categories, suppliers, brands, attributes, and docs via REST/XML API
  • Built multi-shop support for PrestaShop (shop groups)
  • Developed the category mapping engine between European Sourcing and PrestaShop taxonomies
  • Implemented incremental update system based on configurable interval (in days)
  • Designed the concurrency management system: max 6 parallel exports, max 3 per IP, deadlock prevention
Phase 4
Phase 4 - Administration Tools
~2014
  • Built the admin interface for bulk status management
  • Developed purge tools: delete all ES products, categories, suppliers, brands, and attributes on a remote PrestaShop WebService
  • Implemented real-time process monitoring (ps aux integration)
  • Created the zombie process detection and automatic recovery mechanism
Phase 5
Phase 5 - Notifications & Quotas
~Q3 2014
  • Implemented the per-reseller quota system (CSV and WebService quotas managed separately)
  • Built the automatic email notification system at each workflow step
  • Coordinated with Dominique for additional commercial team notifications (September 2014)
WebService Export Sequence
Complete WebService export flow: from reseller request through admin validation, cron execution, PrestaShop API synchronization, to email notification

Team & Interactions

Collaboration and stakeholder ecosystem

The team was compact: 3 developers + 2 commercial/admin staff, operating without formal Agile methodology but using a bugtracker for issue tracking (reference #0000919 found in code).

Code Contribution Distribution
Development Team
~93%Jose DA COSTA

Lead Developer - ~93% of application code (~11,800 / 12,632 lines). Designed the architecture, built all controllers, models, views, CLI scripts, and the PrestaShop integration. Authored the internal wiki documentation.

~6%Guillaume (wamania)

Framework Author & Developer - Created the mynd-framework (MVC framework, ~5,663 lines) shared across the ecosystem. Set up the initial project structure and contributed ~6% of application code.

~1%Dominique (dom)

Developer (punctual interventions) - 7 identified contributions (~100-150 lines): email notification additions, bugtracker #919 fixes, duplicate content error handling.

Commercial & Admin Team
Carine Ruffier

Commercial contact - Email recipient for all export notifications (requests, confirmations, errors)

Celine

Administrative support - Email recipient for export notifications across all environments

External Stakeholders

B2B resellers using the module to populate their PrestaShop shops, promotional product suppliers (Anda, ELASTO FORM, KARL KNAUER, PAUL STRICKER, PORTIA, Troika, etc.), OVH (production hosting), Systonic (historical infrastructure, SVN server).

Results & Impact

Measurable outcomes for the project and the business

Features Delivered by Category
Delivered Features
  • Complete dual authentication system (resellers + administrators)
  • CSV export module with automatic ZIP generation (data + docs)
  • CSV export in PrestaShop-specific format
  • PrestaShop WebService synchronization via REST/XML API
  • Full export lifecycle management (asked → confirmed → running → scheduled/none/error)
  • Admin interface with real-time process monitoring
  • PrestaShop purge tools (products, categories, suppliers, brands, attributes)
  • Per-reseller quota system (CSV and WebService separately)
  • Multi-recipient email notification system
  • Cross-platform category mapping engine (European Sourcing ↔ PrestaShop)
  • Automatic zombie process detection and recovery
  • Multi-language product data support (5 languages)
  • PrestaShop multi-shop support
  • Configurable incremental update system
Technical Metrics
Business Impact
  • Direct revenue generation - each export is a billed service with integrated invoicing workflow
  • Catalog capacity - system dimensioned for up to 500,000 product references
  • Replaced a costly manual process - automated the integration of supplier catalogs into reseller shops
  • B2B client enablement - resellers could automatically populate their PrestaShop e-commerce sites with up-to-date product data and docs
Personal Growth
  • First experience designing and building a complete B2B data integration platform end-to-end
  • Mastered the PrestaShop WebService API (REST/XML) with all its quirks and undocumented behaviors
  • Learned concurrent process management in PHP - PID tracking, zombie detection, deadlock prevention
  • Developed deep understanding of B2B e-commerce workflows: quotas, billing integration, multi-language catalogs
  • Strengthened MySQL skills with complex queries (subqueries, multi-table joins, FIELD ORDER)
  • Gained experience managing a production system under real business pressure (billed service = zero tolerance for downtime)
Skills Mobilized (Radar)

Project Aftermath

What happened after delivery

Immediate aftermath: The platform was actively used by European Sourcing resellers for catalog synchronization. The notification system added in September 2014 shows the platform was generating real commercial activity with the sales team being notified of every export request.

Medium term: The last wiki update (November 2016) indicates the platform remained operational for at least 2 years after the main development phase. The codebase was maintained but no major features were added after Q4 2014.

Current state: The project is archived (NAS backup dated February 2015). European Sourcing has since evolved its technology stack. The export module served its purpose during a critical growth phase of the company, enabling dozens of resellers to integrate promotional product catalogs into their e-commerce platforms.

Legacy: The patterns developed for this project - concurrent batch processing, zombie detection, workflow state machines, cross-platform category mapping - proved to be reusable concepts in later projects. The experience of building a revenue-generating B2B tool shaped a product-oriented mindset that proved valuable in subsequent roles.

Infrastructure & Deployment
Development to production deployment architecture: local workstations, OVH servers, and reseller PrestaShop shops
Architecture Complexity Distribution

Critical Reflection

Retrospective analysis and lessons learned

Strengths
  • Clean modular architecture - clear separation between web interface (controllers/views) and CLI execution scripts, enabling background exports without blocking the UI
  • Robust concurrency management - the multi-level limitation system (6 max, 3 per IP, 1 per URL) with MySQL deadlock detection demonstrates operational maturity gained through real production experience
  • Zombie process detection - the /proc/PID verification mechanism is an elegant solution to detect stuck exports and automatically recover them
  • Complete business workflow - the export lifecycle (asked → confirmed → running → scheduled → none/error) with email notifications at each step represents a well-implemented business process
  • Quota system - fine-grained per-reseller quota management (CSV and WebService separately) shows understanding of B2B commercial constraints
Areas for Improvement
  • Security - authentication uses MD5 without salt (obsolete and vulnerable). Shell exec() calls with incompletely sanitized parameters (PID) present a command injection risk
  • Framework technical debt - the custom mynd-framework, while functional, lacks the robustness and documentation of community frameworks (Symfony, Laravel)
  • No application tests - the only tests present belong to the framework ORM. The export business code has no unit or integration tests
  • Procedural CLI code - CLI scripts use many global variables and goto statements (labels mail:, nomail:), reducing maintainability
  • No message queue - exports are managed via direct SQL queries rather than a proper queue system (RabbitMQ, Redis), limiting scalability
What I Would Do Differently
  • Use a standard PHP framework (Symfony or Laravel) instead of a custom framework to benefit from the ecosystem, documentation, and community support
  • Implement a proper message queue (RabbitMQ, Beanstalkd) for asynchronous export management
  • Use bcrypt/argon2 for password hashing instead of MD5
  • Add functional tests on the export workflow
  • Set up a CI/CD pipeline to automate deployments
  • Use a process supervisor (Supervisord) instead of managing processes directly from PHP code
Lasting Lessons
  • Concurrent batch processing is a complex problem requiring a multi-level approach (global limits + per-IP + per-URL + zombie detection)
  • Third-party API integration (PrestaShop WebService) requires fine-grained error handling, retry logic, and version compatibility management
  • A business workflow involving billing must be rock-solid: every step must be traced, errors must be notified, and the system must recover gracefully after failures
  • Cross-platform category mapping is a recurring challenge in B2B e-commerce integrations

Skills applied

Technical and soft skills applied

Image gallery

Project screenshots and visuals