Melody Bridge: the operational backbone connecting Comarch Optima with SOTE
Melody Bridge is an advanced integration system (middleware) that fixes data inconsistency between ERP and the online store. It fully automated offer management for 21 suppliers.
📋 Project metrics
- Start: 20 June 2021 (Initial Repo)
- Status: Production deployment (skladmuzyczny.pl)
- Role: Lead Developer / Architect
- Goal: Single source of truth for prices and stock plus automated data exchange
🚀 Product journey
- Baseline sync — connected SQL Server (Comarch Optima) with MySQL (SOTE), removing manual stock rewrites.
- Integration Hell (21 suppliers) — unified import for CSV/XML/XLSX and web scraping to handle mass suppliers.
- Merchandising — business logic controlling product priorities and homepage exposure.
- B2B and reporting — external API for partners and sync to MongoDB for G4 reporting.
🎯 Business problem
Lack of automatic communication between Comarch Optima and SOTE meant the company “paid twice” for every product and price change.
❌ Pains and operational challenges
- Loss of customer trust: Selling products that weren’t physically available led to cancellations and bad reviews.
- Time drain: Manual price and stock updates for thousands of SKUs consumed key staff time.
- IT cost barrier: Off-the-shelf integrators or outsourcing were beyond budget and expensive to maintain.
- Google Merchant Center drift: Manually generated feeds went stale fast, burning Ads budgets.
- Supplier data chaos: 21 wholesalers, each with a different format, slowed price reactions.
💡 Why it works (product approach and architecture)
- Pragmatic distributed architecture (3 apps): optima-api near ERP (SQL Server), mysql-optima-api-client updates the shop DB from a constrained host, hit-request (orchestrator + Playwright scraping) on a dedicated VPS.
- “Single Common Language” pattern (ETL): Standardizes CSV/XML/Scraping into the ImportProduct model; adding a 22nd supplier needs no core changes.
- Dual Database (MySQL + MongoDB): MongoDB for aggregation and reporting (G4), offloading the production store DB.
📈 Business impact (ROI)
The system works 24/7 as an invisible employee.
| Metric | Before Melody Bridge | With Melody Bridge | Effect |
|---|---|---|---|
| Stock/price updates | Manual (every few days) | Automatic every 30 minutes | Eliminates “empty” sales |
| Supplier integration time | Days / manual rewrites | Full automation (ETL) | Scalable support for 21 wholesalers |
| GMC feeds (Google) | Generated manually/periodic | Always up to date (XML/CSV) | Higher ROI from Ads campaigns |
| IT operational costs | Dependent on pricey agencies | In-house system | Huge reduction of fixed costs |
"The Melody Bridge system became the operational backbone of e-commerce, eliminating hundreds of hours of manual work each month and restoring full customer trust in stock displayed online."
🛠️ Architecture & tech stack
- Core: Node.js + TypeScript + Express.js
- Databases: MySQL (SOTE), SQL Server (Comarch Optima), MongoDB (G4, reporting, auxiliary data)
- Integrations: Parsing CSV, XLSX, XML and web scraping (Playwright) triggered by external cron jobs
- Security: Server-to-Server with Bearer tokens and hashed auth in payload
🚀 Next steps
- Open architecture allows adding more wholesalers without touching the core.
- As infrastructure evolves, plan to optimize deployment (e.g., consolidating microservices).